Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/utils

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/utils - npm Package Compare versions

Comparing version 5.4.0-rc.1 to 5.4.0-rc.2

6

dist/browser/utils.min.js
/*!
* @pixi/utils - v5.4.0-rc.1
* Compiled Wed, 11 Nov 2020 16:56:22 UTC
* @pixi/utils - v5.4.0-rc.2
* Compiled Tue, 17 Nov 2020 01:47:11 UTC
*

@@ -8,3 +8,3 @@ * @pixi/utils is licensed under the MIT License.

*/
this.PIXI=this.PIXI||{},this.PIXI.utils=this.PIXI.utils||{};var _pixi_utils=function(e,t,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var a=o(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),f=n?n+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],s]:e._events[f].push(s):(e._events[f]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=arguments,f=n?n+e:e;if(!this._events[f])return!1;var h,l,u=this._events[f],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=s[l];u.fn.apply(u.context,h)}else{var p,d=u.length;for(l=0;l<d;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,o);break;default:if(!h)for(p=1,h=new Array(c-1);p<c;p++)h[p-1]=s[p];u[l].fn.apply(u[l].context,h)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var f=0,h=[],l=s.length;f<l;f++)(s[f].fn!==t||o&&!s[f].once||r&&s[f].context!==r)&&h.push(s[f]);h.length?this._events[a]=1===h.length?h[0]:h:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}),i=f,s=f;function f(e,t,n){n=n||2;var r,o,a,i,s,f,c,p=t&&t.length,d=p?t[0]*n:e.length,v=h(e,0,d,n,!0),g=[];if(!v||v.next===v.prev)return g;if(p&&(v=function(e,t,n,r){var o,a,i,s,f,u=[];for(o=0,a=t.length;o<a;o++)i=t[o]*r,s=o<a-1?t[o+1]*r:e.length,(f=h(e,i,s,r,!1))===f.next&&(f.steiner=!0),u.push(b(f));for(u.sort(x),o=0;o<u.length;o++)y(u[o],n),n=l(n,n.next);return n}(e,t,v,n)),e.length>80*n){r=a=e[0],o=i=e[1];for(var m=n;m<d;m+=n)(s=e[m])<r&&(r=s),(f=e[m+1])<o&&(o=f),s>a&&(a=s),f>i&&(i=f);c=0!==(c=Math.max(a-r,i-o))?1/c:0}return u(v,g,n,r,o,c),g}function h(e,t,n,r,o){var a,i;if(o===R(e,t,n,r)>0)for(a=t;a<n;a+=r)i=M(a,e[a],e[a+1],i);else for(a=n-r;a>=t;a-=r)i=M(a,e[a],e[a+1],i);return i&&O(i,i.next)&&(D(i),i=i.next),i}function l(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!O(r,r.next)&&0!==A(r.prev,r,r.next))r=r.next;else{if(D(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function u(e,t,n,r,o,a,i){if(e){!i&&a&&function(e,t,n,r){var o=e;do{null===o.z&&(o.z=m(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,a,i,s,f,h=1;do{for(n=e,e=null,a=null,i=0;n;){for(i++,r=n,s=0,t=0;t<h&&(s++,r=r.nextZ);t++);for(f=h;s>0||f>0&&r;)0!==s&&(0===f||!r||n.z<=r.z)?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,f--),a?a.nextZ=o:e=o,o.prevZ=a,a=o;n=r}a.nextZ=null,h*=2}while(i>1)}(o)}(e,r,o,a);for(var s,f,h=e;e.prev!==e.next;)if(s=e.prev,f=e.next,a?p(e,r,o,a):c(e))t.push(s.i/n),t.push(e.i/n),t.push(f.i/n),D(e),e=f.next,h=f.next;else if((e=f)===h){i?1===i?u(e=d(l(e),t,n),t,n,r,o,a,2):2===i&&v(e,t,n,r,o,a):u(l(e),t,n,r,o,a,1);break}}}function c(e){var t=e.prev,n=e,r=e.next;if(A(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(w(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&A(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function p(e,t,n,r){var o=e.prev,a=e,i=e.next;if(A(o,a,i)>=0)return!1;for(var s=o.x<a.x?o.x<i.x?o.x:i.x:a.x<i.x?a.x:i.x,f=o.y<a.y?o.y<i.y?o.y:i.y:a.y<i.y?a.y:i.y,h=o.x>a.x?o.x>i.x?o.x:i.x:a.x>i.x?a.x:i.x,l=o.y>a.y?o.y>i.y?o.y:i.y:a.y>i.y?a.y:i.y,u=m(s,f,t,n,r),c=m(h,l,t,n,r),p=e.prevZ,d=e.nextZ;p&&p.z>=u&&d&&d.z<=c;){if(p!==e.prev&&p!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==e.prev&&d!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,d.x,d.y)&&A(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=u;){if(p!==e.prev&&p!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=c;){if(d!==e.prev&&d!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,d.x,d.y)&&A(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function d(e,t,n){var r=e;do{var o=r.prev,a=r.next.next;!O(o,a)&&_(o,r,r.next,a)&&I(o,a)&&I(a,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(a.i/n),D(r),D(r.next),r=e=a),r=r.next}while(r!==e);return l(r)}function v(e,t,n,r,o,a){var i=e;do{for(var s=i.next.next;s!==i.prev;){if(i.i!==s.i&&E(i,s)){var f=j(i,s);return i=l(i,i.next),f=l(f,f.next),u(i,t,n,r,o,a),void u(f,t,n,r,o,a)}s=s.next}i=i.next}while(i!==e)}function x(e,t){return e.x-t.x}function y(e,t){if(t=function(e,t){var n,r=t,o=e.x,a=e.y,i=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>i){if(i=s,s===o){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===i)return n;var f,h=n,l=n.x,u=n.y,c=1/0;r=n;do{o>=r.x&&r.x>=l&&o!==r.x&&w(a<u?o:i,a,l,u,a<u?i:o,a,r.x,r.y)&&(f=Math.abs(a-r.y)/(o-r.x),I(r,e)&&(f<c||f===c&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,c=f)),r=r.next}while(r!==h);return n}(e,t)){var n=j(t,e);l(t,t.next),l(n,n.next)}}function g(e,t){return A(e.prev,e,t.prev)<0&&A(t.next,e,e.next)<0}function m(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function b(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function w(e,t,n,r,o,a,i,s){return(o-i)*(t-s)-(e-i)*(a-s)>=0&&(e-i)*(r-s)-(n-i)*(t-s)>=0&&(n-i)*(a-s)-(o-i)*(r-s)>=0}function E(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&_(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(I(e,t)&&I(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&o<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(A(e.prev,e,t.prev)||A(e,t.prev,t))||O(e,t)&&A(e.prev,e,e.next)>0&&A(t.prev,t,t.next)>0)}function A(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function O(e,t){return e.x===t.x&&e.y===t.y}function _(e,t,n,r){var o=k(A(e,t,n)),a=k(A(e,t,r)),i=k(A(n,r,e)),s=k(A(n,r,t));return o!==a&&i!==s||(!(0!==o||!C(e,n,t))||(!(0!==a||!C(e,r,t))||(!(0!==i||!C(n,e,r))||!(0!==s||!C(n,t,r)))))}function C(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k(e){return e>0?1:e<0?-1:0}function I(e,t){return A(e.prev,e,e.next)<0?A(e,t,e.next)>=0&&A(e,e.prev,t)>=0:A(e,t,e.prev)<0||A(e,e.next,t)<0}function j(e,t){var n=new N(e.i,e.x,e.y),r=new N(t.i,t.x,t.y),o=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function M(e,t,n,r){var o=new N(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function N(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(e,t,n,r){for(var o=0,a=t,i=n-r;a<n;a+=r)o+=(e[i]-e[a])*(e[a+1]+e[i+1]),i=a;return o}f.deviation=function(e,t,n,r){var o=t&&t.length,a=o?t[0]*n:e.length,i=Math.abs(R(e,0,a,n));if(o)for(var s=0,f=t.length;s<f;s++){var h=t[s]*n,l=s<f-1?t[s+1]*n:e.length;i-=Math.abs(R(e,h,l,n))}var u=0;for(s=0;s<r.length;s+=3){var c=r[s]*n,p=r[s+1]*n,d=r[s+2]*n;u+=Math.abs((e[c]-e[d])*(e[p+1]-e[c+1])-(e[c]-e[p])*(e[d+1]-e[c+1]))}return 0===i&&0===u?0:Math.abs((u-i)/i)},f.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var a=0;a<e[o].length;a++)for(var i=0;i<t;i++)n.vertices.push(e[o][a][i]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},i.default=s;var L=o(function(e,t){!function(n){var o=t&&!t.nodeType&&t,a=e&&!e.nodeType&&e,i="object"==typeof r&&r;i.global!==i&&i.window!==i&&i.self!==i||(n=i);var s,f,h=2147483647,l=36,u=1,c=26,p=38,d=700,v=72,x=128,y="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-u,A=Math.floor,O=String.fromCharCode;function _(e){throw RangeError(w[e])}function C(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+C((e=e.replace(b,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function j(e){return C(e,function(e){var t="";return e>65535&&(t+=O((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=O(e)}).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function D(e,t,n){var r=0;for(e=n?A(e/d):e>>1,e+=A(e/t);e>E*c>>1;r+=l)e=A(e/E);return A(r+(E+1)*e/(e+p))}function N(e){var t,n,r,o,a,i,s,f,p,d,g,m=[],b=e.length,w=0,E=x,O=v;for((n=e.lastIndexOf(y))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&_("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(a=w,i=1,s=l;o>=b&&_("invalid-input"),((f=(g=e.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:l)>=l||f>A((h-w)/i))&&_("overflow"),w+=f*i,!(f<(p=s<=O?u:s>=O+c?c:s-O));s+=l)i>A(h/(d=l-p))&&_("overflow"),i*=d;O=D(w-a,t=m.length+1,0==a),A(w/t)>h-E&&_("overflow"),E+=A(w/t),w%=t,m.splice(w++,0,E)}return j(m)}function R(e){var t,n,r,o,a,i,s,f,p,d,g,m,b,w,E,C=[];for(m=(e=I(e)).length,t=x,n=0,a=v,i=0;i<m;++i)(g=e[i])<128&&C.push(O(g));for(r=o=C.length,o&&C.push(y);r<m;){for(s=h,i=0;i<m;++i)(g=e[i])>=t&&g<s&&(s=g);for(s-t>A((h-n)/(b=r+1))&&_("overflow"),n+=(s-t)*b,t=s,i=0;i<m;++i)if((g=e[i])<t&&++n>h&&_("overflow"),g==t){for(f=n,p=l;!(f<(d=p<=a?u:p>=a+c?c:p-a));p+=l)E=f-d,w=l-d,C.push(O(M(d+E%w,0))),f=A(E/w);C.push(O(M(f,0))),a=D(n,b,r==o),n=0,++r}++n,++t}return C.join("")}if(s={version:"1.3.2",ucs2:{decode:I,encode:j},decode:N,encode:R,toASCII:function(e){return k(e,function(e){return m.test(e)?"xn--"+R(e):e})},toUnicode:function(e){return k(e,function(e){return g.test(e)?N(e.slice(4).toLowerCase()):e})}},o&&a)if(e.exports==o)a.exports=s;else for(f in s)s.hasOwnProperty(f)&&(o[f]=s[f]);else n.punycode=s}(r)}),P={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}};function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var T=function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var i=1e3;r&&"number"==typeof r.maxKeys&&(i=r.maxKeys);var s=e.length;i>0&&s>i&&(s=i);for(var f=0;f<s;++f){var h,l,u,c,p=e[f].replace(a,"%20"),d=p.indexOf(n);d>=0?(h=p.substr(0,d),l=p.substr(d+1)):(h=p,l=""),u=decodeURIComponent(h),c=decodeURIComponent(l),S(o,u)?Array.isArray(o[u])?o[u].push(c):o[u]=[o[u],c]:o[u]=c}return o},q=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},U=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var o=encodeURIComponent(q(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return o+encodeURIComponent(q(e))}).join(t):o+encodeURIComponent(q(e[r]))}).join(t):r?encodeURIComponent(q(r))+n+encodeURIComponent(q(e)):""},Z=o(function(e,t){t.decode=t.parse=T,t.encode=t.stringify=U}),F=ae,B=function(e,t){return ae(e,!1,!0).resolve(t)},z=function(e,t){if(!e)return t;return ae(e,!1,!0).resolveObject(t)},X=function(e){P.isString(e)&&(e=ae(e));if(!(e instanceof W))return W.prototype.format.call(e);return e.format()},J=W;function W(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var H=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,G=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),K=["'"].concat(Y),V=["%","/","?",";","#"].concat(K),Q=["/","?","#"],ee=/^[+a-z0-9A-Z_-]{0,63}$/,te=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ne={javascript:!0,"javascript:":!0},re={javascript:!0,"javascript:":!0},oe={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ae(e,t,n){if(e&&P.isObject(e)&&e instanceof W)return e;var r=new W;return r.parse(e,t,n),r}W.prototype.parse=function(e,t,n){if(!P.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",a=e.split(o);a[0]=a[0].replace(/\\/g,"/");var i=e=a.join(o);if(i=i.trim(),!n&&1===e.split("#").length){var s=G.exec(i);if(s)return this.path=i,this.href=i,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?Z.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=H.exec(i);if(f){var h=(f=f[0]).toLowerCase();this.protocol=h,i=i.substr(f.length)}if(n||f||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===i.substr(0,2);!l||f&&re[f]||(i=i.substr(2),this.slashes=!0)}if(!re[f]&&(l||f&&!oe[f])){for(var u,c,p=-1,d=0;d<Q.length;d++){-1!==(v=i.indexOf(Q[d]))&&(-1===p||v<p)&&(p=v)}-1!==(c=-1===p?i.lastIndexOf("@"):i.lastIndexOf("@",p))&&(u=i.slice(0,c),i=i.slice(c+1),this.auth=decodeURIComponent(u)),p=-1;for(d=0;d<V.length;d++){var v;-1!==(v=i.indexOf(V[d]))&&(-1===p||v<p)&&(p=v)}-1===p&&(p=i.length),this.host=i.slice(0,p),i=i.slice(p),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var y=this.hostname.split(/\./),g=(d=0,y.length);d<g;d++){var m=y[d];if(m&&!m.match(ee)){for(var b="",w=0,E=m.length;w<E;w++)m.charCodeAt(w)>127?b+="x":b+=m[w];if(!b.match(ee)){var A=y.slice(0,d),O=y.slice(d+1),_=m.match(te);_&&(A.push(_[1]),O.unshift(_[2])),O.length&&(i="/"+O.join(".")+i),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=L.toASCII(this.hostname));var C=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+C,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!ne[h])for(d=0,g=K.length;d<g;d++){var I=K[d];if(-1!==i.indexOf(I)){var j=encodeURIComponent(I);j===I&&(j=escape(I)),i=i.split(I).join(j)}}var M=i.indexOf("#");-1!==M&&(this.hash=i.substr(M),i=i.slice(0,M));var D=i.indexOf("?");if(-1!==D?(this.search=i.substr(D),this.query=i.substr(D+1),t&&(this.query=Z.parse(this.query)),i=i.slice(0,D)):t&&(this.search="",this.query={}),i&&(this.pathname=i),oe[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var N=this.search||"";this.path=C+N}return this.href=this.format(),this},W.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&P.isObject(this.query)&&Object.keys(this.query).length&&(a=Z.stringify(this.query));var i=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||oe[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(i=i.replace("#","%23"))+r},W.prototype.resolve=function(e){return this.resolveObject(ae(e,!1,!0)).format()},W.prototype.resolveObject=function(e){if(P.isString(e)){var t=new W;t.parse(e,!1,!0),e=t}for(var n=new W,r=Object.keys(this),o=0;o<r.length;o++){var a=r[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var i=Object.keys(e),s=0;s<i.length;s++){var f=i[s];"protocol"!==f&&(n[f]=e[f])}return oe[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!oe[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var u=h[l];n[u]=e[u]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||re[e.protocol])n.pathname=e.pathname;else{for(var c=(e.pathname||"").split("/");c.length&&!(e.host=c.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),n.pathname=c.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",d=n.search||"";n.path=p+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),x=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=x||v||n.host&&e.pathname,g=y,m=n.pathname&&n.pathname.split("/")||[],b=(c=e.pathname&&e.pathname.split("/")||[],n.protocol&&!oe[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===m[0]?m[0]=n.host:m.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host=null),y=y&&(""===c[0]||""===m[0])),x)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,m=c;else if(c.length)m||(m=[]),m.pop(),m=m.concat(c),n.search=e.search,n.query=e.query;else if(!P.isNullOrUndefined(e.search)){if(b)n.hostname=n.host=m.shift(),(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift());return n.search=e.search,n.query=e.query,P.isNull(n.pathname)&&P.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],E=(n.host||e.host||m.length>1)&&("."===w||".."===w)||""===w,A=0,O=m.length;O>=0;O--)"."===(w=m[O])?m.splice(O,1):".."===w?(m.splice(O,1),A++):A&&(m.splice(O,1),A--);if(!y&&!g)for(;A--;A)m.unshift("..");!y||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),E&&"/"!==m.join("/").substr(-1)&&m.push("");var _,C=""===m[0]||m[0]&&"/"===m[0].charAt(0);b&&(n.hostname=n.host=C?"":m.length?m.shift():"",(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift()));return(y=y||n.host&&m.length)&&!C&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),P.isNull(n.pathname)&&P.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},W.prototype.parseHost=function(){var e=this.host,t=$.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var ie={parse:F,resolve:B,resolveObject:z,format:X,Url:J};t.settings.RETINA_PREFIX=/@([0-9\.]+)x/,t.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var se,fe=!1,he="5.4.0-rc.1";var le={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var ue=function(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,e[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,e[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,t[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,t[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,t[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var o=[];return o.push(t),o.push(e),o}();function ce(e){if(4===e.BYTES_PER_ELEMENT)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===e.BYTES_PER_ELEMENT){if(e instanceof Uint16Array)return"Uint16Array"}else if(1===e.BYTES_PER_ELEMENT&&e instanceof Uint8Array)return"Uint8Array";return null}var pe={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var de=0;var ve={};var xe=Object.create(null),ye=Object.create(null);var ge=function(){function e(e,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||t.settings.RESOLUTION,this.resize(e,n)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(e,t){this.canvas.width=e*this.resolution,this.canvas.height=t*this.resolution},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=e},enumerable:!1,configurable:!0}),e}();var me,be=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;return Object.defineProperty(e,"isMobile",{enumerable:!0,get:function(){return t.isMobile}}),e.BaseTextureCache=ye,e.CanvasRenderTarget=ge,e.DATA_URI=be,e.EventEmitter=a,e.ProgramCache={},e.TextureCache=xe,e.clearTextureCache=function(){var e;for(e in xe)delete xe[e];for(e in ye)delete ye[e]},e.correctBlendMode=function(e,t){return ue[t?1:0][e]},e.createIndicesForQuads=function(e,t){void 0===t&&(t=null);var n=6*e;if((t=t||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+n);for(var r=0,o=0;r<n;r+=6,o+=4)t[r+0]=o+0,t[r+1]=o+1,t[r+2]=o+2,t[r+3]=o+0,t[r+4]=o+2,t[r+5]=o+3;return t},e.decomposeDataUri=function(e){var t=be.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]}},e.deprecation=function(e,t,n){if(void 0===n&&(n=3),!ve[t]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e):(r=r.split("\n").splice(n).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+"\nDeprecated since v"+e),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e),console.warn(r))),ve[t]=!0}},e.destroyTextureCache=function(){var e;for(e in xe)xe[e].destroy();for(e in ye)ye[e].destroy()},e.determineCrossOrigin=function(e,t){if(void 0===t&&(t=self.location),0===e.indexOf("data:"))return"";t=t||self.location,me||(me=document.createElement("a")),me.href=e;var n=F(me.href),r=!n.port&&""===t.port||n.port===t.port;return n.hostname===t.hostname&&r&&n.protocol===t.protocol?"":"anonymous"},e.earcut=i,e.getBufferType=ce,e.getResolutionOfUrl=function(e,n){var r=t.settings.RETINA_PREFIX.exec(e);return r?parseFloat(r[1]):void 0!==n?n:1},e.hex2rgb=function(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t},e.hex2string=function(e){var t=e.toString(16);return"#"+(t="000000".substr(0,6-t.length)+t)},e.interleaveTypedArrays=function(e,t){for(var n=0,r=0,o={},a=0;a<e.length;a++)r+=t[a],n+=e[a].length;var i=new ArrayBuffer(4*n),s=null,f=0;for(a=0;a<e.length;a++){var h=t[a],l=e[a],u=ce(l);o[u]||(o[u]=new pe[u](i)),s=o[u];for(var c=0;c<l.length;c++)s[(c/h|0)*r+f+c%h]=l[c];f+=h}return new Float32Array(i)},e.isPow2=function(e){return!(e&e-1||!e)},e.isWebGLSupported=function(){return void 0===se&&(se=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:t.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",e)||n.getContext("experimental-webgl",e),o=!(!r||!r.getContextAttributes().stencil);if(r){var a=r.getExtension("WEBGL_lose_context");a&&a.loseContext()}return r=null,o}catch(e){return!1}}()),se},e.log2=function(e){var t=(e>65535?1:0)<<4,n=((e>>>=t)>255?1:0)<<3;return t|=n,t|=n=((e>>>=n)>15?1:0)<<2,(t|=n=((e>>>=n)>3?1:0)<<1)|(e>>>=n)>>1},e.nextPow2=function(e){return e+=0===e?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},e.premultiplyBlendMode=ue,e.premultiplyRgba=function(e,t,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t):(n[0]=e[0],n[1]=e[1],n[2]=e[2]),n[3]=t,n},e.premultiplyTint=function(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var n=e>>16&255,r=e>>8&255,o=255&e;return(255*t<<24)+((n=n*t+.5|0)<<16)+((r=r*t+.5|0)<<8)+(o=o*t+.5|0)},e.premultiplyTintToRgba=function(e,t,n,r){return(n=n||new Float32Array(4))[0]=(e>>16&255)/255,n[1]=(e>>8&255)/255,n[2]=(255&e)/255,(r||void 0===r)&&(n[0]*=t,n[1]*=t,n[2]*=t),n[3]=t,n},e.removeItems=function(e,t,n){var r,o=e.length;if(!(t>=o||0===n)){var a=o-(n=t+n>o?o-t:n);for(r=t;r<a;++r)e[r]=e[r+n];e.length=a}},e.rgb2hex=function(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)},e.sayHello=function(e){var t;if(!fe){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+he+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=self.console).log.apply(t,n)}else self.console&&self.console.log("PixiJS "+he+" - "+e+" - http://www.pixijs.com/");fe=!0}},e.sign=function(e){return 0===e?0:e<0?-1:1},e.skipHello=function(){fe=!0},e.string2hex=function(e){return"string"==typeof e&&"#"===(e=le[e.toLowerCase()]||e)[0]&&(e=e.substr(1)),parseInt(e,16)},e.trimCanvas=function(e){var t,n,r,o=e.width,a=e.height,i=e.getContext("2d"),s=i.getImageData(0,0,o,a).data,f=s.length,h={top:null,left:null,right:null,bottom:null},l=null;for(t=0;t<f;t+=4)0!==s[t+3]&&(n=t/4%o,r=~~(t/4/o),null===h.top&&(h.top=r),null===h.left?h.left=n:n<h.left&&(h.left=n),null===h.right?h.right=n+1:h.right<n&&(h.right=n+1),null===h.bottom?h.bottom=r:h.bottom<r&&(h.bottom=r));return null!==h.top&&(o=h.right-h.left,a=h.bottom-h.top+1,l=i.getImageData(h.left,h.top,o,a)),{height:a,width:o,data:l}},e.uid=function(){return++de},e.url=ie,e}({},PIXI,PIXI);Object.assign(this.PIXI.utils,_pixi_utils);
this.PIXI=this.PIXI||{},this.PIXI.utils=this.PIXI.utils||{};var _pixi_utils=function(e,t,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var a=o(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),f=n?n+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],s]:e._events[f].push(s):(e._events[f]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=arguments,f=n?n+e:e;if(!this._events[f])return!1;var h,l,u=this._events[f],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=s[l];u.fn.apply(u.context,h)}else{var p,d=u.length;for(l=0;l<d;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,o);break;default:if(!h)for(p=1,h=new Array(c-1);p<c;p++)h[p-1]=s[p];u[l].fn.apply(u[l].context,h)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var f=0,h=[],l=s.length;f<l;f++)(s[f].fn!==t||o&&!s[f].once||r&&s[f].context!==r)&&h.push(s[f]);h.length?this._events[a]=1===h.length?h[0]:h:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}),i=f,s=f;function f(e,t,n){n=n||2;var r,o,a,i,s,f,c,p=t&&t.length,d=p?t[0]*n:e.length,v=h(e,0,d,n,!0),g=[];if(!v||v.next===v.prev)return g;if(p&&(v=function(e,t,n,r){var o,a,i,s,f,u=[];for(o=0,a=t.length;o<a;o++)i=t[o]*r,s=o<a-1?t[o+1]*r:e.length,(f=h(e,i,s,r,!1))===f.next&&(f.steiner=!0),u.push(b(f));for(u.sort(x),o=0;o<u.length;o++)y(u[o],n),n=l(n,n.next);return n}(e,t,v,n)),e.length>80*n){r=a=e[0],o=i=e[1];for(var m=n;m<d;m+=n)(s=e[m])<r&&(r=s),(f=e[m+1])<o&&(o=f),s>a&&(a=s),f>i&&(i=f);c=0!==(c=Math.max(a-r,i-o))?1/c:0}return u(v,g,n,r,o,c),g}function h(e,t,n,r,o){var a,i;if(o===R(e,t,n,r)>0)for(a=t;a<n;a+=r)i=M(a,e[a],e[a+1],i);else for(a=n-r;a>=t;a-=r)i=M(a,e[a],e[a+1],i);return i&&O(i,i.next)&&(D(i),i=i.next),i}function l(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!O(r,r.next)&&0!==A(r.prev,r,r.next))r=r.next;else{if(D(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function u(e,t,n,r,o,a,i){if(e){!i&&a&&function(e,t,n,r){var o=e;do{null===o.z&&(o.z=m(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,a,i,s,f,h=1;do{for(n=e,e=null,a=null,i=0;n;){for(i++,r=n,s=0,t=0;t<h&&(s++,r=r.nextZ);t++);for(f=h;s>0||f>0&&r;)0!==s&&(0===f||!r||n.z<=r.z)?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,f--),a?a.nextZ=o:e=o,o.prevZ=a,a=o;n=r}a.nextZ=null,h*=2}while(i>1)}(o)}(e,r,o,a);for(var s,f,h=e;e.prev!==e.next;)if(s=e.prev,f=e.next,a?p(e,r,o,a):c(e))t.push(s.i/n),t.push(e.i/n),t.push(f.i/n),D(e),e=f.next,h=f.next;else if((e=f)===h){i?1===i?u(e=d(l(e),t,n),t,n,r,o,a,2):2===i&&v(e,t,n,r,o,a):u(l(e),t,n,r,o,a,1);break}}}function c(e){var t=e.prev,n=e,r=e.next;if(A(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(w(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&A(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function p(e,t,n,r){var o=e.prev,a=e,i=e.next;if(A(o,a,i)>=0)return!1;for(var s=o.x<a.x?o.x<i.x?o.x:i.x:a.x<i.x?a.x:i.x,f=o.y<a.y?o.y<i.y?o.y:i.y:a.y<i.y?a.y:i.y,h=o.x>a.x?o.x>i.x?o.x:i.x:a.x>i.x?a.x:i.x,l=o.y>a.y?o.y>i.y?o.y:i.y:a.y>i.y?a.y:i.y,u=m(s,f,t,n,r),c=m(h,l,t,n,r),p=e.prevZ,d=e.nextZ;p&&p.z>=u&&d&&d.z<=c;){if(p!==e.prev&&p!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==e.prev&&d!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,d.x,d.y)&&A(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=u;){if(p!==e.prev&&p!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,p.x,p.y)&&A(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=c;){if(d!==e.prev&&d!==e.next&&w(o.x,o.y,a.x,a.y,i.x,i.y,d.x,d.y)&&A(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function d(e,t,n){var r=e;do{var o=r.prev,a=r.next.next;!O(o,a)&&_(o,r,r.next,a)&&I(o,a)&&I(a,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(a.i/n),D(r),D(r.next),r=e=a),r=r.next}while(r!==e);return l(r)}function v(e,t,n,r,o,a){var i=e;do{for(var s=i.next.next;s!==i.prev;){if(i.i!==s.i&&E(i,s)){var f=j(i,s);return i=l(i,i.next),f=l(f,f.next),u(i,t,n,r,o,a),void u(f,t,n,r,o,a)}s=s.next}i=i.next}while(i!==e)}function x(e,t){return e.x-t.x}function y(e,t){if(t=function(e,t){var n,r=t,o=e.x,a=e.y,i=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>i){if(i=s,s===o){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===i)return n;var f,h=n,l=n.x,u=n.y,c=1/0;r=n;do{o>=r.x&&r.x>=l&&o!==r.x&&w(a<u?o:i,a,l,u,a<u?i:o,a,r.x,r.y)&&(f=Math.abs(a-r.y)/(o-r.x),I(r,e)&&(f<c||f===c&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,c=f)),r=r.next}while(r!==h);return n}(e,t)){var n=j(t,e);l(t,t.next),l(n,n.next)}}function g(e,t){return A(e.prev,e,t.prev)<0&&A(t.next,e,e.next)<0}function m(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function b(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function w(e,t,n,r,o,a,i,s){return(o-i)*(t-s)-(e-i)*(a-s)>=0&&(e-i)*(r-s)-(n-i)*(t-s)>=0&&(n-i)*(a-s)-(o-i)*(r-s)>=0}function E(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&_(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(I(e,t)&&I(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&o<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(A(e.prev,e,t.prev)||A(e,t.prev,t))||O(e,t)&&A(e.prev,e,e.next)>0&&A(t.prev,t,t.next)>0)}function A(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function O(e,t){return e.x===t.x&&e.y===t.y}function _(e,t,n,r){var o=k(A(e,t,n)),a=k(A(e,t,r)),i=k(A(n,r,e)),s=k(A(n,r,t));return o!==a&&i!==s||(!(0!==o||!C(e,n,t))||(!(0!==a||!C(e,r,t))||(!(0!==i||!C(n,e,r))||!(0!==s||!C(n,t,r)))))}function C(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k(e){return e>0?1:e<0?-1:0}function I(e,t){return A(e.prev,e,e.next)<0?A(e,t,e.next)>=0&&A(e,e.prev,t)>=0:A(e,t,e.prev)<0||A(e,e.next,t)<0}function j(e,t){var n=new N(e.i,e.x,e.y),r=new N(t.i,t.x,t.y),o=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function M(e,t,n,r){var o=new N(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function N(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(e,t,n,r){for(var o=0,a=t,i=n-r;a<n;a+=r)o+=(e[i]-e[a])*(e[a+1]+e[i+1]),i=a;return o}f.deviation=function(e,t,n,r){var o=t&&t.length,a=o?t[0]*n:e.length,i=Math.abs(R(e,0,a,n));if(o)for(var s=0,f=t.length;s<f;s++){var h=t[s]*n,l=s<f-1?t[s+1]*n:e.length;i-=Math.abs(R(e,h,l,n))}var u=0;for(s=0;s<r.length;s+=3){var c=r[s]*n,p=r[s+1]*n,d=r[s+2]*n;u+=Math.abs((e[c]-e[d])*(e[p+1]-e[c+1])-(e[c]-e[p])*(e[d+1]-e[c+1]))}return 0===i&&0===u?0:Math.abs((u-i)/i)},f.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var a=0;a<e[o].length;a++)for(var i=0;i<t;i++)n.vertices.push(e[o][a][i]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},i.default=s;var L=o(function(e,t){!function(n){var o=t&&!t.nodeType&&t,a=e&&!e.nodeType&&e,i="object"==typeof r&&r;i.global!==i&&i.window!==i&&i.self!==i||(n=i);var s,f,h=2147483647,l=36,u=1,c=26,p=38,d=700,v=72,x=128,y="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-u,A=Math.floor,O=String.fromCharCode;function _(e){throw RangeError(w[e])}function C(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+C((e=e.replace(b,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function j(e){return C(e,function(e){var t="";return e>65535&&(t+=O((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=O(e)}).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function D(e,t,n){var r=0;for(e=n?A(e/d):e>>1,e+=A(e/t);e>E*c>>1;r+=l)e=A(e/E);return A(r+(E+1)*e/(e+p))}function N(e){var t,n,r,o,a,i,s,f,p,d,g,m=[],b=e.length,w=0,E=x,O=v;for((n=e.lastIndexOf(y))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&_("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(a=w,i=1,s=l;o>=b&&_("invalid-input"),((f=(g=e.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:l)>=l||f>A((h-w)/i))&&_("overflow"),w+=f*i,!(f<(p=s<=O?u:s>=O+c?c:s-O));s+=l)i>A(h/(d=l-p))&&_("overflow"),i*=d;O=D(w-a,t=m.length+1,0==a),A(w/t)>h-E&&_("overflow"),E+=A(w/t),w%=t,m.splice(w++,0,E)}return j(m)}function R(e){var t,n,r,o,a,i,s,f,p,d,g,m,b,w,E,C=[];for(m=(e=I(e)).length,t=x,n=0,a=v,i=0;i<m;++i)(g=e[i])<128&&C.push(O(g));for(r=o=C.length,o&&C.push(y);r<m;){for(s=h,i=0;i<m;++i)(g=e[i])>=t&&g<s&&(s=g);for(s-t>A((h-n)/(b=r+1))&&_("overflow"),n+=(s-t)*b,t=s,i=0;i<m;++i)if((g=e[i])<t&&++n>h&&_("overflow"),g==t){for(f=n,p=l;!(f<(d=p<=a?u:p>=a+c?c:p-a));p+=l)E=f-d,w=l-d,C.push(O(M(d+E%w,0))),f=A(E/w);C.push(O(M(f,0))),a=D(n,b,r==o),n=0,++r}++n,++t}return C.join("")}if(s={version:"1.3.2",ucs2:{decode:I,encode:j},decode:N,encode:R,toASCII:function(e){return k(e,function(e){return m.test(e)?"xn--"+R(e):e})},toUnicode:function(e){return k(e,function(e){return g.test(e)?N(e.slice(4).toLowerCase()):e})}},o&&a)if(e.exports==o)a.exports=s;else for(f in s)s.hasOwnProperty(f)&&(o[f]=s[f]);else n.punycode=s}(r)}),P={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}};function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var T=function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var i=1e3;r&&"number"==typeof r.maxKeys&&(i=r.maxKeys);var s=e.length;i>0&&s>i&&(s=i);for(var f=0;f<s;++f){var h,l,u,c,p=e[f].replace(a,"%20"),d=p.indexOf(n);d>=0?(h=p.substr(0,d),l=p.substr(d+1)):(h=p,l=""),u=decodeURIComponent(h),c=decodeURIComponent(l),S(o,u)?Array.isArray(o[u])?o[u].push(c):o[u]=[o[u],c]:o[u]=c}return o},q=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},U=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var o=encodeURIComponent(q(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return o+encodeURIComponent(q(e))}).join(t):o+encodeURIComponent(q(e[r]))}).join(t):r?encodeURIComponent(q(r))+n+encodeURIComponent(q(e)):""},Z=o(function(e,t){t.decode=t.parse=T,t.encode=t.stringify=U}),F=ae,B=function(e,t){return ae(e,!1,!0).resolve(t)},z=function(e,t){if(!e)return t;return ae(e,!1,!0).resolveObject(t)},X=function(e){P.isString(e)&&(e=ae(e));if(!(e instanceof W))return W.prototype.format.call(e);return e.format()},J=W;function W(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var H=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,G=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),K=["'"].concat(Y),V=["%","/","?",";","#"].concat(K),Q=["/","?","#"],ee=/^[+a-z0-9A-Z_-]{0,63}$/,te=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ne={javascript:!0,"javascript:":!0},re={javascript:!0,"javascript:":!0},oe={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ae(e,t,n){if(e&&P.isObject(e)&&e instanceof W)return e;var r=new W;return r.parse(e,t,n),r}W.prototype.parse=function(e,t,n){if(!P.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",a=e.split(o);a[0]=a[0].replace(/\\/g,"/");var i=e=a.join(o);if(i=i.trim(),!n&&1===e.split("#").length){var s=G.exec(i);if(s)return this.path=i,this.href=i,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?Z.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=H.exec(i);if(f){var h=(f=f[0]).toLowerCase();this.protocol=h,i=i.substr(f.length)}if(n||f||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===i.substr(0,2);!l||f&&re[f]||(i=i.substr(2),this.slashes=!0)}if(!re[f]&&(l||f&&!oe[f])){for(var u,c,p=-1,d=0;d<Q.length;d++){-1!==(v=i.indexOf(Q[d]))&&(-1===p||v<p)&&(p=v)}-1!==(c=-1===p?i.lastIndexOf("@"):i.lastIndexOf("@",p))&&(u=i.slice(0,c),i=i.slice(c+1),this.auth=decodeURIComponent(u)),p=-1;for(d=0;d<V.length;d++){var v;-1!==(v=i.indexOf(V[d]))&&(-1===p||v<p)&&(p=v)}-1===p&&(p=i.length),this.host=i.slice(0,p),i=i.slice(p),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var y=this.hostname.split(/\./),g=(d=0,y.length);d<g;d++){var m=y[d];if(m&&!m.match(ee)){for(var b="",w=0,E=m.length;w<E;w++)m.charCodeAt(w)>127?b+="x":b+=m[w];if(!b.match(ee)){var A=y.slice(0,d),O=y.slice(d+1),_=m.match(te);_&&(A.push(_[1]),O.unshift(_[2])),O.length&&(i="/"+O.join(".")+i),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=L.toASCII(this.hostname));var C=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+C,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!ne[h])for(d=0,g=K.length;d<g;d++){var I=K[d];if(-1!==i.indexOf(I)){var j=encodeURIComponent(I);j===I&&(j=escape(I)),i=i.split(I).join(j)}}var M=i.indexOf("#");-1!==M&&(this.hash=i.substr(M),i=i.slice(0,M));var D=i.indexOf("?");if(-1!==D?(this.search=i.substr(D),this.query=i.substr(D+1),t&&(this.query=Z.parse(this.query)),i=i.slice(0,D)):t&&(this.search="",this.query={}),i&&(this.pathname=i),oe[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var N=this.search||"";this.path=C+N}return this.href=this.format(),this},W.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&P.isObject(this.query)&&Object.keys(this.query).length&&(a=Z.stringify(this.query));var i=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||oe[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(i=i.replace("#","%23"))+r},W.prototype.resolve=function(e){return this.resolveObject(ae(e,!1,!0)).format()},W.prototype.resolveObject=function(e){if(P.isString(e)){var t=new W;t.parse(e,!1,!0),e=t}for(var n=new W,r=Object.keys(this),o=0;o<r.length;o++){var a=r[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var i=Object.keys(e),s=0;s<i.length;s++){var f=i[s];"protocol"!==f&&(n[f]=e[f])}return oe[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!oe[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var u=h[l];n[u]=e[u]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||re[e.protocol])n.pathname=e.pathname;else{for(var c=(e.pathname||"").split("/");c.length&&!(e.host=c.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),n.pathname=c.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",d=n.search||"";n.path=p+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),x=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=x||v||n.host&&e.pathname,g=y,m=n.pathname&&n.pathname.split("/")||[],b=(c=e.pathname&&e.pathname.split("/")||[],n.protocol&&!oe[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===m[0]?m[0]=n.host:m.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host=null),y=y&&(""===c[0]||""===m[0])),x)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,m=c;else if(c.length)m||(m=[]),m.pop(),m=m.concat(c),n.search=e.search,n.query=e.query;else if(!P.isNullOrUndefined(e.search)){if(b)n.hostname=n.host=m.shift(),(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift());return n.search=e.search,n.query=e.query,P.isNull(n.pathname)&&P.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],E=(n.host||e.host||m.length>1)&&("."===w||".."===w)||""===w,A=0,O=m.length;O>=0;O--)"."===(w=m[O])?m.splice(O,1):".."===w?(m.splice(O,1),A++):A&&(m.splice(O,1),A--);if(!y&&!g)for(;A--;A)m.unshift("..");!y||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),E&&"/"!==m.join("/").substr(-1)&&m.push("");var _,C=""===m[0]||m[0]&&"/"===m[0].charAt(0);b&&(n.hostname=n.host=C?"":m.length?m.shift():"",(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift()));return(y=y||n.host&&m.length)&&!C&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),P.isNull(n.pathname)&&P.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},W.prototype.parseHost=function(){var e=this.host,t=$.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var ie={parse:F,resolve:B,resolveObject:z,format:X,Url:J};t.settings.RETINA_PREFIX=/@([0-9\.]+)x/,t.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var se,fe=!1,he="5.4.0-rc.2";var le={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var ue=function(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,e[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,e[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,t[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,t[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,t[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var o=[];return o.push(t),o.push(e),o}();function ce(e){if(4===e.BYTES_PER_ELEMENT)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===e.BYTES_PER_ELEMENT){if(e instanceof Uint16Array)return"Uint16Array"}else if(1===e.BYTES_PER_ELEMENT&&e instanceof Uint8Array)return"Uint8Array";return null}var pe={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var de=0;var ve={};var xe=Object.create(null),ye=Object.create(null);var ge=function(){function e(e,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||t.settings.RESOLUTION,this.resize(e,n)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(e,t){this.canvas.width=e*this.resolution,this.canvas.height=t*this.resolution},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=e},enumerable:!1,configurable:!0}),e}();var me,be=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;return Object.defineProperty(e,"isMobile",{enumerable:!0,get:function(){return t.isMobile}}),e.BaseTextureCache=ye,e.CanvasRenderTarget=ge,e.DATA_URI=be,e.EventEmitter=a,e.ProgramCache={},e.TextureCache=xe,e.clearTextureCache=function(){var e;for(e in xe)delete xe[e];for(e in ye)delete ye[e]},e.correctBlendMode=function(e,t){return ue[t?1:0][e]},e.createIndicesForQuads=function(e,t){void 0===t&&(t=null);var n=6*e;if((t=t||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+n);for(var r=0,o=0;r<n;r+=6,o+=4)t[r+0]=o+0,t[r+1]=o+1,t[r+2]=o+2,t[r+3]=o+0,t[r+4]=o+2,t[r+5]=o+3;return t},e.decomposeDataUri=function(e){var t=be.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]}},e.deprecation=function(e,t,n){if(void 0===n&&(n=3),!ve[t]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e):(r=r.split("\n").splice(n).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+"\nDeprecated since v"+e),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e),console.warn(r))),ve[t]=!0}},e.destroyTextureCache=function(){var e;for(e in xe)xe[e].destroy();for(e in ye)ye[e].destroy()},e.determineCrossOrigin=function(e,t){if(void 0===t&&(t=self.location),0===e.indexOf("data:"))return"";t=t||self.location,me||(me=document.createElement("a")),me.href=e;var n=F(me.href),r=!n.port&&""===t.port||n.port===t.port;return n.hostname===t.hostname&&r&&n.protocol===t.protocol?"":"anonymous"},e.earcut=i,e.getBufferType=ce,e.getResolutionOfUrl=function(e,n){var r=t.settings.RETINA_PREFIX.exec(e);return r?parseFloat(r[1]):void 0!==n?n:1},e.hex2rgb=function(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t},e.hex2string=function(e){var t=e.toString(16);return"#"+(t="000000".substr(0,6-t.length)+t)},e.interleaveTypedArrays=function(e,t){for(var n=0,r=0,o={},a=0;a<e.length;a++)r+=t[a],n+=e[a].length;var i=new ArrayBuffer(4*n),s=null,f=0;for(a=0;a<e.length;a++){var h=t[a],l=e[a],u=ce(l);o[u]||(o[u]=new pe[u](i)),s=o[u];for(var c=0;c<l.length;c++)s[(c/h|0)*r+f+c%h]=l[c];f+=h}return new Float32Array(i)},e.isPow2=function(e){return!(e&e-1||!e)},e.isWebGLSupported=function(){return void 0===se&&(se=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:t.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",e)||n.getContext("experimental-webgl",e),o=!(!r||!r.getContextAttributes().stencil);if(r){var a=r.getExtension("WEBGL_lose_context");a&&a.loseContext()}return r=null,o}catch(e){return!1}}()),se},e.log2=function(e){var t=(e>65535?1:0)<<4,n=((e>>>=t)>255?1:0)<<3;return t|=n,t|=n=((e>>>=n)>15?1:0)<<2,(t|=n=((e>>>=n)>3?1:0)<<1)|(e>>>=n)>>1},e.nextPow2=function(e){return e+=0===e?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},e.premultiplyBlendMode=ue,e.premultiplyRgba=function(e,t,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t):(n[0]=e[0],n[1]=e[1],n[2]=e[2]),n[3]=t,n},e.premultiplyTint=function(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var n=e>>16&255,r=e>>8&255,o=255&e;return(255*t<<24)+((n=n*t+.5|0)<<16)+((r=r*t+.5|0)<<8)+(o=o*t+.5|0)},e.premultiplyTintToRgba=function(e,t,n,r){return(n=n||new Float32Array(4))[0]=(e>>16&255)/255,n[1]=(e>>8&255)/255,n[2]=(255&e)/255,(r||void 0===r)&&(n[0]*=t,n[1]*=t,n[2]*=t),n[3]=t,n},e.removeItems=function(e,t,n){var r,o=e.length;if(!(t>=o||0===n)){var a=o-(n=t+n>o?o-t:n);for(r=t;r<a;++r)e[r]=e[r+n];e.length=a}},e.rgb2hex=function(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)},e.sayHello=function(e){var t;if(!fe){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+he+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=self.console).log.apply(t,n)}else self.console&&self.console.log("PixiJS "+he+" - "+e+" - http://www.pixijs.com/");fe=!0}},e.sign=function(e){return 0===e?0:e<0?-1:1},e.skipHello=function(){fe=!0},e.string2hex=function(e){return"string"==typeof e&&"#"===(e=le[e.toLowerCase()]||e)[0]&&(e=e.substr(1)),parseInt(e,16)},e.trimCanvas=function(e){var t,n,r,o=e.width,a=e.height,i=e.getContext("2d"),s=i.getImageData(0,0,o,a).data,f=s.length,h={top:null,left:null,right:null,bottom:null},l=null;for(t=0;t<f;t+=4)0!==s[t+3]&&(n=t/4%o,r=~~(t/4/o),null===h.top&&(h.top=r),null===h.left?h.left=n:n<h.left&&(h.left=n),null===h.right?h.right=n+1:h.right<n&&(h.right=n+1),null===h.bottom?h.bottom=r:h.bottom<r&&(h.bottom=r));return null!==h.top&&(o=h.right-h.left,a=h.bottom-h.top+1,l=i.getImageData(h.left,h.top,o,a)),{height:a,width:o,data:l}},e.uid=function(){return++de},e.url=ie,e}({},PIXI,PIXI);Object.assign(this.PIXI.utils,_pixi_utils);
//# sourceMappingURL=utils.min.js.map
/*!
* @pixi/utils - v5.4.0-rc.1
* Compiled Wed, 11 Nov 2020 16:56:22 UTC
* @pixi/utils - v5.4.0-rc.2
* Compiled Tue, 17 Nov 2020 01:47:11 UTC
*

@@ -47,3 +47,3 @@ * @pixi/utils is licensed under the MIT License.

var saidHello = false;
var VERSION = '5.4.0-rc.1';
var VERSION = '5.4.0-rc.2';
/**

@@ -50,0 +50,0 @@ * Skips the hello message of renderers that are created after this is run.

/*!
* @pixi/utils - v5.4.0-rc.1
* Compiled Wed, 11 Nov 2020 16:56:22 UTC
* @pixi/utils - v5.4.0-rc.2
* Compiled Tue, 17 Nov 2020 01:47:11 UTC
*

@@ -8,3 +8,3 @@ * @pixi/utils is licensed under the MIT License.

*/
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var settings=require("@pixi/settings"),eventemitter3=_interopDefault(require("eventemitter3")),earcut=_interopDefault(require("earcut")),_url=require("url"),_url__default=_interopDefault(_url),cssColorNames=_interopDefault(require("css-color-names")),constants=require("@pixi/constants");settings.settings.RETINA_PREFIX=/@([0-9\.]+)x/,settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var supported,saidHello=!1,VERSION="5.4.0-rc.1";function skipHello(){saidHello=!0}function sayHello(e){var t;if(!saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+VERSION+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=self.console).log.apply(t,r)}else self.console&&self.console.log("PixiJS "+VERSION+" - "+e+" - http://www.pixijs.com/");saidHello=!0}}function isWebGLSupported(){return void 0===supported&&(supported=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var t=document.createElement("canvas"),r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),n=!(!r||!r.getContextAttributes().stencil);if(r){var o=r.getExtension("WEBGL_lose_context");o&&o.loseContext()}return r=null,n}catch(e){return!1}}()),supported}function hex2rgb(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function hex2string(e){var t=e.toString(16);return"#"+(t="000000".substr(0,6-t.length)+t)}function string2hex(e){return"string"==typeof e&&"#"===(e=cssColorNames[e.toLowerCase()]||e)[0]&&(e=e.substr(1)),parseInt(e,16)}function rgb2hex(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function mapPremultipliedBlendModes(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[constants.BLEND_MODES.NORMAL_NPM]=constants.BLEND_MODES.NORMAL,e[constants.BLEND_MODES.ADD_NPM]=constants.BLEND_MODES.ADD,e[constants.BLEND_MODES.SCREEN_NPM]=constants.BLEND_MODES.SCREEN,t[constants.BLEND_MODES.NORMAL]=constants.BLEND_MODES.NORMAL_NPM,t[constants.BLEND_MODES.ADD]=constants.BLEND_MODES.ADD_NPM,t[constants.BLEND_MODES.SCREEN]=constants.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var premultiplyBlendMode=mapPremultipliedBlendModes();function correctBlendMode(e,t){return premultiplyBlendMode[t?1:0][e]}function premultiplyRgba(e,t,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function premultiplyTint(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,n=e>>8&255,o=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((n=n*t+.5|0)<<8)+(o=o*t+.5|0)}function premultiplyTintToRgba(e,t,r,n){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(n||void 0===n)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function createIndicesForQuads(e,t){void 0===t&&(t=null);var r=6*e;if((t=t||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,o=0;n<r;n+=6,o+=4)t[n+0]=o+0,t[n+1]=o+1,t[n+2]=o+2,t[n+3]=o+0,t[n+4]=o+2,t[n+5]=o+3;return t}function getBufferType(e){if(4===e.BYTES_PER_ELEMENT)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===e.BYTES_PER_ELEMENT){if(e instanceof Uint16Array)return"Uint16Array"}else if(1===e.BYTES_PER_ELEMENT&&e instanceof Uint8Array)return"Uint8Array";return null}var map={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function interleaveTypedArrays(e,t){for(var r=0,n=0,o={},a=0;a<e.length;a++)n+=t[a],r+=e[a].length;var i=new ArrayBuffer(4*r),s=null,c=0;for(a=0;a<e.length;a++){var l=t[a],u=e[a],p=getBufferType(u);o[p]||(o[p]=new map[p](i)),s=o[p];for(var f=0;f<u.length;f++){s[(f/l|0)*n+c+f%l]=u[f]}c+=l}return new Float32Array(i)}function nextPow2(e){return e+=0===e?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1}function isPow2(e){return!(e&e-1||!e)}function log2(e){var t=(e>65535?1:0)<<4,r=((e>>>=t)>255?1:0)<<3;return t|=r,t|=r=((e>>>=r)>15?1:0)<<2,(t|=r=((e>>>=r)>3?1:0)<<1)|(e>>>=r)>>1}function removeItems(e,t,r){var n,o=e.length;if(!(t>=o||0===r)){var a=o-(r=t+r>o?o-t:r);for(n=t;n<a;++n)e[n]=e[n+r];e.length=a}}function sign(e){return 0===e?0:e<0?-1:1}var nextUid=0;function uid(){return++nextUid}var warnings={};function deprecation(e,t,r){if(void 0===r&&(r=3),!warnings[t]){var n=(new Error).stack;void 0===n?console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e):(n=n.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+"\nDeprecated since v"+e),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e),console.warn(n))),warnings[t]=!0}}var ProgramCache={},TextureCache=Object.create(null),BaseTextureCache=Object.create(null);function destroyTextureCache(){var e;for(e in TextureCache)TextureCache[e].destroy();for(e in BaseTextureCache)BaseTextureCache[e].destroy()}function clearTextureCache(){var e;for(e in TextureCache)delete TextureCache[e];for(e in BaseTextureCache)delete BaseTextureCache[e]}var CanvasRenderTarget=function(){function e(e,t,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||settings.settings.RESOLUTION,this.resize(e,t)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(e,t){this.canvas.width=e*this.resolution,this.canvas.height=t*this.resolution},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=e},enumerable:!1,configurable:!0}),e}();function trimCanvas(e){var t,r,n,o=e.width,a=e.height,i=e.getContext("2d"),s=i.getImageData(0,0,o,a).data,c=s.length,l={top:null,left:null,right:null,bottom:null},u=null;for(t=0;t<c;t+=4)0!==s[t+3]&&(r=t/4%o,n=~~(t/4/o),null===l.top&&(l.top=n),null===l.left?l.left=r:r<l.left&&(l.left=r),null===l.right?l.right=r+1:l.right<r&&(l.right=r+1),null===l.bottom?l.bottom=n:l.bottom<n&&(l.bottom=n));return null!==l.top&&(o=l.right-l.left,a=l.bottom-l.top+1,u=i.getImageData(l.left,l.top,o,a)),{height:a,width:o,data:u}}var tempAnchor,DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function decomposeDataUri(e){var t=DATA_URI.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]}}function determineCrossOrigin(e,t){if(void 0===t&&(t=self.location),0===e.indexOf("data:"))return"";t=t||self.location,tempAnchor||(tempAnchor=document.createElement("a")),tempAnchor.href=e;var r=_url.parse(tempAnchor.href),n=!r.port&&""===t.port||r.port===t.port;return r.hostname===t.hostname&&n&&r.protocol===t.protocol?"":"anonymous"}function getResolutionOfUrl(e,t){var r=settings.settings.RETINA_PREFIX.exec(e);return r?parseFloat(r[1]):void 0!==t?t:1}Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return settings.isMobile}}),exports.EventEmitter=eventemitter3,exports.earcut=earcut,exports.url=_url__default,exports.BaseTextureCache=BaseTextureCache,exports.CanvasRenderTarget=CanvasRenderTarget,exports.DATA_URI=DATA_URI,exports.ProgramCache=ProgramCache,exports.TextureCache=TextureCache,exports.clearTextureCache=clearTextureCache,exports.correctBlendMode=correctBlendMode,exports.createIndicesForQuads=createIndicesForQuads,exports.decomposeDataUri=decomposeDataUri,exports.deprecation=deprecation,exports.destroyTextureCache=destroyTextureCache,exports.determineCrossOrigin=determineCrossOrigin,exports.getBufferType=getBufferType,exports.getResolutionOfUrl=getResolutionOfUrl,exports.hex2rgb=hex2rgb,exports.hex2string=hex2string,exports.interleaveTypedArrays=interleaveTypedArrays,exports.isPow2=isPow2,exports.isWebGLSupported=isWebGLSupported,exports.log2=log2,exports.nextPow2=nextPow2,exports.premultiplyBlendMode=premultiplyBlendMode,exports.premultiplyRgba=premultiplyRgba,exports.premultiplyTint=premultiplyTint,exports.premultiplyTintToRgba=premultiplyTintToRgba,exports.removeItems=removeItems,exports.rgb2hex=rgb2hex,exports.sayHello=sayHello,exports.sign=sign,exports.skipHello=skipHello,exports.string2hex=string2hex,exports.trimCanvas=trimCanvas,exports.uid=uid;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var settings=require("@pixi/settings"),eventemitter3=_interopDefault(require("eventemitter3")),earcut=_interopDefault(require("earcut")),_url=require("url"),_url__default=_interopDefault(_url),cssColorNames=_interopDefault(require("css-color-names")),constants=require("@pixi/constants");settings.settings.RETINA_PREFIX=/@([0-9\.]+)x/,settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var supported,saidHello=!1,VERSION="5.4.0-rc.2";function skipHello(){saidHello=!0}function sayHello(e){var t;if(!saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+VERSION+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=self.console).log.apply(t,r)}else self.console&&self.console.log("PixiJS "+VERSION+" - "+e+" - http://www.pixijs.com/");saidHello=!0}}function isWebGLSupported(){return void 0===supported&&(supported=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var t=document.createElement("canvas"),r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),n=!(!r||!r.getContextAttributes().stencil);if(r){var o=r.getExtension("WEBGL_lose_context");o&&o.loseContext()}return r=null,n}catch(e){return!1}}()),supported}function hex2rgb(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function hex2string(e){var t=e.toString(16);return"#"+(t="000000".substr(0,6-t.length)+t)}function string2hex(e){return"string"==typeof e&&"#"===(e=cssColorNames[e.toLowerCase()]||e)[0]&&(e=e.substr(1)),parseInt(e,16)}function rgb2hex(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function mapPremultipliedBlendModes(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[constants.BLEND_MODES.NORMAL_NPM]=constants.BLEND_MODES.NORMAL,e[constants.BLEND_MODES.ADD_NPM]=constants.BLEND_MODES.ADD,e[constants.BLEND_MODES.SCREEN_NPM]=constants.BLEND_MODES.SCREEN,t[constants.BLEND_MODES.NORMAL]=constants.BLEND_MODES.NORMAL_NPM,t[constants.BLEND_MODES.ADD]=constants.BLEND_MODES.ADD_NPM,t[constants.BLEND_MODES.SCREEN]=constants.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var premultiplyBlendMode=mapPremultipliedBlendModes();function correctBlendMode(e,t){return premultiplyBlendMode[t?1:0][e]}function premultiplyRgba(e,t,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function premultiplyTint(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,n=e>>8&255,o=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((n=n*t+.5|0)<<8)+(o=o*t+.5|0)}function premultiplyTintToRgba(e,t,r,n){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(n||void 0===n)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function createIndicesForQuads(e,t){void 0===t&&(t=null);var r=6*e;if((t=t||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,o=0;n<r;n+=6,o+=4)t[n+0]=o+0,t[n+1]=o+1,t[n+2]=o+2,t[n+3]=o+0,t[n+4]=o+2,t[n+5]=o+3;return t}function getBufferType(e){if(4===e.BYTES_PER_ELEMENT)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===e.BYTES_PER_ELEMENT){if(e instanceof Uint16Array)return"Uint16Array"}else if(1===e.BYTES_PER_ELEMENT&&e instanceof Uint8Array)return"Uint8Array";return null}var map={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function interleaveTypedArrays(e,t){for(var r=0,n=0,o={},a=0;a<e.length;a++)n+=t[a],r+=e[a].length;var i=new ArrayBuffer(4*r),s=null,c=0;for(a=0;a<e.length;a++){var l=t[a],u=e[a],p=getBufferType(u);o[p]||(o[p]=new map[p](i)),s=o[p];for(var f=0;f<u.length;f++){s[(f/l|0)*n+c+f%l]=u[f]}c+=l}return new Float32Array(i)}function nextPow2(e){return e+=0===e?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1}function isPow2(e){return!(e&e-1||!e)}function log2(e){var t=(e>65535?1:0)<<4,r=((e>>>=t)>255?1:0)<<3;return t|=r,t|=r=((e>>>=r)>15?1:0)<<2,(t|=r=((e>>>=r)>3?1:0)<<1)|(e>>>=r)>>1}function removeItems(e,t,r){var n,o=e.length;if(!(t>=o||0===r)){var a=o-(r=t+r>o?o-t:r);for(n=t;n<a;++n)e[n]=e[n+r];e.length=a}}function sign(e){return 0===e?0:e<0?-1:1}var nextUid=0;function uid(){return++nextUid}var warnings={};function deprecation(e,t,r){if(void 0===r&&(r=3),!warnings[t]){var n=(new Error).stack;void 0===n?console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e):(n=n.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+"\nDeprecated since v"+e),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+"\nDeprecated since v"+e),console.warn(n))),warnings[t]=!0}}var ProgramCache={},TextureCache=Object.create(null),BaseTextureCache=Object.create(null);function destroyTextureCache(){var e;for(e in TextureCache)TextureCache[e].destroy();for(e in BaseTextureCache)BaseTextureCache[e].destroy()}function clearTextureCache(){var e;for(e in TextureCache)delete TextureCache[e];for(e in BaseTextureCache)delete BaseTextureCache[e]}var CanvasRenderTarget=function(){function e(e,t,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||settings.settings.RESOLUTION,this.resize(e,t)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(e,t){this.canvas.width=e*this.resolution,this.canvas.height=t*this.resolution},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=e},enumerable:!1,configurable:!0}),e}();function trimCanvas(e){var t,r,n,o=e.width,a=e.height,i=e.getContext("2d"),s=i.getImageData(0,0,o,a).data,c=s.length,l={top:null,left:null,right:null,bottom:null},u=null;for(t=0;t<c;t+=4)0!==s[t+3]&&(r=t/4%o,n=~~(t/4/o),null===l.top&&(l.top=n),null===l.left?l.left=r:r<l.left&&(l.left=r),null===l.right?l.right=r+1:l.right<r&&(l.right=r+1),null===l.bottom?l.bottom=n:l.bottom<n&&(l.bottom=n));return null!==l.top&&(o=l.right-l.left,a=l.bottom-l.top+1,u=i.getImageData(l.left,l.top,o,a)),{height:a,width:o,data:u}}var tempAnchor,DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function decomposeDataUri(e){var t=DATA_URI.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]}}function determineCrossOrigin(e,t){if(void 0===t&&(t=self.location),0===e.indexOf("data:"))return"";t=t||self.location,tempAnchor||(tempAnchor=document.createElement("a")),tempAnchor.href=e;var r=_url.parse(tempAnchor.href),n=!r.port&&""===t.port||r.port===t.port;return r.hostname===t.hostname&&n&&r.protocol===t.protocol?"":"anonymous"}function getResolutionOfUrl(e,t){var r=settings.settings.RETINA_PREFIX.exec(e);return r?parseFloat(r[1]):void 0!==t?t:1}Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return settings.isMobile}}),exports.EventEmitter=eventemitter3,exports.earcut=earcut,exports.url=_url__default,exports.BaseTextureCache=BaseTextureCache,exports.CanvasRenderTarget=CanvasRenderTarget,exports.DATA_URI=DATA_URI,exports.ProgramCache=ProgramCache,exports.TextureCache=TextureCache,exports.clearTextureCache=clearTextureCache,exports.correctBlendMode=correctBlendMode,exports.createIndicesForQuads=createIndicesForQuads,exports.decomposeDataUri=decomposeDataUri,exports.deprecation=deprecation,exports.destroyTextureCache=destroyTextureCache,exports.determineCrossOrigin=determineCrossOrigin,exports.getBufferType=getBufferType,exports.getResolutionOfUrl=getResolutionOfUrl,exports.hex2rgb=hex2rgb,exports.hex2string=hex2string,exports.interleaveTypedArrays=interleaveTypedArrays,exports.isPow2=isPow2,exports.isWebGLSupported=isWebGLSupported,exports.log2=log2,exports.nextPow2=nextPow2,exports.premultiplyBlendMode=premultiplyBlendMode,exports.premultiplyRgba=premultiplyRgba,exports.premultiplyTint=premultiplyTint,exports.premultiplyTintToRgba=premultiplyTintToRgba,exports.removeItems=removeItems,exports.rgb2hex=rgb2hex,exports.sayHello=sayHello,exports.sign=sign,exports.skipHello=skipHello,exports.string2hex=string2hex,exports.trimCanvas=trimCanvas,exports.uid=uid;
//# sourceMappingURL=utils.min.js.map
/*!
* @pixi/utils - v5.4.0-rc.1
* Compiled Wed, 11 Nov 2020 16:56:22 UTC
* @pixi/utils - v5.4.0-rc.2
* Compiled Tue, 17 Nov 2020 01:47:11 UTC
*

@@ -42,3 +42,3 @@ * @pixi/utils is licensed under the MIT License.

var saidHello = false;
var VERSION = '5.4.0-rc.1';
var VERSION = '5.4.0-rc.2';
/**

@@ -45,0 +45,0 @@ * Skips the hello message of renderers that are created after this is run.

/*!
* @pixi/utils - v5.4.0-rc.1
* Compiled Wed, 11 Nov 2020 16:56:22 UTC
* @pixi/utils - v5.4.0-rc.2
* Compiled Tue, 17 Nov 2020 01:47:11 UTC
*

@@ -8,3 +8,3 @@ * @pixi/utils is licensed under the MIT License.

*/
import{settings as t}from"@pixi/settings";export{isMobile}from"@pixi/settings";export{default as EventEmitter}from"eventemitter3";export{default as earcut}from"earcut";import{parse as n}from"url";export{default as url}from"url";import r from"css-color-names";import{BLEND_MODES as e}from"@pixi/constants";t.RETINA_PREFIX=/@([0-9\.]+)x/,t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var o,i=!1,a="5.4.0-rc.1";function c(){i=!0}function f(t){var n;if(!i){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+a+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(n=self.console).log.apply(n,r)}else self.console&&self.console.log("PixiJS "+a+" - "+t+" - http://www.pixijs.com/");i=!0}}function u(){return void 0===o&&(o=function(){var n={stencil:!0,failIfMajorPerformanceCaveat:t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),e=r.getContext("webgl",n)||r.getContext("experimental-webgl",n),o=!(!e||!e.getContextAttributes().stencil);if(e){var i=e.getExtension("WEBGL_lose_context");i&&i.loseContext()}return e=null,o}catch(t){return!1}}()),o}function l(t,n){return void 0===n&&(n=[]),n[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,n}function s(t){var n=t.toString(16);return"#"+(n="000000".substr(0,6-n.length)+n)}function d(t){return"string"==typeof t&&"#"===(t=r[t.toLowerCase()]||t)[0]&&(t=t.substr(1)),parseInt(t,16)}function p(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var g=function(){for(var t=[],n=[],r=0;r<32;r++)t[r]=r,n[r]=r;t[e.NORMAL_NPM]=e.NORMAL,t[e.ADD_NPM]=e.ADD,t[e.SCREEN_NPM]=e.SCREEN,n[e.NORMAL]=e.NORMAL_NPM,n[e.ADD]=e.ADD_NPM,n[e.SCREEN]=e.SCREEN_NPM;var o=[];return o.push(n),o.push(t),o}();function h(t,n){return g[n?1:0][t]}function v(t,n,r,e){return r=r||new Float32Array(4),e||void 0===e?(r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=n,r}function x(t,n){if(1===n)return(255*n<<24)+t;if(0===n)return 0;var r=t>>16&255,e=t>>8&255,o=255&t;return(255*n<<24)+((r=r*n+.5|0)<<16)+((e=e*n+.5|0)<<8)+(o=o*n+.5|0)}function A(t,n,r,e){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(e||void 0===e)&&(r[0]*=n,r[1]*=n,r[2]*=n),r[3]=n,r}function E(t,n){void 0===n&&(n=null);var r=6*t;if((n=n||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+n.length+" and expected "+r);for(var e=0,o=0;e<r;e+=6,o+=4)n[e+0]=o+0,n[e+1]=o+1,n[e+2]=o+2,n[e+3]=o+0,n[e+4]=o+2,n[e+5]=o+3;return n}function m(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var w={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function y(t,n){for(var r=0,e=0,o={},i=0;i<t.length;i++)e+=n[i],r+=t[i].length;var a=new ArrayBuffer(4*r),c=null,f=0;for(i=0;i<t.length;i++){var u=n[i],l=t[i],s=m(l);o[s]||(o[s]=new w[s](a)),c=o[s];for(var d=0;d<l.length;d++){c[(d/u|0)*e+f+d%u]=l[d]}f+=u}return new Float32Array(a)}function b(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function C(t){return!(t&t-1||!t)}function R(t){var n=(t>65535?1:0)<<4,r=((t>>>=n)>255?1:0)<<3;return n|=r,n|=r=((t>>>=r)>15?1:0)<<2,(n|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function _(t,n,r){var e,o=t.length;if(!(n>=o||0===r)){var i=o-(r=n+r>o?o-n:r);for(e=n;e<i;++e)t[e]=t[e+r];t.length=i}}function N(t){return 0===t?0:t<0?-1:1}var P=0;function M(){return++P}var L={};function O(t,n,r){if(void 0===r&&(r=3),!L[n]){var e=(new Error).stack;void 0===e?console.warn("PixiJS Deprecation Warning: ",n+"\nDeprecated since v"+t):(e=e.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",n+"\nDeprecated since v"+t),console.warn(e),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",n+"\nDeprecated since v"+t),console.warn(e))),L[n]=!0}}var D={},F=Object.create(null),I=Object.create(null);function S(){var t;for(t in F)F[t].destroy();for(t in I)I[t].destroy()}function T(){var t;for(t in F)delete F[t];for(t in I)delete I[t]}var k=function(){function n(n,r,e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=e||t.RESOLUTION,this.resize(n,r)}return n.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},n.prototype.resize=function(t,n){this.canvas.width=t*this.resolution,this.canvas.height=n*this.resolution},n.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(n.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!1,configurable:!0}),n}();function U(t){var n,r,e,o=t.width,i=t.height,a=t.getContext("2d"),c=a.getImageData(0,0,o,i).data,f=c.length,u={top:null,left:null,right:null,bottom:null},l=null;for(n=0;n<f;n+=4)0!==c[n+3]&&(r=n/4%o,e=~~(n/4/o),null===u.top&&(u.top=e),null===u.left?u.left=r:r<u.left&&(u.left=r),null===u.right?u.right=r+1:u.right<r&&(u.right=r+1),null===u.bottom?u.bottom=e:u.bottom<e&&(u.bottom=e));return null!==u.top&&(o=u.right-u.left,i=u.bottom-u.top+1,l=a.getImageData(u.left,u.top,o,i)),{height:i,width:o,data:l}}var j,J=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function B(t){var n=J.exec(t);if(n)return{mediaType:n[1]?n[1].toLowerCase():void 0,subType:n[2]?n[2].toLowerCase():void 0,charset:n[3]?n[3].toLowerCase():void 0,encoding:n[4]?n[4].toLowerCase():void 0,data:n[5]}}function W(t,r){if(void 0===r&&(r=self.location),0===t.indexOf("data:"))return"";r=r||self.location,j||(j=document.createElement("a")),j.href=t;var e=n(j.href),o=!e.port&&""===r.port||e.port===r.port;return e.hostname===r.hostname&&o&&e.protocol===r.protocol?"":"anonymous"}function Y(n,r){var e=t.RETINA_PREFIX.exec(n);return e?parseFloat(e[1]):void 0!==r?r:1}export{I as BaseTextureCache,k as CanvasRenderTarget,J as DATA_URI,D as ProgramCache,F as TextureCache,T as clearTextureCache,h as correctBlendMode,E as createIndicesForQuads,B as decomposeDataUri,O as deprecation,S as destroyTextureCache,W as determineCrossOrigin,m as getBufferType,Y as getResolutionOfUrl,l as hex2rgb,s as hex2string,y as interleaveTypedArrays,C as isPow2,u as isWebGLSupported,R as log2,b as nextPow2,g as premultiplyBlendMode,v as premultiplyRgba,x as premultiplyTint,A as premultiplyTintToRgba,_ as removeItems,p as rgb2hex,f as sayHello,N as sign,c as skipHello,d as string2hex,U as trimCanvas,M as uid};
import{settings as t}from"@pixi/settings";export{isMobile}from"@pixi/settings";export{default as EventEmitter}from"eventemitter3";export{default as earcut}from"earcut";import{parse as n}from"url";export{default as url}from"url";import r from"css-color-names";import{BLEND_MODES as e}from"@pixi/constants";t.RETINA_PREFIX=/@([0-9\.]+)x/,t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var o,i=!1,a="5.4.0-rc.2";function c(){i=!0}function f(t){var n;if(!i){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+a+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(n=self.console).log.apply(n,r)}else self.console&&self.console.log("PixiJS "+a+" - "+t+" - http://www.pixijs.com/");i=!0}}function u(){return void 0===o&&(o=function(){var n={stencil:!0,failIfMajorPerformanceCaveat:t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),e=r.getContext("webgl",n)||r.getContext("experimental-webgl",n),o=!(!e||!e.getContextAttributes().stencil);if(e){var i=e.getExtension("WEBGL_lose_context");i&&i.loseContext()}return e=null,o}catch(t){return!1}}()),o}function l(t,n){return void 0===n&&(n=[]),n[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,n}function s(t){var n=t.toString(16);return"#"+(n="000000".substr(0,6-n.length)+n)}function d(t){return"string"==typeof t&&"#"===(t=r[t.toLowerCase()]||t)[0]&&(t=t.substr(1)),parseInt(t,16)}function p(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var g=function(){for(var t=[],n=[],r=0;r<32;r++)t[r]=r,n[r]=r;t[e.NORMAL_NPM]=e.NORMAL,t[e.ADD_NPM]=e.ADD,t[e.SCREEN_NPM]=e.SCREEN,n[e.NORMAL]=e.NORMAL_NPM,n[e.ADD]=e.ADD_NPM,n[e.SCREEN]=e.SCREEN_NPM;var o=[];return o.push(n),o.push(t),o}();function h(t,n){return g[n?1:0][t]}function v(t,n,r,e){return r=r||new Float32Array(4),e||void 0===e?(r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=n,r}function x(t,n){if(1===n)return(255*n<<24)+t;if(0===n)return 0;var r=t>>16&255,e=t>>8&255,o=255&t;return(255*n<<24)+((r=r*n+.5|0)<<16)+((e=e*n+.5|0)<<8)+(o=o*n+.5|0)}function A(t,n,r,e){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(e||void 0===e)&&(r[0]*=n,r[1]*=n,r[2]*=n),r[3]=n,r}function E(t,n){void 0===n&&(n=null);var r=6*t;if((n=n||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+n.length+" and expected "+r);for(var e=0,o=0;e<r;e+=6,o+=4)n[e+0]=o+0,n[e+1]=o+1,n[e+2]=o+2,n[e+3]=o+0,n[e+4]=o+2,n[e+5]=o+3;return n}function m(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var w={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function y(t,n){for(var r=0,e=0,o={},i=0;i<t.length;i++)e+=n[i],r+=t[i].length;var a=new ArrayBuffer(4*r),c=null,f=0;for(i=0;i<t.length;i++){var u=n[i],l=t[i],s=m(l);o[s]||(o[s]=new w[s](a)),c=o[s];for(var d=0;d<l.length;d++){c[(d/u|0)*e+f+d%u]=l[d]}f+=u}return new Float32Array(a)}function b(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function C(t){return!(t&t-1||!t)}function R(t){var n=(t>65535?1:0)<<4,r=((t>>>=n)>255?1:0)<<3;return n|=r,n|=r=((t>>>=r)>15?1:0)<<2,(n|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function _(t,n,r){var e,o=t.length;if(!(n>=o||0===r)){var i=o-(r=n+r>o?o-n:r);for(e=n;e<i;++e)t[e]=t[e+r];t.length=i}}function N(t){return 0===t?0:t<0?-1:1}var P=0;function M(){return++P}var L={};function O(t,n,r){if(void 0===r&&(r=3),!L[n]){var e=(new Error).stack;void 0===e?console.warn("PixiJS Deprecation Warning: ",n+"\nDeprecated since v"+t):(e=e.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",n+"\nDeprecated since v"+t),console.warn(e),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",n+"\nDeprecated since v"+t),console.warn(e))),L[n]=!0}}var D={},F=Object.create(null),I=Object.create(null);function S(){var t;for(t in F)F[t].destroy();for(t in I)I[t].destroy()}function T(){var t;for(t in F)delete F[t];for(t in I)delete I[t]}var k=function(){function n(n,r,e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=e||t.RESOLUTION,this.resize(n,r)}return n.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},n.prototype.resize=function(t,n){this.canvas.width=t*this.resolution,this.canvas.height=n*this.resolution},n.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(n.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!1,configurable:!0}),n}();function U(t){var n,r,e,o=t.width,i=t.height,a=t.getContext("2d"),c=a.getImageData(0,0,o,i).data,f=c.length,u={top:null,left:null,right:null,bottom:null},l=null;for(n=0;n<f;n+=4)0!==c[n+3]&&(r=n/4%o,e=~~(n/4/o),null===u.top&&(u.top=e),null===u.left?u.left=r:r<u.left&&(u.left=r),null===u.right?u.right=r+1:u.right<r&&(u.right=r+1),null===u.bottom?u.bottom=e:u.bottom<e&&(u.bottom=e));return null!==u.top&&(o=u.right-u.left,i=u.bottom-u.top+1,l=a.getImageData(u.left,u.top,o,i)),{height:i,width:o,data:l}}var j,J=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function B(t){var n=J.exec(t);if(n)return{mediaType:n[1]?n[1].toLowerCase():void 0,subType:n[2]?n[2].toLowerCase():void 0,charset:n[3]?n[3].toLowerCase():void 0,encoding:n[4]?n[4].toLowerCase():void 0,data:n[5]}}function W(t,r){if(void 0===r&&(r=self.location),0===t.indexOf("data:"))return"";r=r||self.location,j||(j=document.createElement("a")),j.href=t;var e=n(j.href),o=!e.port&&""===r.port||e.port===r.port;return e.hostname===r.hostname&&o&&e.protocol===r.protocol?"":"anonymous"}function Y(n,r){var e=t.RETINA_PREFIX.exec(n);return e?parseFloat(e[1]):void 0!==r?r:1}export{I as BaseTextureCache,k as CanvasRenderTarget,J as DATA_URI,D as ProgramCache,F as TextureCache,T as clearTextureCache,h as correctBlendMode,E as createIndicesForQuads,B as decomposeDataUri,O as deprecation,S as destroyTextureCache,W as determineCrossOrigin,m as getBufferType,Y as getResolutionOfUrl,l as hex2rgb,s as hex2string,y as interleaveTypedArrays,C as isPow2,u as isWebGLSupported,R as log2,b as nextPow2,g as premultiplyBlendMode,v as premultiplyRgba,x as premultiplyTint,A as premultiplyTintToRgba,_ as removeItems,p as rgb2hex,f as sayHello,N as sign,c as skipHello,d as string2hex,U as trimCanvas,M as uid};
//# sourceMappingURL=utils.min.js.map
{
"name": "@pixi/utils",
"version": "5.4.0-rc.1",
"version": "5.4.0-rc.2",
"main": "dist/cjs/utils.js",

@@ -29,4 +29,4 @@ "module": "dist/esm/utils.js",

"dependencies": {
"@pixi/constants": "5.4.0-rc.1",
"@pixi/settings": "5.4.0-rc.1",
"@pixi/constants": "5.4.0-rc.2",
"@pixi/settings": "5.4.0-rc.2",
"css-color-names": "^1.0.1",

@@ -40,3 +40,3 @@ "earcut": "^2.2.2",

},
"gitHead": "83ee25a7658391c5132ea97f2af90ae34280bc7f"
"gitHead": "fc4ca303a8f03eee754e12e0e769c263d8b19465"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc