@antv/g-canvas 1.9.4 → 1.9.6

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.
@@ -1,13 +1,13 @@
1
1
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Canvas2D={}),t.window.G)}(this,(function(t,e){"use strict";function r(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new O(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function p(){}function v(){}var d={};u(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==e&&n.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return p.prototype=v,u(m,"constructor",v),u(v,"constructor",p),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function c(t,e,r,n){var o,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(3>i?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function s(){for(var t=0,e=0,r=arguments.length;r>e;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;r>e;e++)for(var i=arguments[e],a=0,c=i.length;c>a;a++,o++)n[o]=i[a];return n}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var l=e.Syringe.defineToken(""),f=e.Syringe.defineToken("");function p(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function v(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var o=r>n?r:n,i=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI)}}function d(t,r){var n,o,i=r.x1,a=r.y1,c=r.x2,u=r.y2,s=r.defX,h=void 0===s?0:s,l=r.defY,f=void 0===l?0:l,p=r.markerStart,v=r.markerEnd,d=r.markerStartOffset,y=r.markerEndOffset,g=0,m=0,w=0,x=0,b=0;p&&p instanceof e.DisplayObject&&d&&(n=c-i,o=u-a,b=Math.atan2(o,n),g=Math.cos(b)*(d||0),m=Math.sin(b)*(d||0)),v&&v instanceof e.DisplayObject&&y&&(n=i-c,o=a-u,b=Math.atan2(o,n),w=Math.cos(b)*(y||0),x=Math.sin(b)*(y||0)),t.moveTo(i-h+g,a-f+m),t.lineTo(c-h+w,u-f+x)}function y(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,u=r.markerEnd,s=r.markerStartOffset,h=r.markerEndOffset,l=r.path,f=l.zCommandIndexes,p=[].concat(l.curve);f.forEach((function(t,e){p.splice(t+e,1,["Z"])}));var v,d,y=p.length&&"Z"===p[p.length-1][0],g=0,m=0,w=0,x=0,b=0;if(c&&c instanceof e.DisplayObject&&s){var E=c.parentNode.getStartTangent(),L=E[0],O=E[1];v=L[0]-O[0],d=L[1]-O[1],b=Math.atan2(d,v),g=Math.cos(b)*(s||0),m=Math.sin(b)*(s||0)}if(u&&u instanceof e.DisplayObject&&h){var S=u.parentNode.getEndTangent(),P=S[0],k=S[1];v=P[0]-k[0],d=P[1]-k[1],b=Math.atan2(d,v),w=Math.cos(b)*(h||0),x=Math.sin(b)*(h||0)}for(var C=0;p.length>C;C++){var M=p[C];switch(M[0]){case"M":t.moveTo(M[1]-o+g,M[2]-a+m);break;case"C":t.bezierCurveTo(M[1]-o,M[2]-a,M[3]-o,M[4]-a,M[5]-o+(C===p.length-(y?2:1)?w:0),M[6]-a+(C===p.length-(y?2:1)?x:0));break;case"Z":t.closePath()}}}function g(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,u=void 0===c?0:c,s=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,v=p.length,d=p[0][0]-a,y=p[0][1]-u,g=p[v-1][0]-a,m=p[v-1][1]-u,w=0,x=0,b=0,E=0,L=0;s&&s instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[v-1][0]-p[0][0],o=p[v-1][1]-p[0][1],L=Math.atan2(o,n),b=Math.cos(L)*(f||0),E=Math.sin(L)*(f||0)),t.moveTo(d+(w||b),y+(x||E));for(var O=1;v-1>O;O++){var S=p[O];t.lineTo(S[0]-a,S[1]-u)}t.lineTo(g,m)}function m(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,u=void 0===c?0:c,s=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,v=p.length,d=p[0][0]-a,y=p[0][1]-u,g=p[v-1][0]-a,m=p[v-1][1]-u,w=0,x=0,b=0,E=0,L=0;s&&s instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[v-2][0]-p[v-1][0],o=p[v-2][1]-p[v-1][1],L=Math.atan2(o,n),b=Math.cos(L)*(f||0),E=Math.sin(L)*(f||0)),t.moveTo(d+w,y+x);for(var O=1;v-1>O;O++){var S=p[O];t.lineTo(S[0]-a,S[1]-u)}t.lineTo(g+b,m+E)}var w={}.toString,x=function(t,e){return w.call(t)==="[object "+e+"]"},b=function(t){return x(t,"Function")};function E(t,e){var r;if(t)if(r=t,Array.isArray?Array.isArray(r):x(r,"Array"))for(var n=0,o=t.length;o>n&&!1!==e(t[n],n);n++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var L,O=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return E(t,(function(r,n){b(t)&&"prototype"===n||e.push(r)})),e};function S(t,e){var r=e.radius,n=e.width,o=e.height,i=n,a=o;if(r&&r.some((function(t){return 0!==t}))){var c=n>0?1:-1,u=o>0?1:-1,s=c+u===0,h=r.map((function(t){return e=t,r=0,n=Math.min(Math.abs(i)/2,Math.abs(a)/2),r>e?r:e>n?n:e;var e,r,n})),l=h[0],f=h[1],p=h[2],v=h[3];t.moveTo(c*l,0),t.lineTo(i-c*f,0),0!==f&&t.arc(i-c*f,u*f,f,-u*Math.PI/2,c>0?0:Math.PI,s),t.lineTo(i,a-u*p),0!==p&&t.arc(i-c*p,a-u*p,p,c>0?0:Math.PI,u>0?Math.PI/2:1.5*Math.PI,s),t.lineTo(c*v,a),0!==v&&t.arc(c*v,a-u*v,v,u>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,s),t.lineTo(0,u*l),0!==l&&t.arc(c*l,u*l,l,c>0?Math.PI:0,u>0?1.5*Math.PI:Math.PI/2,s)}else t.rect(0,0,i,a)}!function(t,e){if(!b(t))throw new TypeError("Expected a function");var r=function r(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var c=t.apply(this,n);return a.set(i,c),c};r.cache=new Map}((function(t,e){void 0===e&&(e={});var r,n=e.fontSize,o=e.fontFamily,i=e.fontWeight,a=e.fontStyle,c=e.fontVariant;return L||(L=document.createElement("canvas").getContext("2d")),L.font=[a,c,i,n+"px",o].join(" "),L.measureText((r=t,x(r,"String")?t:"")).width}),(function(t,e){return void 0===e&&(e={}),s([t],O(e)).join("")}));var P=e.Module((function(t){t({token:{token:f,named:e.Shape.CIRCLE},useValue:p}),t({token:{token:f,named:e.Shape.ELLIPSE},useValue:v}),t({token:{token:f,named:e.Shape.RECT},useValue:S}),t({token:{token:f,named:e.Shape.LINE},useValue:d}),t({token:{token:f,named:e.Shape.POLYLINE},useValue:m}),t({token:{token:f,named:e.Shape.POLYGON},useValue:g}),t({token:{token:f,named:e.Shape.PATH},useValue:y}),t({token:l,useFactory:function(t){return function(e){return t.container.isBoundNamed(f,e)?t.container.getNamed(f,e):null}}})})),k=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,h(e,r);var o=n.prototype;return o.init=function(){this.container.load(P,!0)},o.destroy=function(){this.container.unload(P)},n}(e.AbstractRendererPlugin),C=Object.freeze({__proto__:null,PathGenerator:f,PathGeneratorFactory:l,Plugin:k});function M(){
3
+ r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new P(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function d(){}function p(){}var v={};s(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(O([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=p.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,s(m,"constructor",p),s(p,"constructor",d),d.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function c(t,e,r,n){var o,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(3>i?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function s(t,e){return function(r,n){e(r,n,t)}}var u={}.toString,h=function(t){return null==t},l=function(t){return e="String",u.call(t)==="[object "+e+"]";var e},f=function(t,e,r){return e>t?e:t>r?r:t};function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var p=e.Syringe.defineToken(""),v=e.Syringe.defineToken("");function y(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function g(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var o=r>n?r:n,i=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI)}}function m(t,r){var n,o,i=r.x1,a=r.y1,c=r.x2,s=r.y2,u=r.defX,h=void 0===u?0:u,l=r.defY,f=void 0===l?0:l,d=r.markerStart,p=r.markerEnd,v=r.markerStartOffset,y=r.markerEndOffset,g=0,m=0,w=0,x=0,b=0;d&&d instanceof e.DisplayObject&&v&&(n=c-i,o=s-a,b=Math.atan2(o,n),g=Math.cos(b)*(v||0),m=Math.sin(b)*(v||0)),p&&p instanceof e.DisplayObject&&y&&(n=i-c,o=a-s,b=Math.atan2(o,n),w=Math.cos(b)*(y||0),x=Math.sin(b)*(y||0)),t.moveTo(i-h+g,a-f+m),t.lineTo(c-h+w,s-f+x)}function w(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.path,f=l.zCommandIndexes,d=[].concat(l.curve);f.forEach((function(t,e){d.splice(t+e,1,["Z"])}));var p,v,y=d.length&&"Z"===d[d.length-1][0],g=0,m=0,w=0,x=0,b=0;if(c&&c instanceof e.DisplayObject&&u){var E=c.parentNode.getStartTangent(),L=E[0],P=E[1];p=L[0]-P[0],v=L[1]-P[1],b=Math.atan2(v,p),g=Math.cos(b)*(u||0),m=Math.sin(b)*(u||0)}if(s&&s instanceof e.DisplayObject&&h){var O=s.parentNode.getEndTangent(),S=O[0],C=O[1];p=S[0]-C[0],v=S[1]-C[1],b=Math.atan2(v,p),w=Math.cos(b)*(h||0),x=Math.sin(b)*(h||0)}for(var k=0;d.length>k;k++){var M=d[k];switch(M[0]){case"M":t.moveTo(M[1]-o+g,M[2]-a+m);break;case"C":t.bezierCurveTo(M[1]-o,M[2]-a,M[3]-o,M[4]-a,M[5]-o+(k===d.length-(y?2:1)?w:0),M[6]-a+(k===d.length-(y?2:1)?x:0));break;case"Z":t.closePath()}}}function x(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,d=r.points.points,p=d.length,v=d[0][0]-a,y=d[0][1]-s,g=d[p-1][0]-a,m=d[p-1][1]-s,w=0,x=0,b=0,E=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=d[1][0]-d[0][0],o=d[1][1]-d[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=d[p-1][0]-d[0][0],o=d[p-1][1]-d[0][1],L=Math.atan2(o,n),b=Math.cos(L)*(f||0),E=Math.sin(L)*(f||0)),t.moveTo(v+(w||b),y+(x||E));for(var P=1;p-1>P;P++){var O=d[P];t.lineTo(O[0]-a,O[1]-s)}t.lineTo(g,m)}function b(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,d=r.points.points,p=d.length,v=d[0][0]-a,y=d[0][1]-s,g=d[p-1][0]-a,m=d[p-1][1]-s,w=0,x=0,b=0,E=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=d[1][0]-d[0][0],o=d[1][1]-d[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=d[p-2][0]-d[p-1][0],o=d[p-2][1]-d[p-1][1],L=Math.atan2(o,n),b=Math.cos(L)*(f||0),E=Math.sin(L)*(f||0)),t.moveTo(v+w,y+x);for(var P=1;p-1>P;P++){var O=d[P];t.lineTo(O[0]-a,O[1]-s)}t.lineTo(g+b,m+E)}function E(t,e){var r=e.radius,n=e.width,o=e.height,i=n,a=o;if(r&&r.some((function(t){return 0!==t}))){var c=n>0?1:-1,s=o>0?1:-1,u=c+s===0,h=r.map((function(t){return f(t,0,Math.min(Math.abs(i)/2,Math.abs(a)/2))})),l=h[0],d=h[1],p=h[2],v=h[3];t.moveTo(c*l,0),t.lineTo(i-c*d,0),0!==d&&t.arc(i-c*d,s*d,d,-s*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(i,a-s*p),0!==p&&t.arc(i-c*p,a-s*p,p,c>0?0:Math.PI,s>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,a),0!==v&&t.arc(c*v,a-s*v,v,s>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,s*l),0!==l&&t.arc(c*l,s*l,l,c>0?Math.PI:0,s>0?1.5*Math.PI:Math.PI/2,u)}else t.rect(0,0,i,a)}var L=e.Module((function(t){t({token:{token:v,named:e.Shape.CIRCLE},useValue:y}),t({token:{token:v,named:e.Shape.ELLIPSE},useValue:g}),t({token:{token:v,named:e.Shape.RECT},useValue:E}),t({token:{token:v,named:e.Shape.LINE},useValue:m}),t({token:{token:v,named:e.Shape.POLYLINE},useValue:b}),t({token:{token:v,named:e.Shape.POLYGON},useValue:x}),t({token:{token:v,named:e.Shape.PATH},useValue:w}),t({token:p,useFactory:function(t){return function(e){return t.container.isBoundNamed(v,e)?t.container.getNamed(v,e):null}}})})),P=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,d(e,r);var o=n.prototype;return o.init=function(){this.container.load(L,!0)},o.destroy=function(){this.container.unload(L)},n}(e.AbstractRendererPlugin),O=Object.freeze({__proto__:null,PathGenerator:v,PathGeneratorFactory:p,Plugin:P});function S(){
4
4
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
5
- M=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function l(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function j(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function _(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var N="undefined"!=typeof Float32Array?Float32Array:Array;function R(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],u=e[5],s=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],d=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],b=r[2],E=r[3];return t[0]=w*n+x*c+b*l+E*d,t[1]=w*o+x*u+b*f+E*y,t[2]=w*i+x*s+b*p+E*g,t[3]=w*a+x*h+b*v+E*m,t[4]=(w=r[4])*n+(x=r[5])*c+(b=r[6])*l+(E=r[7])*d,t[5]=w*o+x*u+b*f+E*y,t[6]=w*i+x*s+b*p+E*g,t[7]=w*a+x*h+b*v+E*m,t[8]=(w=r[8])*n+(x=r[9])*c+(b=r[10])*l+(E=r[11])*d,t[9]=w*o+x*u+b*f+E*y,t[10]=w*i+x*s+b*p+E*g,t[11]=w*a+x*h+b*v+E*m,t[12]=(w=r[12])*n+(x=r[13])*c+(b=r[14])*l+(E=r[15])*d,t[13]=w*o+x*u+b*f+E*y,t[14]=w*i+x*s+b*p+E*g,t[15]=w*a+x*h+b*v+E*m,t}function F(){var t=new N(3);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function I(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var G;G=F();!function(){var t,e=(t=new N(2),N!=Float32Array&&(t[0]=0,t[1]=0),t)}();var B,D,W,Y=e.Syringe.defineToken(""),$=F(),H=F(),U=F(),z=(W=new N(16),N!=Float32Array&&(W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=0,W[12]=0,W[13]=0,W[14]=0),W[0]=1,W[5]=1,W[10]=1,W[15]=1,W),V=(B=function(){function t(t,r,n,o,i){var a=this;this.renderingContext=void 0,this.canvasConfig=void 0,this.offscreenCanvas=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.pathGeneratorFactoryCache={},this.isHit=function(t,r,n){var o=a.pointInPathPickerFactory(t.nodeName);if(o){var i=function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],c=e[5],u=e[6],s=e[7],h=e[8],l=e[9],f=e[10],p=e[11],v=e[12],d=e[13],y=e[14],g=e[15],m=r*c-n*a,w=r*u-o*a,x=r*s-i*a,b=n*u-o*c,E=n*s-i*c,L=o*s-i*u,O=h*d-l*v,S=h*y-f*v,P=h*g-p*v,k=l*y-f*d,C=l*g-p*d,M=f*g-p*y,j=m*M-w*C+x*k+b*P-E*S+L*O;return j?(t[0]=(c*M-u*C+s*k)*(j=1/j),t[1]=(o*C-n*M-i*k)*j,t[2]=(d*L-y*E+g*b)*j,t[3]=(f*E-l*L-p*b)*j,t[4]=(u*P-a*M-s*S)*j,t[5]=(r*M-o*P+i*S)*j,t[6]=(y*x-v*L-g*w)*j,t[7]=(h*L-f*x+p*w)*j,t[8]=(a*C-c*P+s*O)*j,t[9]=(n*P-r*C-i*O)*j,t[10]=(v*E-d*x+g*m)*j,t[11]=(l*x-h*E-p*m)*j,t[12]=(c*S-a*k-u*O)*j,t[13]=(r*k-n*S+o*O)*j,t[14]=(d*w-v*b-y*m)*j,t[15]=(h*b-l*w+f*m)*j,t):null}(z,n),c=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}(H,I(U,r[0],r[1],0),i),u=t.getGeometryBounds().halfExtents,s=t.parsedStyle.anchor;if(c[0]+=(s&&s[0]||0)*u[0]*2,c[1]+=(s&&s[1]||0)*u[1]*2,o(t,new e.Point(c[0],c[1]),a.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var r=a.offscreenCanvas.getOrCreateContext(a.canvasConfig.offscreenCanvas);void 0===a.pathGeneratorFactoryCache[t.nodeName]&&(a.pathGeneratorFactoryCache[t.nodeName]=a.pathGeneratorFactory(t.nodeName));var n=a.pathGeneratorFactoryCache[t.nodeName];return n&&(r.beginPath(),n(r,t.parsedStyle),r.closePath()),r.isPointInPath(e.x,e.y)},this.renderingContext=t,this.canvasConfig=r,this.offscreenCanvas=n,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=i}var r=t.prototype;return r.apply=function(t){var e,r=this,n=null===(e=this.renderingContext.root)||void 0===e?void 0:e.ownerDocument;t.hooks.pick.tapPromise(D.tag,function(){var t,e=(t=M().mark((function t(e){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(n,e));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){j(i,n,o,a,c,"next",t)}function c(t){j(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),t.hooks.pickSync.tap(D.tag,(function(t){return r.pick(n,t)}))},r.pick=function(t,r){for(var n,o=r.topmost,i=r.position,a=I($,i.x,i.y,0),c=[],u=_(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(n=u()).done;){var s=n.value,h=s.getWorldTransform();if(this.isHit(s,a,h)){var l=e.findClosestClipPathTarget(s);if(l){var f=l.style.clipPath;if(h=R(z,l===s?h:l.getWorldTransform(),f.getLocalTransform()),this.isHit(f,a,h)){if(o)return r.picked=[s],r;c.push(s)}}else{if(o)return r.picked=[s],r;c.push(s)}}}return r.picked=c,r},t}(),B.tag="CanvasPicker",D=B);function X(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function q(t,e){return.001>Math.abs(t-e)}function Q(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}V=D=c([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.RenderingContext)),u(1,e.inject(e.CanvasConfig)),u(2,e.inject(e.OffscreenCanvasCreator)),u(3,e.inject(l)),u(4,e.inject(Y))],V);var Z=function(t,e,r,n,o){return{x:(1-o)*t+o*r,y:(1-o)*e+o*n}},J=function(t,e,r,n,o,i){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((o-t)*(o-t)+(i-e)*(i-e));var c=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o}(c,c),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([o-t,i-e],c))};function K(t,e,r,n,o){var i=1-o;return i*i*i*t+3*e*o*i*i+3*r*o*o*i+n*o*o*o}function tt(t,e,r,n,o){var i=1-o;return 3*(i*i*(e-t)+2*i*o*(r-e)+o*o*(n-r))}function et(t,e,r,n){var o,i,a,c=-3*t+9*e-9*r+3*n,u=6*t-12*e+6*r,s=3*e-3*t,h=[];if(q(c,0))q(u,0)||0>(o=-s/u)||o>1||h.push(o);else{var l=u*u-4*c*s;q(l,0)?h.push(-u/(2*c)):l>0&&(i=(-u-(a=Math.sqrt(l)))/(2*c),0>(o=(-u+a)/(2*c))||o>1||h.push(o),0>i||i>1||h.push(i))}return h}function rt(t,e,r,n,o,i,a,c,u){var s=K(t,r,o,a,u),h=K(e,n,i,c,u),l=Z(t,e,r,n,u),f=Z(r,n,o,i,u),p=Z(o,i,a,c,u),v=Z(l.x,l.y,f.x,f.y,u),d=Z(f.x,f.y,p.x,p.y,u);return[[t,e,l.x,l.y,v.x,v.y,s,h],[s,h,d.x,d.y,p.x,p.y,a,c]]}function nt(t,e,r,n,o,i,a,c,u){if(0===u)return function(t,e){for(var r=0,n=t.length,o=0;n>o;o++)r+=X(t[o],e[o],t[(o+1)%n],e[(o+1)%n]);return r/2}([t,r,o,a],[e,n,i,c]);var s=rt(t,e,r,n,o,i,a,c,.5),h=[].concat(s[0],[u-1]),l=[].concat(s[1],[u-1]);return nt.apply(void 0,h)+nt.apply(void 0,l)}var ot={extrema:et,box:function(t,e,r,n,o,i,a,c){for(var u=[t,a],s=[e,c],h=et(t,r,o,a),l=et(e,n,i,c),f=0;h.length>f;f++)u.push(K(t,r,o,a,h[f]));for(var p=0;l.length>p;p++)s.push(K(e,n,i,c,l[p]));return Q(u,s)},length:function(t,e,r,n,o,i,a,c){return nt(t,e,r,n,o,i,a,c,3)},nearestPoint:function(t,e,r,n,o,i,a,c,u,s,h){return function(t,e,r,n,o,i){var a=-1,c=1/0,u=[r,n],s=20;i&&i>200&&(s=i/10);for(var h=1/s,l=h/10,f=0;s>=f;f++){var p=f*h,v=[o.apply(void 0,t.concat([p])),o.apply(void 0,e.concat([p]))],d=X(u[0],u[1],v[0],v[1]);c>d&&(a=p,c=d)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}c=1/0;for(var g=0;32>g&&l>=1e-4;g++){var m=a-l,w=a+l,x=[o.apply(void 0,t.concat([m])),o.apply(void 0,e.concat([m]))],b=X(u[0],u[1],x[0],x[1]);if(m>=0&&c>b)a=m,c=b;else{var E=[o.apply(void 0,t.concat([w])),o.apply(void 0,e.concat([w]))],L=X(u[0],u[1],E[0],E[1]);1>=w&&c>L?(a=w,c=L):l*=.5}}return{x:o.apply(void 0,t.concat([a])),y:o.apply(void 0,e.concat([a]))}}([t,r,o,a],[e,n,i,c],u,s,K,h)},pointDistance:function(t,e,r,n,o,i,a,c,u,s,h){var l=this.nearestPoint(t,e,r,n,o,i,a,c,u,s,h);return X(l.x,l.y,u,s)},interpolationAt:K,pointAt:function(t,e,r,n,o,i,a,c,u){return{x:K(t,r,o,a,u),y:K(e,n,i,c,u)}},divide:function(t,e,r,n,o,i,a,c,u){return rt(t,e,r,n,o,i,a,c,u)},tangentAngle:function(t,e,r,n,o,i,a,c,u){var s=tt(t,r,o,a,u),h=tt(e,n,i,c,u);return(Math.atan2(h,s)+2*Math.PI)%(2*Math.PI)}};function it(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function at(t,e,r,n,o,i){return!(t>o||o>t+r||e>i||i>e+n)}function ct(t,e,r,n,o,i,a,c){var u=(Math.atan2(c-e,a-t)+2*Math.PI)%(2*Math.PI);if(n>u||u>o)return!1;var s={x:t+r*Math.cos(u),y:e+r*Math.sin(u)};return it(s.x,s.y,a,c)<=i/2}function ut(t,e,r,n,o,i,a){var c=Math.min(t,r),u=Math.max(t,r),s=Math.min(e,n),h=Math.max(e,n),l=o/2;return!(c-l>i||i>u+l||s-l>a||a>h+l)&&J(t,e,r,n,i,a)<=o/2}function st(t,e,r,n,o){var i=t.length;if(2>i)return!1;for(var a=0;i-1>a;a++){if(ut(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(o){var c=t[0],u=t[i-1];if(ut(c[0],c[1],u[0],u[1],e,r,n))return!0}return!1}function ht(t){return 1e-6>Math.abs(t)?0:0>t?-1:1}function lt(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function ft(t,e,r){var n=!1,o=t.length;if(2>=o)return!1;for(var i=0;o>i;i++){var a=t[i],c=t[(i+1)%o];if(lt(a,c,[e,r]))return!0;ht(a[1]-r)>0!=ht(c[1]-r)>0&&0>ht(e-(r-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(n=!n)}return n}function pt(t,e,r){for(var n=!1,o=0;t.length>o;o++){if(n=ft(t[o],e,r))break}return n}function vt(t,r){var n=t.parsedStyle,o=n.r,i=n.fill,a=n.stroke,c=n.clipPathTargets,u=n.pointerEvents,s=((n.lineWidth||0)+(n.increasedLineWidthForHitTesting||0))/2,h=it(o,o,r.x,r.y),l=!!(null==c?void 0:c.length),f=e.isFillOrStrokeAffected(u,i,a),p=f[0],v=f[1];return p&&v||l?o+s>=h:p?o>=h:!!v&&(h>=o-s&&o+s>=h)}function dt(t,e,r,n){return t/(r*r)+e/(n*n)}function yt(t,r){var n=r.x,o=r.y,i=t.parsedStyle,a=i.rx,c=i.ry,u=i.lineWidth,s=i.increasedLineWidthForHitTesting,h=i.clipPathTargets,l=!!(null==h?void 0:h.length),f=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),p=f[0],v=f[1],d=((u||0)+(s||0))/2,y=(n-a)*(n-a),g=(o-c)*(o-c);return p&&v||l?1>=dt(y,g,a+d,c+d):p?1>=dt(y,g,a,c):!!v&&(dt(y,g,a-d,c-d)>=1&&1>=dt(y,g,a+d,c+d))}function gt(t,r){var n=t.parsedStyle,o=n.x1,i=n.y1,a=n.x2,c=n.y2,u=n.lineWidth,s=n.increasedLineWidthForHitTesting,h=n.defX,l=void 0===h?0:h,f=n.defY,p=void 0===f?0:f,v=n.clipPathTargets,d=!!(null==v?void 0:v.length),y=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!y[1]&&!d||!u)&&ut(o,i,a,c,(u||0)+(s||0),r.x+l,r.y+p)}function mt(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.defX,u=void 0===c?0:c,s=o.defY,h=void 0===s?0:s,l=o.clipPathTargets,f=o.path,p=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),v=p[0],d=p[1],y=f.segments,g=f.hasArc,m=f.polylines,w=f.polygons,x=e.getOrCalculatePathTotalLength(t),b=!!(null==l?void 0:l.length),E=!1;return v||b?E=g?n(t,r):pt(w,r.x+u,r.y+h)||pt(m,r.x+u,r.y+h):((d||b)&&(E=function(t,e,r,n,o){for(var i=!1,a=0;t.length>a;a++){var c=t[a],u=c.currentPoint,s=c.params,h=c.prePoint;switch(c.command){case"L":case"Z":i=ut(h[0],h[1],u[0],u[1],e,r,n);break;case"C":i=e/2>=ot.pointDistance(h[0],h[1],s[1],s[2],s[3],s[4],s[5],s[6],r,n,o)}if(i)break}return i}(y,(i||0)+(a||0),r.x+u,r.y+h,x)),E)}function wt(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,u=void 0===c?0:c,s=n.defY,h=void 0===s?0:s,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),p=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke),v=p[0],d=!1;return(p[1]||f)&&(d=st(a.points,(o||0)+(i||0),r.x+u,r.y+h,!0)),d||!v&&!f||(d=ft(a.points,r.x+u,r.y+h)),d}function xt(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,u=void 0===c?0:c,s=n.defY,h=void 0===s?0:s,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),p=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!p[1]&&!f||!o)&&st(a.points,(o||0)+(i||0),r.x+u,r.y+h,!1)}function bt(t,r,n){var o=t.parsedStyle,i=o.radius,a=o.lineWidth,c=o.increasedLineWidthForHitTesting,u=o.width,s=o.height,h=o.clipPathTargets,l=!!(null==h?void 0:h.length),f=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),p=f[0],v=f[1],d=(a||0)+(c||0);if(i&&i.some((function(t){return 0!==t}))){var y=!1;return(v||l)&&(y=function(t,e,r,n,o,i,a,c){var u=o[0],s=o[1],h=o[2],l=o[3];return ut(t+u,e,t+r-s,e,i,a,c)||ut(t+r,e+s,t+r,e+n-h,i,a,c)||ut(t+r-h,e+n,t+l,e+n,i,a,c)||ut(t,e+n-l,t,e+u,i,a,c)||ct(t+r-s,e+s,s,1.5*Math.PI,2*Math.PI,i,a,c)||ct(t+r-h,e+n-h,h,0,.5*Math.PI,i,a,c)||ct(t+l,e+n-l,l,.5*Math.PI,Math.PI,i,a,c)||ct(t+u,e+u,u,Math.PI,1.5*Math.PI,i,a,c)}(0,0,u,s,i.map((function(t){return e=t,r=0,n=Math.min(Math.abs(u)/2,Math.abs(s)/2),r>e?r:e>n?n:e;var e,r,n})),d,r.x,r.y)),y||!p&&!l||(y=n(t,r)),y}var g=d/2;return p&&v||l?at(0-g,0-g,u+g,s+g,r.x,r.y):p?at(0,0,u,s,r.x,r.y):!!v&&function(t,e,r,n,o,i,a){var c=o/2;return at(t-c,e-c,r,o,i,a)||at(t+r-c,e-c,o,n,i,a)||at(t+c,e+n-c,r,o,i,a)||at(t-c,e+c,o,n,i,a)}(0,0,u,s,d,r.x,r.y)}var Et=e.Module((function(t){t({token:Y,useFactory:function(t){return function(t){return t===e.Shape.CIRCLE?vt:t===e.Shape.ELLIPSE?yt:t===e.Shape.RECT?bt:t===e.Shape.LINE?gt:t===e.Shape.POLYLINE?xt:t===e.Shape.POLYGON?wt:t===e.Shape.PATH?mt:t===e.Shape.IMAGE||t===e.Shape.TEXT?function(){return!0}:null}}}),t(V)})),Lt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,T(e,r);var o=n.prototype;return o.init=function(){this.container.load(Et,!0)},o.destroy=function(){this.container.unload(Et)},n}(e.AbstractRendererPlugin),Ot=Object.freeze({__proto__:null,Plugin:Lt});function St(){
5
+ S=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function d(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(p=y);var g=d.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,c(g,"constructor",d),c(d,"constructor",f),f.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function C(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return M(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A="undefined"!=typeof Float32Array?Float32Array:Array;function j(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],b=r[2],E=r[3];return t[0]=w*n+x*c+b*l+E*v,t[1]=w*o+x*s+b*f+E*y,t[2]=w*i+x*u+b*d+E*g,t[3]=w*a+x*h+b*p+E*m,t[4]=(w=r[4])*n+(x=r[5])*c+(b=r[6])*l+(E=r[7])*v,t[5]=w*o+x*s+b*f+E*y,t[6]=w*i+x*u+b*d+E*g,t[7]=w*a+x*h+b*p+E*m,t[8]=(w=r[8])*n+(x=r[9])*c+(b=r[10])*l+(E=r[11])*v,t[9]=w*o+x*s+b*f+E*y,t[10]=w*i+x*u+b*d+E*g,t[11]=w*a+x*h+b*p+E*m,t[12]=(w=r[12])*n+(x=r[13])*c+(b=r[14])*l+(E=r[15])*v,t[13]=w*o+x*s+b*f+E*y,t[14]=w*i+x*u+b*d+E*g,t[15]=w*a+x*h+b*p+E*m,t}function _(){var t=new A(3);return A!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function N(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var R;R=_();!function(){var t,e=(t=new A(2),A!=Float32Array&&(t[0]=0,t[1]=0),t)}();var I,G,F,B=e.Syringe.defineToken(""),D=_(),Y=_(),W=_(),$=(F=new A(16),A!=Float32Array&&(F[1]=0,F[2]=0,F[3]=0,F[4]=0,F[6]=0,F[7]=0,F[8]=0,F[9]=0,F[11]=0,F[12]=0,F[13]=0,F[14]=0),F[0]=1,F[5]=1,F[10]=1,F[15]=1,F),H=(I=function(){function t(t,r,n,o,i){var a=this;this.renderingContext=void 0,this.canvasConfig=void 0,this.offscreenCanvas=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.pathGeneratorFactoryCache={},this.isHit=function(t,r,n){var o=a.pointInPathPickerFactory(t.nodeName);if(o){var i=function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],c=e[5],s=e[6],u=e[7],h=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=r*c-n*a,w=r*s-o*a,x=r*u-i*a,b=n*s-o*c,E=n*u-i*c,L=o*u-i*s,P=h*v-l*p,O=h*y-f*p,S=h*g-d*p,C=l*y-f*v,k=l*g-d*v,M=f*g-d*y,T=m*M-w*k+x*C+b*S-E*O+L*P;return T?(t[0]=(c*M-s*k+u*C)*(T=1/T),t[1]=(o*k-n*M-i*C)*T,t[2]=(v*L-y*E+g*b)*T,t[3]=(f*E-l*L-d*b)*T,t[4]=(s*S-a*M-u*O)*T,t[5]=(r*M-o*S+i*O)*T,t[6]=(y*x-p*L-g*w)*T,t[7]=(h*L-f*x+d*w)*T,t[8]=(a*k-c*S+u*P)*T,t[9]=(n*S-r*k-i*P)*T,t[10]=(p*E-v*x+g*m)*T,t[11]=(l*x-h*E-d*m)*T,t[12]=(c*O-a*C-s*P)*T,t[13]=(r*C-n*O+o*P)*T,t[14]=(v*w-p*b-y*m)*T,t[15]=(h*b-l*w+f*m)*T,t):null}($,n),c=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}(Y,N(W,r[0],r[1],0),i),s=t.getGeometryBounds().halfExtents,u=t.parsedStyle.anchor;if(c[0]+=(u&&u[0]||0)*s[0]*2,c[1]+=(u&&u[1]||0)*s[1]*2,o(t,new e.Point(c[0],c[1]),a.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var r=a.offscreenCanvas.getOrCreateContext(a.canvasConfig.offscreenCanvas);void 0===a.pathGeneratorFactoryCache[t.nodeName]&&(a.pathGeneratorFactoryCache[t.nodeName]=a.pathGeneratorFactory(t.nodeName));var n=a.pathGeneratorFactoryCache[t.nodeName];return n&&(r.beginPath(),n(r,t.parsedStyle),r.closePath()),r.isPointInPath(e.x,e.y)},this.renderingContext=t,this.canvasConfig=r,this.offscreenCanvas=n,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=i}var r=t.prototype;return r.apply=function(t){var e,r=this,n=null===(e=this.renderingContext.root)||void 0===e?void 0:e.ownerDocument;t.hooks.pick.tapPromise(G.tag,function(){var t,e=(t=S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(n,e));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){C(i,n,o,a,c,"next",t)}function c(t){C(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),t.hooks.pickSync.tap(G.tag,(function(t){return r.pick(n,t)}))},r.pick=function(t,r){for(var n,o=r.topmost,i=r.position,a=N(D,i.x,i.y,0),c=[],s=T(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(n=s()).done;){var u=n.value,h=u.getWorldTransform();if(this.isHit(u,a,h)){var l=e.findClosestClipPathTarget(u);if(l){var f=l.style.clipPath;if(h=j($,l===u?h:l.getWorldTransform(),f.getLocalTransform()),this.isHit(f,a,h)){if(o)return r.picked=[u],r;c.push(u)}}else{if(o)return r.picked=[u],r;c.push(u)}}}return r.picked=c,r},t}(),I.tag="CanvasPicker",G=I);function U(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function z(t,e){return.001>Math.abs(t-e)}function X(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}H=G=c([e.singleton({contrib:e.RenderingPluginContribution}),s(0,e.inject(e.RenderingContext)),s(1,e.inject(e.CanvasConfig)),s(2,e.inject(e.OffscreenCanvasCreator)),s(3,e.inject(p)),s(4,e.inject(B))],H);var V=function(t,e,r,n,o){return{x:(1-o)*t+o*r,y:(1-o)*e+o*n}},q=function(t,e,r,n,o,i){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((o-t)*(o-t)+(i-e)*(i-e));var c=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o}(c,c),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([o-t,i-e],c))};function Q(t,e,r,n,o){var i=1-o;return i*i*i*t+3*e*o*i*i+3*r*o*o*i+n*o*o*o}function Z(t,e,r,n,o){var i=1-o;return 3*(i*i*(e-t)+2*i*o*(r-e)+o*o*(n-r))}function J(t,e,r,n){var o,i,a,c=-3*t+9*e-9*r+3*n,s=6*t-12*e+6*r,u=3*e-3*t,h=[];if(z(c,0))z(s,0)||0>(o=-u/s)||o>1||h.push(o);else{var l=s*s-4*c*u;z(l,0)?h.push(-s/(2*c)):l>0&&(i=(-s-(a=Math.sqrt(l)))/(2*c),0>(o=(-s+a)/(2*c))||o>1||h.push(o),0>i||i>1||h.push(i))}return h}function K(t,e,r,n,o,i,a,c,s){var u=Q(t,r,o,a,s),h=Q(e,n,i,c,s),l=V(t,e,r,n,s),f=V(r,n,o,i,s),d=V(o,i,a,c,s),p=V(l.x,l.y,f.x,f.y,s),v=V(f.x,f.y,d.x,d.y,s);return[[t,e,l.x,l.y,p.x,p.y,u,h],[u,h,v.x,v.y,d.x,d.y,a,c]]}function tt(t,e,r,n,o,i,a,c,s){if(0===s)return function(t,e){for(var r=0,n=t.length,o=0;n>o;o++)r+=U(t[o],e[o],t[(o+1)%n],e[(o+1)%n]);return r/2}([t,r,o,a],[e,n,i,c]);var u=K(t,e,r,n,o,i,a,c,.5),h=[].concat(u[0],[s-1]),l=[].concat(u[1],[s-1]);return tt.apply(void 0,h)+tt.apply(void 0,l)}var et={extrema:J,box:function(t,e,r,n,o,i,a,c){for(var s=[t,a],u=[e,c],h=J(t,r,o,a),l=J(e,n,i,c),f=0;h.length>f;f++)s.push(Q(t,r,o,a,h[f]));for(var d=0;l.length>d;d++)u.push(Q(e,n,i,c,l[d]));return X(s,u)},length:function(t,e,r,n,o,i,a,c){return tt(t,e,r,n,o,i,a,c,3)},nearestPoint:function(t,e,r,n,o,i,a,c,s,u,h){return function(t,e,r,n,o,i){var a=-1,c=1/0,s=[r,n],u=20;i&&i>200&&(u=i/10);for(var h=1/u,l=h/10,f=0;u>=f;f++){var d=f*h,p=[o.apply(void 0,t.concat([d])),o.apply(void 0,e.concat([d]))],v=U(s[0],s[1],p[0],p[1]);c>v&&(a=d,c=v)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}c=1/0;for(var g=0;32>g&&l>=1e-4;g++){var m=a-l,w=a+l,x=[o.apply(void 0,t.concat([m])),o.apply(void 0,e.concat([m]))],b=U(s[0],s[1],x[0],x[1]);if(m>=0&&c>b)a=m,c=b;else{var E=[o.apply(void 0,t.concat([w])),o.apply(void 0,e.concat([w]))],L=U(s[0],s[1],E[0],E[1]);1>=w&&c>L?(a=w,c=L):l*=.5}}return{x:o.apply(void 0,t.concat([a])),y:o.apply(void 0,e.concat([a]))}}([t,r,o,a],[e,n,i,c],s,u,Q,h)},pointDistance:function(t,e,r,n,o,i,a,c,s,u,h){var l=this.nearestPoint(t,e,r,n,o,i,a,c,s,u,h);return U(l.x,l.y,s,u)},interpolationAt:Q,pointAt:function(t,e,r,n,o,i,a,c,s){return{x:Q(t,r,o,a,s),y:Q(e,n,i,c,s)}},divide:function(t,e,r,n,o,i,a,c,s){return K(t,e,r,n,o,i,a,c,s)},tangentAngle:function(t,e,r,n,o,i,a,c,s){var u=Z(t,r,o,a,s),h=Z(e,n,i,c,s);return(Math.atan2(h,u)+2*Math.PI)%(2*Math.PI)}};function rt(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function nt(t,e,r,n,o,i){return!(t>o||o>t+r||e>i||i>e+n)}function ot(t,e,r,n,o,i,a,c){var s=(Math.atan2(c-e,a-t)+2*Math.PI)%(2*Math.PI);if(n>s||s>o)return!1;var u={x:t+r*Math.cos(s),y:e+r*Math.sin(s)};return rt(u.x,u.y,a,c)<=i/2}function it(t,e,r,n,o,i,a){var c=Math.min(t,r),s=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n),l=o/2;return!(c-l>i||i>s+l||u-l>a||a>h+l)&&q(t,e,r,n,i,a)<=o/2}function at(t,e,r,n,o){var i=t.length;if(2>i)return!1;for(var a=0;i-1>a;a++){if(it(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(o){var c=t[0],s=t[i-1];if(it(c[0],c[1],s[0],s[1],e,r,n))return!0}return!1}function ct(t){return 1e-6>Math.abs(t)?0:0>t?-1:1}function st(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function ut(t,e,r){var n=!1,o=t.length;if(2>=o)return!1;for(var i=0;o>i;i++){var a=t[i],c=t[(i+1)%o];if(st(a,c,[e,r]))return!0;ct(a[1]-r)>0!=ct(c[1]-r)>0&&0>ct(e-(r-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(n=!n)}return n}function ht(t,e,r){for(var n=!1,o=0;t.length>o;o++){if(n=ut(t[o],e,r))break}return n}function lt(t,r){var n=t.parsedStyle,o=n.r,i=n.fill,a=n.stroke,c=n.clipPathTargets,s=n.pointerEvents,u=((n.lineWidth||0)+(n.increasedLineWidthForHitTesting||0))/2,h=rt(o,o,r.x,r.y),l=!!(null==c?void 0:c.length),f=e.isFillOrStrokeAffected(s,i,a),d=f[0],p=f[1];return d&&p||l?o+u>=h:d?o>=h:!!p&&(h>=o-u&&o+u>=h)}function ft(t,e,r,n){return t/(r*r)+e/(n*n)}function dt(t,r){var n=r.x,o=r.y,i=t.parsedStyle,a=i.rx,c=i.ry,s=i.lineWidth,u=i.increasedLineWidthForHitTesting,h=i.clipPathTargets,l=!!(null==h?void 0:h.length),f=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),d=f[0],p=f[1],v=((s||0)+(u||0))/2,y=(n-a)*(n-a),g=(o-c)*(o-c);return d&&p||l?1>=ft(y,g,a+v,c+v):d?1>=ft(y,g,a,c):!!p&&(ft(y,g,a-v,c-v)>=1&&1>=ft(y,g,a+v,c+v))}function pt(t,r){var n=t.parsedStyle,o=n.x1,i=n.y1,a=n.x2,c=n.y2,s=n.lineWidth,u=n.increasedLineWidthForHitTesting,h=n.defX,l=void 0===h?0:h,f=n.defY,d=void 0===f?0:f,p=n.clipPathTargets,v=!!(null==p?void 0:p.length),y=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!y[1]&&!v||!s)&&it(o,i,a,c,(s||0)+(u||0),r.x+l,r.y+d)}function vt(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.defX,s=void 0===c?0:c,u=o.defY,h=void 0===u?0:u,l=o.clipPathTargets,f=o.path,d=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),p=d[0],v=d[1],y=f.segments,g=f.hasArc,m=f.polylines,w=f.polygons,x=e.getOrCalculatePathTotalLength(t),b=!!(null==l?void 0:l.length),E=!1;return p||b?E=g?n(t,r):ht(w,r.x+s,r.y+h)||ht(m,r.x+s,r.y+h):((v||b)&&(E=function(t,e,r,n,o){for(var i=!1,a=0;t.length>a;a++){var c=t[a],s=c.currentPoint,u=c.params,h=c.prePoint;switch(c.command){case"L":case"Z":i=it(h[0],h[1],s[0],s[1],e,r,n);break;case"C":i=e/2>=et.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],r,n,o)}if(i)break}return i}(y,(i||0)+(a||0),r.x+s,r.y+h,x)),E)}function yt(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,s=void 0===c?0:c,u=n.defY,h=void 0===u?0:u,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),d=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke),p=d[0],v=!1;return(d[1]||f)&&(v=at(a.points,(o||0)+(i||0),r.x+s,r.y+h,!0)),v||!p&&!f||(v=ut(a.points,r.x+s,r.y+h)),v}function gt(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,s=void 0===c?0:c,u=n.defY,h=void 0===u?0:u,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),d=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!d[1]&&!f||!o)&&at(a.points,(o||0)+(i||0),r.x+s,r.y+h,!1)}function mt(t,r,n){var o=t.parsedStyle,i=o.radius,a=o.lineWidth,c=o.increasedLineWidthForHitTesting,s=o.width,u=o.height,h=o.clipPathTargets,l=!!(null==h?void 0:h.length),d=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),p=d[0],v=d[1],y=(a||0)+(c||0);if(i&&i.some((function(t){return 0!==t}))){var g=!1;return(v||l)&&(g=function(t,e,r,n,o,i,a,c){var s=o[0],u=o[1],h=o[2],l=o[3];return it(t+s,e,t+r-u,e,i,a,c)||it(t+r,e+u,t+r,e+n-h,i,a,c)||it(t+r-h,e+n,t+l,e+n,i,a,c)||it(t,e+n-l,t,e+s,i,a,c)||ot(t+r-u,e+u,u,1.5*Math.PI,2*Math.PI,i,a,c)||ot(t+r-h,e+n-h,h,0,.5*Math.PI,i,a,c)||ot(t+l,e+n-l,l,.5*Math.PI,Math.PI,i,a,c)||ot(t+s,e+s,s,Math.PI,1.5*Math.PI,i,a,c)}(0,0,s,u,i.map((function(t){return f(t,0,Math.min(Math.abs(s)/2,Math.abs(u)/2))})),y,r.x,r.y)),g||!p&&!l||(g=n(t,r)),g}var m=y/2;return p&&v||l?nt(0-m,0-m,s+m,u+m,r.x,r.y):p?nt(0,0,s,u,r.x,r.y):!!v&&function(t,e,r,n,o,i,a){var c=o/2;return nt(t-c,e-c,r,o,i,a)||nt(t+r-c,e-c,o,n,i,a)||nt(t+c,e+n-c,r,o,i,a)||nt(t-c,e+c,o,n,i,a)}(0,0,s,u,y,r.x,r.y)}var wt=e.Module((function(t){t({token:B,useFactory:function(t){return function(t){return t===e.Shape.CIRCLE?lt:t===e.Shape.ELLIPSE?dt:t===e.Shape.RECT?mt:t===e.Shape.LINE?pt:t===e.Shape.POLYLINE?gt:t===e.Shape.POLYGON?yt:t===e.Shape.PATH?vt:t===e.Shape.IMAGE||t===e.Shape.TEXT?function(){return!0}:null}}}),t(H)})),xt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,k(e,r);var o=n.prototype;return o.init=function(){this.container.load(wt,!0)},o.destroy=function(){this.container.unload(wt)},n}(e.AbstractRendererPlugin),bt=Object.freeze({__proto__:null,Plugin:xt});function Et(){
6
6
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
7
- St=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function l(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Pt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pt(i,n,o,a,c,"next",t)}function c(t){Pt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ct(t,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ct(t,e)}var Mt={}.toString,jt=function(t,e){return Mt.call(t)==="[object "+e+"]"},Tt=function(t){return jt(t,"Function")};function At(t,e){var r;if(t)if(r=t,Array.isArray?Array.isArray(r):jt(r,"Array"))for(var n=0,o=t.length;o>n&&!1!==e(t[n],n);n++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var _t,Nt=function(t){return jt(t,"String")},Rt=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return At(t,(function(r,n){Tt(t)&&"prototype"===n||e.push(r)})),e};!function(t,e){if(!Tt(t))throw new TypeError("Expected a function");var r=function r(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var c=t.apply(this,n);return a.set(i,c),c};r.cache=new Map}((function(t,e){void 0===e&&(e={});var r=e.fontSize,n=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return _t||(_t=document.createElement("canvas").getContext("2d")),_t.font=[i,a,o,r+"px",n].join(" "),_t.measureText(Nt(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),s([t],Rt(e)).join("")}));var Ft,It,Gt=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(o,i){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){o(a)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=t,r.imageCache[t]=a)}))},r.getOrCreatePatternSync=function(t,e,r){var n=this.generatePatternKey(t);if(n&&this.patternCache[n])return this.patternCache[n];var o,i=t.image,a=t.repetition,c=(o=Nt(i)?this.getImageSync(i,r):i)&&e.createPattern(o,a);return n&&c&&(this.patternCache[n]=c),c},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),o=t.type,i=t.steps,a=t.width,c=t.height,u=t.cx,s=t.cy;if(this.gradientCache[n])return this.gradientCache[n];var h=null;if(o===e.GradientType.LinearGradient){var l=e.computeLinearGradient(a,c,t.angle);h=r.createLinearGradient(l.x1,l.y1,l.x2,l.y2)}else if(o===e.GradientType.RadialGradient){var f=e.computeRadialGradient(a,c,u,s),p=f.x,v=f.y;h=r.createRadialGradient(p,v,0,p,v,f.r)}return h&&(i.forEach((function(t){var e;null===(e=h)||void 0===e||e.addColorStop(t[0],t[1])})),this.gradientCache[n]=h),this.gradientCache[n]},r.generateGradientKey=function(t){return"gradient-"+t.type+"-"+(t.angle||0)+"-"+(t.cx||0)+"-"+(t.cy||0)+"-"+t.width+"-"+t.height+"-"+t.steps.map((function(t){return t.join("")})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;if(Nt(e))return"pattern-"+e+"-"+r},t}();Gt=c([e.singleton(),u(0,e.inject(e.CanvasConfig))],Gt);var Bt=(Ft=function(){function t(t,e){this.imagePool=void 0,this.renderingContext=void 0,this.imagePool=t,this.renderingContext=e}return t.prototype.apply=function(t){var r=this,n=function(n){var o=n.target;if(o.nodeName===e.Shape.IMAGE){var i=o.attributes.img;Nt(i)&&r.imagePool.getImageSync(i,(function(){o.renderable.dirty=!0,t.dirtify()}))}},o=function(n){var o=n.target,i=n.newValue;o.nodeName===e.Shape.IMAGE&&"img"===n.attrName&&Nt(i)&&r.imagePool.getOrCreateImage(i).then((function(){o.renderable.dirty=!0,t.dirtify()}))};t.hooks.init.tapPromise(It.tag,kt(St().mark((function t(){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,o);case 2:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(It.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,o)}))},t}(),Ft.tag="LoadImage",It=Ft);Bt=It=c([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(Gt)),u(1,e.inject(e.RenderingContext))],Bt);var Dt=e.Module((function(t){t(Gt),t(Bt)})),Wt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ct(e,r);var o=n.prototype;return o.init=function(){this.container.load(Dt,!0)},o.destroy=function(){this.container.unload(Dt)},n}(e.AbstractRendererPlugin),Yt=Object.freeze({__proto__:null,get ImagePool(){return Gt},Plugin:Wt});function $t(){
7
+ Et=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function d(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(p=y);var g=d.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,c(g,"constructor",d),c(d,"constructor",f),f.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Lt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Lt(i,n,o,a,c,"next",t)}function c(t){Lt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ot(t,e){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ot(t,e)}var St,Ct,kt=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(o,i){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){o(a)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=t,r.imageCache[t]=a)}))},r.getOrCreatePatternSync=function(t,e,r){var n=this.generatePatternKey(t);if(n&&this.patternCache[n])return this.patternCache[n];var o,i=t.image,a=t.repetition,c=(o=l(i)?this.getImageSync(i,r):i)&&e.createPattern(o,a);return n&&c&&(this.patternCache[n]=c),c},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),o=t.type,i=t.steps,a=t.width,c=t.height,s=t.cx,u=t.cy,h=t.size;if(this.gradientCache[n])return this.gradientCache[n];var l=null;if(o===e.GradientType.LinearGradient){var f=e.computeLinearGradient(a,c,t.angle);l=r.createLinearGradient(f.x1,f.y1,f.x2,f.y2)}else if(o===e.GradientType.RadialGradient){var d=e.computeRadialGradient(a,c,s,u,h),p=d.x,v=d.y;l=r.createRadialGradient(p,v,0,p,v,d.r)}return l&&(i.forEach((function(t){var r,n=t.offset;n.unit===e.UnitType.kPercentage&&(null===(r=l)||void 0===r||r.addColorStop(n.value/100,t.color.toString()))})),this.gradientCache[n]=l),this.gradientCache[n]},r.generateGradientKey=function(t){var e=t.width,r=t.height,n=t.steps,o=t.angle,i=t.cx,a=t.cy,c=t.size;return"gradient-"+t.type+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==i?void 0:i.toString())||0)+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==c?void 0:c.toString())||0)+"-"+e+"-"+r+"-"+n.map((function(t){return""+t.offset+t.color})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;if(l(e))return"pattern-"+e+"-"+r},t}();kt=c([e.singleton(),s(0,e.inject(e.CanvasConfig))],kt);var Mt=(St=function(){function t(t,e){this.imagePool=void 0,this.renderingContext=void 0,this.imagePool=t,this.renderingContext=e}return t.prototype.apply=function(t){var r=this,n=function(n){var o=n.target;if(o.nodeName===e.Shape.IMAGE){var i=o.attributes.img;l(i)&&r.imagePool.getImageSync(i,(function(){o.renderable.dirty=!0,t.dirtify()}))}},o=function(n){var o=n.target,i=n.newValue;o.nodeName===e.Shape.IMAGE&&"img"===n.attrName&&l(i)&&r.imagePool.getOrCreateImage(i).then((function(){o.renderable.dirty=!0,t.dirtify()}))};t.hooks.init.tapPromise(Ct.tag,Pt(Et().mark((function t(){return Et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,o);case 2:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(Ct.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,o)}))},t}(),St.tag="LoadImage",Ct=St);Mt=Ct=c([e.singleton({contrib:e.RenderingPluginContribution}),s(0,e.inject(kt)),s(1,e.inject(e.RenderingContext))],Mt);var Tt=e.Module((function(t){t(kt),t(Mt)})),At=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ot(e,r);var o=n.prototype;return o.init=function(){this.container.load(Tt,!0)},o.destroy=function(){this.container.unload(Tt)},n}(e.AbstractRendererPlugin),jt=Object.freeze({__proto__:null,get ImagePool(){return kt},Plugin:At});function _t(){
8
8
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
9
- $t=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function l(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Ht(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ht(i,n,o,a,c,"next",t)}function c(t){Ht(i,n,o,a,c,"throw",t)}a(void 0)}))}}function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zt.apply(this,arguments)}function Vt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xt(t,e)}function Xt(t,e){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xt(t,e)}var qt={}.toString,Qt=function(t,e){return qt.call(t)==="[object "+e+"]"},Zt=function(t){return Qt(t,"Function")},Jt=function(t){return null==t};function Kt(t,e){var r;if(t)if(r=t,Array.isArray?Array.isArray(r):Qt(r,"Array"))for(var n=0,o=t.length;o>n&&!1!==e(t[n],n);n++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var te,ee=function(t){return Qt(t,"String")},re=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return Kt(t,(function(r,n){Zt(t)&&"prototype"===n||e.push(r)})),e};!function(t,e){if(!Zt(t))throw new TypeError("Expected a function");var r=function r(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var c=t.apply(this,n);return a.set(i,c),c};r.cache=new Map}((function(t,e){void 0===e&&(e={});var r=e.fontSize,n=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return te||(te=document.createElement("canvas").getContext("2d")),te.font=[i,a,o,r+"px",n].join(" "),te.measureText(ee(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),s([t],re(e)).join("")}));var ne="undefined"!=typeof Float32Array?Float32Array:Array;function oe(){var t=new ne(16);return ne!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ie(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ae(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],u=e[5],s=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],d=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],b=r[2],E=r[3];return t[0]=w*n+x*c+b*l+E*d,t[1]=w*o+x*u+b*f+E*y,t[2]=w*i+x*s+b*p+E*g,t[3]=w*a+x*h+b*v+E*m,t[4]=(w=r[4])*n+(x=r[5])*c+(b=r[6])*l+(E=r[7])*d,t[5]=w*o+x*u+b*f+E*y,t[6]=w*i+x*s+b*p+E*g,t[7]=w*a+x*h+b*v+E*m,t[8]=(w=r[8])*n+(x=r[9])*c+(b=r[10])*l+(E=r[11])*d,t[9]=w*o+x*u+b*f+E*y,t[10]=w*i+x*s+b*p+E*g,t[11]=w*a+x*h+b*v+E*m,t[12]=(w=r[12])*n+(x=r[13])*c+(b=r[14])*l+(E=r[15])*d,t[13]=w*o+x*u+b*f+E*y,t[14]=w*i+x*s+b*p+E*g,t[15]=w*a+x*h+b*v+E*m,t}function ce(t,e,r){var n,o,i,a,c,u,s,h,l,f,p,v,d=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*d+e[4]*y+e[8]*g+e[12],t[13]=e[1]*d+e[5]*y+e[9]*g+e[13],t[14]=e[2]*d+e[6]*y+e[10]*g+e[14],t[15]=e[3]*d+e[7]*y+e[11]*g+e[15]):(o=e[1],i=e[2],a=e[3],c=e[4],u=e[5],s=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],t[0]=n=e[0],t[1]=o,t[2]=i,t[3]=a,t[4]=c,t[5]=u,t[6]=s,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=v,t[12]=n*d+c*y+l*g+e[12],t[13]=o*d+u*y+f*g+e[13],t[14]=i*d+s*y+p*g+e[14],t[15]=a*d+h*y+v*g+e[15]),t}function ue(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function se(){var t=new ne(3);return ne!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function he(t,e,r){var n=new ne(3);return n[0]=t,n[1]=e,n[2]=r,n}function le(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});!function(){var t=se()}();var fe=e.Syringe.defineToken(""),pe=e.Syringe.defineToken("",{multiple:!1}),ve=e.Syringe.defineToken("",{multiple:!1}),de=e.Syringe.defineToken("",{multiple:!1}),ye=e.Syringe.defineToken("",{multiple:!1}),ge=e.Syringe.defineToken("",{multiple:!1}),me=e.Syringe.defineToken("",{multiple:!1}),we=e.Syringe.defineToken("",{multiple:!1}),xe=e.Syringe.defineToken("",{multiple:!1}),be=e.Syringe.defineToken("",{multiple:!1}),Ee=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,o){var i=r.fill,a=r.opacity,c=r.fillOpacity,u=r.stroke,s=r.strokeOpacity,h=r.lineWidth,l=r.lineCap,f=r.lineJoin,p=r.shadowType,v=r.shadowColor,d=r.shadowBlur,y=r.filter,g=r.miterLimit,m=!Jt(i)&&!i.isNone,w=!Jt(u)&&!u.isNone&&h>0,x=0===i.alpha,b=!(!y||!y.length),E=!Jt(v)&&d>0,L=n.nodeName,O="inner"===p,S=w&&E&&(L===e.Shape.PATH||L===e.Shape.LINE||L===e.Shape.POLYLINE||x||O);m&&(t.globalAlpha=a*c,S||Le(n,t,E),this.fill(t,n,i,o),S||this.clearShadowAndFilter(t,b,E)),w&&(t.globalAlpha=a*s,t.lineWidth=h,Jt(g)||(t.miterLimit=g),Jt(l)||(t.lineCap=l),Jt(f)||(t.lineJoin=f),S&&(O&&(t.globalCompositeOperation="source-atop"),Le(n,t,!0),O&&(this.stroke(t,n,u,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,b,!0))),this.stroke(t,n,u,o))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!Jt(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=i.getColor(e,r,t),t.fill()})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,o)),t.fill())},r.stroke=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=i.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,o)),t.stroke())},r.getPattern=function(t,e,r,n){return this.imagePool.getOrCreatePatternSync(t,r,(function(){e.renderable.dirty=!0,n.dirtify()}))},r.getColor=function(t,r,n){var o;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var i=r.getGeometryBounds();o=this.imagePool.getOrCreateGradient(zt({type:t.type},t.value,{width:i&&2*i.halfExtents[0]||1,height:i&&2*i.halfExtents[1]||1}),n)}return o},t}();function Le(t,e,r){var n=t.parsedStyle,o=n.filter,i=n.shadowColor,a=n.shadowBlur,c=n.shadowOffsetX,u=n.shadowOffsetY;o&&o.length&&(e.filter=t.style.filter),r&&(e.shadowColor=i.toString(),e.shadowBlur=a||0,e.shadowOffsetX=c||0,e.shadowOffsetY=u||0)}Ee=c([e.singleton(),u(0,e.inject(Gt))],Ee);var Oe=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,o=e.img,i=e.shadowColor,a=e.shadowBlur,c=e.width,u=e.height;if(ee(o)?n=this.imagePool.getImageSync(o):(c||(c=o.width),u||(u=o.height),n=o),n){Le(r,t,!Jt(i)&&a>0);try{t.drawImage(n,0,0,c,u)}catch(t){}}},t}();Oe=c([e.singleton({token:be}),u(0,e.inject(Gt))],Oe);var Se=function(){function t(){}var e=t.prototype;return e.render=function(t,e,r){var n=e.lineWidth,o=e.textAlign,i=e.textBaseline,a=e.lineJoin,c=e.miterLimit,u=e.letterSpacing,s=e.stroke,h=e.fill,l=e.fillOpacity,f=e.strokeOpacity,p=e.opacity,v=e.metrics,d=e.dx,y=e.dy,g=e.shadowColor,m=e.shadowBlur,w=v.lines,x=v.height,b=v.lineHeight,E=v.lineMetrics;t.font=v.font,t.lineWidth=n,t.textAlign=o,t.textBaseline=i,t.lineJoin=a,Jt(c)||(t.miterLimit=c);var L=0;"middle"===i?L=-x/2-b/2:"bottom"===i||"alphabetic"===i||"ideographic"===i?L=-x:"top"!==i&&"hanging"!==i||(L=-b);var O=d||0;L+=y||0,Le(r,t,!Jt(g)&&m>0);for(var S=0;w.length>S;S++){var P=n/2+O;L+=b,Jt(s)||s.isNone||!n||this.drawLetterSpacing(t,w[S],E[S],o,P,L,u,l,f,p,!0),Jt(h)||this.drawLetterSpacing(t,w[S],E[S],o,P,L,u,l,f,p)}},e.drawLetterSpacing=function(t,e,r,n,o,i,a,c,u,s,h){if(void 0===h&&(h=!1),0!==a){var l=t.textAlign;t.textAlign="left";var f=o;"center"===n?f=o-r.width/2:"right"!==n&&"end"!==n||(f=o-r.width);for(var p=Array.from(e),v=t.measureText(e).width,d=0,y=0;p.length>y;++y){var g=p[y];h?this.strokeText(t,g,f,i,u):this.fillText(t,g,f,i,c,s),f+=v-(d=t.measureText(e.substring(y+1)).width)+a,v=d}t.textAlign=l}else h?this.strokeText(t,e,o,i,u):this.fillText(t,e,o,i,c,s)},e.fillText=function(t,e,r,n,o,i){var a,c=!Jt(o)&&1!==o;c&&(a=t.globalAlpha,t.globalAlpha=o*i),t.fillText(e,r,n),c&&(t.globalAlpha=a)},e.strokeText=function(t,e,r,n,o){var i,a=!Jt(o)&&1!==o;a&&(i=t.globalAlpha,t.globalAlpha=o),t.strokeText(e,r,n),a&&(t.globalAlpha=i)},t}();Se=c([e.singleton({token:xe})],Se);var Pe=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);Pe=c([e.singleton({token:de})],Pe);var ke=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);ke=c([e.singleton({token:pe})],ke);var Ce=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);Ce=c([e.singleton({token:ve})],Ce);var Me=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);Me=c([e.singleton({token:ye})],Me);var je=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);je=c([e.singleton({token:ge})],je);var Te=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);Te=c([e.singleton({token:me})],Te);var Ae=function(t){function e(){return t.apply(this,arguments)||this}return Vt(e,t),e}(Ee);Ae=c([e.singleton({token:we})],Ae);var _e,Ne,Re=e.Syringe.defineToken(""),Fe=(_e=function(){function t(t,e,r,n,o,i,a,c,u){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.pathGeneratorFactory=void 0,this.styleRendererFactory=void 0,this.displayObjectPool=void 0,this.canvasRendererPluginOptions=void 0,this.rBush=void 0,this.pathGeneratorFactoryCache={},this.styleRendererFactoryCache={},this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=oe(),this.dprMatrix=oe(),this.tmpMat4=oe(),this.vec3a=se(),this.vec3b=se(),this.vec3c=se(),this.vec3d=se(),this.canvasConfig=t,this.camera=e,this.contextService=r,this.renderingContext=n,this.pathGeneratorFactory=o,this.styleRendererFactory=i,this.displayObjectPool=a,this.canvasRendererPluginOptions=c,this.rBush=u}var r=t.prototype;return r.apply=function(t){var r=this,n=this.renderingContext.root.ownerDocument.defaultView,o=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)},i=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)};t.hooks.init.tapPromise(Ne.tag,Ut($t().mark((function t(){var n,a,c,u,s;return $t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.CULLED,i),n=r.contextService.getDPR(),c=(a=r.canvasConfig).width,u=a.height,s=r.contextService.getContext(),r.clearRect(s,0,0,c*n,u*n),ue(r.dprMatrix,he(n,n,1));case 7:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(Ne.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.CULLED,i)})),t.hooks.beginFrame.tap(Ne.tag,(function(){var e=r.contextService.getContext(),n=r.contextService.getDPR(),o=r.canvasConfig,i=o.width,a=o.height,c=r.canvasRendererPluginOptions,u=c.dirtyObjectNumThreshold,s=c.dirtyObjectRatioThreshold,h=t.getStats(),l=h.rendered,f=l/h.total;r.clearFullScreen=t.disableDirtyRectangleRendering()||l>u&&f>s,e&&(e.resetTransform(),r.clearFullScreen&&r.clearRect(e,0,0,i*n,a*n))}));var a=function e(n){n.isVisible()&&!n.isCulled()&&(r.renderDisplayObject(n,t),r.saveDirtyAABB(n)),(n.sortable.sorted||n.childNodes).forEach((function(t){e(t)}))};t.hooks.endFrame.tap(Ne.tag,(function(){var o=r.contextService.getContext();if(ae(r.vpMatrix,r.dprMatrix,r.camera.getOrthoMatrix()),r.clearFullScreen)a(r.renderingContext.root);else{var i=r.safeMergeAABB.apply(r,[r.mergeDirtyAABBs(r.renderQueue)].concat(r.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,o=t.maxX,i=t.maxY,a=new e.AABB;return a.setMinMax(he(r,n,0),he(o,i,0)),a}))));if(r.removedRBushNodeAABBs=[],e.AABB.isEmpty(i))return void(r.renderQueue=[]);var c=r.convertAABB2Rect(i),u=c.x,s=c.y,h=c.width,l=c.height,f=le(r.vec3a,he(u,s,0),r.vpMatrix),p=le(r.vec3b,he(u+h,s,0),r.vpMatrix),v=le(r.vec3c,he(u,s+l,0),r.vpMatrix),d=le(r.vec3d,he(u+h,s+l,0),r.vpMatrix),y=Math.min(f[0],p[0],d[0],v[0]),g=Math.min(f[1],p[1],d[1],v[1]),m=Math.max(f[0],p[0],d[0],v[0]),w=Math.max(f[1],p[1],d[1],v[1]),x=Math.floor(y),b=Math.floor(g),E=Math.ceil(m-y),L=Math.ceil(w-g);o.save(),r.clearRect(o,x,b,E,L),o.beginPath(),o.rect(x,b,E,L),o.clip(),o.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),r.canvasConfig.renderer.getConfig().enableDirtyRectangleRenderingDebug&&n.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:x,y:b,width:E,height:L}})),r.searchDirtyObjects(i).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(e){e&&e.isVisible()&&!e.isCulled()&&r.renderDisplayObject(e,t)})),o.restore(),r.renderQueue.forEach((function(t){r.saveDirtyAABB(t)})),r.renderQueue=[]}r.restoreStack.forEach((function(){o.restore()})),r.restoreStack=[]})),t.hooks.render.tap(Ne.tag,(function(t){r.clearFullScreen||r.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,o){t.clearRect(e,r,n,o);var i=this.canvasConfig.background;i&&(t.fillStyle=i,t.fillRect(e,r,n,o))},r.renderDisplayObject=function(t,r){var n=this.contextService.getContext(),o=t.nodeName,i=this.restoreStack[this.restoreStack.length-1];!i||t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINS||(n.restore(),this.restoreStack.pop()),void 0===this.styleRendererFactoryCache[o]&&(this.styleRendererFactoryCache[o]=this.styleRendererFactory(o));var a=this.styleRendererFactoryCache[o];void 0===this.pathGeneratorFactoryCache[o]&&(this.pathGeneratorFactoryCache[o]=this.pathGeneratorFactory(o));var c=this.pathGeneratorFactoryCache[o],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u,t.getWorldTransform()),void 0===this.pathGeneratorFactoryCache[u.nodeName]&&(this.pathGeneratorFactoryCache[u.nodeName]=this.pathGeneratorFactory(u.nodeName));var s=this.pathGeneratorFactoryCache[u.nodeName];s&&(n.save(),this.restoreStack.push(t),n.beginPath(),s(n,u.parsedStyle),n.closePath(),n.clip())}a&&(this.applyWorldTransform(n,t),n.save(),this.applyAttributesToContext(n,t)),c&&(n.beginPath(),c(n,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&n.closePath()),a&&(a.render(n,t.parsedStyle,t,r),n.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),o=Math.floor(e[1]);return{x:n,y:o,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-o}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var e=this,r=t.getMin(),n=r[0],o=r[1],i=t.getMax();return this.rBush.search({minX:n,minY:o,maxX:i[0],maxY:i[1]}).map((function(t){return e.displayObjectPool.getByEntity(t.id)}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,o=r.fill,i=r.opacity,a=r.lineDash,c=r.lineDashOffset;a&&t.setLineDash(a),Jt(c)||(t.lineDashOffset=c),Jt(i)||(t.globalAlpha*=i),Jt(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),Jt(o)||Array.isArray(o)||o.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,o=0,i=(e.parsedStyle||{}).anchor,a=i&&i[0]||0,c=i&&i[1]||0;if(0!==a||0!==c){var u=e.getGeometryBounds();n=-a*(u&&2*u.halfExtents[0]||0),o=-c*(u&&2*u.halfExtents[1]||0)}r?(ie(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,ce(this.tmpMat4,this.tmpMat4,this.vec3a),ae(this.tmpMat4,r,this.tmpMat4),ae(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(ie(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,ce(this.tmpMat4,this.tmpMat4,this.vec3a),ae(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return n.forEach((function(e){t.add(e)})),t},t}(),_e.tag="CanvasRenderer",Ne=_e);Fe=Ne=c([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.DefaultCamera)),u(2,e.inject(e.ContextService)),u(3,e.inject(e.RenderingContext)),u(4,e.inject(l)),u(5,e.inject(fe)),u(6,e.inject(e.DisplayObjectPool)),u(7,e.inject(Re)),u(8,e.inject(e.RBushRoot))],Fe);var Ie,Ge,Be=e.Module((function(t){var r;t(ke),t(Ce),t(Pe),t(Oe),t(Se),t(Me),t(je),t(Te),t(Ae);var n=((r={})[e.Shape.CIRCLE]=pe,r[e.Shape.ELLIPSE]=ve,r[e.Shape.RECT]=de,r[e.Shape.IMAGE]=be,r[e.Shape.TEXT]=xe,r[e.Shape.LINE]=ye,r[e.Shape.POLYLINE]=ge,r[e.Shape.POLYGON]=me,r[e.Shape.PATH]=we,r);t({token:fe,useFactory:function(t){return function(e){var r=n[e];return r&&t.container.isBound(r)?t.container.get(r):null}}}),t(Fe)})),De=function(t){function e(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}Vt(e,t);var r=e.prototype;return r.init=function(){this.container.register(Re,{useValue:zt({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options)}),this.container.load(Be,!0)},r.destroy=function(){this.container.unload(Be),this.container.remove(Re)},e}(e.AbstractRendererPlugin),We=Object.freeze({__proto__:null,get CircleRenderer(){return ke},CircleRendererContribution:pe,get EllipseRenderer(){return Ce},EllipseRendererContribution:ve,get ImageRenderer(){return Oe},ImageRendererContribution:be,get LineRenderer(){return Me},LineRendererContribution:ye,get PathRenderer(){return Ae},PathRendererContribution:we,Plugin:De,get PolygonRenderer(){return Te},PolygonRendererContribution:me,get PolylineRenderer(){return je},PolylineRendererContribution:ge,get RectRenderer(){return Pe},RectRendererContribution:de,StyleRendererFactory:fe,get TextRenderer(){return Se},TextRendererContribution:xe});function Ye(){
9
+ _t=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function d(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(p=y);var g=d.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,c(g,"constructor",d),c(d,"constructor",f),f.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Nt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Nt(i,n,o,a,c,"next",t)}function c(t){Nt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function It(){return It=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},It.apply(this,arguments)}function Gt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ft(t,e)}function Ft(t,e){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ft(t,e)}var Bt="undefined"!=typeof Float32Array?Float32Array:Array;function Dt(){var t=new Bt(16);return Bt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Yt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Wt(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],b=r[2],E=r[3];return t[0]=w*n+x*c+b*l+E*v,t[1]=w*o+x*s+b*f+E*y,t[2]=w*i+x*u+b*d+E*g,t[3]=w*a+x*h+b*p+E*m,t[4]=(w=r[4])*n+(x=r[5])*c+(b=r[6])*l+(E=r[7])*v,t[5]=w*o+x*s+b*f+E*y,t[6]=w*i+x*u+b*d+E*g,t[7]=w*a+x*h+b*p+E*m,t[8]=(w=r[8])*n+(x=r[9])*c+(b=r[10])*l+(E=r[11])*v,t[9]=w*o+x*s+b*f+E*y,t[10]=w*i+x*u+b*d+E*g,t[11]=w*a+x*h+b*p+E*m,t[12]=(w=r[12])*n+(x=r[13])*c+(b=r[14])*l+(E=r[15])*v,t[13]=w*o+x*s+b*f+E*y,t[14]=w*i+x*u+b*d+E*g,t[15]=w*a+x*h+b*p+E*m,t}function $t(t,e,r){var n,o,i,a,c,s,u,h,l,f,d,p,v=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],d=e[10],p=e[11],t[0]=n=e[0],t[1]=o,t[2]=i,t[3]=a,t[4]=c,t[5]=s,t[6]=u,t[7]=h,t[8]=l,t[9]=f,t[10]=d,t[11]=p,t[12]=n*v+c*y+l*g+e[12],t[13]=o*v+s*y+f*g+e[13],t[14]=i*v+u*y+d*g+e[14],t[15]=a*v+h*y+p*g+e[15]),t}function Ht(){var t=new Bt(3);return Bt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ut(t,e,r){var n=new Bt(3);return n[0]=t,n[1]=e,n[2]=r,n}function zt(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});!function(){var t=Ht()}();var Xt=e.Syringe.defineToken(""),Vt=e.Syringe.defineToken("",{multiple:!1}),qt=e.Syringe.defineToken("",{multiple:!1}),Qt=e.Syringe.defineToken("",{multiple:!1}),Zt=e.Syringe.defineToken("",{multiple:!1}),Jt=e.Syringe.defineToken("",{multiple:!1}),Kt=e.Syringe.defineToken("",{multiple:!1}),te=e.Syringe.defineToken("",{multiple:!1}),ee=e.Syringe.defineToken("",{multiple:!1}),re=e.Syringe.defineToken("",{multiple:!1}),ne=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,o){var i=r.fill,a=r.opacity,c=r.fillOpacity,s=r.stroke,u=r.strokeOpacity,l=r.lineWidth,f=r.lineCap,d=r.lineJoin,p=r.shadowType,v=r.shadowColor,y=r.shadowBlur,g=r.filter,m=r.miterLimit,w=!h(i)&&!i.isNone,x=!h(s)&&!s.isNone&&l>0,b=0===i.alpha,E=!(!g||!g.length),L=!h(v)&&y>0,P=n.nodeName,O="inner"===p,S=x&&L&&(P===e.Shape.PATH||P===e.Shape.LINE||P===e.Shape.POLYLINE||b||O);w&&(t.globalAlpha=a*c,S||oe(n,t,L),this.fill(t,n,i,o),S||this.clearShadowAndFilter(t,E,L)),x&&(t.globalAlpha=a*u,t.lineWidth=l,h(m)||(t.miterLimit=m),h(f)||(t.lineCap=f),h(d)||(t.lineJoin=d),S&&(O&&(t.globalCompositeOperation="source-atop"),oe(n,t,!0),O&&(this.stroke(t,n,s,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,E,!0))),this.stroke(t,n,s,o))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!h(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=i.getColor(e,r,t),t.fill()})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,o)),t.fill())},r.stroke=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=i.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,o)),t.stroke())},r.getPattern=function(t,e,r,n){return this.imagePool.getOrCreatePatternSync(t,r,(function(){e.renderable.dirty=!0,n.dirtify()}))},r.getColor=function(t,r,n){var o;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var i=r.getGeometryBounds();o=this.imagePool.getOrCreateGradient(It({type:t.type},t.value,{width:i&&2*i.halfExtents[0]||1,height:i&&2*i.halfExtents[1]||1}),n)}return o},t}();function oe(t,e,r){var n=t.parsedStyle,o=n.filter,i=n.shadowColor,a=n.shadowBlur,c=n.shadowOffsetX,s=n.shadowOffsetY;o&&o.length&&(e.filter=t.style.filter),r&&(e.shadowColor=i.toString(),e.shadowBlur=a||0,e.shadowOffsetX=c||0,e.shadowOffsetY=s||0)}ne=c([e.singleton(),s(0,e.inject(kt))],ne);var ie=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,o=e.img,i=e.shadowColor,a=e.shadowBlur,c=e.width,s=e.height;if(l(o)?n=this.imagePool.getImageSync(o):(c||(c=o.width),s||(s=o.height),n=o),n){oe(r,t,!h(i)&&a>0);try{t.drawImage(n,0,0,c,s)}catch(t){}}},t}();ie=c([e.singleton({token:re}),s(0,e.inject(kt))],ie);var ae=function(){function t(){}var e=t.prototype;return e.render=function(t,e,r){var n=e.lineWidth,o=e.textAlign,i=e.textBaseline,a=e.lineJoin,c=e.miterLimit,s=e.letterSpacing,u=e.stroke,l=e.fill,f=e.fillOpacity,d=e.strokeOpacity,p=e.opacity,v=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,w=e.shadowBlur,x=v.lines,b=v.height,E=v.lineHeight,L=v.lineMetrics;t.font=v.font,t.lineWidth=n,t.textAlign=o,t.textBaseline=i,t.lineJoin=a,h(c)||(t.miterLimit=c);var P=0;"middle"===i?P=-b/2-E/2:"bottom"===i||"alphabetic"===i||"ideographic"===i?P=-b:"top"!==i&&"hanging"!==i||(P=-E);var O=y||0;P+=g||0,oe(r,t,!h(m)&&w>0);for(var S=0;x.length>S;S++){var C=n/2+O;P+=E,h(u)||u.isNone||!n||this.drawLetterSpacing(t,x[S],L[S],o,C,P,s,f,d,p,!0),h(l)||this.drawLetterSpacing(t,x[S],L[S],o,C,P,s,f,d,p)}},e.drawLetterSpacing=function(t,e,r,n,o,i,a,c,s,u,h){if(void 0===h&&(h=!1),0!==a){var l=t.textAlign;t.textAlign="left";var f=o;"center"===n?f=o-r.width/2:"right"!==n&&"end"!==n||(f=o-r.width);for(var d=Array.from(e),p=t.measureText(e).width,v=0,y=0;d.length>y;++y){var g=d[y];h?this.strokeText(t,g,f,i,s):this.fillText(t,g,f,i,c,u),f+=p-(v=t.measureText(e.substring(y+1)).width)+a,p=v}t.textAlign=l}else h?this.strokeText(t,e,o,i,s):this.fillText(t,e,o,i,c,u)},e.fillText=function(t,e,r,n,o,i){var a,c=!h(o)&&1!==o;c&&(a=t.globalAlpha,t.globalAlpha=o*i),t.fillText(e,r,n),c&&(t.globalAlpha=a)},e.strokeText=function(t,e,r,n,o){var i,a=!h(o)&&1!==o;a&&(i=t.globalAlpha,t.globalAlpha=o),t.strokeText(e,r,n),a&&(t.globalAlpha=i)},t}();ae=c([e.singleton({token:ee})],ae);var ce=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);ce=c([e.singleton({token:Qt})],ce);var se=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);se=c([e.singleton({token:Vt})],se);var ue=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);ue=c([e.singleton({token:qt})],ue);var he=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);he=c([e.singleton({token:Zt})],he);var le=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);le=c([e.singleton({token:Jt})],le);var fe=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);fe=c([e.singleton({token:Kt})],fe);var de=function(t){function e(){return t.apply(this,arguments)||this}return Gt(e,t),e}(ne);de=c([e.singleton({token:te})],de);var pe,ve,ye=e.Syringe.defineToken(""),ge=(pe=function(){function t(t,e,r,n,o,i,a,c,s){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.pathGeneratorFactory=void 0,this.styleRendererFactory=void 0,this.displayObjectPool=void 0,this.canvasRendererPluginOptions=void 0,this.rBush=void 0,this.pathGeneratorFactoryCache={},this.styleRendererFactoryCache={},this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=Dt(),this.dprMatrix=Dt(),this.tmpMat4=Dt(),this.vec3a=Ht(),this.vec3b=Ht(),this.vec3c=Ht(),this.vec3d=Ht(),this.canvasConfig=t,this.camera=e,this.contextService=r,this.renderingContext=n,this.pathGeneratorFactory=o,this.styleRendererFactory=i,this.displayObjectPool=a,this.canvasRendererPluginOptions=c,this.rBush=s}var r=t.prototype;return r.apply=function(t){var r=this,n=this.renderingContext.root.ownerDocument.defaultView,o=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)},i=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)};t.hooks.init.tapPromise(ve.tag,Rt(_t().mark((function t(){var n,a,c,s,u;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.CULLED,i),n=r.contextService.getDPR(),c=(a=r.canvasConfig).width,s=a.height,u=r.contextService.getContext(),r.clearRect(u,0,0,c*n,s*n);case 6:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(ve.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.CULLED,i)})),t.hooks.beginFrame.tap(ve.tag,(function(){var e=r.contextService.getContext(),n=r.contextService.getDPR(),o=r.canvasConfig,i=o.width,a=o.height,c=r.canvasRendererPluginOptions,s=c.dirtyObjectNumThreshold,u=c.dirtyObjectRatioThreshold,h=t.getStats(),l=h.rendered,f=l/h.total;r.clearFullScreen=t.disableDirtyRectangleRendering()||l>s&&f>u,e&&(e.resetTransform(),r.clearFullScreen&&r.clearRect(e,0,0,i*n,a*n))}));var a=function e(n){n.isVisible()&&!n.isCulled()&&(r.renderDisplayObject(n,t),r.saveDirtyAABB(n)),(n.sortable.sorted||n.childNodes).forEach((function(t){e(t)}))};t.hooks.endFrame.tap(ve.tag,(function(){var o=r.contextService.getContext(),i=r.contextService.getDPR();if(function(t,e){t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(r.dprMatrix,Ut(i,i,1)),Wt(r.vpMatrix,r.dprMatrix,r.camera.getOrthoMatrix()),r.clearFullScreen)a(r.renderingContext.root);else{var c=r.safeMergeAABB.apply(r,[r.mergeDirtyAABBs(r.renderQueue)].concat(r.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,o=t.maxX,i=t.maxY,a=new e.AABB;return a.setMinMax(Ut(r,n,0),Ut(o,i,0)),a}))));if(r.removedRBushNodeAABBs=[],e.AABB.isEmpty(c))return void(r.renderQueue=[]);var s=r.convertAABB2Rect(c),u=s.x,h=s.y,l=s.width,f=s.height,d=zt(r.vec3a,Ut(u,h,0),r.vpMatrix),p=zt(r.vec3b,Ut(u+l,h,0),r.vpMatrix),v=zt(r.vec3c,Ut(u,h+f,0),r.vpMatrix),y=zt(r.vec3d,Ut(u+l,h+f,0),r.vpMatrix),g=Math.min(d[0],p[0],y[0],v[0]),m=Math.min(d[1],p[1],y[1],v[1]),w=Math.max(d[0],p[0],y[0],v[0]),x=Math.max(d[1],p[1],y[1],v[1]),b=Math.floor(g),E=Math.floor(m),L=Math.ceil(w-g),P=Math.ceil(x-m);o.save(),r.clearRect(o,b,E,L,P),o.beginPath(),o.rect(b,E,L,P),o.clip(),o.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),r.canvasConfig.renderer.getConfig().enableDirtyRectangleRenderingDebug&&n.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:b,y:E,width:L,height:P}})),r.searchDirtyObjects(c).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(e){e&&e.isVisible()&&!e.isCulled()&&r.renderDisplayObject(e,t)})),o.restore(),r.renderQueue.forEach((function(t){r.saveDirtyAABB(t)})),r.renderQueue=[]}r.restoreStack.forEach((function(){o.restore()})),r.restoreStack=[]})),t.hooks.render.tap(ve.tag,(function(t){r.clearFullScreen||r.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,o){t.clearRect(e,r,n,o);var i=this.canvasConfig.background;i&&(t.fillStyle=i,t.fillRect(e,r,n,o))},r.renderDisplayObject=function(t,r){var n=this.contextService.getContext(),o=t.nodeName,i=this.restoreStack[this.restoreStack.length-1];!i||t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINS||(n.restore(),this.restoreStack.pop()),void 0===this.styleRendererFactoryCache[o]&&(this.styleRendererFactoryCache[o]=this.styleRendererFactory(o));var a=this.styleRendererFactoryCache[o];void 0===this.pathGeneratorFactoryCache[o]&&(this.pathGeneratorFactoryCache[o]=this.pathGeneratorFactory(o));var c=this.pathGeneratorFactoryCache[o],s=t.parsedStyle.clipPath;if(s){this.applyWorldTransform(n,s,t.getWorldTransform()),void 0===this.pathGeneratorFactoryCache[s.nodeName]&&(this.pathGeneratorFactoryCache[s.nodeName]=this.pathGeneratorFactory(s.nodeName));var u=this.pathGeneratorFactoryCache[s.nodeName];u&&(n.save(),this.restoreStack.push(t),n.beginPath(),u(n,s.parsedStyle),n.closePath(),n.clip())}a&&(this.applyWorldTransform(n,t),n.save(),this.applyAttributesToContext(n,t)),c&&(n.beginPath(),c(n,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&n.closePath()),a&&(a.render(n,t.parsedStyle,t,r),n.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),o=Math.floor(e[1]);return{x:n,y:o,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-o}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var e=this,r=t.getMin(),n=r[0],o=r[1],i=t.getMax();return this.rBush.search({minX:n,minY:o,maxX:i[0],maxY:i[1]}).map((function(t){return e.displayObjectPool.getByEntity(t.id)}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,o=r.fill,i=r.opacity,a=r.lineDash,c=r.lineDashOffset;a&&t.setLineDash(a),h(c)||(t.lineDashOffset=c),h(i)||(t.globalAlpha*=i),h(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),h(o)||Array.isArray(o)||o.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,o=0,i=(e.parsedStyle||{}).anchor,a=i&&i[0]||0,c=i&&i[1]||0;if(0!==a||0!==c){var s=e.getGeometryBounds();n=-a*(s&&2*s.halfExtents[0]||0),o=-c*(s&&2*s.halfExtents[1]||0)}r?(Yt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,$t(this.tmpMat4,this.tmpMat4,this.vec3a),Wt(this.tmpMat4,r,this.tmpMat4),Wt(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Yt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,$t(this.tmpMat4,this.tmpMat4,this.vec3a),Wt(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return n.forEach((function(e){t.add(e)})),t},t}(),pe.tag="CanvasRenderer",ve=pe);ge=ve=c([e.singleton({contrib:e.RenderingPluginContribution}),s(0,e.inject(e.CanvasConfig)),s(1,e.inject(e.DefaultCamera)),s(2,e.inject(e.ContextService)),s(3,e.inject(e.RenderingContext)),s(4,e.inject(p)),s(5,e.inject(Xt)),s(6,e.inject(e.DisplayObjectPool)),s(7,e.inject(ye)),s(8,e.inject(e.RBushRoot))],ge);var me,we,xe=e.Module((function(t){var r;t(se),t(ue),t(ce),t(ie),t(ae),t(he),t(le),t(fe),t(de);var n=((r={})[e.Shape.CIRCLE]=Vt,r[e.Shape.ELLIPSE]=qt,r[e.Shape.RECT]=Qt,r[e.Shape.IMAGE]=re,r[e.Shape.TEXT]=ee,r[e.Shape.LINE]=Zt,r[e.Shape.POLYLINE]=Jt,r[e.Shape.POLYGON]=Kt,r[e.Shape.PATH]=te,r);t({token:Xt,useFactory:function(t){return function(e){var r=n[e];return r&&t.container.isBound(r)?t.container.get(r):null}}}),t(ge)})),be=function(t){function e(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}Gt(e,t);var r=e.prototype;return r.init=function(){this.container.register(ye,{useValue:It({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options)}),this.container.load(xe,!0)},r.destroy=function(){this.container.unload(xe),this.container.remove(ye)},e}(e.AbstractRendererPlugin),Ee=Object.freeze({__proto__:null,get CircleRenderer(){return se},CircleRendererContribution:Vt,get EllipseRenderer(){return ue},EllipseRendererContribution:qt,get ImageRenderer(){return ie},ImageRendererContribution:re,get LineRenderer(){return he},LineRendererContribution:Zt,get PathRenderer(){return de},PathRendererContribution:te,Plugin:be,get PolygonRenderer(){return fe},PolygonRendererContribution:Kt,get PolylineRenderer(){return le},PolylineRendererContribution:Jt,get RectRenderer(){return ce},RectRendererContribution:Qt,StyleRendererFactory:Xt,get TextRenderer(){return ae},TextRendererContribution:ee});function Le(){
10
10
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
11
- Ye=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function l(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function $e(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function He(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$e(i,n,o,a,c,"next",t)}function c(t){$e(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ue(t,e){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ue(t,e)}var ze=(Ie=function(){function t(t,e){this.contextService=void 0,this.renderingContext=void 0,this.contextService=t,this.renderingContext=e}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},o=function(e){t.hooks.pointerUp.call(e)},i=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},c=function(e){t.hooks.pointerOut.call(e)},u=function(e){t.hooks.pointerCancel.call(e)},s=function(e){t.hooks.pointerWheel.call(e)},h=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",o,!0)},l=function(t){t.addEventListener("touchstart",i,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",u,!0)},f=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",i,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",o,!0)};t.hooks.init.tapPromise(Ge.tag,He(Ye().mark((function t(){var n;return Ye().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?h(n):f(n),r.supportsTouchEvents&&l(n),n.addEventListener("wheel",s,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(Ge.tag,(function(){var t=e.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):r.supportsPointerEvents&&(t.style.touchAction=""),r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",o,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",i,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",o,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",i,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",n,!0),t.removeEventListener("touchcancel",u,!0)}(t),t.removeEventListener("wheel",s,!0)}))},t}(),Ie.tag="DOMInteraction",Ge=Ie);ze=Ge=c([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.ContextService)),u(1,e.inject(e.RenderingContext))],ze);var Ve=e.Module((function(t){t(ze)})),Xe=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ue(e,r);var o=n.prototype;return o.init=function(){this.container.load(Ve,!0)},o.destroy=function(){this.container.unload(Ve)},n}(e.AbstractRendererPlugin),qe=Object.freeze({__proto__:null,Plugin:Xe});function Qe(){
11
+ Le=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function d(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(p=y);var g=d.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,c(g,"constructor",d),c(d,"constructor",f),f.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Pe(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Oe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pe(i,n,o,a,c,"next",t)}function c(t){Pe(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Se(t,e){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Se(t,e)}var Ce=(me=function(){function t(t,e){this.contextService=void 0,this.renderingContext=void 0,this.contextService=t,this.renderingContext=e}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},o=function(e){t.hooks.pointerUp.call(e)},i=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},c=function(e){t.hooks.pointerOut.call(e)},s=function(e){t.hooks.pointerCancel.call(e)},u=function(e){t.hooks.pointerWheel.call(e)},h=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",o,!0)},l=function(t){t.addEventListener("touchstart",i,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",s,!0)},f=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",i,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",o,!0)};t.hooks.init.tapPromise(we.tag,Oe(Le().mark((function t(){var n;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?h(n):f(n),r.supportsTouchEvents&&l(n),n.addEventListener("wheel",u,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(we.tag,(function(){var t=e.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):r.supportsPointerEvents&&(t.style.touchAction=""),r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",o,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",i,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",o,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",i,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",n,!0),t.removeEventListener("touchcancel",s,!0)}(t),t.removeEventListener("wheel",u,!0)}))},t}(),me.tag="DOMInteraction",we=me);Ce=we=c([e.singleton({contrib:e.RenderingPluginContribution}),s(0,e.inject(e.ContextService)),s(1,e.inject(e.RenderingContext))],Ce);var ke,Me,Te=e.Module((function(t){t(Ce)})),Ae=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Se(e,r);var o=n.prototype;return o.init=function(){this.container.load(Te,!0)},o.destroy=function(){this.container.unload(Te)},n}(e.AbstractRendererPlugin),je=Object.freeze({__proto__:null,Plugin:Ae});function _e(){
12
12
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
13
- Qe=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function l(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Ze(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Je(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ze(i,n,o,a,c,"next",t)}function c(t){Ze(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ke(t,e){return Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ke(t,e)}var tr={}.toString,er=function(t,e){return tr.call(t)==="[object "+e+"]"},rr=function(t){return er(t,"Function")};function nr(t,e){var r;if(t)if(r=t,Array.isArray?Array.isArray(r):er(r,"Array"))for(var n=0,o=t.length;o>n&&!1!==e(t[n],n);n++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var or,ir,ar,cr=function(t){return er(t,"String")},ur=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return nr(t,(function(r,n){rr(t)&&"prototype"===n||e.push(r)})),e};!function(t,e){if(!rr(t))throw new TypeError("Expected a function");var r=function r(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var c=t.apply(this,n);return a.set(i,c),c};r.cache=new Map}((function(t,e){void 0===e&&(e={});var r=e.fontSize,n=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return or||(or=document.createElement("canvas").getContext("2d")),or.font=[i,a,o,r+"px",n].join(" "),or.measureText(cr(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),s([t],ur(e)).join("")}));var sr=(ir=function(){function t(t,e,r){this.contextService=void 0,this.renderingContext=void 0,this.canvasConfig=void 0,this.$camera=void 0,this.contextService=t,this.renderingContext=e,this.canvasConfig=r}var r=t.prototype;return r.apply=function(t){var r=this,n=function(t,e){var r=t.getWorldTransform();e.style.transform="matrix("+[r[0],r[1],r[4],r[5],r[12],r[13]].join(",")+")"},o=function(t){var o=t.target;if(o.nodeName===e.Shape.HTML){var i=r.getOrCreateEl(o),a=o.ownerDocument.documentElement.attributes;Object.keys(a).forEach((function(t){i.style[t]=a[t]})),Object.keys(o.attributes).forEach((function(t){r.updateAttribute(t,o)})),n(o,i)}},i=function(t){var n=t.target;if(n.nodeName===e.Shape.HTML){var o=r.getId(n),i=r.contextService.getDomElement().parentNode;if(i){var a=i.querySelector("#"+o);a&&i.removeChild(a)}}},a=function(t){var n=t.target;n.nodeName===e.Shape.HTML&&r.updateAttribute(t.attrName,n)},c=function(t){var o=t.target;if(o.nodeName===e.Shape.HTML){var i=r.getOrCreateEl(o);n(o,i)}};t.hooks.init.tapPromise(ar.tag,Je(Qe().mark((function t(){return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.addEventListener(e.ElementEvent.BOUNDS_CHANGED,c);case 4:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(ar.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,c)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.getOrCreateEl=function(t){var e=this.canvasConfig.document,r=this.getId(t),n=this.contextService.getDomElement(),o=n.parentNode;if(o){var i=o.querySelector("#"+r);if(!i){i=(e||document).createElement("div"),t.parsedStyle.$el=i,i.id=r,t.name&&i.setAttribute("name",t.name),t.className&&(i.className=t.className),o.appendChild(i),i.style.position="absolute",i.style.left=(n.offsetLeft||0)+"px",i.style.top=(n.offsetTop||0)+"px",i.style["will-change"]="transform";var a=t.getWorldTransform();i.style.transform="matrix("+[a[0],a[1],a[4],a[5],a[12],a[13]].join(",")+")"}return i}return null},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var o=r.parsedStyle.innerHTML;cr(o)?n.innerHTML=o:(n.innerHTML="",n.appendChild(o));break;case"transformOrigin":var i=r.parsedStyle.transformOrigin;n.style["transform-origin"]=i[0].value+" "+i[1].value;break;case"width":var a=r.computedStyleMap().get("width");n.style.width=a.toString();break;case"height":var c=r.computedStyleMap().get("height");n.style.height=c.toString();break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var u=r.parsedStyle.fill,s="";u instanceof e.CSSRGB?s=u.isNone?"transparent":r.getAttribute("fill"):Array.isArray(u)?s=r.getAttribute("fill"):e.isPattern(u),n.style.background=s;break;case"stroke":var h=r.parsedStyle.stroke,l="";h instanceof e.CSSRGB?l=h.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(h)?l=r.getAttribute("stroke"):e.isPattern(h),n.style["border-color"]=l,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}(),ir.tag="HTMLRendering",ar=ir);sr=ar=c([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.ContextService)),u(1,e.inject(e.RenderingContext)),u(2,e.inject(e.CanvasConfig))],sr);var hr=e.Module((function(t){t(sr)})),lr=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ke(e,r);var o=n.prototype;return o.init=function(){this.container.load(hr,!0)},o.destroy=function(){this.container.unload(hr)},n}(e.AbstractRendererPlugin),fr=Object.freeze({__proto__:null,Plugin:lr}),pr={}.toString,vr=function(t,e){return pr.call(t)==="[object "+e+"]"},dr=function(t){return vr(t,"Function")};function yr(t,e){var r;if(t)if(r=t,Array.isArray?Array.isArray(r):vr(r,"Array"))for(var n=0,o=t.length;o>n&&!1!==e(t[n],n);n++);else if(function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var gr,mr=function(t){return vr(t,"String")},wr=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return yr(t,(function(r,n){dr(t)&&"prototype"===n||e.push(r)})),e};!function(t,e){if(!dr(t))throw new TypeError("Expected a function");var r=function(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var c=t.apply(this,n);return a.set(i,c),c};r.cache=new Map}((function(t,e){void 0===e&&(e={});var r=e.fontSize,n=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return gr||(gr=document.createElement("canvas").getContext("2d")),gr.font=[i,a,o,r+"px",n].join(" "),gr.measureText(mr(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),s([t],wr(e)).join("")}));var xr=function(){function t(t){this.canvasConfig=void 0,this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=t}var n=t.prototype;return n.init=function(){var t=o(r().mark((function t(){var n,o,i,a,c,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(n=this.canvasConfig).container,a=n.devicePixelRatio,(i=n.canvas)?(this.$canvas=i,o&&i.parentElement!==o&&o.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container):o&&(this.$container=mr(o)?document.getElementById(o):o,this.$container&&(c=document.createElement("canvas"),this.$container.appendChild(c),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=c)),this.context=this.$canvas.getContext("2d"),u=1>(u=a||e.isBrowser&&window.devicePixelRatio||1)?1:Math.ceil(u),this.dpr=u,this.resize(this.canvasConfig.width,this.canvasConfig.height);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getContext=function(){return this.context},n.getDomElement=function(){return this.$canvas},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},n.resize=function(t,r){this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r))},n.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=o(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();xr=c([e.singleton({token:e.ContextService}),u(0,e.inject(e.CanvasConfig))],xr);var br=e.Module((function(t){t(xr)})),Er=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.container.load(br,!0)},r.destroy=function(){this.container.unload(br)},e}(e.AbstractRendererPlugin),Lr=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new Er),r.registerPlugin(new Wt),r.registerPlugin(new k),r.registerPlugin(new De),r.registerPlugin(new Xe),r.registerPlugin(new Lt),r.registerPlugin(new lr),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=C,t.CanvasPicker=Ot,t.CanvasRenderer=We,t.DomInteraction=qe,t.HTMLRenderer=fr,t.ImageLoader=Yt,t.Renderer=Lr,Object.defineProperty(t,"__esModule",{value:!0})}));
13
+ _e=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function d(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(p=y);var g=d.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,c(g,"constructor",d),c(d,"constructor",f),f.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Ne(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Re(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ne(i,n,o,a,c,"next",t)}function c(t){Ne(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ie(t,e){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ie(t,e)}var Ge=(ke=function(){function t(t,e,r){this.contextService=void 0,this.renderingContext=void 0,this.canvasConfig=void 0,this.$camera=void 0,this.contextService=t,this.renderingContext=e,this.canvasConfig=r}var r=t.prototype;return r.apply=function(t){var r=this,n=function(t,e){var r=t.getWorldTransform();e.style.transform="matrix("+[r[0],r[1],r[4],r[5],r[12],r[13]].join(",")+")"},o=function(t){var o=t.target;if(o.nodeName===e.Shape.HTML){var i=r.getOrCreateEl(o),a=o.ownerDocument.documentElement.attributes;Object.keys(a).forEach((function(t){i.style[t]=a[t]})),Object.keys(o.attributes).forEach((function(t){r.updateAttribute(t,o)})),n(o,i)}},i=function(t){var n=t.target;if(n.nodeName===e.Shape.HTML){var o=r.getId(n),i=r.contextService.getDomElement().parentNode;if(i){var a=i.querySelector("#"+o);a&&i.removeChild(a)}}},a=function(t){var n=t.target;n.nodeName===e.Shape.HTML&&r.updateAttribute(t.attrName,n)},c=function(t){var o=t.target;if(o.nodeName===e.Shape.HTML){var i=r.getOrCreateEl(o);n(o,i)}};t.hooks.init.tapPromise(Me.tag,Re(_e().mark((function t(){return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.addEventListener(e.ElementEvent.BOUNDS_CHANGED,c);case 4:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(Me.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,c)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.getOrCreateEl=function(t){var e=this.canvasConfig.document,r=this.getId(t),n=this.contextService.getDomElement(),o=n.parentNode;if(o){var i=o.querySelector("#"+r);if(!i){i=(e||document).createElement("div"),t.parsedStyle.$el=i,i.id=r,t.name&&i.setAttribute("name",t.name),t.className&&(i.className=t.className),o.appendChild(i),i.style.position="absolute",i.style.left=(n.offsetLeft||0)+"px",i.style.top=(n.offsetTop||0)+"px",i.style["will-change"]="transform";var a=t.getWorldTransform();i.style.transform="matrix("+[a[0],a[1],a[4],a[5],a[12],a[13]].join(",")+")"}return i}return null},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var o=r.parsedStyle.innerHTML;l(o)?n.innerHTML=o:(n.innerHTML="",n.appendChild(o));break;case"transformOrigin":var i=r.parsedStyle.transformOrigin;n.style["transform-origin"]=i[0].value+" "+i[1].value;break;case"width":var a=r.computedStyleMap().get("width");n.style.width=a.toString();break;case"height":var c=r.computedStyleMap().get("height");n.style.height=c.toString();break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var s=r.parsedStyle.fill,u="";s instanceof e.CSSRGB?u=s.isNone?"transparent":r.getAttribute("fill"):Array.isArray(s)?u=r.getAttribute("fill"):e.isPattern(s),n.style.background=u;break;case"stroke":var h=r.parsedStyle.stroke,f="";h instanceof e.CSSRGB?f=h.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(h)?f=r.getAttribute("stroke"):e.isPattern(h),n.style["border-color"]=f,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}(),ke.tag="HTMLRendering",Me=ke);Ge=Me=c([e.singleton({contrib:e.RenderingPluginContribution}),s(0,e.inject(e.ContextService)),s(1,e.inject(e.RenderingContext)),s(2,e.inject(e.CanvasConfig))],Ge);var Fe=e.Module((function(t){t(Ge)})),Be=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ie(e,r);var o=n.prototype;return o.init=function(){this.container.load(Fe,!0)},o.destroy=function(){this.container.unload(Fe)},n}(e.AbstractRendererPlugin),De=Object.freeze({__proto__:null,Plugin:Be}),Ye=function(){function t(t,e){this.canvasConfig=void 0,this.renderingContext=void 0,this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=t,this.renderingContext=e}var n=t.prototype;return n.init=function(){var t=o(r().mark((function t(){var e,n,o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(e=this.canvasConfig).container,(o=e.canvas)?(this.$canvas=o,n&&o.parentElement!==n&&n.appendChild(o),this.$container=o.parentElement,this.canvasConfig.container=this.$container):n&&(this.$container=l(n)?document.getElementById(n):n,this.$container&&(i=document.createElement("canvas"),this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i)),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getContext=function(){return this.context},n.getDomElement=function(){return this.$canvas},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},n.resize=function(t,r){var n=this.canvasConfig.devicePixelRatio||e.isBrowser&&window.devicePixelRatio||1;n=1>n?1:Math.ceil(n),this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r)),this.renderingContext.renderReasons.add(e.RenderReason.CAMERA_CHANGED)},n.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=o(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();Ye=c([e.singleton({token:e.ContextService}),s(0,e.inject(e.CanvasConfig)),s(1,e.inject(e.RenderingContext))],Ye);var We=e.Module((function(t){t(Ye)})),$e=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.container.load(We,!0)},r.destroy=function(){this.container.unload(We)},e}(e.AbstractRendererPlugin),He=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new $e),r.registerPlugin(new At),r.registerPlugin(new P),r.registerPlugin(new be),r.registerPlugin(new Ae),r.registerPlugin(new xt),r.registerPlugin(new Be),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=O,t.CanvasPicker=bt,t.CanvasRenderer=Ee,t.DomInteraction=je,t.HTMLRenderer=De,t.ImageLoader=jt,t.Renderer=He,Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g-canvas",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "A renderer implemented by Canvas 2D API",
5
5
  "keywords": [
6
6
  "antv",
@@ -18,7 +18,6 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "author": "https://github.com/orgs/antvis/people",
21
- "sideEffects": true,
22
21
  "main": "dist/index.js",
23
22
  "unpkg": "dist/index.umd.min.js",
24
23
  "module": "dist/index.esm.js",
@@ -30,12 +29,13 @@
30
29
  "README.md"
31
30
  ],
32
31
  "dependencies": {
33
- "@antv/g-plugin-canvas-path-generator": "^1.1.16",
34
- "@antv/g-plugin-canvas-picker": "^1.8.13",
35
- "@antv/g-plugin-canvas-renderer": "^1.7.19",
36
- "@antv/g-plugin-dom-interaction": "^1.7.16",
37
- "@antv/g-plugin-html-renderer": "^1.7.16",
38
- "@antv/g-plugin-image-loader": "^1.1.17",
32
+ "@antv/g-plugin-canvas-path-generator": "^1.1.18",
33
+ "@antv/g-plugin-canvas-picker": "^1.8.15",
34
+ "@antv/g-plugin-canvas-renderer": "^1.7.21",
35
+ "@antv/g-plugin-dom-interaction": "^1.7.18",
36
+ "@antv/g-plugin-html-renderer": "^1.7.18",
37
+ "@antv/g-plugin-image-loader": "^1.1.19",
38
+ "@antv/util": "^3.2.4",
39
39
  "tslib": "^2.3.1"
40
40
  },
41
41
  "devDependencies": {
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "a639abae3bcb29ab1eae75d6001447fe4eaa6f77"
51
+ "gitHead": "396bb46d0e7fea8689a8ca03b6862bd2c189c685"
52
52
  }