@antv/g-svg 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.min.js +1 -1
- package/package.json +5 -5
package/dist/index.umd.min.js
CHANGED
|
@@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function f(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}Object.create;var h=n(0),p=n(1),v="ontouchstart"in self,m=!!self.PointerEvent;var b=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},u=function(e){t.hooks.pointerOut.call(e)},c=function(e){t.hooks.pointerWheel.call(e)};t.hooks.init.tap(e.tag,(function(){var t=n.contextService.getDomElement();m?(self.document.addEventListener("pointermove",r,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",u,!0),t.addEventListener("pointerover",a,!0),self.addEventListener("pointerup",i,!0)):(self.document.addEventListener("mousemove",r,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",u,!0),t.addEventListener("mouseover",a,!0),self.addEventListener("mouseup",i,!0)),v&&(t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",r,!0)),t.addEventListener("wheel",c,{passive:!0,capture:!0})})),t.hooks.destroy.tap(e.tag,(function(){var t=n.contextService.getDomElement();m?(self.document.removeEventListener("pointermove",r,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",u,!0),t.removeEventListener("pointerover",a,!0),self.removeEventListener("pointerup",i,!0)):(self.document.removeEventListener("mousemove",r,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",u,!0),t.removeEventListener("mouseover",a,!0),self.removeEventListener("mouseup",i,!0)),v&&(t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",r,!0)),t.removeEventListener("wheel",c,!0)}))},t.tag="DOMInteractionPlugin",f([Object(p.inject)(h.ContextService),l("design:type",Object)],t.prototype,"contextService",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),y=Object(p.Module)((function(t){t(b)})),g=function(){function t(){}return t.prototype.init=function(t){t.load(y,!0)},t.prototype.destroy=function(t){t.remove(b)},t}(),M=function(){function t(){}return t.tag="c-svg-element",t}(),A={}.toString,S=function(t,e){return A.call(t)==="[object "+e+"]"},w=function(t){return S(t,"Function")},E=function(t){return Array.isArray?Array.isArray(t):S(t,"Array")},O=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var x=function(t,e){if(t)if(E(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(O(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;var P=Array.prototype,C=(P.splice,P.indexOf,Array.prototype.splice,function(t){return S(t,"String")});Object.prototype.hasOwnProperty;var j=function(t){return S(t,"Number")};Number.isInteger&&Number.isInteger;Math.PI,parseInt,Math.PI;var T=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return x(t,(function(n,r){w(t)&&"prototype"===r||e.push(n)})),e};Object.prototype;Object.prototype.hasOwnProperty;var L;Object.prototype.hasOwnProperty;(function(t,e){if(!w(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var u=t.apply(this,r);return a.set(o,u),u};n.cache=new Map})((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return L||(L=document.createElement("canvas").getContext("2d")),L.font=[o,a,i,n+"px",r].join(" "),L.measureText(C(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r}([t],T(e)).join("")})),function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();function R(t){return t.toFixed(6).replace(".000000","")}var k=function(){function t(){this.dependencies=["radius","width","height"]}return t.prototype.apply=function(t,e){var n=e.radius,r=void 0===n?0:n,i=e.width,o=void 0===i?0:i,a=e.height,u=void 0===a?0:a,c="";if(r){var s=function(t){var e=0,n=0,r=0,i=0;return E(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}(r);E(r)?1===r.length?s.r1=s.r2=s.r3=s.r4=r[0]:2===r.length?(s.r1=s.r3=r[0],s.r2=s.r4=r[1]):3===r.length?(s.r1=r[0],s.r2=s.r4=r[1],s.r3=r[2]):(s.r1=r[0],s.r2=r[1],s.r3=r[2],s.r4=r[3]):s.r1=s.r2=s.r3=s.r4=r,c=[["M "+s.r1+",0"],["l "+(o-s.r1-s.r2)+",0"],["a "+s.r2+","+s.r2+",0,0,1,"+s.r2+","+s.r2],["l 0,"+(u-s.r2-s.r3)],["a "+s.r3+","+s.r3+",0,0,1,"+-s.r3+","+s.r3],["l "+(s.r3+s.r4-o)+",0"],["a "+s.r4+","+s.r4+",0,0,1,"+-s.r4+","+-s.r4],["l 0,"+(s.r4+s.r1-u)],["a "+s.r1+","+s.r1+",0,0,1,"+s.r1+","+-s.r1],["z"]].join(" ")}else c="M 0,0 l "+o+",0 l 0,"+u+" l"+-o+" 0 z";t.setAttribute("d",c)},t=f([Object(p.singleton)()],t)}(),$=function(){function t(){this.dependencies=["img","width","height"]}return t.prototype.apply=function(t,e){var n=e.img,r=void 0===n?"":n,i=e.width,o=void 0===i?0:i,a=e.height,u=void 0===a?0:a;if(t.setAttribute("x","0"),t.setAttribute("y","0"),C(r))t.setAttribute("href",r);else if(r instanceof Image)o||t.setAttribute("width",""+r.width),u||t.setAttribute("height",""+r.height),t.setAttribute("href",r.src);else if(r instanceof HTMLElement&&C(r.nodeName)&&"CANVAS"===r.nodeName.toUpperCase())t.setAttribute("href",r.toDataURL());else if(r instanceof ImageData){var c=document.createElement("canvas");c.setAttribute("width",""+r.width),c.setAttribute("height",""+r.height);var s=c.getContext("2d");s&&(s.putImageData(r,0,0),o||t.setAttribute("width",""+r.width),u||t.setAttribute("height",""+r.height),t.setAttribute("href",c.toDataURL()))}},t=f([Object(p.singleton)()],t)}(),G=function(){function t(){this.dependencies=["x1","y1","x2","y2"]}return t.prototype.apply=function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,u=void 0===a?0:a,c=e.defY,s=void 0===c?0:c,f=e.stroke;t.setAttribute("x1",""+(n-u)),t.setAttribute("y1",""+(r-s)),t.setAttribute("x2",""+(i-u)),r===o&&f&&f.type!==h.PARSED_COLOR_TYPE.Constant?t.setAttribute("y2",""+(o-s+1e-5)):t.setAttribute("y2",""+(o-s))},t=f([Object(p.singleton)()],t)}(),_=function(){function t(){this.dependencies=["points"]}return t.prototype.apply=function(t,e){var n=e.points,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o;n&&n.points&&n.points.length>=2&&t.setAttribute("points",n.points.map((function(t){return t[0]-i+","+(t[1]-a)})).join(" "))},t=f([Object(p.singleton)()],t)}(),N=n(2),D={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},V={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},W={left:"left",start:"left",center:"middle",right:"end",end:"end"},q=function(){function t(){this.dependencies=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","padding","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","whiteSpace"]}return t.prototype.apply=function(t,e){var n=e.textAlign,r=(e.text,e.textBaseline),i=(e.fontSize,e.lineCap),o=e.lineJoin,a=e.lineWidth,u=void 0===a?0:a,c=e.metrics,s=Object(N.a)();s&&"firefox"===s.name?t.setAttribute("dominant-baseline",V[r]||"alphabetic"):(t.setAttribute("dominant-baseline",V[r]),t.setAttribute("alignment-baseline",D[r])),t.setAttribute("text-anchor",W[n]),t.setAttribute("paint-order","stroke"),t.setAttribute("style","stroke-linecap:"+i+"; stroke-linejoin:"+o+";");var f=c.lines,l=c.lineHeight,d=c.height,h=f.length;1===h?(t.innerHTML=f[0],t.setAttribute("dx",""+u/2)):t.innerHTML=f.map((function(t,e){var n=0;return 0===e?"middle"===r?n=l/2-d/2:"top"===r||"hanging"===r?n=0:"bottom"!==r&&"alphabetic"!==r&&"ideographic"!==r||(n=-l*(h-1)):n=l,'<tspan x="0" dx="'+u/2+'" dy="'+n+'">'+t+"</tspan>"})).join("")},t=f([Object(p.singleton)()],t)}(),H=function(){function t(){this.dependencies=["path"]}return t.prototype.apply=function(t,e){var n=e.path,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o;t.setAttribute("d",this.formatPath(n.absolutePath,i,a))},t.prototype.formatPath=function(t,e,n){var r=t.map((function(t){switch(t[0]){case"M":return"M "+(t[1]-e)+","+(t[2]-n);case"L":return"L "+(t[1]-e)+","+(t[2]-n);case"Q":return"Q "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n);case"C":return"C "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n)+","+(t[5]-e)+" "+(t[6]-n);case"A":return"A "+t[1]+" "+t[2]+" "+t[3]+" "+t[4]+" "+t[5]+" "+(t[6]-e)+" "+(t[7]-n);case"Z":return"Z"}})).join(" ");return~r.indexOf("NaN")?"":r},t=f([Object(p.singleton)()],t)}(),B=1e-6,I="undefined"!=typeof Float32Array?Float32Array:Array,F=Math.random;Math.PI;function Y(){var t=new I(16);return I!=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 X(t){var e=new I(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function z(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 U(t,e,n,r,i,o,a,u,c,s,f,l,d,h,p,v){var m=new I(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=o,m[6]=a,m[7]=u,m[8]=c,m[9]=s,m[10]=f,m[11]=l,m[12]=d,m[13]=h,m[14]=p,m[15]=v,m}function Z(t,e,n,r,i,o,a,u,c,s,f,l,d,h,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=s,t[9]=f,t[10]=l,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=m,t}function Q(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function K(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function J(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],c=e[6],s=e[7],f=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15],y=n*u-r*a,g=n*c-i*a,M=n*s-o*a,A=r*c-i*u,S=r*s-o*u,w=i*s-o*c,E=f*v-l*p,O=f*m-d*p,x=f*b-h*p,P=l*m-d*v,C=l*b-h*v,j=d*b-h*m,T=y*j-g*C+M*P+A*x-S*O+w*E;return T?(T=1/T,t[0]=(u*j-c*C+s*P)*T,t[1]=(i*C-r*j-o*P)*T,t[2]=(v*w-m*S+b*A)*T,t[3]=(d*S-l*w-h*A)*T,t[4]=(c*x-a*j-s*O)*T,t[5]=(n*j-i*x+o*O)*T,t[6]=(m*M-p*w-b*g)*T,t[7]=(f*w-d*M+h*g)*T,t[8]=(a*C-u*x+s*E)*T,t[9]=(r*x-n*C-o*E)*T,t[10]=(p*S-v*M+b*y)*T,t[11]=(l*M-f*S-h*y)*T,t[12]=(u*O-a*P-c*E)*T,t[13]=(n*P-r*O+i*E)*T,t[14]=(v*g-p*A-m*y)*T,t[15]=(f*A-l*g+d*y)*T,t):null}function tt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],c=e[6],s=e[7],f=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15];return t[0]=u*(d*b-h*m)-l*(c*b-s*m)+v*(c*h-s*d),t[1]=-(r*(d*b-h*m)-l*(i*b-o*m)+v*(i*h-o*d)),t[2]=r*(c*b-s*m)-u*(i*b-o*m)+v*(i*s-o*c),t[3]=-(r*(c*h-s*d)-u*(i*h-o*d)+l*(i*s-o*c)),t[4]=-(a*(d*b-h*m)-f*(c*b-s*m)+p*(c*h-s*d)),t[5]=n*(d*b-h*m)-f*(i*b-o*m)+p*(i*h-o*d),t[6]=-(n*(c*b-s*m)-a*(i*b-o*m)+p*(i*s-o*c)),t[7]=n*(c*h-s*d)-a*(i*h-o*d)+f*(i*s-o*c),t[8]=a*(l*b-h*v)-f*(u*b-s*v)+p*(u*h-s*l),t[9]=-(n*(l*b-h*v)-f*(r*b-o*v)+p*(r*h-o*l)),t[10]=n*(u*b-s*v)-a*(r*b-o*v)+p*(r*s-o*u),t[11]=-(n*(u*h-s*l)-a*(r*h-o*l)+f*(r*s-o*u)),t[12]=-(a*(l*m-d*v)-f*(u*m-c*v)+p*(u*d-c*l)),t[13]=n*(l*m-d*v)-f*(r*m-i*v)+p*(r*d-i*l),t[14]=-(n*(u*m-c*v)-a*(r*m-i*v)+p*(r*c-i*u)),t[15]=n*(u*d-c*l)-a*(r*d-i*l)+f*(r*c-i*u),t}function et(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],c=t[7],s=t[8],f=t[9],l=t[10],d=t[11],h=t[12],p=t[13],v=t[14],m=t[15];return(e*a-n*o)*(l*m-d*v)-(e*u-r*o)*(f*m-d*p)+(e*c-i*o)*(f*v-l*p)+(n*u-r*a)*(s*m-d*h)-(n*c-i*a)*(s*v-l*h)+(r*c-i*u)*(s*p-f*h)}function nt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=e[8],d=e[9],h=e[10],p=e[11],v=e[12],m=e[13],b=e[14],y=e[15],g=n[0],M=n[1],A=n[2],S=n[3];return t[0]=g*r+M*u+A*l+S*v,t[1]=g*i+M*c+A*d+S*m,t[2]=g*o+M*s+A*h+S*b,t[3]=g*a+M*f+A*p+S*y,g=n[4],M=n[5],A=n[6],S=n[7],t[4]=g*r+M*u+A*l+S*v,t[5]=g*i+M*c+A*d+S*m,t[6]=g*o+M*s+A*h+S*b,t[7]=g*a+M*f+A*p+S*y,g=n[8],M=n[9],A=n[10],S=n[11],t[8]=g*r+M*u+A*l+S*v,t[9]=g*i+M*c+A*d+S*m,t[10]=g*o+M*s+A*h+S*b,t[11]=g*a+M*f+A*p+S*y,g=n[12],M=n[13],A=n[14],S=n[15],t[12]=g*r+M*u+A*l+S*v,t[13]=g*i+M*c+A*d+S*m,t[14]=g*o+M*s+A*h+S*b,t[15]=g*a+M*f+A*p+S*y,t}function rt(t,e,n){var r,i,o,a,u,c,s,f,l,d,h,p,v=n[0],m=n[1],b=n[2];return e===t?(t[12]=e[0]*v+e[4]*m+e[8]*b+e[12],t[13]=e[1]*v+e[5]*m+e[9]*b+e[13],t[14]=e[2]*v+e[6]*m+e[10]*b+e[14],t[15]=e[3]*v+e[7]*m+e[11]*b+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=e[8],d=e[9],h=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=c,t[6]=s,t[7]=f,t[8]=l,t[9]=d,t[10]=h,t[11]=p,t[12]=r*v+u*m+l*b+e[12],t[13]=i*v+c*m+d*b+e[13],t[14]=o*v+s*m+h*b+e[14],t[15]=a*v+f*m+p*b+e[15]),t}function it(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n,r){var i,o,a,u,c,s,f,l,d,h,p,v,m,b,y,g,M,A,S,w,E,O,x,P,C=r[0],j=r[1],T=r[2],L=Math.hypot(C,j,T);return L<B?null:(C*=L=1/L,j*=L,T*=L,i=Math.sin(n),a=1-(o=Math.cos(n)),u=e[0],c=e[1],s=e[2],f=e[3],l=e[4],d=e[5],h=e[6],p=e[7],v=e[8],m=e[9],b=e[10],y=e[11],g=C*C*a+o,M=j*C*a+T*i,A=T*C*a-j*i,S=C*j*a-T*i,w=j*j*a+o,E=T*j*a+C*i,O=C*T*a+j*i,x=j*T*a-C*i,P=T*T*a+o,t[0]=u*g+l*M+v*A,t[1]=c*g+d*M+m*A,t[2]=s*g+h*M+b*A,t[3]=f*g+p*M+y*A,t[4]=u*S+l*w+v*E,t[5]=c*S+d*w+m*E,t[6]=s*S+h*w+b*E,t[7]=f*S+p*w+y*E,t[8]=u*O+l*x+v*P,t[9]=c*O+d*x+m*P,t[10]=s*O+h*x+b*P,t[11]=f*O+p*x+y*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function at(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],u=e[6],c=e[7],s=e[8],f=e[9],l=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+s*r,t[5]=a*i+f*r,t[6]=u*i+l*r,t[7]=c*i+d*r,t[8]=s*i-o*r,t[9]=f*i-a*r,t[10]=l*i-u*r,t[11]=d*i-c*r,t}function ut(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],c=e[3],s=e[8],f=e[9],l=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-s*r,t[1]=a*i-f*r,t[2]=u*i-l*r,t[3]=c*i-d*r,t[8]=o*r+s*i,t[9]=a*r+f*i,t[10]=u*r+l*i,t[11]=c*r+d*i,t}function ct(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],c=e[3],s=e[4],f=e[5],l=e[6],d=e[7];return e!==t&&(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[0]=o*i+s*r,t[1]=a*i+f*r,t[2]=u*i+l*r,t[3]=c*i+d*r,t[4]=s*i-o*r,t[5]=f*i-a*r,t[6]=l*i-u*r,t[7]=d*i-c*r,t}function st(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ft(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 lt(t,e,n){var r,i,o,a=n[0],u=n[1],c=n[2],s=Math.hypot(a,u,c);return s<B?null:(a*=s=1/s,u*=s,c*=s,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=u*a*o+c*r,t[2]=c*a*o-u*r,t[3]=0,t[4]=a*u*o-c*r,t[5]=u*u*o+i,t[6]=c*u*o+a*r,t[7]=0,t[8]=a*c*o+u*r,t[9]=u*c*o-a*r,t[10]=c*c*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function dt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ht(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function pt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=r+r,c=i+i,s=o+o,f=r*u,l=r*c,d=r*s,h=i*c,p=i*s,v=o*s,m=a*u,b=a*c,y=a*s;return t[0]=1-(h+v),t[1]=l+y,t[2]=d-b,t[3]=0,t[4]=l-y,t[5]=1-(f+v),t[6]=p+m,t[7]=0,t[8]=d+b,t[9]=p-m,t[10]=1-(f+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function mt(t,e){var n=new I(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(u*a+f*r+c*o-s*i)/l,n[1]=2*(c*a+f*i+s*r-u*o)/l,n[2]=2*(s*a+f*o+u*i-c*r)/l):(n[0]=2*(u*a+f*r+c*o-s*i),n[1]=2*(c*a+f*i+s*r-u*o),n[2]=2*(s*a+f*o+u*i-c*r)),vt(t,e,n),t}function bt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function yt(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],u=e[6],c=e[8],s=e[9],f=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,u),t[2]=Math.hypot(c,s,f),t}function gt(t,e){var n=new I(3);yt(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,u=e[1]*i,c=e[2]*o,s=e[4]*r,f=e[5]*i,l=e[6]*o,d=e[8]*r,h=e[9]*i,p=e[10]*o,v=a+f+p,m=0;return v>0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(l-h)/m,t[1]=(d-c)/m,t[2]=(u-s)/m):a>f&&a>p?(m=2*Math.sqrt(1+a-f-p),t[3]=(l-h)/m,t[0]=.25*m,t[1]=(u+s)/m,t[2]=(d+c)/m):f>p?(m=2*Math.sqrt(1+f-a-p),t[3]=(d-c)/m,t[0]=(u+s)/m,t[1]=.25*m,t[2]=(l+h)/m):(m=2*Math.sqrt(1+p-a-f),t[3]=(u-s)/m,t[0]=(d+c)/m,t[1]=(l+h)/m,t[2]=.25*m),t}function Mt(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3],c=i+i,s=o+o,f=a+a,l=i*c,d=i*s,h=i*f,p=o*s,v=o*f,m=a*f,b=u*c,y=u*s,g=u*f,M=r[0],A=r[1],S=r[2];return t[0]=(1-(p+m))*M,t[1]=(d+g)*M,t[2]=(h-y)*M,t[3]=0,t[4]=(d-g)*A,t[5]=(1-(l+m))*A,t[6]=(v+b)*A,t[7]=0,t[8]=(h+y)*S,t[9]=(v-b)*S,t[10]=(1-(l+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function At(t,e,n,r,i){var o=e[0],a=e[1],u=e[2],c=e[3],s=o+o,f=a+a,l=u+u,d=o*s,h=o*f,p=o*l,v=a*f,m=a*l,b=u*l,y=c*s,g=c*f,M=c*l,A=r[0],S=r[1],w=r[2],E=i[0],O=i[1],x=i[2],P=(1-(v+b))*A,C=(h+M)*A,j=(p-g)*A,T=(h-M)*S,L=(1-(d+b))*S,R=(m+y)*S,k=(p+g)*w,$=(m-y)*w,G=(1-(d+v))*w;return t[0]=P,t[1]=C,t[2]=j,t[3]=0,t[4]=T,t[5]=L,t[6]=R,t[7]=0,t[8]=k,t[9]=$,t[10]=G,t[11]=0,t[12]=n[0]+E-(P*E+T*O+k*x),t[13]=n[1]+O-(C*E+L*O+$*x),t[14]=n[2]+x-(j*E+R*O+G*x),t[15]=1,t}function St(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,c=i+i,s=n*a,f=r*a,l=r*u,d=i*a,h=i*u,p=i*c,v=o*a,m=o*u,b=o*c;return t[0]=1-l-p,t[1]=f+b,t[2]=d-m,t[3]=0,t[4]=f-b,t[5]=1-s-p,t[6]=h+v,t[7]=0,t[8]=d+m,t[9]=h-v,t[10]=1-s-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function wt(t,e,n,r,i,o,a){var u=1/(n-e),c=1/(i-r),s=1/(o-a);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(i+r)*c,t[10]=(a+o)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*s,t[15]=0,t}function Et(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Ot=Et;function xt(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Pt(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),c=2/(a+u),s=2/(i+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(a-u)*c*.5,t[9]=(i-o)*s*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Ct(t,e,n,r,i,o,a){var u=1/(e-n),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*c,t[14]=(a+o)*s,t[15]=1,t}var jt=Ct;function Tt(t,e,n,r,i,o,a){var u=1/(e-n),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*c,t[14]=o*s,t[15]=1,t}function Lt(t,e,n,r){var i,o,a,u,c,s,f,l,d,h,p=e[0],v=e[1],m=e[2],b=r[0],y=r[1],g=r[2],M=n[0],A=n[1],S=n[2];return Math.abs(p-M)<B&&Math.abs(v-A)<B&&Math.abs(m-S)<B?Q(t):(f=p-M,l=v-A,d=m-S,i=y*(d*=h=1/Math.hypot(f,l,d))-g*(l*=h),o=g*(f*=h)-b*d,a=b*l-y*f,(h=Math.hypot(i,o,a))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),u=l*a-d*o,c=d*i-f*a,s=f*o-l*i,(h=Math.hypot(u,c,s))?(u*=h=1/h,c*=h,s*=h):(u=0,c=0,s=0),t[0]=i,t[1]=u,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=l,t[7]=0,t[8]=a,t[9]=s,t[10]=d,t[11]=0,t[12]=-(i*p+o*v+a*m),t[13]=-(u*p+c*v+s*m),t[14]=-(f*p+l*v+d*m),t[15]=1,t)}function Rt(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=r[0],c=r[1],s=r[2],f=i-n[0],l=o-n[1],d=a-n[2],h=f*f+l*l+d*d;h>0&&(f*=h=1/Math.sqrt(h),l*=h,d*=h);var p=c*d-s*l,v=s*f-u*d,m=u*l-c*f;return(h=p*p+v*v+m*m)>0&&(p*=h=1/Math.sqrt(h),v*=h,m*=h),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-d*v,t[5]=d*p-f*m,t[6]=f*v-l*p,t[7]=0,t[8]=f,t[9]=l,t[10]=d,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function kt(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function $t(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function Gt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function _t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Nt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Dt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function Vt(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]}function Wt(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],s=t[7],f=t[8],l=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],b=t[15],y=e[0],g=e[1],M=e[2],A=e[3],S=e[4],w=e[5],E=e[6],O=e[7],x=e[8],P=e[9],C=e[10],j=e[11],T=e[12],L=e[13],R=e[14],k=e[15];return Math.abs(n-y)<=B*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-g)<=B*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(i-M)<=B*Math.max(1,Math.abs(i),Math.abs(M))&&Math.abs(o-A)<=B*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(a-S)<=B*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(u-w)<=B*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(c-E)<=B*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(s-O)<=B*Math.max(1,Math.abs(s),Math.abs(O))&&Math.abs(f-x)<=B*Math.max(1,Math.abs(f),Math.abs(x))&&Math.abs(l-P)<=B*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(d-C)<=B*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(h-j)<=B*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(p-T)<=B*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(v-L)<=B*Math.max(1,Math.abs(v),Math.abs(L))&&Math.abs(m-R)<=B*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(b-k)<=B*Math.max(1,Math.abs(b),Math.abs(k))}var qt=nt,Ht=_t;function Bt(){var t=new I(3);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=new I(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ft(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Yt(t,e,n){var r=new I(3);return r[0]=t,r[1]=e,r[2]=n,r}function Xt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Qt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Kt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Jt(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function te(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function ee(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function ne(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function re(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function ie(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function oe(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function ae(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function ue(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function ce(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function se(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function fe(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function le(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function de(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function he(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],c=n[2];return t[0]=i*c-o*u,t[1]=o*a-r*c,t[2]=r*u-i*a,t}function pe(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ve(t,e,n,r,i,o){var a=o*o,u=a*(2*o-3)+1,c=a*(o-2)+o,s=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*c+r[0]*s+i[0]*f,t[1]=e[1]*u+n[1]*c+r[1]*s+i[1]*f,t[2]=e[2]*u+n[2]*c+r[2]*s+i[2]*f,t}function me(t,e,n,r,i,o){var a=1-o,u=a*a,c=o*o,s=u*a,f=3*o*u,l=3*c*a,d=c*o;return t[0]=e[0]*s+n[0]*f+r[0]*l+i[0]*d,t[1]=e[1]*s+n[1]*f+r[1]*l+i[1]*d,t[2]=e[2]*s+n[2]*f+r[2]*l+i[2]*d,t}function be(t,e){e=e||1;var n=2*F()*Math.PI,r=2*F()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function ye(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ge(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Me(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],u=e[0],c=e[1],s=e[2],f=i*s-o*c,l=o*u-r*s,d=r*c-i*u,h=i*d-o*l,p=o*f-r*d,v=r*l-i*f,m=2*a;return f*=m,l*=m,d*=m,h*=2,p*=2,v*=2,t[0]=u+f+h,t[1]=c+l+p,t[2]=s+d+v,t}function Ae(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Se(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function we(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Ee(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2],c=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+u*u),s=c&&de(t,e)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function Oe(t){return t[0]=0,t[1]=0,t[2]=0,t}function xe(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Pe(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Ce(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2];return Math.abs(n-o)<=B*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=B*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=B*Math.max(1,Math.abs(i),Math.abs(u))}var je,Te=Zt,Le=Qt,Re=Kt,ke=ae,$e=ue,Ge=Ft,_e=ce,Ne=(je=Bt(),function(t,e,n,r,i,o){var a,u;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)je[0]=t[a],je[1]=t[a+1],je[2]=t[a+2],i(je,je,o),t[a]=je[0],t[a+1]=je[1],t[a+2]=je[2];return t});function De(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function Ve(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}!function(){var t,e=(t=new I(4),I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function We(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function qe(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function He(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Be(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>B?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Ie(t,e){var n=An(t,e);return Math.acos(2*n*n-1)}function Fe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=n[0],c=n[1],s=n[2],f=n[3];return t[0]=r*f+a*u+i*s-o*c,t[1]=i*f+a*c+o*u-r*s,t[2]=o*f+a*s+r*c-i*u,t[3]=a*f-r*u-i*c-o*s,t}function Ye(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+a*u,t[1]=i*c+o*u,t[2]=o*c-i*u,t[3]=a*c-r*u,t}function Xe(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c-o*u,t[1]=i*c+a*u,t[2]=o*c+r*u,t[3]=a*c-i*u,t}function ze(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*u,t[1]=i*c-r*u,t[2]=o*c+a*u,t[3]=a*c-o*u,t}function Ue(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function Ze(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=Math.exp(o),c=a>0?u*Math.sin(a)/a:0;return t[0]=n*c,t[1]=r*c,t[2]=i*c,t[3]=u*Math.cos(a),t}function Qe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=a>0?Math.atan2(a,o)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Ke(t,e,n){return Qe(t,e),Mn(t,t,n),Ze(t,t),t}function Je(t,e,n,r){var i,o,a,u,c,s=e[0],f=e[1],l=e[2],d=e[3],h=n[0],p=n[1],v=n[2],m=n[3];return(o=s*h+f*p+l*v+d*m)<0&&(o=-o,h=-h,p=-p,v=-v,m=-m),1-o>B?(i=Math.acos(o),a=Math.sin(i),u=Math.sin((1-r)*i)/a,c=Math.sin(r*i)/a):(u=1-r,c=r),t[0]=u*s+c*h,t[1]=u*f+c*p,t[2]=u*l+c*v,t[3]=u*d+c*m,t}function tn(t){var e=F(),n=F(),r=F(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function en(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,u=a?1/a:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-i*u,t[3]=o*u,t}function nn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function rn(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function on(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),u=Math.sin(n),c=Math.cos(n),s=Math.sin(r),f=Math.cos(r);return t[0]=o*c*f-a*u*s,t[1]=a*u*f+o*c*s,t[2]=a*c*s-o*u*f,t[3]=a*c*f+o*u*s,t}function an(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var un,cn,sn,fn,ln,dn,hn,pn=function(t){var e=new I(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},vn=function(t,e,n,r){var i=new I(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},mn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},bn=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},yn=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},gn=Fe,Mn=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},An=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Sn=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=u+r*(n[3]-u),t},wn=De,En=wn,On=Ve,xn=On,Pn=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t},Cn=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},jn=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],u=e[1],c=e[2],s=e[3];return Math.abs(n-a)<=B*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=B*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-c)<=B*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-s)<=B*Math.max(1,Math.abs(o),Math.abs(s))},Tn=(un=Bt(),cn=Yt(1,0,0),sn=Yt(0,1,0),function(t,e,n){var r=de(e,n);return r<-.999999?(he(un,cn,e),Ge(un)<1e-6&&he(un,sn,e),le(un,un),He(t,un,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(he(un,e,n),t[0]=un[0],t[1]=un[1],t[2]=un[2],t[3]=1+r,Pn(t,t))}),Ln=(fn=We(),ln=We(),function(t,e,n,r,i,o){return Je(fn,e,i,o),Je(ln,n,r,o),Je(t,fn,ln,2*o*(1-o)),t}),Rn=(dn=new I(9),I!=Float32Array&&(dn[1]=0,dn[2]=0,dn[3]=0,dn[5]=0,dn[6]=0,dn[7]=0),dn[0]=1,dn[4]=1,dn[8]=1,hn=dn,function(t,e,n,r){return hn[0]=n[0],hn[3]=n[1],hn[6]=n[2],hn[1]=r[0],hn[4]=r[1],hn[7]=r[2],hn[2]=-e[0],hn[5]=-e[1],hn[8]=-e[2],Pn(t,rn(t,hn))});function kn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $n(t,e,n,r){var i="g-filter-"+e.entity,o=t.querySelectorAll("[name="+i+"]");if(o.length&&o.forEach((function(e){t.removeChild(e)})),0===r.length)null==n||n.removeAttribute("filter");else{var a=r.map((function(e,n){var r=e.name,o=e.params,a=kn("filter");return"blur"===r?function(t,e){var n=kn("feGaussianBlur");n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation",""+e[0].value),t.appendChild(n)}(a,o):"brightness"===r?function(t,e){var n=Gn(e[0]);_n(t,{type:"linear",slope:n,intercept:0})}(a,o):"drop-shadow"===r?function(t,e){var n=e[0].value,r=e[1].value,i=e[2].value,o=e[3].formatted,a=kn("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation",""+i),t.appendChild(a);var u=kn("feOffset");u.setAttribute("dx",""+n),u.setAttribute("dy",""+r),u.setAttribute("result","offsetblur"),t.appendChild(u);var c=kn("feFlood");c.setAttribute("flood-color",o),t.appendChild(c);var s=kn("feComposite");s.setAttribute("in2","offsetblur"),s.setAttribute("operator","in"),t.appendChild(s);var f=kn("feMerge");t.appendChild(f);var l=kn("feMergeNode"),d=kn("feMergeNode");d.setAttribute("in","SourceGraphic"),f.appendChild(l),f.appendChild(d)}(a,o):"contrast"===r?function(t,e){var n=Gn(e[0]);_n(t,{type:"linear",slope:n,intercept:-.5*n+.5})}(a,o):"grayscale"===r?function(t,e){var n=Gn(e[0]);Nn(t,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(a,o):"sepia"===r?function(t,e){var n=Gn(e[0]);Nn(t,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(a,o):"saturate"===r?function(t,e){var n=Gn(e[0]),r=kn("feColorMatrix");r.setAttribute("type","saturate"),r.setAttribute("values",""+n),t.appendChild(r)}(a,o):"hue-rotate"===r?function(t,e){var n=kn("feColorMatrix");n.setAttribute("type","hueRotate"),n.setAttribute("values",""+Object(h.convertAngleUnit)(e[0])),t.appendChild(n)}(a,o):"invert"===r&&function(t,e){var n=Gn(e[0]);_n(t,{type:"table",tableValues:n+" "+(1-n)})}(a,o),a.id=i+"-"+n,a.setAttribute("name",i),t.appendChild(a),a.id}));null==n||n.setAttribute("filter",a.map((function(t){return"url(#"+t+")"})).join(" "))}}function Gn(t){return"%"===t.unit?t.value/100:t.value}function _n(t,e){var n=e.type,r=e.slope,i=e.intercept,o=e.tableValues,a=kn("feComponentTransfer");[kn("feFuncR"),kn("feFuncG"),kn("feFuncB")].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues",""+o):(t.setAttribute("slope",""+r),t.setAttribute("intercept",""+i)),a.appendChild(t)})),t.appendChild(a)}function Nn(t,e){var n=kn("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values",e.join(" ")),t.appendChild(n)}var Dn={},Vn=0;function Wn(t,e,n,r,i){var o=function(t){var e="",n=t.type;if(n===h.PARSED_COLOR_TYPE.Pattern){var r=t.value.src;e=r}else if(n===h.PARSED_COLOR_TYPE.LinearGradient||n===h.PARSED_COLOR_TYPE.RadialGradient){var i=t.value,o=i.x0,a=i.y0,u=i.x1,c=i.y1,s=i.r1,f=i.steps;e=""+n+o+a+u+c+(s||0)+f.map((function(t){return t.join("")})).join("")}e&&(Dn[e]||(Dn[e]="_pattern_"+n+"_"+Vn++));return Dn[e]}(r),a=t.querySelector("#"+o);r.type===h.PARSED_COLOR_TYPE.LinearGradient||r.type===h.PARSED_COLOR_TYPE.RadialGradient?(a||function(t,e,n){var r=kn(e.type===h.PARSED_COLOR_TYPE.LinearGradient?"linearGradient":"radialGradient");if(e.type===h.PARSED_COLOR_TYPE.LinearGradient){var i=e.value,o=i.x0,a=i.y0,u=i.x1,c=i.y1;r.setAttribute("x1",""+o),r.setAttribute("y1",""+a),r.setAttribute("x2",""+u),r.setAttribute("y2",""+c)}else{var s=e.value,f=(o=s.x0,a=s.y0,s.r1);r.setAttribute("cx",""+o),r.setAttribute("cy",""+a),r.setAttribute("r",""+f/2)}var l="";e.value.steps.forEach((function(t){var e=d(t,2),n=e[0],r=e[1];l+='<stop offset="'+n+'" stop-color="'+r+'"></stop>'})),r.innerHTML=l,r.id=n,t.appendChild(r)}(t,r,o),null==n||n.setAttribute(i,"url(#"+o+")")):r.type===h.PARSED_COLOR_TYPE.Pattern?(a||function(t,e,n){var r=e.value.src,i=kn("pattern");i.setAttribute("patternUnits","userSpaceOnUse");var o=kn("image");i.appendChild(o),i.id=n,t.appendChild(i),o.setAttribute("href",r);var a=new window.Image;r.match(/^data:/i)||(a.crossOrigin="Anonymous");function u(){i.setAttribute("width",""+a.width),i.setAttribute("height",""+a.height)}a.src=r,a.complete?u():(a.onload=u,a.src=a.src)}(t,r,o),null==n||n.setAttribute(i,"url(#"+o+")")):null==n||n.setAttribute(i,""+r.formatted)}var qn;var Hn=((qn={})[h.SHAPE.Rect]="path",qn[h.SHAPE.Circle]="circle",qn[h.SHAPE.Ellipse]="ellipse",qn[h.SHAPE.Image]="image",qn[h.SHAPE.Group]="g",qn[h.SHAPE.Line]="line",qn[h.SHAPE.Polyline]="polyline",qn[h.SHAPE.Polygon]="polygon",qn[h.SHAPE.Text]="text",qn[h.SHAPE.Path]="path",qn[h.SHAPE.HTML]="foreignObject",qn),Bn={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML"},In=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(t){var e=t.target;n.createSVGDom(e,n.$camera)},i=function(t){var e=t.target;n.removeSVGDom(e)},o=function(t){var e,r,i=t.target,o=t.detail,a=o.attributeName;o.newValue;if("zIndex"===a){var u=i.parentNode,c=null===(r=null===(e=i.parentNode)||void 0===e?void 0:e.elementSVG)||void 0===r?void 0:r.$groupEl,s=((null==u?void 0:u.children)||[]).slice();c&&n.reorderChildren(c,s)}n.updateAttribute(i,a,i.parsedStyle[a])};t.hooks.init.tap(e.tag,(function(){n.$def=kn("defs");var t=n.contextService.getContext();t.appendChild(n.$def),t.setAttribute("color-interpolation-filters","sRGB"),n.$camera=kn("g"),n.$camera.id="g_svg_camera",n.applyTransform(n.$camera,n.camera.getOrthoMatrix()),t.appendChild(n.$camera),n.renderingContext.root.addEventListener(h.ElementEvent.MOUNTED,r),n.renderingContext.root.addEventListener(h.ElementEvent.UNMOUNTED,i),n.renderingContext.root.addEventListener(h.ElementEvent.ATTRIBUTE_CHANGED,o)})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(h.ElementEvent.MOUNTED,r),n.renderingContext.root.removeEventListener(h.ElementEvent.UNMOUNTED,i),n.renderingContext.root.removeEventListener(h.ElementEvent.ATTRIBUTE_CHANGED,o)})),t.hooks.render.tap(e.tag,(function(t){var e,r;n.renderingContext.renderReasons.has(h.RENDER_REASON.CameraChanged)&&n.applyTransform(n.$camera,n.camera.getOrthoMatrix());var i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;i&&o&&(n.applyTransform(o,t.getLocalTransform()),n.reorderChildren(o,t.children||[]),t.renderable.dirty=!1)}))},t.prototype.reorderChildren=function(t,e){e.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}));var n=document.createDocumentFragment();e.forEach((function(t){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)})),t.appendChild(n)},t.prototype.applyTransform=function(t,e){var n=i.getTranslation(o.create(),e),r=i.getScaling(o.create(),e),u=i.getRotation(a.create(),e),c=d(n,2),s=c[0],f=c[1],l=d(r,2),p=l[0],v=l[1],m=d(Object(h.getEuler)(o.create(),u),3),b=m[0],y=(m[1],m[2]),g=Object(h.fromRotationTranslationScale)(b||y,s,f,p,v);t.setAttribute("transform","matrix("+R(g[0])+","+R(g[1])+","+R(g[3])+","+R(g[4])+","+R(g[6])+","+R(g[7])+")")},t.prototype.applyAttributes=function(t){var e,n,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,i=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;if(r&&i){var o=t.nodeName,a=t.attributes,u=t.parsedStyle;for(var c in r.setAttribute("fill","none"),o===h.SHAPE.Image&&r.setAttribute("preserveAspectRatio","none"),a)this.updateAttribute(t,c,u[c],!0);var s=this.elementRendererFactory(o);s&&s.apply(r,u)}},t.prototype.updateAttribute=function(t,e,n,r){var i,o,a;void 0===r&&(r=!1);var u=null===(i=t.elementSVG)||void 0===i?void 0:i.$el,c=null===(o=t.elementSVG)||void 0===o?void 0:o.$groupEl,s=t.parsedStyle;if(Bn[e])if("fill"===e||"stroke"===e)Wn(this.$def,0,u,s[e],Bn[e]);else if("visibility"===e)null==c||c.setAttribute(Bn[e],""+n);else if("clipPath"===e){var f=n;if(f){var l="clip-path-"+f.id;if(!this.$def.querySelector("#"+l)){var d=kn("clipPath");d.id=l,this.$def.appendChild(d),this.createSVGDom(f,d,!0),f.elementSVG.$groupEl=d}var p=null===(a=f.elementSVG)||void 0===a?void 0:a.$groupEl;p&&this.applyTransform(p,f.getLocalTransform()),this.applyAttributes(f),null==u||u.setAttribute("clip-path","url(#"+l+")")}else null==u||u.removeAttribute("clip-path")}else if("shadowColor"===e||"shadowBlur"===e||"shadowOffsetX"===e||"shadowOffsetY"===e)!function(t,e,n,r){var i="filter-dropshadow-"+e.entity,o=t.querySelector("#"+i);if(!o){o=kn("filter");var a=kn("feDropShadow");a.setAttribute("dx","0"),a.setAttribute("dy","0"),o.appendChild(a),o.id=i,t.appendChild(o)}var u=o.children[0];if("shadowColor"===r){var c=e.parsedStyle[r];u.setAttribute("flood-color",c.formatted)}else"shadowBlur"===r?u.setAttribute("stdDeviation",""+Number(e.parsedStyle[r])/2):"shadowOffsetX"===r?u.setAttribute("dx",e.parsedStyle[r]):"shadowOffsetY"===r&&u.setAttribute("dy",e.parsedStyle[r]);null==n||n.setAttribute("filter","url(#"+i+")")}(this.$def,t,u,e);else if("filter"===e)$n(this.$def,t,u,s[e]);else if("innerHTML"===e){var v=document.createElement("div");"string"==typeof n?v.innerHTML=n:v.appendChild(n),u.innerHTML="",u.appendChild(v)}else t.nodeName!==h.SHAPE.Text&&["anchor","width","height","r","rx","ry"].indexOf(e)>-1&&this.updateAnchorWithTransform(t),"anchor"!==e&&(null==u||u.setAttribute(Bn[e],""+n));if(!r&&u){var m=this.elementRendererFactory(t.nodeName);m&&m.dependencies.indexOf(e)>-1&&m.apply(u,t.parsedStyle)}},t.prototype.createSVGDom=function(t,e,n){var r;void 0===n&&(n=!1),t.elementSVG=new M;var i=t.elementSVG,o=Hn[t.nodeName]||"g";if(o){var a=void 0,u=kn(o);t.nodeName===h.SHAPE.HTML&&(t.parsedStyle.$el=u),u.id="g_svg_"+t.nodeName+"_"+t.entity,"g"===o||n?a=u:(a=kn("g")).appendChild(u),i.$el=u,i.$groupEl=a;var c=t.parentNode&&(null===(r=t.parentNode.elementSVG)||void 0===r?void 0:r.$groupEl)||e;c&&c.appendChild(a),this.applyAttributes(t)}},t.prototype.removeSVGDom=function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&n.parentNode.removeChild(n)},t.prototype.updateAnchorWithTransform=function(t){var e,n=t.getGeometryBounds(),r=n&&2*n.halfExtents[0]||0,i=n&&2*n.halfExtents[1]||0,o=(t.parsedStyle||{}).anchor,a=void 0===o?[0,0]:o,u=null===(e=t.elementSVG)||void 0===e?void 0:e.$el;null==u||u.setAttribute("transform","translate(-"+a[0]*r+",-"+a[1]*i+")"),t.nodeName!==h.SHAPE.Circle&&t.nodeName!==h.SHAPE.Ellipse||(null==u||u.setAttribute("cx",""+r/2),null==u||u.setAttribute("cy",""+i/2))},t.tag="SVGRendererPlugin",f([Object(p.inject)(h.DefaultCamera),l("design:type",h.Camera)],t.prototype,"camera",void 0),f([Object(p.inject)(h.ContextService),l("design:type",Object)],t.prototype,"contextService",void 0),f([Object(p.inject)(h.RenderingContext),l("design:type",Object)],t.prototype,"renderingContext",void 0),f([Object(p.inject)(h.SceneGraphService),l("design:type",Object)],t.prototype,"sceneGraphService",void 0),f([Object(p.inject)("ElementRendererFactory"),l("design:type",Function)],t.prototype,"elementRendererFactory",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),Fn=Object(p.Module)((function(t){t(k),t($),t(G),t(_),t(q),t(H),t({token:"ElementRendererFactory",useFactory:function(t){return function(e){return e===h.SHAPE.Rect?t.container.get(k):e===h.SHAPE.Image?t.container.get($):e===h.SHAPE.Line?t.container.get(G):e===h.SHAPE.Polyline||e===h.SHAPE.Polygon?t.container.get(_):e===h.SHAPE.Text?t.container.get(q):e===h.SHAPE.Path?t.container.get(H):null}}}),t(In)})),Yn=function(){function t(){}return t.prototype.init=function(t){t.load(Fn,!0)},t.prototype.destroy=function(t){t.remove(k),t.remove($),t.remove(G),t.remove(_),t.remove(q),t.remove(H),t.remove("ElementRendererFactory"),t.remove(In)},t}(),Xn=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.pick.tap(e.tag,(function(t){var e=t.position,r=e.clientX,i=e.clientY;try{var o=document.elementFromPoint(r,i),a=null,u=o&&o.getAttribute("id");if(u){var c=u.lastIndexOf("_");(a=n.displayObjectPool.getByEntity(Number(u.substring(c+1)))).interactive||(a=null)}t.picked=a}catch(e){t.picked=null}return t}))},t.tag="SVGPickerPlugin",f([Object(p.inject)(h.SceneGraphService),l("design:type",Object)],t.prototype,"sceneGraphService",void 0),f([Object(p.inject)(h.DisplayObjectPool),l("design:type",h.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),zn=Object(p.Module)((function(t){t(Xn)})),Un=function(){function t(){}return t.prototype.init=function(t){t.load(zn,!0)},t.prototype.destroy=function(t){t.remove(Xn)},t}(),Zn=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig.container;if(this.$container=C(t)?document.getElementById(t):t,this.$container){this.$container.style.position||(this.$container.style.position="relative");var e=kn("svg");e.setAttribute("width",""+this.canvasConfig.width),e.setAttribute("height",""+this.canvasConfig.height),this.$container.appendChild(e),this.$namespace=e}var n=window.devicePixelRatio||1;n=n>=1?Math.ceil(n):1,this.dpr=n},t.prototype.getDomElement=function(){return this.$namespace},t.prototype.getContext=function(){return this.$namespace},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},t.prototype.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width",""+t),this.$namespace.setAttribute("height",""+e))},t.prototype.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},f([Object(p.inject)(h.CanvasConfig),l("design:type",Object)],t.prototype,"canvasConfig",void 0),t=f([Object(p.singleton)({token:h.ContextService})],t)}(),Qn=Object(p.Module)((function(t){t(Zn)})),Kn=function(){function t(){}return t.prototype.init=function(t){t.load(Qn,!0)},t.prototype.destroy=function(t){t.remove(Zn)},t}(),Jn=function(t){function e(e){var n=t.call(this,e)||this;return n.registerPlugin(new Kn),n.registerPlugin(new Yn),n.registerPlugin(new g),n.registerPlugin(new Un),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(h.AbstractRenderer)}])}));
|
|
16
|
+
var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function f(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}Object.create;var h=n(0),p=n(1),v="ontouchstart"in self,m=!!self.PointerEvent;var b=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},u=function(e){t.hooks.pointerOut.call(e)},c=function(e){t.hooks.pointerWheel.call(e)};t.hooks.init.tap(e.tag,(function(){var t=n.contextService.getDomElement();m?(self.document.addEventListener("pointermove",r,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",u,!0),t.addEventListener("pointerover",a,!0),self.addEventListener("pointerup",i,!0)):(self.document.addEventListener("mousemove",r,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",u,!0),t.addEventListener("mouseover",a,!0),self.addEventListener("mouseup",i,!0)),v&&(t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",r,!0)),t.addEventListener("wheel",c,{passive:!0,capture:!0})})),t.hooks.destroy.tap(e.tag,(function(){var t=n.contextService.getDomElement();m?(self.document.removeEventListener("pointermove",r,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",u,!0),t.removeEventListener("pointerover",a,!0),self.removeEventListener("pointerup",i,!0)):(self.document.removeEventListener("mousemove",r,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",u,!0),t.removeEventListener("mouseover",a,!0),self.removeEventListener("mouseup",i,!0)),v&&(t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",r,!0)),t.removeEventListener("wheel",c,!0)}))},t.tag="DOMInteractionPlugin",f([Object(p.inject)(h.ContextService),l("design:type",Object)],t.prototype,"contextService",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),y=Object(p.Module)((function(t){t(b)})),g=function(){function t(){}return t.prototype.init=function(t){t.load(y,!0)},t.prototype.destroy=function(t){t.remove(b)},t}(),M=function(){function t(){}return t.tag="c-svg-element",t}(),A={}.toString,S=function(t,e){return A.call(t)==="[object "+e+"]"},w=function(t){return S(t,"Function")},E=function(t){return Array.isArray?Array.isArray(t):S(t,"Array")},O=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var x=function(t,e){if(t)if(E(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(O(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;var P=Array.prototype,C=(P.splice,P.indexOf,Array.prototype.splice,function(t){return S(t,"String")});Object.prototype.hasOwnProperty;var j=function(t){return S(t,"Number")};Number.isInteger&&Number.isInteger;Math.PI,parseInt,Math.PI;var T=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return x(t,(function(n,r){w(t)&&"prototype"===r||e.push(n)})),e};Object.prototype;Object.prototype.hasOwnProperty;var L;Object.prototype.hasOwnProperty;(function(t,e){if(!w(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var u=t.apply(this,r);return a.set(o,u),u};n.cache=new Map})((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return L||(L=document.createElement("canvas").getContext("2d")),L.font=[o,a,i,n+"px",r].join(" "),L.measureText(C(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r}([t],T(e)).join("")})),function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();function R(t){return t.toFixed(6).replace(".000000","")}var k=function(){function t(){this.dependencies=["radius","width","height"]}return t.prototype.apply=function(t,e){var n=e.radius,r=void 0===n?0:n,i=e.width,o=void 0===i?0:i,a=e.height,u=void 0===a?0:a,c="";if(r){var s=function(t){var e=0,n=0,r=0,i=0;return E(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}(r);E(r)?1===r.length?s.r1=s.r2=s.r3=s.r4=r[0]:2===r.length?(s.r1=s.r3=r[0],s.r2=s.r4=r[1]):3===r.length?(s.r1=r[0],s.r2=s.r4=r[1],s.r3=r[2]):(s.r1=r[0],s.r2=r[1],s.r3=r[2],s.r4=r[3]):s.r1=s.r2=s.r3=s.r4=r,c=[["M "+s.r1+",0"],["l "+(o-s.r1-s.r2)+",0"],["a "+s.r2+","+s.r2+",0,0,1,"+s.r2+","+s.r2],["l 0,"+(u-s.r2-s.r3)],["a "+s.r3+","+s.r3+",0,0,1,"+-s.r3+","+s.r3],["l "+(s.r3+s.r4-o)+",0"],["a "+s.r4+","+s.r4+",0,0,1,"+-s.r4+","+-s.r4],["l 0,"+(s.r4+s.r1-u)],["a "+s.r1+","+s.r1+",0,0,1,"+s.r1+","+-s.r1],["z"]].join(" ")}else c="M 0,0 l "+o+",0 l 0,"+u+" l"+-o+" 0 z";t.setAttribute("d",c)},t=f([Object(p.singleton)()],t)}(),$=function(){function t(){this.dependencies=["img","width","height"]}return t.prototype.apply=function(t,e){var n=e.img,r=void 0===n?"":n,i=e.width,o=void 0===i?0:i,a=e.height,u=void 0===a?0:a;if(t.setAttribute("x","0"),t.setAttribute("y","0"),C(r))t.setAttribute("href",r);else if(r instanceof Image)o||t.setAttribute("width",""+r.width),u||t.setAttribute("height",""+r.height),t.setAttribute("href",r.src);else if(r instanceof HTMLElement&&C(r.nodeName)&&"CANVAS"===r.nodeName.toUpperCase())t.setAttribute("href",r.toDataURL());else if(r instanceof ImageData){var c=document.createElement("canvas");c.setAttribute("width",""+r.width),c.setAttribute("height",""+r.height);var s=c.getContext("2d");s&&(s.putImageData(r,0,0),o||t.setAttribute("width",""+r.width),u||t.setAttribute("height",""+r.height),t.setAttribute("href",c.toDataURL()))}},t=f([Object(p.singleton)()],t)}(),G=function(){function t(){this.dependencies=["x1","y1","x2","y2"]}return t.prototype.apply=function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,u=void 0===a?0:a,c=e.defY,s=void 0===c?0:c,f=e.stroke;t.setAttribute("x1",""+(n-u)),t.setAttribute("y1",""+(r-s)),t.setAttribute("x2",""+(i-u)),r===o&&f&&f.type!==h.PARSED_COLOR_TYPE.Constant?t.setAttribute("y2",""+(o-s+1e-5)):t.setAttribute("y2",""+(o-s))},t=f([Object(p.singleton)()],t)}(),_=function(){function t(){this.dependencies=["points"]}return t.prototype.apply=function(t,e){var n=e.points,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o;n&&n.points&&n.points.length>=2&&t.setAttribute("points",n.points.map((function(t){return t[0]-i+","+(t[1]-a)})).join(" "))},t=f([Object(p.singleton)()],t)}(),N=n(2),D={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},V={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},W={left:"left",start:"left",center:"middle",right:"end",end:"end"},q=function(){function t(){this.dependencies=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","whiteSpace"]}return t.prototype.apply=function(t,e){var n=e.textAlign,r=(e.text,e.textBaseline),i=(e.fontSize,e.lineCap),o=e.lineJoin,a=e.lineWidth,u=void 0===a?0:a,c=e.metrics,s=Object(N.a)();s&&"firefox"===s.name?t.setAttribute("dominant-baseline",V[r]||"alphabetic"):(t.setAttribute("dominant-baseline",V[r]),t.setAttribute("alignment-baseline",D[r])),t.setAttribute("text-anchor",W[n]),t.setAttribute("paint-order","stroke"),t.setAttribute("style","stroke-linecap:"+i+"; stroke-linejoin:"+o+";");var f=c.lines,l=c.lineHeight,d=c.height,h=f.length;1===h?(t.innerHTML=f[0],t.setAttribute("dx",""+u/2)):t.innerHTML=f.map((function(t,e){var n=0;return 0===e?"middle"===r?n=l/2-d/2:"top"===r||"hanging"===r?n=0:"bottom"!==r&&"alphabetic"!==r&&"ideographic"!==r||(n=-l*(h-1)):n=l,'<tspan x="0" dx="'+u/2+'" dy="'+n+'">'+t+"</tspan>"})).join("")},t=f([Object(p.singleton)()],t)}(),H=function(){function t(){this.dependencies=["path"]}return t.prototype.apply=function(t,e){var n=e.path,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o;t.setAttribute("d",this.formatPath(n.absolutePath,i,a))},t.prototype.formatPath=function(t,e,n){var r=t.map((function(t){switch(t[0]){case"M":return"M "+(t[1]-e)+","+(t[2]-n);case"L":return"L "+(t[1]-e)+","+(t[2]-n);case"Q":return"Q "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n);case"C":return"C "+(t[1]-e)+" "+(t[2]-n)+","+(t[3]-e)+" "+(t[4]-n)+","+(t[5]-e)+" "+(t[6]-n);case"A":return"A "+t[1]+" "+t[2]+" "+t[3]+" "+t[4]+" "+t[5]+" "+(t[6]-e)+" "+(t[7]-n);case"Z":return"Z"}})).join(" ");return~r.indexOf("NaN")?"":r},t=f([Object(p.singleton)()],t)}(),B=1e-6,I="undefined"!=typeof Float32Array?Float32Array:Array,F=Math.random;Math.PI;function Y(){var t=new I(16);return I!=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 X(t){var e=new I(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function z(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 U(t,e,n,r,i,o,a,u,c,s,f,l,d,h,p,v){var m=new I(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=o,m[6]=a,m[7]=u,m[8]=c,m[9]=s,m[10]=f,m[11]=l,m[12]=d,m[13]=h,m[14]=p,m[15]=v,m}function Z(t,e,n,r,i,o,a,u,c,s,f,l,d,h,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=s,t[9]=f,t[10]=l,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=m,t}function Q(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function K(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function J(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],c=e[6],s=e[7],f=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15],y=n*u-r*a,g=n*c-i*a,M=n*s-o*a,A=r*c-i*u,S=r*s-o*u,w=i*s-o*c,E=f*v-l*p,O=f*m-d*p,x=f*b-h*p,P=l*m-d*v,C=l*b-h*v,j=d*b-h*m,T=y*j-g*C+M*P+A*x-S*O+w*E;return T?(T=1/T,t[0]=(u*j-c*C+s*P)*T,t[1]=(i*C-r*j-o*P)*T,t[2]=(v*w-m*S+b*A)*T,t[3]=(d*S-l*w-h*A)*T,t[4]=(c*x-a*j-s*O)*T,t[5]=(n*j-i*x+o*O)*T,t[6]=(m*M-p*w-b*g)*T,t[7]=(f*w-d*M+h*g)*T,t[8]=(a*C-u*x+s*E)*T,t[9]=(r*x-n*C-o*E)*T,t[10]=(p*S-v*M+b*y)*T,t[11]=(l*M-f*S-h*y)*T,t[12]=(u*O-a*P-c*E)*T,t[13]=(n*P-r*O+i*E)*T,t[14]=(v*g-p*A-m*y)*T,t[15]=(f*A-l*g+d*y)*T,t):null}function tt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],c=e[6],s=e[7],f=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15];return t[0]=u*(d*b-h*m)-l*(c*b-s*m)+v*(c*h-s*d),t[1]=-(r*(d*b-h*m)-l*(i*b-o*m)+v*(i*h-o*d)),t[2]=r*(c*b-s*m)-u*(i*b-o*m)+v*(i*s-o*c),t[3]=-(r*(c*h-s*d)-u*(i*h-o*d)+l*(i*s-o*c)),t[4]=-(a*(d*b-h*m)-f*(c*b-s*m)+p*(c*h-s*d)),t[5]=n*(d*b-h*m)-f*(i*b-o*m)+p*(i*h-o*d),t[6]=-(n*(c*b-s*m)-a*(i*b-o*m)+p*(i*s-o*c)),t[7]=n*(c*h-s*d)-a*(i*h-o*d)+f*(i*s-o*c),t[8]=a*(l*b-h*v)-f*(u*b-s*v)+p*(u*h-s*l),t[9]=-(n*(l*b-h*v)-f*(r*b-o*v)+p*(r*h-o*l)),t[10]=n*(u*b-s*v)-a*(r*b-o*v)+p*(r*s-o*u),t[11]=-(n*(u*h-s*l)-a*(r*h-o*l)+f*(r*s-o*u)),t[12]=-(a*(l*m-d*v)-f*(u*m-c*v)+p*(u*d-c*l)),t[13]=n*(l*m-d*v)-f*(r*m-i*v)+p*(r*d-i*l),t[14]=-(n*(u*m-c*v)-a*(r*m-i*v)+p*(r*c-i*u)),t[15]=n*(u*d-c*l)-a*(r*d-i*l)+f*(r*c-i*u),t}function et(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],c=t[7],s=t[8],f=t[9],l=t[10],d=t[11],h=t[12],p=t[13],v=t[14],m=t[15];return(e*a-n*o)*(l*m-d*v)-(e*u-r*o)*(f*m-d*p)+(e*c-i*o)*(f*v-l*p)+(n*u-r*a)*(s*m-d*h)-(n*c-i*a)*(s*v-l*h)+(r*c-i*u)*(s*p-f*h)}function nt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=e[8],d=e[9],h=e[10],p=e[11],v=e[12],m=e[13],b=e[14],y=e[15],g=n[0],M=n[1],A=n[2],S=n[3];return t[0]=g*r+M*u+A*l+S*v,t[1]=g*i+M*c+A*d+S*m,t[2]=g*o+M*s+A*h+S*b,t[3]=g*a+M*f+A*p+S*y,g=n[4],M=n[5],A=n[6],S=n[7],t[4]=g*r+M*u+A*l+S*v,t[5]=g*i+M*c+A*d+S*m,t[6]=g*o+M*s+A*h+S*b,t[7]=g*a+M*f+A*p+S*y,g=n[8],M=n[9],A=n[10],S=n[11],t[8]=g*r+M*u+A*l+S*v,t[9]=g*i+M*c+A*d+S*m,t[10]=g*o+M*s+A*h+S*b,t[11]=g*a+M*f+A*p+S*y,g=n[12],M=n[13],A=n[14],S=n[15],t[12]=g*r+M*u+A*l+S*v,t[13]=g*i+M*c+A*d+S*m,t[14]=g*o+M*s+A*h+S*b,t[15]=g*a+M*f+A*p+S*y,t}function rt(t,e,n){var r,i,o,a,u,c,s,f,l,d,h,p,v=n[0],m=n[1],b=n[2];return e===t?(t[12]=e[0]*v+e[4]*m+e[8]*b+e[12],t[13]=e[1]*v+e[5]*m+e[9]*b+e[13],t[14]=e[2]*v+e[6]*m+e[10]*b+e[14],t[15]=e[3]*v+e[7]*m+e[11]*b+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=e[8],d=e[9],h=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=c,t[6]=s,t[7]=f,t[8]=l,t[9]=d,t[10]=h,t[11]=p,t[12]=r*v+u*m+l*b+e[12],t[13]=i*v+c*m+d*b+e[13],t[14]=o*v+s*m+h*b+e[14],t[15]=a*v+f*m+p*b+e[15]),t}function it(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n,r){var i,o,a,u,c,s,f,l,d,h,p,v,m,b,y,g,M,A,S,w,E,O,x,P,C=r[0],j=r[1],T=r[2],L=Math.hypot(C,j,T);return L<B?null:(C*=L=1/L,j*=L,T*=L,i=Math.sin(n),a=1-(o=Math.cos(n)),u=e[0],c=e[1],s=e[2],f=e[3],l=e[4],d=e[5],h=e[6],p=e[7],v=e[8],m=e[9],b=e[10],y=e[11],g=C*C*a+o,M=j*C*a+T*i,A=T*C*a-j*i,S=C*j*a-T*i,w=j*j*a+o,E=T*j*a+C*i,O=C*T*a+j*i,x=j*T*a-C*i,P=T*T*a+o,t[0]=u*g+l*M+v*A,t[1]=c*g+d*M+m*A,t[2]=s*g+h*M+b*A,t[3]=f*g+p*M+y*A,t[4]=u*S+l*w+v*E,t[5]=c*S+d*w+m*E,t[6]=s*S+h*w+b*E,t[7]=f*S+p*w+y*E,t[8]=u*O+l*x+v*P,t[9]=c*O+d*x+m*P,t[10]=s*O+h*x+b*P,t[11]=f*O+p*x+y*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function at(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],u=e[6],c=e[7],s=e[8],f=e[9],l=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+s*r,t[5]=a*i+f*r,t[6]=u*i+l*r,t[7]=c*i+d*r,t[8]=s*i-o*r,t[9]=f*i-a*r,t[10]=l*i-u*r,t[11]=d*i-c*r,t}function ut(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],c=e[3],s=e[8],f=e[9],l=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-s*r,t[1]=a*i-f*r,t[2]=u*i-l*r,t[3]=c*i-d*r,t[8]=o*r+s*i,t[9]=a*r+f*i,t[10]=u*r+l*i,t[11]=c*r+d*i,t}function ct(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],c=e[3],s=e[4],f=e[5],l=e[6],d=e[7];return e!==t&&(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[0]=o*i+s*r,t[1]=a*i+f*r,t[2]=u*i+l*r,t[3]=c*i+d*r,t[4]=s*i-o*r,t[5]=f*i-a*r,t[6]=l*i-u*r,t[7]=d*i-c*r,t}function st(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ft(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 lt(t,e,n){var r,i,o,a=n[0],u=n[1],c=n[2],s=Math.hypot(a,u,c);return s<B?null:(a*=s=1/s,u*=s,c*=s,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=u*a*o+c*r,t[2]=c*a*o-u*r,t[3]=0,t[4]=a*u*o-c*r,t[5]=u*u*o+i,t[6]=c*u*o+a*r,t[7]=0,t[8]=a*c*o+u*r,t[9]=u*c*o-a*r,t[10]=c*c*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function dt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ht(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function pt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=r+r,c=i+i,s=o+o,f=r*u,l=r*c,d=r*s,h=i*c,p=i*s,v=o*s,m=a*u,b=a*c,y=a*s;return t[0]=1-(h+v),t[1]=l+y,t[2]=d-b,t[3]=0,t[4]=l-y,t[5]=1-(f+v),t[6]=p+m,t[7]=0,t[8]=d+b,t[9]=p-m,t[10]=1-(f+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function mt(t,e){var n=new I(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],u=e[4],c=e[5],s=e[6],f=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(u*a+f*r+c*o-s*i)/l,n[1]=2*(c*a+f*i+s*r-u*o)/l,n[2]=2*(s*a+f*o+u*i-c*r)/l):(n[0]=2*(u*a+f*r+c*o-s*i),n[1]=2*(c*a+f*i+s*r-u*o),n[2]=2*(s*a+f*o+u*i-c*r)),vt(t,e,n),t}function bt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function yt(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],u=e[6],c=e[8],s=e[9],f=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,u),t[2]=Math.hypot(c,s,f),t}function gt(t,e){var n=new I(3);yt(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,u=e[1]*i,c=e[2]*o,s=e[4]*r,f=e[5]*i,l=e[6]*o,d=e[8]*r,h=e[9]*i,p=e[10]*o,v=a+f+p,m=0;return v>0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(l-h)/m,t[1]=(d-c)/m,t[2]=(u-s)/m):a>f&&a>p?(m=2*Math.sqrt(1+a-f-p),t[3]=(l-h)/m,t[0]=.25*m,t[1]=(u+s)/m,t[2]=(d+c)/m):f>p?(m=2*Math.sqrt(1+f-a-p),t[3]=(d-c)/m,t[0]=(u+s)/m,t[1]=.25*m,t[2]=(l+h)/m):(m=2*Math.sqrt(1+p-a-f),t[3]=(u-s)/m,t[0]=(d+c)/m,t[1]=(l+h)/m,t[2]=.25*m),t}function Mt(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3],c=i+i,s=o+o,f=a+a,l=i*c,d=i*s,h=i*f,p=o*s,v=o*f,m=a*f,b=u*c,y=u*s,g=u*f,M=r[0],A=r[1],S=r[2];return t[0]=(1-(p+m))*M,t[1]=(d+g)*M,t[2]=(h-y)*M,t[3]=0,t[4]=(d-g)*A,t[5]=(1-(l+m))*A,t[6]=(v+b)*A,t[7]=0,t[8]=(h+y)*S,t[9]=(v-b)*S,t[10]=(1-(l+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function At(t,e,n,r,i){var o=e[0],a=e[1],u=e[2],c=e[3],s=o+o,f=a+a,l=u+u,d=o*s,h=o*f,p=o*l,v=a*f,m=a*l,b=u*l,y=c*s,g=c*f,M=c*l,A=r[0],S=r[1],w=r[2],E=i[0],O=i[1],x=i[2],P=(1-(v+b))*A,C=(h+M)*A,j=(p-g)*A,T=(h-M)*S,L=(1-(d+b))*S,R=(m+y)*S,k=(p+g)*w,$=(m-y)*w,G=(1-(d+v))*w;return t[0]=P,t[1]=C,t[2]=j,t[3]=0,t[4]=T,t[5]=L,t[6]=R,t[7]=0,t[8]=k,t[9]=$,t[10]=G,t[11]=0,t[12]=n[0]+E-(P*E+T*O+k*x),t[13]=n[1]+O-(C*E+L*O+$*x),t[14]=n[2]+x-(j*E+R*O+G*x),t[15]=1,t}function St(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,c=i+i,s=n*a,f=r*a,l=r*u,d=i*a,h=i*u,p=i*c,v=o*a,m=o*u,b=o*c;return t[0]=1-l-p,t[1]=f+b,t[2]=d-m,t[3]=0,t[4]=f-b,t[5]=1-s-p,t[6]=h+v,t[7]=0,t[8]=d+m,t[9]=h-v,t[10]=1-s-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function wt(t,e,n,r,i,o,a){var u=1/(n-e),c=1/(i-r),s=1/(o-a);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(i+r)*c,t[10]=(a+o)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*s,t[15]=0,t}function Et(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Ot=Et;function xt(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Pt(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),c=2/(a+u),s=2/(i+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(a-u)*c*.5,t[9]=(i-o)*s*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Ct(t,e,n,r,i,o,a){var u=1/(e-n),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*c,t[14]=(a+o)*s,t[15]=1,t}var jt=Ct;function Tt(t,e,n,r,i,o,a){var u=1/(e-n),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*c,t[14]=o*s,t[15]=1,t}function Lt(t,e,n,r){var i,o,a,u,c,s,f,l,d,h,p=e[0],v=e[1],m=e[2],b=r[0],y=r[1],g=r[2],M=n[0],A=n[1],S=n[2];return Math.abs(p-M)<B&&Math.abs(v-A)<B&&Math.abs(m-S)<B?Q(t):(f=p-M,l=v-A,d=m-S,i=y*(d*=h=1/Math.hypot(f,l,d))-g*(l*=h),o=g*(f*=h)-b*d,a=b*l-y*f,(h=Math.hypot(i,o,a))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),u=l*a-d*o,c=d*i-f*a,s=f*o-l*i,(h=Math.hypot(u,c,s))?(u*=h=1/h,c*=h,s*=h):(u=0,c=0,s=0),t[0]=i,t[1]=u,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=l,t[7]=0,t[8]=a,t[9]=s,t[10]=d,t[11]=0,t[12]=-(i*p+o*v+a*m),t[13]=-(u*p+c*v+s*m),t[14]=-(f*p+l*v+d*m),t[15]=1,t)}function Rt(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=r[0],c=r[1],s=r[2],f=i-n[0],l=o-n[1],d=a-n[2],h=f*f+l*l+d*d;h>0&&(f*=h=1/Math.sqrt(h),l*=h,d*=h);var p=c*d-s*l,v=s*f-u*d,m=u*l-c*f;return(h=p*p+v*v+m*m)>0&&(p*=h=1/Math.sqrt(h),v*=h,m*=h),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-d*v,t[5]=d*p-f*m,t[6]=f*v-l*p,t[7]=0,t[8]=f,t[9]=l,t[10]=d,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function kt(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function $t(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function Gt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function _t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Nt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Dt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function Vt(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]}function Wt(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],s=t[7],f=t[8],l=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],b=t[15],y=e[0],g=e[1],M=e[2],A=e[3],S=e[4],w=e[5],E=e[6],O=e[7],x=e[8],P=e[9],C=e[10],j=e[11],T=e[12],L=e[13],R=e[14],k=e[15];return Math.abs(n-y)<=B*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-g)<=B*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(i-M)<=B*Math.max(1,Math.abs(i),Math.abs(M))&&Math.abs(o-A)<=B*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(a-S)<=B*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(u-w)<=B*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(c-E)<=B*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(s-O)<=B*Math.max(1,Math.abs(s),Math.abs(O))&&Math.abs(f-x)<=B*Math.max(1,Math.abs(f),Math.abs(x))&&Math.abs(l-P)<=B*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(d-C)<=B*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(h-j)<=B*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(p-T)<=B*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(v-L)<=B*Math.max(1,Math.abs(v),Math.abs(L))&&Math.abs(m-R)<=B*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(b-k)<=B*Math.max(1,Math.abs(b),Math.abs(k))}var qt=nt,Ht=_t;function Bt(){var t=new I(3);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=new I(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ft(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Yt(t,e,n){var r=new I(3);return r[0]=t,r[1]=e,r[2]=n,r}function Xt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Qt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Kt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Jt(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function te(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function ee(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function ne(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function re(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function ie(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function oe(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function ae(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function ue(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function ce(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function se(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function fe(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function le(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function de(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function he(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],c=n[2];return t[0]=i*c-o*u,t[1]=o*a-r*c,t[2]=r*u-i*a,t}function pe(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ve(t,e,n,r,i,o){var a=o*o,u=a*(2*o-3)+1,c=a*(o-2)+o,s=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*c+r[0]*s+i[0]*f,t[1]=e[1]*u+n[1]*c+r[1]*s+i[1]*f,t[2]=e[2]*u+n[2]*c+r[2]*s+i[2]*f,t}function me(t,e,n,r,i,o){var a=1-o,u=a*a,c=o*o,s=u*a,f=3*o*u,l=3*c*a,d=c*o;return t[0]=e[0]*s+n[0]*f+r[0]*l+i[0]*d,t[1]=e[1]*s+n[1]*f+r[1]*l+i[1]*d,t[2]=e[2]*s+n[2]*f+r[2]*l+i[2]*d,t}function be(t,e){e=e||1;var n=2*F()*Math.PI,r=2*F()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function ye(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ge(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Me(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],u=e[0],c=e[1],s=e[2],f=i*s-o*c,l=o*u-r*s,d=r*c-i*u,h=i*d-o*l,p=o*f-r*d,v=r*l-i*f,m=2*a;return f*=m,l*=m,d*=m,h*=2,p*=2,v*=2,t[0]=u+f+h,t[1]=c+l+p,t[2]=s+d+v,t}function Ae(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Se(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function we(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Ee(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2],c=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+u*u),s=c&&de(t,e)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function Oe(t){return t[0]=0,t[1]=0,t[2]=0,t}function xe(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Pe(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Ce(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2];return Math.abs(n-o)<=B*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=B*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=B*Math.max(1,Math.abs(i),Math.abs(u))}var je,Te=Zt,Le=Qt,Re=Kt,ke=ae,$e=ue,Ge=Ft,_e=ce,Ne=(je=Bt(),function(t,e,n,r,i,o){var a,u;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)je[0]=t[a],je[1]=t[a+1],je[2]=t[a+2],i(je,je,o),t[a]=je[0],t[a+1]=je[1],t[a+2]=je[2];return t});function De(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function Ve(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}!function(){var t,e=(t=new I(4),I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function We(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function qe(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function He(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Be(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>B?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Ie(t,e){var n=An(t,e);return Math.acos(2*n*n-1)}function Fe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=n[0],c=n[1],s=n[2],f=n[3];return t[0]=r*f+a*u+i*s-o*c,t[1]=i*f+a*c+o*u-r*s,t[2]=o*f+a*s+r*c-i*u,t[3]=a*f-r*u-i*c-o*s,t}function Ye(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+a*u,t[1]=i*c+o*u,t[2]=o*c-i*u,t[3]=a*c-r*u,t}function Xe(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c-o*u,t[1]=i*c+a*u,t[2]=o*c+r*u,t[3]=a*c-i*u,t}function ze(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*u,t[1]=i*c-r*u,t[2]=o*c+a*u,t[3]=a*c-o*u,t}function Ue(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function Ze(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=Math.exp(o),c=a>0?u*Math.sin(a)/a:0;return t[0]=n*c,t[1]=r*c,t[2]=i*c,t[3]=u*Math.cos(a),t}function Qe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=a>0?Math.atan2(a,o)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Ke(t,e,n){return Qe(t,e),Mn(t,t,n),Ze(t,t),t}function Je(t,e,n,r){var i,o,a,u,c,s=e[0],f=e[1],l=e[2],d=e[3],h=n[0],p=n[1],v=n[2],m=n[3];return(o=s*h+f*p+l*v+d*m)<0&&(o=-o,h=-h,p=-p,v=-v,m=-m),1-o>B?(i=Math.acos(o),a=Math.sin(i),u=Math.sin((1-r)*i)/a,c=Math.sin(r*i)/a):(u=1-r,c=r),t[0]=u*s+c*h,t[1]=u*f+c*p,t[2]=u*l+c*v,t[3]=u*d+c*m,t}function tn(t){var e=F(),n=F(),r=F(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function en(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,u=a?1/a:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-i*u,t[3]=o*u,t}function nn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function rn(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function on(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),u=Math.sin(n),c=Math.cos(n),s=Math.sin(r),f=Math.cos(r);return t[0]=o*c*f-a*u*s,t[1]=a*u*f+o*c*s,t[2]=a*c*s-o*u*f,t[3]=a*c*f+o*u*s,t}function an(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var un,cn,sn,fn,ln,dn,hn,pn=function(t){var e=new I(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},vn=function(t,e,n,r){var i=new I(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},mn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},bn=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},yn=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},gn=Fe,Mn=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},An=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Sn=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=u+r*(n[3]-u),t},wn=De,En=wn,On=Ve,xn=On,Pn=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t},Cn=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},jn=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],u=e[1],c=e[2],s=e[3];return Math.abs(n-a)<=B*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=B*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-c)<=B*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-s)<=B*Math.max(1,Math.abs(o),Math.abs(s))},Tn=(un=Bt(),cn=Yt(1,0,0),sn=Yt(0,1,0),function(t,e,n){var r=de(e,n);return r<-.999999?(he(un,cn,e),Ge(un)<1e-6&&he(un,sn,e),le(un,un),He(t,un,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(he(un,e,n),t[0]=un[0],t[1]=un[1],t[2]=un[2],t[3]=1+r,Pn(t,t))}),Ln=(fn=We(),ln=We(),function(t,e,n,r,i,o){return Je(fn,e,i,o),Je(ln,n,r,o),Je(t,fn,ln,2*o*(1-o)),t}),Rn=(dn=new I(9),I!=Float32Array&&(dn[1]=0,dn[2]=0,dn[3]=0,dn[5]=0,dn[6]=0,dn[7]=0),dn[0]=1,dn[4]=1,dn[8]=1,hn=dn,function(t,e,n,r){return hn[0]=n[0],hn[3]=n[1],hn[6]=n[2],hn[1]=r[0],hn[4]=r[1],hn[7]=r[2],hn[2]=-e[0],hn[5]=-e[1],hn[8]=-e[2],Pn(t,rn(t,hn))});function kn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $n(t,e,n,r){var i="g-filter-"+e.entity,o=t.querySelectorAll("[name="+i+"]");if(o.length&&o.forEach((function(e){t.removeChild(e)})),0===r.length)null==n||n.removeAttribute("filter");else{var a=r.map((function(e,n){var r=e.name,o=e.params,a=kn("filter");return"blur"===r?function(t,e){var n=kn("feGaussianBlur");n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation",""+e[0].value),t.appendChild(n)}(a,o):"brightness"===r?function(t,e){var n=Gn(e[0]);_n(t,{type:"linear",slope:n,intercept:0})}(a,o):"drop-shadow"===r?function(t,e){var n=e[0].value,r=e[1].value,i=e[2].value,o=e[3].formatted,a=kn("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation",""+i),t.appendChild(a);var u=kn("feOffset");u.setAttribute("dx",""+n),u.setAttribute("dy",""+r),u.setAttribute("result","offsetblur"),t.appendChild(u);var c=kn("feFlood");c.setAttribute("flood-color",o),t.appendChild(c);var s=kn("feComposite");s.setAttribute("in2","offsetblur"),s.setAttribute("operator","in"),t.appendChild(s);var f=kn("feMerge");t.appendChild(f);var l=kn("feMergeNode"),d=kn("feMergeNode");d.setAttribute("in","SourceGraphic"),f.appendChild(l),f.appendChild(d)}(a,o):"contrast"===r?function(t,e){var n=Gn(e[0]);_n(t,{type:"linear",slope:n,intercept:-.5*n+.5})}(a,o):"grayscale"===r?function(t,e){var n=Gn(e[0]);Nn(t,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(a,o):"sepia"===r?function(t,e){var n=Gn(e[0]);Nn(t,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(a,o):"saturate"===r?function(t,e){var n=Gn(e[0]),r=kn("feColorMatrix");r.setAttribute("type","saturate"),r.setAttribute("values",""+n),t.appendChild(r)}(a,o):"hue-rotate"===r?function(t,e){var n=kn("feColorMatrix");n.setAttribute("type","hueRotate"),n.setAttribute("values",""+Object(h.convertAngleUnit)(e[0])),t.appendChild(n)}(a,o):"invert"===r&&function(t,e){var n=Gn(e[0]);_n(t,{type:"table",tableValues:n+" "+(1-n)})}(a,o),a.id=i+"-"+n,a.setAttribute("name",i),t.appendChild(a),a.id}));null==n||n.setAttribute("filter",a.map((function(t){return"url(#"+t+")"})).join(" "))}}function Gn(t){return"%"===t.unit?t.value/100:t.value}function _n(t,e){var n=e.type,r=e.slope,i=e.intercept,o=e.tableValues,a=kn("feComponentTransfer");[kn("feFuncR"),kn("feFuncG"),kn("feFuncB")].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues",""+o):(t.setAttribute("slope",""+r),t.setAttribute("intercept",""+i)),a.appendChild(t)})),t.appendChild(a)}function Nn(t,e){var n=kn("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values",e.join(" ")),t.appendChild(n)}var Dn={},Vn=0;function Wn(t,e,n,r,i){var o=function(t){var e="",n=t.type;if(n===h.PARSED_COLOR_TYPE.Pattern){var r=t.value.src;e=r}else if(n===h.PARSED_COLOR_TYPE.LinearGradient||n===h.PARSED_COLOR_TYPE.RadialGradient){var i=t.value,o=i.x0,a=i.y0,u=i.x1,c=i.y1,s=i.r1,f=i.steps;e=""+n+o+a+u+c+(s||0)+f.map((function(t){return t.join("")})).join("")}e&&(Dn[e]||(Dn[e]="_pattern_"+n+"_"+Vn++));return Dn[e]}(r),a=t.querySelector("#"+o);r.type===h.PARSED_COLOR_TYPE.LinearGradient||r.type===h.PARSED_COLOR_TYPE.RadialGradient?(a||function(t,e,n){var r=kn(e.type===h.PARSED_COLOR_TYPE.LinearGradient?"linearGradient":"radialGradient");if(e.type===h.PARSED_COLOR_TYPE.LinearGradient){var i=e.value,o=i.x0,a=i.y0,u=i.x1,c=i.y1;r.setAttribute("x1",""+o),r.setAttribute("y1",""+a),r.setAttribute("x2",""+u),r.setAttribute("y2",""+c)}else{var s=e.value,f=(o=s.x0,a=s.y0,s.r1);r.setAttribute("cx",""+o),r.setAttribute("cy",""+a),r.setAttribute("r",""+f/2)}var l="";e.value.steps.forEach((function(t){var e=d(t,2),n=e[0],r=e[1];l+='<stop offset="'+n+'" stop-color="'+r+'"></stop>'})),r.innerHTML=l,r.id=n,t.appendChild(r)}(t,r,o),null==n||n.setAttribute(i,"url(#"+o+")")):r.type===h.PARSED_COLOR_TYPE.Pattern?(a||function(t,e,n){var r=e.value.src,i=kn("pattern");i.setAttribute("patternUnits","userSpaceOnUse");var o=kn("image");i.appendChild(o),i.id=n,t.appendChild(i),o.setAttribute("href",r);var a=new window.Image;r.match(/^data:/i)||(a.crossOrigin="Anonymous");function u(){i.setAttribute("width",""+a.width),i.setAttribute("height",""+a.height)}a.src=r,a.complete?u():(a.onload=u,a.src=a.src)}(t,r,o),null==n||n.setAttribute(i,"url(#"+o+")")):null==n||n.setAttribute(i,""+r.formatted)}var qn;var Hn=((qn={})[h.SHAPE.Rect]="path",qn[h.SHAPE.Circle]="circle",qn[h.SHAPE.Ellipse]="ellipse",qn[h.SHAPE.Image]="image",qn[h.SHAPE.Group]="g",qn[h.SHAPE.Line]="line",qn[h.SHAPE.Polyline]="polyline",qn[h.SHAPE.Polygon]="polygon",qn[h.SHAPE.Text]="text",qn[h.SHAPE.Path]="path",qn[h.SHAPE.HTML]="foreignObject",qn),Bn={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML"},In=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(t){var e=t.target;n.createSVGDom(e,n.$camera)},i=function(t){var e=t.target;n.removeSVGDom(e)},o=function(t){var e,r,i=t.target,o=t.detail,a=o.attributeName;o.newValue;if("zIndex"===a){var u=i.parentNode,c=null===(r=null===(e=i.parentNode)||void 0===e?void 0:e.elementSVG)||void 0===r?void 0:r.$groupEl,s=((null==u?void 0:u.children)||[]).slice();c&&n.reorderChildren(c,s)}n.updateAttribute(i,a,i.parsedStyle[a])};t.hooks.init.tap(e.tag,(function(){n.$def=kn("defs");var t=n.contextService.getContext();t.appendChild(n.$def),t.setAttribute("color-interpolation-filters","sRGB"),n.$camera=kn("g"),n.$camera.id="g_svg_camera",n.applyTransform(n.$camera,n.camera.getOrthoMatrix()),t.appendChild(n.$camera),n.renderingContext.root.addEventListener(h.ElementEvent.MOUNTED,r),n.renderingContext.root.addEventListener(h.ElementEvent.UNMOUNTED,i),n.renderingContext.root.addEventListener(h.ElementEvent.ATTRIBUTE_CHANGED,o)})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(h.ElementEvent.MOUNTED,r),n.renderingContext.root.removeEventListener(h.ElementEvent.UNMOUNTED,i),n.renderingContext.root.removeEventListener(h.ElementEvent.ATTRIBUTE_CHANGED,o)})),t.hooks.render.tap(e.tag,(function(t){var e,r;n.renderingContext.renderReasons.has(h.RENDER_REASON.CameraChanged)&&n.applyTransform(n.$camera,n.camera.getOrthoMatrix());var i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;i&&o&&(n.applyTransform(o,t.getLocalTransform()),n.reorderChildren(o,t.children||[]),t.renderable.dirty=!1)}))},t.prototype.reorderChildren=function(t,e){e.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}));var n=document.createDocumentFragment();e.forEach((function(t){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)})),t.appendChild(n)},t.prototype.applyTransform=function(t,e){var n=i.getTranslation(o.create(),e),r=i.getScaling(o.create(),e),u=i.getRotation(a.create(),e),c=d(n,2),s=c[0],f=c[1],l=d(r,2),p=l[0],v=l[1],m=d(Object(h.getEuler)(o.create(),u),3),b=m[0],y=(m[1],m[2]),g=Object(h.fromRotationTranslationScale)(b||y,s,f,p,v);t.setAttribute("transform","matrix("+R(g[0])+","+R(g[1])+","+R(g[3])+","+R(g[4])+","+R(g[6])+","+R(g[7])+")")},t.prototype.applyAttributes=function(t){var e,n,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,i=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;if(r&&i){var o=t.nodeName,a=t.attributes,u=t.parsedStyle;for(var c in r.setAttribute("fill","none"),o===h.SHAPE.Image&&r.setAttribute("preserveAspectRatio","none"),a)this.updateAttribute(t,c,u[c],!0);var s=this.elementRendererFactory(o);s&&s.apply(r,u)}},t.prototype.updateAttribute=function(t,e,n,r){var i,o,a;void 0===r&&(r=!1);var u=null===(i=t.elementSVG)||void 0===i?void 0:i.$el,c=null===(o=t.elementSVG)||void 0===o?void 0:o.$groupEl,s=t.parsedStyle;if(Bn[e])if("fill"===e||"stroke"===e)Wn(this.$def,0,u,s[e],Bn[e]);else if("visibility"===e)null==c||c.setAttribute(Bn[e],""+n);else if("clipPath"===e){var f=n;if(f){var l="clip-path-"+f.id;if(!this.$def.querySelector("#"+l)){var d=kn("clipPath");d.id=l,this.$def.appendChild(d),this.createSVGDom(f,d,!0),f.elementSVG.$groupEl=d}var p=null===(a=f.elementSVG)||void 0===a?void 0:a.$groupEl;p&&this.applyTransform(p,f.getLocalTransform()),this.applyAttributes(f),null==u||u.setAttribute("clip-path","url(#"+l+")")}else null==u||u.removeAttribute("clip-path")}else if("shadowColor"===e||"shadowBlur"===e||"shadowOffsetX"===e||"shadowOffsetY"===e)!function(t,e,n,r){var i="filter-dropshadow-"+e.entity,o=t.querySelector("#"+i);if(!o){o=kn("filter");var a=kn("feDropShadow");a.setAttribute("dx","0"),a.setAttribute("dy","0"),o.appendChild(a),o.id=i,t.appendChild(o)}var u=o.children[0];if("shadowColor"===r){var c=e.parsedStyle[r];u.setAttribute("flood-color",c.formatted)}else"shadowBlur"===r?u.setAttribute("stdDeviation",""+Number(e.parsedStyle[r])/2):"shadowOffsetX"===r?u.setAttribute("dx",e.parsedStyle[r]):"shadowOffsetY"===r&&u.setAttribute("dy",e.parsedStyle[r]);null==n||n.setAttribute("filter","url(#"+i+")")}(this.$def,t,u,e);else if("filter"===e)$n(this.$def,t,u,s[e]);else if("innerHTML"===e){var v=document.createElement("div");"string"==typeof n?v.innerHTML=n:v.appendChild(n),u.innerHTML="",u.appendChild(v)}else t.nodeName!==h.SHAPE.Text&&["anchor","width","height","r","rx","ry"].indexOf(e)>-1&&this.updateAnchorWithTransform(t),"anchor"!==e&&(null==u||u.setAttribute(Bn[e],""+n));if(!r&&u){var m=this.elementRendererFactory(t.nodeName);m&&m.dependencies.indexOf(e)>-1&&m.apply(u,t.parsedStyle)}},t.prototype.createSVGDom=function(t,e,n){var r;void 0===n&&(n=!1),t.elementSVG=new M;var i=t.elementSVG,o=Hn[t.nodeName]||"g";if(o){var a=void 0,u=kn(o);t.nodeName===h.SHAPE.HTML&&(t.parsedStyle.$el=u),u.id="g_svg_"+t.nodeName+"_"+t.entity,"g"===o||n?a=u:(a=kn("g")).appendChild(u),i.$el=u,i.$groupEl=a;var c=t.parentNode&&(null===(r=t.parentNode.elementSVG)||void 0===r?void 0:r.$groupEl)||e;c&&c.appendChild(a),this.applyAttributes(t)}},t.prototype.removeSVGDom=function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&n.parentNode.removeChild(n)},t.prototype.updateAnchorWithTransform=function(t){var e,n=t.getGeometryBounds(),r=n&&2*n.halfExtents[0]||0,i=n&&2*n.halfExtents[1]||0,o=(t.parsedStyle||{}).anchor,a=void 0===o?[0,0]:o,u=null===(e=t.elementSVG)||void 0===e?void 0:e.$el;null==u||u.setAttribute("transform","translate(-"+a[0]*r+",-"+a[1]*i+")"),t.nodeName!==h.SHAPE.Circle&&t.nodeName!==h.SHAPE.Ellipse||(null==u||u.setAttribute("cx",""+r/2),null==u||u.setAttribute("cy",""+i/2))},t.tag="SVGRendererPlugin",f([Object(p.inject)(h.DefaultCamera),l("design:type",h.Camera)],t.prototype,"camera",void 0),f([Object(p.inject)(h.ContextService),l("design:type",Object)],t.prototype,"contextService",void 0),f([Object(p.inject)(h.RenderingContext),l("design:type",Object)],t.prototype,"renderingContext",void 0),f([Object(p.inject)(h.SceneGraphService),l("design:type",Object)],t.prototype,"sceneGraphService",void 0),f([Object(p.inject)("ElementRendererFactory"),l("design:type",Function)],t.prototype,"elementRendererFactory",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),Fn=Object(p.Module)((function(t){t(k),t($),t(G),t(_),t(q),t(H),t({token:"ElementRendererFactory",useFactory:function(t){return function(e){return e===h.SHAPE.Rect?t.container.get(k):e===h.SHAPE.Image?t.container.get($):e===h.SHAPE.Line?t.container.get(G):e===h.SHAPE.Polyline||e===h.SHAPE.Polygon?t.container.get(_):e===h.SHAPE.Text?t.container.get(q):e===h.SHAPE.Path?t.container.get(H):null}}}),t(In)})),Yn=function(){function t(){}return t.prototype.init=function(t){t.load(Fn,!0)},t.prototype.destroy=function(t){t.remove(k),t.remove($),t.remove(G),t.remove(_),t.remove(q),t.remove(H),t.remove("ElementRendererFactory"),t.remove(In)},t}(),Xn=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.pick.tap(e.tag,(function(t){var e=t.position,r=e.clientX,i=e.clientY;try{var o=document.elementFromPoint(r,i),a=null,u=o&&o.getAttribute("id");if(u){var c=u.lastIndexOf("_");(a=n.displayObjectPool.getByEntity(Number(u.substring(c+1)))).interactive||(a=null)}t.picked=a}catch(e){t.picked=null}return t}))},t.tag="SVGPickerPlugin",f([Object(p.inject)(h.SceneGraphService),l("design:type",Object)],t.prototype,"sceneGraphService",void 0),f([Object(p.inject)(h.DisplayObjectPool),l("design:type",h.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),t=e=f([Object(p.singleton)({contrib:h.RenderingPluginContribution})],t)}(),zn=Object(p.Module)((function(t){t(Xn)})),Un=function(){function t(){}return t.prototype.init=function(t){t.load(zn,!0)},t.prototype.destroy=function(t){t.remove(Xn)},t}(),Zn=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig.container;if(this.$container=C(t)?document.getElementById(t):t,this.$container){this.$container.style.position||(this.$container.style.position="relative");var e=kn("svg");e.setAttribute("width",""+this.canvasConfig.width),e.setAttribute("height",""+this.canvasConfig.height),this.$container.appendChild(e),this.$namespace=e}var n=window.devicePixelRatio||1;n=n>=1?Math.ceil(n):1,this.dpr=n},t.prototype.getDomElement=function(){return this.$namespace},t.prototype.getContext=function(){return this.$namespace},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},t.prototype.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width",""+t),this.$namespace.setAttribute("height",""+e))},t.prototype.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},f([Object(p.inject)(h.CanvasConfig),l("design:type",Object)],t.prototype,"canvasConfig",void 0),t=f([Object(p.singleton)({token:h.ContextService})],t)}(),Qn=Object(p.Module)((function(t){t(Zn)})),Kn=function(){function t(){}return t.prototype.init=function(t){t.load(Qn,!0)},t.prototype.destroy=function(t){t.remove(Zn)},t}(),Jn=function(t){function e(e){var n=t.call(this,e)||this;return n.registerPlugin(new Kn),n.registerPlugin(new Yn),n.registerPlugin(new g),n.registerPlugin(new Un),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(h.AbstractRenderer)}])}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-svg",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "A renderer implemented by SVG",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://github.com/antvis/g#readme",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@antv/g-plugin-dom-interaction": "^1.0.
|
|
41
|
-
"@antv/g-plugin-svg-picker": "^1.0.
|
|
42
|
-
"@antv/g-plugin-svg-renderer": "^1.0.
|
|
40
|
+
"@antv/g-plugin-dom-interaction": "^1.0.11",
|
|
41
|
+
"@antv/g-plugin-svg-picker": "^1.0.11",
|
|
42
|
+
"@antv/g-plugin-svg-renderer": "^1.0.11",
|
|
43
43
|
"@antv/util": "^2.0.13",
|
|
44
44
|
"tslib": "^2.3.1"
|
|
45
45
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"umd": "webpack"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "688274a67997224971b11c806a0e363ea1326240"
|
|
54
54
|
}
|