@antv/g 5.8.5 → 5.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/parser/path.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyPath.d.ts +0 -3
- package/dist/css/properties/CSSPropertyPath.d.ts.map +1 -1
- package/dist/display-objects/Line.d.ts +1 -0
- package/dist/display-objects/Line.d.ts.map +1 -1
- package/dist/display-objects/Path.d.ts +10 -1
- package/dist/display-objects/Path.d.ts.map +1 -1
- package/dist/display-objects/Polyline.d.ts +1 -0
- package/dist/display-objects/Polyline.d.ts.map +1 -1
- package/dist/index.esm.js +66 -24
- package/dist/index.js +66 -22
- package/dist/index.umd.js +113 -52
- package/dist/index.umd.min.js +1 -1
- package/dist/services/SceneGraphService.d.ts +2 -0
- package/dist/services/SceneGraphService.d.ts.map +1 -1
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/path.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.umd.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var r,i,o=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]})),a=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}})),s=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var n=0;e.id=function(){return n++}})),u=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var n=function(){function t(t,e){this.id=s.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=a.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===a.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=n})),c=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"})),l=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var n=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(o.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(o.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(o.TAGGED_PROP,t)||[]},t}();e.MetadataReader=n})),h=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}})),f=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0,e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===c.STACK_OVERFLOW}})),d=n((function(t,e){function n(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function r(t,e){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===e||r(t.parentRequest,e))}function i(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0,e.getServiceIdentifierAsString=n,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",o=n(t,e);return 0!==o.length&&(r="\nRegistered bindings:",o.forEach((function(t){var e="Object";null!==t.implementationType&&(e=i(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(r(e,e.serviceIdentifier)){var i=function(t){return function t(e,r){void 0===r&&(r=[]);var i=n(e.serviceIdentifier);return r.push(i),null!==e.parentRequest?t(e.parentRequest,r):r}(t).reverse().join(" --\x3e ")}(e);throw new Error(c.CIRCULAR_DEPENDENCY+" "+i)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=i})),p=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var n=function(){function t(t){this.id=s.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=n})),v=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===o.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=n})),y=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0,e.Plan=function(t,e){this.parentContext=t,this.rootRequest=e}})),g=n((function(t,e){function n(t,e,n,r,i){var o={},a="number"==typeof i,s=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(c.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var u=o[s];if(Array.isArray(u))for(var l=0,h=u;h.length>l;l++){var f=h[l];if(f.key===r.key)throw new Error(c.DUPLICATED_METADATA+" "+f.key.toString())}else u=[];u.push(r),o[s]=u,Reflect.defineMetadata(t,o,e)}function r(t,e){Reflect.decorate(t,e)}function i(t,e){return function(n,r){e(n,r,t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0,e.tagParameter=function(t,e,r,i){n(o.TAGGED,t,e,i,r)},e.tagProperty=function(t,e,r){n(o.TAGGED_PROP,t.constructor,e,r)},e.decorate=function(t,e,n){"number"==typeof n?r([i(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):r([t],e)}})),m=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var n=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=n,e.inject=function(t){return function(e,n,r){if(void 0===t)throw new Error(c.UNDEFINED_INJECT_ANNOTATION(e.name));var i=new v.Metadata(o.INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),T=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var n=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=n})),b=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var n=function(){function t(t,e,n,r){this.id=s.id(),this.type=t,this.serviceIdentifier=n,this.name=new T.QueryableString(e||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new v.Metadata(o.NAMED_TAG,r):r instanceof v.Metadata&&(i=r),null!==i&&this.metadata.push(i)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;n.length>e;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(o.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(o.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(o.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(o.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===o.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return o.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(o.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;i.length>r;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=n})),E=n((function(t,n){var r=e&&e.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};function i(t,e,n,i){var o=t.getConstructorMetadata(n),a=o.compilerGeneratedMetadata;if(void 0===a)throw new Error(c.MISSING_INJECTABLE_ANNOTATION+" "+e+".");var l=o.userGeneratedMetadata,h=Object.keys(l),f=function(t,e,n,r,i){for(var o=[],a=0;i>a;a++){var u=s(a,t,e,n,r);null!==u&&o.push(u)}return o}(i,e,a,l,0===n.length&&h.length>0||h.length>n.length?h.length:n.length),d=u(t,n);return r(r([],f),d)}function s(t,e,n,r,i){var o=i[t.toString()]||[],s=l(o),u=!0!==s.unmanaged,h=r[t],f=s.inject||s.multiInject;if((h=f||h)instanceof m.LazyServiceIdentifer&&(h=h.unwrap()),u){if(!e&&(h===Object||h===Function||void 0===h))throw new Error(c.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".");var d=new b.Target(a.TargetTypeEnum.ConstructorArgument,s.targetName,h);return d.metadata=o,d}return null}function u(t,e){for(var n=t.getPropertiesMetadata(e),i=[],o=0,s=Object.keys(n);s.length>o;o++){var c=s[o],h=n[c],f=l(n[c]),d=new b.Target(a.TargetTypeEnum.ClassProperty,f.targetName||c,f.inject||f.multiInject);d.metadata=h,i.push(d)}var p=Object.getPrototypeOf(e.prototype).constructor;if(p!==Object){var v=u(t,p);i=r(r([],i),v)}return i}function l(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[o.INJECT_TAG],multiInject:e[o.MULTI_INJECT_TAG],targetName:e[o.NAME_TAG],unmanaged:e[o.UNMANAGED_TAG]}}Object.defineProperty(n,"__esModule",{value:!0}),n.getFunctionName=n.getBaseClassDependencyCount=n.getDependencies=void 0,Object.defineProperty(n,"getFunctionName",{enumerable:!0,get:function(){return d.getFunctionName}}),n.getDependencies=function(t,e){return i(t,d.getFunctionName(e),e,!1)},n.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var a=i(e,d.getFunctionName(r),r,!0),s=a.map((function(t){return t.metadata.filter((function(t){return t.key===o.UNMANAGED_TAG}))})),u=[].concat.apply([],s).length,c=a.length-u;return c>0?c:t(e,r)}return 0}})),S=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var n=function(){function t(t,e,n,r,i){this.id=s.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=n})),x=n((function(t,e){function n(t){return t._bindingDictionary}function r(t,e,n,r,i,a){var s=new v.Metadata(t?o.MULTI_INJECT_TAG:o.INJECT_TAG,n),u=new b.Target(e,r,n,s);if(void 0!==i){var c=new v.Metadata(i,a);u.metadata.push(c)}return u}function i(t,e,n,r,i){var o=u(n.container,i.serviceIdentifier),a=[];return o.length===h.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=u(n.container,i.serviceIdentifier)),a=e?o:o.filter((function(t){var e=new S.Request(t.serviceIdentifier,n,r,t,i);return t.constraint(e)})),function(t,e,n,r){switch(e.length){case h.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var i=d.getServiceIdentifierAsString(t),o=c.NOT_REGISTERED;throw o+=d.listMetadataForTarget(i,n),o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o);case h.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;default:if(n.isArray())return e;i=d.getServiceIdentifierAsString(t),o=c.AMBIGUOUS_MATCH+" "+i;throw o+=d.listRegisteredBindingsForServiceIdentifier(r,i,u),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function s(t,e,n,r,o,u){var l,h;if(null===o){l=i(t,e,r,null,u),h=new S.Request(n,r,null,l,u);var f=new y.Plan(r,h);r.addPlan(f)}else l=i(t,e,r,o,u),h=o.addChildRequest(u.serviceIdentifier,l,u);l.forEach((function(e){var n=null;if(u.isArray())n=h.addChildRequest(e.serviceIdentifier,e,u);else{if(e.cache)return;n=h}if(e.type===a.BindingTypeEnum.Instance&&null!==e.implementationType){var i=E.getDependencies(t,e.implementationType);if(!r.container.options.skipBaseClassChecks)if(E.getBaseClassDependencyCount(t,e.implementationType)>i.length){var o=c.ARGUMENTS_LENGTH_MISMATCH(E.getFunctionName(e.implementationType));throw new Error(o)}i.forEach((function(e){s(t,!1,e.serviceIdentifier,r,n,e)}))}}))}function u(t,e){var r=[],i=n(t);return i.hasKey(e)?r=i.get(e):null!==t.parent&&(r=u(t.parent,e)),r}Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0,e.getBindingDictionary=n,e.plan=function(t,e,n,i,o,a,u,c){void 0===c&&(c=!1);var l=new p.Context(e),h=r(n,i,o,"",a,u);try{return s(t,c,o,l,null,h),l}catch(t){throw f.isStackOverflowExeption(t)&&l.plan&&d.circularDependencyToException(l.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new b.Target(a.TargetTypeEnum.Variable,"",e,new v.Metadata(n,r)),o=new p.Context(t);return new S.Request(e,o,null,[],i)}})),w=n((function(t,n){var r=e&&e.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(n,"__esModule",{value:!0}),n.resolveInstance=void 0,n.resolveInstance=function(t,e,n){var i,s=null;if(e.length>0){var u=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ConstructorArgument})).map(n);s=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===a.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value(),t[r]=i[n]})),t}(s=new((i=t).bind.apply(i,r([void 0],u))),e,n)}else s=new t;return function(t,e){if(Reflect.hasMetadata(o.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(o.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(c.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,s),s}})),P=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var n=function(t,e,n){try{return n()}catch(n){throw f.isStackOverflowExeption(n)?new Error(c.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},r=function(t){return function(e){e.parentContext.setCurrentRequest(e);var i=e.bindings,o=e.childRequests,s=e.target&&e.target.isArray(),u=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(s&&u)return o.map((function(e){return r(t)(e)}));var l=null;if(!e.target.isOptional()||0!==i.length){var h=i[0],f=h.scope===a.BindingScopeEnum.Singleton,p=h.scope===a.BindingScopeEnum.Request;if(f&&h.activated)return h.cache;if(p&&null!==t&&t.has(h.id))return t.get(h.id);if(h.type===a.BindingTypeEnum.ConstantValue)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Function)l=h.cache,h.activated=!0;else if(h.type===a.BindingTypeEnum.Constructor)l=h.implementationType;else if(h.type===a.BindingTypeEnum.DynamicValue&&null!==h.dynamicValue)l=n("toDynamicValue",h.serviceIdentifier,(function(){return h.dynamicValue(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Factory&&null!==h.factory)l=n("toFactory",h.serviceIdentifier,(function(){return h.factory(e.parentContext)}));else if(h.type===a.BindingTypeEnum.Provider&&null!==h.provider)l=n("toProvider",h.serviceIdentifier,(function(){return h.provider(e.parentContext)}));else{if(h.type!==a.BindingTypeEnum.Instance||null===h.implementationType){var v=d.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(c.INVALID_BINDING_TYPE+" "+v)}l=w.resolveInstance(h.implementationType,o,r(t))}return"function"==typeof h.onActivation&&(l=h.onActivation(e.parentContext,l)),f&&(h.cache=l,h.activated=!0),p&&null!==t&&!t.has(h.id)&&t.set(h.id,l),l}}};e.resolve=function(t){return r(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}})),N=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var n=function(t,e){var r=t.parentRequest;return null!==r&&(!!e(r)||n(r,e))};e.traverseAncerstors=n;var r=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new v.Metadata(t,e),n}};e.taggedConstraint=r;var i=r(o.NAMED_TAG);e.namedConstraint=i;e.typeConstraint=function(t){return function(e){return null!==e&&("string"==typeof t?e.bindings[0].serviceIdentifier===t:t===e.bindings[0].implementationType)}}})),k=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=N.namedConstraint(t),new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new C.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=N.taggedConstraint(t)(e),new C.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return N.typeConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return N.namedConstraint(t)(e.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return N.taggedConstraint(t)(e)(n.parentRequest)},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.typeConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,N.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,N.namedConstraint(t))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!N.traverseAncerstors(n,N.taggedConstraint(t)(e))},new C.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return N.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!N.traverseAncerstors(e,t)},new C.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=n})),C=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new k.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=n})),M=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new k.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=n})),_=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=a.BindingScopeEnum.Request,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=a.BindingScopeEnum.Transient,new M.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=n})),A=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var n=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new k.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new C.BindingOnSyntax(this._binding),this._bindingInSyntax=new _.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=n})),O=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var n=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=a.BindingTypeEnum.Instance,this._binding.implementationType=t,new A.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+c.INVALID_TO_SELF_VALUE);return this.to(this._binding.serviceIdentifier)},t.prototype.toConstantValue=function(t){return this._binding.type=a.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=a.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new A.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=a.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(c.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=a.BindingTypeEnum.Function,this._binding.scope=a.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=a.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=a.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=a.BindingScopeEnum.Singleton,new M.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=n})),I=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var n=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=n})),R=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var n=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(c.NULL_ARGUMENT);if(null==e)throw new Error(c.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(c.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(c.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(c.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=n})),L=n((function(t,n){var r=e&&e.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=e&&e.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&i[3]>o[1])){a.label=o[1];break}if(6===o[0]&&i[1]>a.label){a.label=i[1],i=o;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},h=e&&e.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;r>n;n++,i++)t[i]=e[n];return t};Object.defineProperty(n,"__esModule",{value:!0}),n.Container=void 0;var f=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+c.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=a.BindingScopeEnum.Transient;else if(e.defaultScope!==a.BindingScopeEnum.Singleton&&e.defaultScope!==a.BindingScopeEnum.Transient&&e.defaultScope!==a.BindingScopeEnum.Request)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+c.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=s.id(),this._bindingDictionary=new R.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;arguments.length>i;i++)r[i-2]=arguments[i];var o=new t,a=h([e,n],r).map((function(t){return x.getBindingDictionary(t)})),s=x.getBindingDictionary(o);function u(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return a.forEach((function(t){u(t,s)})),o},t.prototype.load=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;i.length>r;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return r.length>n?(a=e((o=r[n]).id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;arguments.length>n;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=new u.Binding(t,this.options.defaultScope||a.BindingScopeEnum.Transient);return this._bindingDictionary.add(t,e),new O.BindingToSyntax(e)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(c.CANNOT_UNBIND+" "+d.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new R.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,o.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=x.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(I.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(c.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,a.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,o.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,a.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,a.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,o.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw new Error(c.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=x.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),P.resolve(n)}},t}();n.Container=f})),D=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0,e.ContainerModule=function(t){this.id=s.id(),this.registry=t},e.AsyncContainerModule=function(t){this.id=s.id(),this.registry=t}})),F=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0,e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(o.PARAM_TYPES,t))throw new Error(c.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(o.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(o.PARAM_TYPES,e,t),t}}})),B=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0,e.tagged=function(t,e){return function(n,r,i){var o=new v.Metadata(t,e);"number"==typeof i?g.tagParameter(n,r,i,o):g.tagProperty(n,r,o)}}})),U=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0,e.named=function(t){return function(e,n,r){var i=new v.Metadata(o.NAMED_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),j=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0,e.optional=function(){return function(t,e,n){var r=new v.Metadata(o.OPTIONAL_TAG,!0);"number"==typeof n?g.tagParameter(t,e,n,r):g.tagProperty(t,e,r)}}})),V=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0,e.unmanaged=function(){return function(t,e,n){var r=new v.Metadata(o.UNMANAGED_TAG,!0);g.tagParameter(t,e,n,r)}}})),G=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0,e.multiInject=function(t){return function(e,n,r){var i=new v.Metadata(o.MULTI_INJECT_TAG,t);"number"==typeof r?g.tagParameter(e,n,r,i):g.tagProperty(e,n,i)}}})),H=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0,e.targetName=function(t){return function(e,n,r){var i=new v.Metadata(o.NAME_TAG,t);g.tagParameter(e,n,r,i)}}})),z=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0,e.postConstruct=function(){return function(t,e,n){var r=new v.Metadata(o.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(o.POST_CONSTRUCT,t.constructor))throw new Error(c.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(o.POST_CONSTRUCT,r,t.constructor)}}})),W=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;arguments.length>r;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}})),Y=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0,e.METADATA_KEY=o,Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return L.Container}}),Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return a.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return a.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return a.TargetTypeEnum}}),Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return D.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return D.ContainerModule}}),Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return F.injectable}}),Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return B.tagged}}),Object.defineProperty(e,"named",{enumerable:!0,get:function(){return U.named}}),Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return m.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return m.LazyServiceIdentifer}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return j.optional}}),Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return V.unmanaged}}),Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return G.multiInject}}),Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return H.targetName}}),Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return z.postConstruct}}),Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return l.MetadataReader}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return s.id}}),Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return g.decorate}}),Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return N.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return N.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return N.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return N.typeConstraint}}),Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return d.getServiceIdentifierAsString}}),Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return W.multiBindToService}})}));function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function X(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(t,e,n){return e&&X(t.prototype,e),n&&X(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Q(e,n){return n.lifecycle===t.Syringe.Lifecycle.singleton?function(t){return t.inSingletonScope()}(e):function(t){return t.inTransientScope()}(e)}function $(t,e){t.whenTargetNamed(nt(e))}function tt(t,e){return e.bind(rt(t))}function et(t,e){if(e.isBound(rt(t)))try{return e.rebind(rt(t))}catch(n){return e.bind(rt(t))}return e.bind(rt(t))}function nt(e){return t.Utils.isDefinedToken(e)?e.symbol:e}function rt(e){return t.Utils.isDefinedToken(e)?e.symbol:e}!function(t){!function(n){var r="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===r.Reflect?r.Reflect=t:i=o(r.Reflect,i),function(t){var e=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return rt(Object.create(null))}:a?function(){return rt({__proto__:null})}:function(){return rt({})},has:s?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:s?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(l||"function"!=typeof WeakMap?nt():WeakMap);function p(t,e,n,r){if(L(n)){if(!z(t))throw new TypeError;if(!Y(e))throw new TypeError;return w(t,e)}if(!z(t))throw new TypeError;if(!B(e))throw new TypeError;if(!B(r)&&!L(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),P(t,e,n=H(n),r)}function v(t,e){function n(n,r){if(!B(n))throw new TypeError;if(!L(r)&&!q(r))throw new TypeError;A(t,e,n,r)}return n}function y(t,e,n,r){if(!B(n))throw new TypeError;return L(r)||(r=H(r)),A(t,e,n,r)}function g(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),k(t,e,n)}function m(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),C(t,e,n)}function T(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),M(t,e,n)}function b(t,e,n){if(!B(e))throw new TypeError;return L(n)||(n=H(n)),_(t,e,n)}function E(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),O(t,e)}function S(t,e){if(!B(t))throw new TypeError;return L(e)||(e=H(e)),I(t,e)}function x(t,e,n){if(!B(e))throw new TypeError;L(n)||(n=H(n));var r=N(e,n,!1);if(L(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}function w(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!L(r)&&!D(r)){if(!Y(r))throw new TypeError;e=r}}return e}function P(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!L(o)&&!D(o)){if(!B(o))throw new TypeError;r=o}}return r}function N(t,e,n){var r=d.get(t);if(L(r)){if(!n)return;r=new h,d.set(t,r)}var i=r.get(e);if(L(i)){if(!n)return;i=new h,r.set(e,i)}return i}function k(t,e,n){if(C(t,e,n))return!0;var r=$(e);return!D(r)&&k(t,r,n)}function C(t,e,n){var r=N(e,n,!1);return!L(r)&&V(r.has(t))}function M(t,e,n){if(C(t,e,n))return _(t,e,n);var r=$(e);return D(r)?void 0:M(t,r,n)}function _(t,e,n){var r=N(e,n,!1);if(!L(r))return r.get(t)}function A(t,e,n,r){N(n,r,!0).set(t,e)}function O(t,e){var n=I(t,e),r=$(t);if(null===r)return n;var i=O(r,e);if(0>=i.length)return n;if(0>=n.length)return i;for(var o=new f,a=[],s=0,u=n;u.length>s;s++){o.has(h=u[s])||(o.add(h),a.push(h))}for(var c=0,l=i;l.length>c;c++){var h;o.has(h=l[c])||(o.add(h),a.push(h))}return a}function I(t,e){var n=[],r=N(t,e,!1);if(L(r))return n;for(var i=K(r.keys()),o=0;;){var a=J(i);if(!a)return n.length=o,n;var s=Z(a);try{n[o]=s}catch(t){try{Q(i)}finally{throw t}}o++}}function R(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function L(t){return void 0===t}function D(t){return null===t}function F(t){return"symbol"==typeof t}function B(t){return"object"==typeof t?null!==t:"function"==typeof t}function U(t,e){switch(R(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",i=X(t,r);if(void 0!==i){var o=i.call(t,n);if(B(o))throw new TypeError;return o}return j(t,"default"===n?"number":n)}function j(t,e){if("string"===e){var n=t.toString;if(W(n))if(!B(i=n.call(t)))return i;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i}else{var r;if(W(r=t.valueOf))if(!B(i=r.call(t)))return i;var i,o=t.toString;if(W(o))if(!B(i=o.call(t)))return i}throw new TypeError}function V(t){return!!t}function G(t){return""+t}function H(t){var e=U(t,3);return F(e)?e:G(e)}function z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function W(t){return"function"==typeof t}function Y(t){return"function"==typeof t}function q(t){switch(R(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){var n=t[e];if(null!=n){if(!W(n))throw new TypeError;return n}}function K(t){var e=X(t,i);if(!W(e))throw new TypeError;var n=e.call(t);if(!B(n))throw new TypeError;return n}function Z(t){return t.value}function J(t){var e=t.next();return!e.done&&e}function Q(t){var e=t.return;e&&e.call(t)}function $(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&this._keys.length>t){var n=this._selector(this._keys[t],this._values[t]);return this._keys.length>t+1?this._index++:(this._index=-1,this._keys=e,this._values=e),{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0>this._index||(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return 0>this._index||(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return 0>e?void 0:this._values[e]},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;r>i;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,o)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),0>this._cacheIndex&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}()}function nt(){var t=16,n=u.create(),r=i();return function(){function t(){this._key=i()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&u.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?u.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=i()},t}();function i(){var t;do{t="@@WeakMap@@"+c()}while(u.has(n,t));return n[t]=!0,t}function o(t,n){if(!e.call(t,r)){if(!n)return;Object.defineProperty(t,r,{value:u.create()})}return t[r]}function a(t,e){for(var n=0;e>n;++n)t[n]=255*Math.random()|0;return t}function s(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t):a(new Array(t),t)}function c(){var e=s(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;t>r;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),16>i&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function rt(t){return t.__=void 0,delete t.__,t}t("decorate",p),t("metadata",v),t("defineMetadata",y),t("hasMetadata",g),t("hasOwnMetadata",m),t("getMetadata",T),t("getOwnMetadata",b),t("getMetadataKeys",E),t("getOwnMetadataKeys",S),t("deleteMetadata",x)}(i)}()}(r||(r={})),function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=K((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Z(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===q(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(t.Syringe||(t.Syringe={})),(i=t.Utils||(t.Utils={})).toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},i.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},i.isDefinedToken=function(t){return!!(t&&"object"===q(t)&&"symbol"in t&&"multiple"in t)},i.isInjectOption=function(t){return!(!t||"object"!==q(t)||!("token"in t))},i.isNamedToken=function(t){return!!(t&&"object"===q(t)&&"token"in t&&"named"in t)},i.isMultipleEnabled=function(t){return i.isDefinedToken(t)&&t.multiple};var it=new Y.Container;function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Y.injectable();return function(r){Reflect.defineMetadata(t.Syringe.ClassOptionSymbol,at(at({},e),{},{target:r}),r),n(r)}}function ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.singleton}))}function lt(t){return Y.inject(rt(t))}function ht(t){return Y.named(nt(t))}var ft=Symbol("SyringeOptionSymbol");function dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pt(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?dt(Object(n),!0).forEach((function(e){vt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var gt=function(){function e(n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=n,this.token=r,this.option=i,this.rawToken=t.Utils.isNamedToken(r)?r.token:r,this.named=t.Utils.isNamedToken(r)?r.named:void 0,this.mutiple=!!this.named||t.Utils.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var n,r,i;return n=e,r=[{key:"resolve",value:function(){var e=this,n=this.register;(function(t){return t&&"object"===J(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(n)&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(r){t.Utils.isMultipleEnabled(r)?tt(r,n).toService(e.generalToken):et(r,n).toService(e.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return et(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return Q(et(this.generalToken,t).toDynamicValue((function(t){var n=Dt.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return et(this.generalToken,t).toFactory((function(t){var e=Dt.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return Q(et(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return Q(tt(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return Q(tt(e.generalToken,t).toDynamicValue((function(t){var e=Dt.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return tt(e.generalToken,t).toFactory((function(t){var e=Dt.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?tt(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&$(t,e.named)})),r.forEach((function(t){return e.named&&$(t,e.named)})),i.forEach((function(t){return e.named&&$(t,e.named)})),o&&$(o,this.named))}}],i=[{key:"resolveTarget",value:function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var o=Reflect.getMetadata(ft,r);o&&e.resolveOption(n,o)}catch(t){}if(t.Utils.isClass(r))if(i.useClass){var a=t.Utils.toArray(i.useClass);a.unshift(r),i.useClass=a}else i.useClass=[r];var s;try{s=Reflect.getMetadata(t.Syringe.ClassOptionSymbol,r)}catch(t){}if((s=pt(pt({},s||{}),i)).token){var u=t.Utils.toArray(s.token);u.unshift(r),s.token=u}else s.token=[r];e.resolveOption(n,s)}catch(t){}}},{key:"resolveOption",value:function(n,r){var i=function(e){var n=t.Utils.toArray(e.token),r=t.Utils.toArray(e.useClass),i=t.Utils.toArray(e.useDynamic),o=t.Utils.toArray(e.useFactory),a=t.Utils.toArray(e.contrib),s={token:n,useClass:r,lifecycle:a.length>0?t.Syringe.Lifecycle.singleton:e.lifecycle||t.Syringe.Lifecycle.transient,contrib:a,useDynamic:i,useFactory:o};return"useValue"in e&&(s.useValue=e.useValue),s}(pt(pt({},e.globalConfig),r));(0!==i.useClass.length||0!==i.useDynamic.length||0!==i.useFactory.length||"useValue"in i)&&i.token.forEach((function(t){new e(n,t,pt({},i)).resolve()}))}}],r&&yt(n.prototype,r),i&&yt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();gt.globalConfig=t.Syringe.DefaultOption;var mt=t.Syringe.defineToken("ContributionProvider");function Tt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function Et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function St(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Et(Object(n),!0).forEach((function(e){xt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Pt=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=St(St({},this.option),r))}var e,n,r;return e=t,n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,Tt(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=St(St({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}],n&&wt(e.prototype,n),r&&wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nt(e,n){return{token:{token:mt,named:e},useDynamic:function(t){return new Pt(e,t.container,n)},lifecycle:t.Syringe.Lifecycle.singleton}}function kt(e,n,r){e({token:{token:mt,named:n},useDynamic:function(t){return new Pt(n,t.container,r)},lifecycle:t.Syringe.Lifecycle.singleton})}function Ct(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Mt=function(){function e(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(e,n,i,o){var a={bind:e,unbind:n,isBound:i,rebind:o},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(a,e):gt.resolveTarget(a,e,n)};r.baseRegistry&&r.baseRegistry(s),r.optionCollection&&r.optionCollection.forEach((function(t){return s(t)}))},this.baseRegistry=n,this.inversifyModule=new Y.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var n,r,i;return n=e,r=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(Nt(e))})),this}}],r&&Ct(n.prototype,r),i&&Ct(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function _t(t){return t&&"inversifyModule"in t}function At(t){return new Mt(t)}function Ot(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var It,Rt,Lt=new Map,Dt=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=t||new Y.Container,e.setContainer(this.container,this)}var n,r,i;return n=e,r=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(_t(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){_t(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(rt(t))}},{key:"get",value:function(t){return this.container.get(rt(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(rt(t),nt(e))}},{key:"getAll",value:function(t){return this.container.getAll(rt(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(rt(t),nt(e))}},{key:"isBound",value:function(t){return this.container.isBound(rt(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(rt(t),nt(e))}},{key:"createChild",value:function(){var t=new e(this.container.createChild());return t.parent=this,t}},{key:"register",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.Utils.isInjectOption(e)?gt.resolveOption(this.container,e):gt.resolveTarget(this.container,e,n)}}],i=[{key:"setContainer",value:function(t,e){return Lt.set(t.id,e)}},{key:"getContainer",value:function(t){var n=Lt.get(t.id);if(!n){var r=new e(t);return e.setContainer(t,r),r}return n}},{key:"config",value:function(t){gt.globalConfig=t}}],r&&Ot(n.prototype,r),i&&Ot(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Ft=new Dt(it),Bt=Ft.register.bind(Ft),Ut=function(t){return function(e,n,r){ht(t)(e,n,r),lt(mt)(e,n,r)}};function jt(t,e,n,r,i){Vt(t,e,n||0,r||t.length-1,i||Ht)}function Vt(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*u*(o-u)/o)*(0>a-o/2?-1:1);Vt(t,e,Math.max(n,Math.floor(e-a*u/o+c)),Math.min(r,Math.floor(e+(o-a)*u/o+c)),i)}var l=t[e],h=n,f=r;for(Gt(t,n,e),i(t[r],l)>0&&Gt(t,n,r);f>h;){for(Gt(t,h,f),h++,f--;0>i(t[h],l);)h++;for(;i(t[f],l)>0;)f--}0===i(t[n],l)?Gt(t,n,f):Gt(t,++f,r),f>e||(n=f+1),e>f||(r=f-1)}}function Gt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ht(t,e){return e>t?-1:t>e?1:0}(It=t.Contribution||(t.Contribution={})).Provider=mt,It.register=kt;class zt{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!ee(t,e))return n;const r=this.toBBox,i=[];for(;e;){for(let o=0;e.children.length>o;o++){const a=e.children[o],s=e.leaf?r(a):a;ee(t,s)&&(e.leaf?n.push(a):te(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n}collides(t){let e=this.data;if(!ee(t,e))return!1;const n=[];for(;e;){for(let r=0;e.children.length>r;r++){const i=e.children[r],o=e.leaf?this.toBBox(i):i;if(ee(t,o)){if(e.leaf||te(t,o))return!0;n.push(i)}}e=n.pop()}return!1}load(t){if(!t||!t.length)return this;if(this._minEntries>t.length){for(let e=0;t.length>e;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(e.height>this.data.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=ne([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),i=[],o=[];let a,s,u;for(;n||i.length;){if(n||(n=i.pop(),s=i[i.length-1],a=o.pop(),u=!0),n.leaf){const r=Wt(t,n.children,e);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}u||n.leaf||!te(n,r)?s?(a++,n=s.children[a],u=!1):n=null:(i.push(n),o.push(a),a=0,s=n,n=n.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const i=n-e+1;let o,a=this._maxEntries;if(a>=i)return o=ne(t.slice(e,n+1)),Yt(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=ne([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));re(t,e,n,u,this.compareMinX);for(let i=e;n>=i;i+=u){const e=Math.min(i+u-1,n);re(t,i,e,s,this.compareMinY);for(let n=i;e>=n;n+=s){const i=Math.min(n+s-1,e);o.children.push(this._build(t,n,i,r-1))}}return Yt(o,this.toBBox),o}_chooseSubtree(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){let n,r=1/0,a=1/0;for(let s=0;e.children.length>s;s++){const u=e.children[s],c=Jt(u),l=(i=t,o=u,(Math.max(o.maxX,i.maxX)-Math.min(o.minX,i.minX))*(Math.max(o.maxY,i.maxY)-Math.min(o.minY,i.minY))-c);a>l?(a=l,r=r>c?c:r,n=u):l===a&&r>c&&(r=c,n=u)}e=n||e.children[0]}var i,o;return e}_insert(t,e,n){const r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),Xt(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}_split(t,e){const n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r),a=ne(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Yt(n,this.toBBox),Yt(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=ne([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Yt(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,i=1/0,o=1/0;for(let a=e;n-e>=a;a++){const e=qt(t,0,a,this.toBBox),s=qt(t,a,n,this.toBBox),u=$t(e,s),c=Jt(e)+Jt(s);i>u?(i=u,r=a,o=o>c?c:o):u===i&&o>c&&(o=c,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:Kt,i=t.leaf?this.compareMinY:Zt,o=this._allDistMargin(t,e,n,r);this._allDistMargin(t,e,n,i)>o&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this.toBBox,o=qt(t,0,e,i),a=qt(t,n-e,n,i);let s=Qt(o)+Qt(a);for(let r=e;n-e>r;r++){const e=t.children[r];Xt(o,t.leaf?i(e):e),s+=Qt(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];Xt(a,t.leaf?i(e):e),s+=Qt(a)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Xt(e[r],t)}_condense(t){for(let e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():Yt(t[n],this.toBBox)}}function Wt(t,e,n){if(!n)return e.indexOf(t);for(let r=0;e.length>r;r++)if(n(t,e[r]))return r;return-1}function Yt(t,e){qt(t,0,t.children.length,e,t)}function qt(t,e,n,r,i){i||(i=ne(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;n>o;o++){const e=t.children[o];Xt(i,t.leaf?r(e):e)}return i}function Xt(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function Kt(t,e){return t.minX-e.minX}function Zt(t,e){return t.minY-e.minY}function Jt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Qt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function $t(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function te(t,e){return!(t.minX>e.minX||t.minY>e.minY||e.maxX>t.maxX||e.maxY>t.maxY)}function ee(t,e){return!(e.minX>t.maxX||e.minY>t.maxY||t.minX>e.maxX||t.minY>e.maxY)}function ne(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function re(t,e,n,r,i){const o=[e,n];for(;o.length;){if(r>=(n=o.pop())-(e=o.pop()))continue;const a=e+Math.ceil((n-e)/r/2)*r;jt(t,a,e,n,i),o.push(e,a,a,n)}}(Rt=t.PropertySyntax||(t.PropertySyntax={})).COORDINATE="<coordinate>",Rt.COLOR="<color>",Rt.PAINT="<paint>",Rt.NUMBER="<number>",Rt.ANGLE="<angle>",Rt.OPACITY_VALUE="<opacity-value>",Rt.SHADOW_BLUR="<shadow-blur>",Rt.LENGTH="<length>",Rt.PERCENTAGE="<percentage>",Rt.LENGTH_PERCENTAGE="<length> | <percentage>",Rt.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",Rt.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",Rt.LIST_OF_POINTS="<list-of-points>",Rt.PATH="<path>",Rt.FILTER="<filter>",Rt.Z_INDEX="<z-index>",Rt.OFFSET_PATH="<offset-path>",Rt.OFFSET_DISTANCE="<offset-distance>",Rt.CLIP_PATH="<clip-path>",Rt.MARKER="<marker>",Rt.TRANSFORM="<transform>",Rt.TRANSFORM_ORIGIN="<transform-origin>",Rt.TEXT="<text>",Rt.TEXT_TRANSFORM="<text-transform>";var ie,oe,ae,se,ue,ce=t.Syringe.defineToken("");function le(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
3
|
-
le=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new x(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(w([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function w(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(T.prototype),s(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function he(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){he(o,r,i,a,s,"next",t)}function s(t){he(o,r,i,a,s,"throw",t)}a(void 0)}))}}function de(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pe(t,e,n){return e&&de(t.prototype,e),n&&de(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ve.apply(this,arguments)}function ye(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ge(t,e)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}function me(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(i[n]=t[n]);return i}function Te(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function Ee(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(ie=t.UnitType||(t.UnitType={}))[ie.kUnknown=0]="kUnknown",ie[ie.kNumber=1]="kNumber",ie[ie.kPercentage=2]="kPercentage",ie[ie.kEms=3]="kEms",ie[ie.kPixels=4]="kPixels",ie[ie.kRems=5]="kRems",ie[ie.kDegrees=6]="kDegrees",ie[ie.kRadians=7]="kRadians",ie[ie.kGradians=8]="kGradians",ie[ie.kTurns=9]="kTurns",ie[ie.kMilliseconds=10]="kMilliseconds",ie[ie.kSeconds=11]="kSeconds",ie[ie.kInteger=12]="kInteger",(oe=t.UnitCategory||(t.UnitCategory={}))[oe.kUNumber=0]="kUNumber",oe[oe.kUPercent=1]="kUPercent",oe[oe.kULength=2]="kULength",oe[oe.kUAngle=3]="kUAngle",oe[oe.kUTime=4]="kUTime",oe[oe.kUOther=5]="kUOther",(ae=t.ValueRange||(t.ValueRange={}))[ae.kAll=0]="kAll",ae[ae.kNonNegative=1]="kNonNegative",ae[ae.kInteger=2]="kInteger",ae[ae.kNonNegativeInteger=3]="kNonNegativeInteger",ae[ae.kPositiveInteger=4]="kPositiveInteger",(se=t.Nested||(t.Nested={}))[se.kYes=0]="kYes",se[se.kNo=1]="kNo",(ue=t.ParenLess||(t.ParenLess={}))[ue.kYes=0]="kYes",ue[ue.kNo=1]="kNo";var Se,xe=[{name:"em",unit_type:t.UnitType.kEms},{name:"px",unit_type:t.UnitType.kPixels},{name:"deg",unit_type:t.UnitType.kDegrees},{name:"rad",unit_type:t.UnitType.kRadians},{name:"grad",unit_type:t.UnitType.kGradians},{name:"ms",unit_type:t.UnitType.kMilliseconds},{name:"s",unit_type:t.UnitType.kSeconds},{name:"rem",unit_type:t.UnitType.kRems},{name:"turn",unit_type:t.UnitType.kTurns}];(Se=t.CSSStyleValueType||(t.CSSStyleValueType={}))[Se.kUnknownType=0]="kUnknownType",Se[Se.kUnparsedType=1]="kUnparsedType",Se[Se.kKeywordType=2]="kKeywordType",Se[Se.kUnitType=3]="kUnitType",Se[Se.kSumType=4]="kSumType",Se[Se.kProductType=5]="kProductType",Se[Se.kNegateType=6]="kNegateType",Se[Se.kInvertType=7]="kInvertType",Se[Se.kMinType=8]="kMinType",Se[Se.kMaxType=9]="kMaxType",Se[Se.kClampType=10]="kClampType",Se[Se.kTransformType=11]="kTransformType",Se[Se.kPositionType=12]="kPositionType",Se[Se.kURLImageType=13]="kURLImageType",Se[Se.kColorType=14]="kColorType",Se[Se.kUnsupportedColorType=15]="kUnsupportedColorType";var we,Pe,Ne=function(){function e(){}e.parse=function(t,e){return[][0]},e.parseAll=function(t,e){return[]},e.unitFromName=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:this.stringToUnitType(e):t.UnitType.kUnknown},e.unitTypeToUnitCategory=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return t.UnitCategory.kUNumber;case t.UnitType.kPercentage:return t.UnitCategory.kUPercent;case t.UnitType.kPixels:return t.UnitCategory.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.UnitCategory.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.UnitCategory.kUAngle;default:return t.UnitCategory.kUOther}},e.unitTypeToString=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:return"em";case t.UnitType.kRems:return"rem";case t.UnitType.kPixels:return"px";case t.UnitType.kDegrees:return"deg";case t.UnitType.kRadians:return"rad";case t.UnitType.kGradians:return"grad";case t.UnitType.kMilliseconds:return"ms";case t.UnitType.kSeconds:return"s";case t.UnitType.kTurns:return"turn"}return""},e.stringToUnitType=function(t){return xe.find((function(e){return e.name===t})).unit_type},e.canonicalUnitTypeForCategory=function(e){switch(e){case t.UnitCategory.kUNumber:return t.UnitType.kNumber;case t.UnitCategory.kULength:return t.UnitType.kPixels;case t.UnitCategory.kUPercent:return t.UnitType.kPercentage;case t.UnitCategory.kUTime:return t.UnitType.kSeconds;case t.UnitCategory.kUAngle:return t.UnitType.kDegrees;default:return t.UnitType.kUnknown}},e.conversionToCanonicalUnitsScaleFactor=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kSeconds:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360}return n},e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kDegrees>e},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kRems},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds};var n=e.prototype;return n.toString=function(){return this.buildCSSText(t.Nested.kNo,t.ParenLess.kNo,"")},n.isNumericValue=function(){return this.getType()>=t.CSSStyleValueType.kUnitType&&this.getType()<=t.CSSStyleValueType.kClampType},e}(),ke=function(e){function n(t){var n;return(n=e.call(this)||this).colorSpace=void 0,n.colorSpace=t,n}ye(n,e);var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kColorType},r.to=function(t){return this},n}(Ne),Ce=function(e){function n(t){var n;return(n=e.call(this)||this).value=void 0,n.value=t,n}ye(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value)},r.getType=function(){return t.CSSStyleValueType.kKeywordType},r.buildCSSText=function(t,e,n){return n+this.value},n}(Ne);function Me(t){if(!t)throw new Error}function _e(t,e){if(t!==e)throw new Error}function Ae(t,e){if(t===e)throw new Error}function Oe(t){return void 0===t}function Ie(t){return null==t}function Re(t){return"number"==typeof t}function Le(t){return"function"==typeof t}function De(t){return"boolean"==typeof t}function Fe(t){return"[object Object]"===Object.prototype.toString.call(t)}function Be(e){switch(Ae(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kPixels:case t.UnitType.kRems:return t.BaseType.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.BaseType.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.BaseType.kAngle;case t.UnitType.kPercentage:return t.BaseType.kPercent;default:return t.BaseType.kLength}}function Ue(e){switch(e){case t.BaseType.kLength:return"length";case t.BaseType.kAngle:return"angle";case t.BaseType.kTime:return"time";case t.BaseType.kFrequency:return"frequency";case t.BaseType.kResolution:return"resolution";case t.BaseType.kFlex:return"flex";case t.BaseType.kPercent:return"percent"}return""}(we=t.CSSMathOperator||(t.CSSMathOperator={})).kAdd="+",we.kSubtract="-",we.kMultiply="*",we.kDivide="/",we.kMin="min",we.kMax="max",we.kClamp="clamp",we.kInvalid="",(Pe=t.BaseType||(t.BaseType={}))[Pe.kLength=0]="kLength",Pe[Pe.kAngle=1]="kAngle",Pe[Pe.kTime=2]="kTime",Pe[Pe.kFrequency=3]="kFrequency",Pe[Pe.kResolution=4]="kResolution",Pe[Pe.kFlex=5]="kFlex",Pe[Pe.kPercent=6]="kPercent",Pe[Pe.kNumBaseTypes=7]="kNumBaseTypes";var je=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=t.BaseType.kPercent,this.hasPercentHint=!1,this.exponents=new Array(t.BaseType.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(Be(e),n)}var n=e.prototype;return n.applyPercentHint=function(e){Ae(e,t.BaseType.kPercent),this.setExponent(e,this.exponent(e)+this.exponent(t.BaseType.kPercent)),this.setExponent(t.BaseType.kPercent,0),this.percentHint=e,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return Ae(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},n.exponent=function(t){return this.exponents[t]},n.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},e.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},n.matchesBaseType=function(e){return Ae(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesBaseTypePercentage=function(e){return Ae(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},e.add=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint),_e(e.percentHint,n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;if(e.exponents[i]!==n.exponents[i]&&(o!==t.BaseType.kPercent&&(e.applyPercentHint(o),n.applyPercentHint(o)),e.exponents[i]!==n.exponents[i]))return e}return e},e.multiply=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;e.setExponent(o,e.exponent(o)+n.exponent(o))}return e},e}(),Ve=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}ye(n,e),n.fromNumberish=function(e){return"number"==typeof e?new qe(e,t.UnitType.kNumber):e},n.fromPercentish=function(e){return"number"==typeof e?new qe(100*e,t.UnitType.kPercentage):e};var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kUnknownType},r.equals=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kSumType,i,this);var o=We(i,t.CSSMathOperator.kAdd);return o||nn.create(i)},r.sub=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);i=i.map((function(t){return t.negate()})),He(t.CSSStyleValueType.kSumType,i,this);var o=We(i,t.CSSMathOperator.kAdd);return o||nn.create(i)},r.mul=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kProductType,i,this);var o=Ye(i);return o||rn.create(i)},r.div=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);i=i.map((function(t){return t.invert()})),He(t.CSSStyleValueType.kProductType,i,this);var o=Ye(i);return o||rn.create(i)},r.min=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kMinType,i,this);var o=We(i,t.CSSMathOperator.kMin);return o||tn.create(i)},r.max=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kMaxType,i,this);var o=We(i,t.CSSMathOperator.kMax);return o||en.create(i)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=ze(e[0]);return r?(n="string"==typeof t?qe.unitFromName(t):t,r.convertTo(n)):null},r.toSum=function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=0,o=e;o.length>i;i++){var a=o[i];if(!n.isValidUnit(n.unitFromName(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=Ee(s);!(u=l()).done;){var h=u.value,f=ze(h);if(!f)return null;c.push(f)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var d=nn.create(c);return Me(!!d),d}for(var p=[],v=function(){var t=n.unitFromName(g[y]);Me(n.isValidUnit(t));var e=c.reduce((function(e,n,r){if(n){var i=n.convertTo(t);i&&(e+=i.value,c[r]=null)}return e}),0);p.push(new qe(e,t))},y=0,g=e;g.length>y;y++)v();if(c.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return nn.create(p)},r.type=function(){var e={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},n=this.type_.exponent(t.BaseType.kLength);return n&&(e.length=n),(n=this.type_.exponent(t.BaseType.kAngle))&&(e.angle=n),(n=this.type_.exponent(t.BaseType.kTime))&&(e.time=n),(n=this.type_.exponent(t.BaseType.kFrequency))&&(e.frequency=n),(n=this.type_.exponent(t.BaseType.kResolution))&&(e.resolution=n),(n=this.type_.exponent(t.BaseType.kFlex))&&(e.flex=n),(n=this.type_.exponent(t.BaseType.kPercent))&&(e.percent=n),this.type_.hasPercentHint&&(e.percentHint=Ue(this.type_.percentHint)),e},n.isValidUnit=function(e){return!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e))},r.negate=function(){return Ze.create(this)},r.invert=function(){return Ke.create(this)},n}(Ne);function Ge(t){return t.map(Ve.fromNumberish)}function He(t,e,n){Me(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ze(t){return 0===Object.keys(t.units).length?new qe(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new qe(t.value,Number(Object.keys(t.units)[0])):null}function We(e,n){Me(!!e.length);var r=e[0]instanceof qe?e[0]:null;if(!r)return null;for(var i=r.value,o=1;e.length>o;o++){var a=e[o]instanceof qe?e[o]:null;if(!a||a.unit!==r.unit)return null;n===t.CSSMathOperator.kAdd?i+=a.value:n===t.CSSMathOperator.kMax?i=Math.max(i,a.value):n===t.CSSMathOperator.kMin&&(i=Math.min(i,a.value))}return new qe(i,r.unit)}function Ye(e){Me(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof qe?e[i]:null;if(!o)return null;if(o.unit!==t.UnitType.kNumber){if(n!==t.UnitType.kNumber)return null;n=o.unit}r*=o.value}return new qe(r,n)}var qe=function(e){function n(r,i){var o,a;return void 0===i&&(i=t.UnitType.kNumber),a="string"==typeof i?n.unitFromName(i):i,Me(n.isValidUnit(a)),(o=e.call(this,new je(a))||this).unit=void 0,o.value=void 0,o.unit=a,o.value=r,o}ye(n,e),n.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},n.toCanonicalUnitIfPossible=function(e){var n=this.toCanonicalUnit(e);return n===t.UnitType.kUnknown?e:n},n.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Me(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},n.formatNumber=function(t,e){return void 0===e&&(e=""),t+e};var r=n.prototype;return r.clone=function(){return new n(this.value,this.unit)},r.convertTo=function(e){if(this.unit===e)return new n(this.value,this.unit);var r=n.toCanonicalUnit(this.unit);if(r!==n.toCanonicalUnit(e)||r===t.UnitType.kUnknown)return null;var i=Ne.conversionToCanonicalUnitsScaleFactor(this.unit)/Ne.conversionToCanonicalUnitsScaleFactor(e);return new n(this.value*i,e)},r.equals=function(t){return this.value===t.value&&this.unit===t.unit},r.getType=function(){return t.CSSStyleValueType.kUnitType},r.sumValue=function(){var e=[],r={};return this.unit!==t.UnitType.kNumber&&(r[n.toCanonicalUnitIfPossible(this.unit)]=1),e.push({value:this.value*Ne.conversionToCanonicalUnitsScaleFactor(this.unit),units:r}),e},r.negate=function(){return new n(-this.value,this.unit)},r.invert=function(){return this.unit===t.UnitType.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ke.create(this)},r.buildCSSText=function(e,r,i){var o;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:o=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kRems:case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kTurns:var a=this.value,s=n.unitTypeToString(this.unit);if(-999999>a||a>999999){var u=n.unitTypeToString(this.unit);o=!Number.isFinite(a)||Number.isNaN(a)?n.formatInfinityOrNaN(a,u):n.formatNumber(a,u)}else o=""+a+s}return i+=o},n}(Ve),Xe=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.isUnitValue=function(){return!1},e}(Ve),Ke=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="invert",r.value=t,r}ye(n,e),n.create=function(t){return new n(t,je.negateExponents(t.type_))};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kInvertType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kInvertType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="1 / "),n===t.ParenLess.kNo&&(r+=")"),r},n}(Xe),Ze=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="negate",r.value=t,r}ye(n,e),n.create=function(t){return new n(t,t.type_)};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kNegateType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kNegateType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="-"),n===t.ParenLess.kNo&&(r+=")"),r},n}(Xe);function Je(t,e,n){for(var r=t[0].type_,i=1;t.length>i;i++)r=e(r,t[i].type_,false);return r}var Qe,$e=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}ye(e,t);var n=e.prototype;return n.numericValues=function(){return this.values},n.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Xe),tn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="min",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMinType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=Ee(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},r.buildCSSText=function(e,n,r){r+="min(";for(var i,o=!0,a=Ee(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}($e),en=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="max",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMaxType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=Ee(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},r.buildCSSText=function(e,n,r){r+="max(";for(var i,o=!0,a=Ee(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}($e),nn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="sum",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))},n.numericTypeFromUnitMap=function(t){var e=new je;return Object.keys(t).forEach((function(n){var r=t[n];e=je.multiply(e,new je(Number(n),r),false),Me(!0)})),e},n.canCreateNumericTypeFromSumValue=function(t){var e=this;Me(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return je.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kSumType},r.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(ve({},e)):t[n].value+=e.value}))})),n.canCreateNumericTypeFromSumValue(t)?t:null},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kNegateType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" - "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" + ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}($e),rn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="product",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.multiply))},n.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Ae(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kProductType},r.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(e){var r=e.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(e){i.push({value:t.value*e.value,units:n.multiplyUnitMaps(t.units,e.units)})}))})),t=i})),t},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kInvertType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" / "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" * ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}($e),on=new qe(0,"px"),an=new qe(0,"deg"),sn=function(t){function e(e,n,r,i,o){var a;return void 0===i&&(i=1),void 0===o&&(o=!1),(a=t.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}ye(e,t);var n=e.prototype;return n.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},n.buildCSSText=function(t,e,n){return n+"rgba("+this.r+","+this.g+","+this.b+","+this.alpha+")"},e}(ke);(Qe=t.GradientType||(t.GradientType={}))[Qe.Constant=0]="Constant",Qe[Qe.LinearGradient=1]="LinearGradient",Qe[Qe.RadialGradient=2]="RadialGradient";var un=function(e){function n(t,n){var r;return(r=e.call(this)||this).type=void 0,r.value=void 0,r.type=t,r.value=n,r}ye(n,e);var r=n.prototype;return r.clone=function(){return new n(this.type,this.value)},r.buildCSSText=function(t,e,n){return n},r.getType=function(){return t.CSSStyleValueType.kColorType},n}(Ne),cn=1e-6,ln="undefined"!=typeof Float32Array?Float32Array:Array;function hn(){var t=new ln(9);return ln!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function fn(){var t=new ln(16);return ln!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function dn(t){var e=new ln(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function pn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function vn(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=y,t}function yn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,E=r*u-i*s,S=r*c-o*s,x=i*c-o*u,w=l*v-h*p,P=l*y-f*p,N=l*g-d*p,k=h*y-f*v,C=h*g-d*v,M=f*g-d*y,_=m*M-T*C+b*k+E*N-S*P+x*w;return _?(t[0]=(s*M-u*C+c*k)*(_=1/_),t[1]=(i*C-r*M-o*k)*_,t[2]=(v*x-y*S+g*E)*_,t[3]=(f*S-h*x-d*E)*_,t[4]=(u*N-a*M-c*P)*_,t[5]=(n*M-i*N+o*P)*_,t[6]=(y*b-p*x-g*T)*_,t[7]=(l*x-f*b+d*T)*_,t[8]=(a*C-s*N+c*w)*_,t[9]=(r*N-n*C-o*w)*_,t[10]=(p*S-v*b+g*m)*_,t[11]=(h*b-l*S-d*m)*_,t[12]=(s*P-a*k-u*w)*_,t[13]=(n*k-r*P+i*w)*_,t[14]=(v*T-p*E-y*m)*_,t[15]=(l*E-h*T+f*m)*_,t):null}function mn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],T=n[0],b=n[1],E=n[2],S=n[3];return t[0]=T*r+b*s+E*h+S*v,t[1]=T*i+b*u+E*f+S*y,t[2]=T*o+b*c+E*d+S*g,t[3]=T*a+b*l+E*p+S*m,t[4]=(T=n[4])*r+(b=n[5])*s+(E=n[6])*h+(S=n[7])*v,t[5]=T*i+b*u+E*f+S*y,t[6]=T*o+b*c+E*d+S*g,t[7]=T*a+b*l+E*p+S*m,t[8]=(T=n[8])*r+(b=n[9])*s+(E=n[10])*h+(S=n[11])*v,t[9]=T*i+b*u+E*f+S*y,t[10]=T*o+b*c+E*d+S*g,t[11]=T*a+b*l+E*p+S*m,t[12]=(T=n[12])*r+(b=n[13])*s+(E=n[14])*h+(S=n[15])*v,t[13]=T*i+b*u+E*f+S*y,t[14]=T*o+b*c+E*d+S*g,t[15]=T*a+b*l+E*p+S*m,t}function Tn(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function bn(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function En(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function Sn(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function xn(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function wn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,d=i*u,p=i*c,v=o*c,y=a*s,g=a*u,m=a*c;return t[0]=1-(d+v),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+v),t[6]=p+y,t[7]=0,t[8]=f+g,t[9]=p-y,t[10]=1-(l+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Pn(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Nn(t,e){var n=e[4],r=e[5],i=e[6],o=e[8],a=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,i),t[2]=Math.hypot(o,a,s),t}function kn(t,e){var n=new ln(3);Nn(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,d=e[9]*i,p=e[10]*o,v=a+l+p,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):l>p?(y=2*Math.sqrt(1+l-a-p),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+p-a-l),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function Cn(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,d=o*l,p=o*h,v=a*l,y=a*h,g=s*h,m=u*c,T=u*l,b=u*h,E=r[0],S=r[1],x=r[2],w=i[0],P=i[1],N=i[2],k=(1-(v+g))*E,C=(d+b)*E,M=(p-T)*E,_=(d-b)*S,A=(1-(f+g))*S,O=(y+m)*S,I=(p+T)*x,R=(y-m)*x,L=(1-(f+v))*x;return t[0]=k,t[1]=C,t[2]=M,t[3]=0,t[4]=_,t[5]=A,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+w-(k*w+_*P+I*N),t[13]=n[1]+P-(C*w+A*P+R*N),t[14]=n[2]+N-(M*w+O*P+L*N),t[15]=1,t}function Mn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _n(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function An(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var On=An;function In(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p=e[0],v=e[1],y=e[2],g=r[0],m=r[1],T=r[2],b=n[0],E=n[1],S=n[2];return Math.abs(p-b)<cn&&Math.abs(v-E)<cn&&Math.abs(y-S)<cn?yn(t):(l=p-b,h=v-E,f=y-S,i=m*(f*=d=1/Math.hypot(l,h,f))-T*(h*=d),o=T*(l*=d)-g*f,a=g*h-m*l,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(d=Math.hypot(s,u,c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*v+a*y),t[13]=-(s*p+u*v+c*y),t[14]=-(l*p+h*v+f*y),t[15]=1,t)}function Rn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Ln=Object.freeze({__proto__:null,create:fn,clone:dn,copy:pn,fromValues:function(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v){var y=new ln(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=u,y[9]=c,y[10]=l,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=v,y},set:vn,identity:yn,transpose:function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:gn,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15];return t[0]=s*(f*g-d*y)-h*(u*g-c*y)+v*(u*d-c*f),t[1]=-(r*(f*g-d*y)-h*(i*g-o*y)+v*(i*d-o*f)),t[2]=r*(u*g-c*y)-s*(i*g-o*y)+v*(i*c-o*u),t[3]=-(r*(u*d-c*f)-s*(i*d-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-d*y)-l*(u*g-c*y)+p*(u*d-c*f)),t[5]=n*(f*g-d*y)-l*(i*g-o*y)+p*(i*d-o*f),t[6]=-(n*(u*g-c*y)-a*(i*g-o*y)+p*(i*c-o*u)),t[7]=n*(u*d-c*f)-a*(i*d-o*f)+l*(i*c-o*u),t[8]=a*(h*g-d*v)-l*(s*g-c*v)+p*(s*d-c*h),t[9]=-(n*(h*g-d*v)-l*(r*g-o*v)+p*(r*d-o*h)),t[10]=n*(s*g-c*v)-a*(r*g-o*v)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*y-f*v)-l*(s*y-u*v)+p*(s*f-u*h)),t[13]=n*(h*y-f*v)-l*(r*y-i*v)+p*(r*f-i*h),t[14]=-(n*(s*y-u*v)-a*(r*y-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t},determinant:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)},multiply:mn,translate:Tn,scale:bn,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p,v,y,g,m,T,b,E,S,x,w,P,N,k,C=r[0],M=r[1],_=r[2],A=Math.hypot(C,M,_);return cn>A?null:(C*=A=1/A,M*=A,_*=A,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],f=e[5],d=e[6],p=e[7],y=e[9],g=e[10],m=e[11],S=C*M*(a=1-o)-_*i,x=M*M*a+o,w=_*M*a+C*i,P=C*_*a+M*i,N=M*_*a-C*i,k=_*_*a+o,t[0]=(s=e[0])*(T=C*C*a+o)+(h=e[4])*(b=M*C*a+_*i)+(v=e[8])*(E=_*C*a-M*i),t[1]=u*T+f*b+y*E,t[2]=c*T+d*b+g*E,t[3]=l*T+p*b+m*E,t[4]=s*S+h*x+v*w,t[5]=u*S+f*x+y*w,t[6]=c*S+d*x+g*w,t[7]=l*S+p*x+m*w,t[8]=s*P+h*N+v*k,t[9]=u*P+f*N+y*k,t[10]=c*P+d*N+g*k,t[11]=l*P+p*N+m*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:En,rotateY:Sn,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t},fromTranslation:xn,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return cn>c?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),i=Math.cos(e),t[0]=a*a*(o=1-i)+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:wn,fromQuat2:function(t,e){var n=new ln(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),wn(t,e,n),t},getTranslation:Pn,getScaling:Nn,getRotation:kn,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,d=i*l,p=o*c,v=o*l,y=a*l,g=s*u,m=s*c,T=s*l,b=r[0],E=r[1],S=r[2];return t[0]=(1-(p+y))*b,t[1]=(f+T)*b,t[2]=(d-m)*b,t[3]=0,t[4]=(f-T)*E,t[5]=(1-(h+y))*E,t[6]=(v+g)*E,t[7]=0,t[8]=(d+m)*S,t[9]=(v-g)*S,t[10]=(1-(h+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Cn,fromQuat:Mn,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:_n,perspective:_n,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(o=1/(r-i)),t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:An,ortho:On,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t},lookAt:In,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],d=l*l+h*h+f*f;d>0&&(l*=d=1/Math.sqrt(d),h*=d,f*=d);var p=u*f-c*h,v=c*l-s*f,y=s*h-u*l;return(d=p*p+v*v+y*y)>0&&(p*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=p,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-f*v,t[5]=f*p-l*y,t[6]=l*v-h*p,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Rn,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],d=t[11],p=t[12],v=t[13],y=t[14],g=t[15],m=e[0],T=e[1],b=e[2],E=e[3],S=e[4],x=e[5],w=e[6],P=e[7],N=e[8],k=e[9],C=e[10],M=e[11],_=e[12],A=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>cn*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-T)>cn*Math.max(1,Math.abs(r),Math.abs(T))||Math.abs(i-b)>cn*Math.max(1,Math.abs(i),Math.abs(b))||Math.abs(o-E)>cn*Math.max(1,Math.abs(o),Math.abs(E))||Math.abs(a-S)>cn*Math.max(1,Math.abs(a),Math.abs(S))||Math.abs(s-x)>cn*Math.max(1,Math.abs(s),Math.abs(x))||Math.abs(u-w)>cn*Math.max(1,Math.abs(u),Math.abs(w))||Math.abs(c-P)>cn*Math.max(1,Math.abs(c),Math.abs(P))||Math.abs(l-N)>cn*Math.max(1,Math.abs(l),Math.abs(N))||Math.abs(h-k)>cn*Math.max(1,Math.abs(h),Math.abs(k))||Math.abs(f-C)>cn*Math.max(1,Math.abs(f),Math.abs(C))||Math.abs(d-M)>cn*Math.max(1,Math.abs(d),Math.abs(M))||Math.abs(p-_)>cn*Math.max(1,Math.abs(p),Math.abs(_))||Math.abs(v-A)>cn*Math.max(1,Math.abs(v),Math.abs(A))||Math.abs(y-O)>cn*Math.max(1,Math.abs(y),Math.abs(O))||Math.abs(g-I)>cn*Math.max(1,Math.abs(g),Math.abs(I)))},mul:mn,sub:Rn});function Dn(){var t=new ln(3);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Fn(t){var e=new ln(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Bn(t){return Math.hypot(t[0],t[1],t[2])}function Un(t,e,n){var r=new ln(3);return r[0]=t,r[1]=e,r[2]=n,r}function jn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Vn(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Gn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Hn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function zn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Wn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Yn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function qn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Xn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Kn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Zn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Jn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Qn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=cn*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=cn*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=cn*Math.max(1,Math.abs(i),Math.abs(s))}var $n,tr=Hn,er=zn,nr=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},rr=Bn;$n=Dn();function ir(){var t=new ln(4);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function or(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}!function(){var t=ir()}();function ar(){var t=new ln(4);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function sr(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ur(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function cr(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>cn?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}function lr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function hr(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}var fr,dr,pr,vr,yr,gr,mr=function(t,e,n,r){var i=new ln(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Tr=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},br=ur,Er=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};fr=Dn(),dr=Un(1,0,0),pr=Un(0,1,0),vr=ar(),yr=ar(),gr=hn();function Sr(t,e){var n=new ln(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new ln(2),ln!=Float32Array&&(t[0]=0,t[1]=0),t)}();function xr(t){return t.map((function(t){return Array.isArray(t)?[].concat(t):t}))}var wr=function(){return wr=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},wr.apply(this,arguments)};function Pr(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function Nr(t,e){return function(n,r){e(n,r,t)}}function kr(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var Cr={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Mr(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var _r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Ar(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return _r[e]===t.length-1&&"achlmqstvz".includes(e)}))}function Or(t){return Ar(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function Ir(t){return Or(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function Rr(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=_r[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,_r[n]))),_r[n]););}function Lr(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e)}function Dr(t){return t>=48&&57>=t||43===t||45===t||46===t}function Fr(t){return t>=48&&57>=t}function Br(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,u=!1,c=!1;if(n>o)if(43!==(e=r.charCodeAt(o))&&45!==e||(e=r.charCodeAt(o+=1)),Fr(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Fr(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Fr(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Fr(r.charCodeAt(o));)o+=1,u=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(c&&!s&&!u)return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent');if(43!==(e=r.charCodeAt(o+=1))&&45!==e||(o+=1),o>=n||!Fr(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Fr(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';else t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param'}function Ur(t){for(var e,n=t.pathValue,r=t.max;r>t.index&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function jr(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=_r[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,Ur(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?Br(t):Lr(t),t.err.length)return;t.data.push(t.param),Ur(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,Ur(t))}if(t.index>=t.max)break;if(!Dr(n.charCodeAt(t.index)))break}Rr(t)}else Rr(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var Vr=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Gr(t){if(Or(t))return xr(t);var e=function(t){if(Ar(t))return xr(t);var e=new Vr(t);for(Ur(e);e.max>e.index&&!e.err.length;)jr(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],u=s.toUpperCase();if("M"===s)return i=n=a[0],o=r=a[1],["M",n,r];if(s!==u)switch(u){case"A":e=[u,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[u,a[0]+r];break;case"H":e=[u,a[0]+n];break;default:var c=a.map((function(t,e){return t+(e%2?r:n)}));e=[u].concat(c)}else e=[u].concat(a);var l=e.length;switch(u){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[l-2],r=e[l-1],"M"===u&&(i=n,o=r)}return e}))}function Hr(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),u=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)u=["L",t[1],i];else if("V"===n)u=["L",r,t[1]];else if("S"===n){var c=2*r-o,l=2*i-a;e.x1=c,e.y1=l,u=["C",c,l].concat(s)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=["Q",h,f].concat(s)}else if("Q"===n){var d=s[1];e.qx=s[0],e.qy=d}return u}function zr(t){if(Ir(t))return xr(t);for(var e=Gr(t),n=wr({},Cr),r=[],i=e.length,o=0;i>o;o+=1){r[o]=e[o][0],e[o]=Hr(e[o],n);var a=e[o],s=a.length;n.x1=+a[s-2],n.y1=+a[s-1],n.x2=+a[s-4]||n.x1,n.y2=+a[s-3]||n.y1}return e}function Wr(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Yr(t,e,n,r,i,o,a,s,u,c){var l,h,f,d,p,v=t,y=e,g=n,m=r,T=s,b=u,E=120*Math.PI/180,S=Math.PI/180*(+i||0),x=[];if(c)h=c[0],f=c[1],d=c[2],p=c[3];else{y=(l=Wr(v,y,-S)).y;var w=((v=l.x)-(T=(l=Wr(T,b,-S)).x))/2,P=(y-(b=l.y))/2,N=w*w/(g*g)+P*P/(m*m);N>1&&(g*=N=Math.sqrt(N),m*=N);var k=g*g,C=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((k*C-k*P*P-C*w*w)/(k*P*P+C*w*w)));d=M*g*P/m+(v+T)/2,p=M*-m*w/g+(y+b)/2,h=Math.asin(((y-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=Math.asin(((b-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=d>v?Math.PI-h:h,f=d>T?Math.PI-f:f,0>h&&(h=2*Math.PI+h),0>f&&(f=2*Math.PI+f),a&&h>f&&(h-=2*Math.PI),!a&&f>h&&(f-=2*Math.PI)}var _=f-h;if(Math.abs(_)>E){var A=f,O=T,I=b;f=h+E*(a&&f>h?1:-1),x=Yr(T=d+g*Math.cos(f),b=p+m*Math.sin(f),g,m,i,0,a,O,I,[f,A,d,p])}_=f-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(f),F=Math.sin(f),B=Math.tan(_/4),U=4/3*g*B,j=4/3*m*B,V=[v,y],G=[v+U*L,y-j*R],H=[T+U*F,b-j*D],z=[T,b];if(G[0]=2*V[0]-G[0],G[1]=2*V[1]-G[1],c)return G.concat(H,z,x);for(var W=[],Y=0,q=(x=G.concat(H,z,x)).length;q>Y;Y+=1)W[Y]=Y%2?Wr(x[Y-1],x[Y],S).y:Wr(x[Y],x[Y+1],S).x;return W}function qr(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Xr(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Kr(t,e,n,r,i){var o=Xr([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=qr([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}else a={x:n,y:r};else a={x:t,y:e};return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Zr(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=qr(o,a,i),u=qr(a,s,i),c=qr(s,u,i),l=qr(u,c,i),h=qr(c,l,i),f=Kr(o[0],o[1],s[0],s[1],c[0]).point,d=Kr(h[0],h[1],l[0],l[1],u[0]).point;return[f.x,f.y,d.x,d.y,n,r]}function Jr(t,e){var n,r,i,o,a,s,u,c=t[0],l=t.slice(1).map(Number),h=l[0],f=l[1],d=e.x1,p=e.y1,v=e.x,y=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=h,e.y=f,t;case"A":return n=[d,p].concat(l),["C"].concat(Yr(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=h,e.qy=f,n=[d,p].concat(l),["C"].concat([(s=1/3)*n[0]+(u=2/3)*(r=n[2]),s*n[1]+u*(i=n[3]),s*(o=n[4])+u*r,s*(a=n[5])+u*i,o,a]);case"L":return["C"].concat(Zr(d,p,h,f));case"Z":return d===v&&p===y?["C",d,p,v,y,v,y]:["C"].concat(Zr(d,p,v,y))}return t}function Qr(t,e){if(void 0===e&&(e=!1),function(t){return Ir(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=xr(t);return e?[n,[]]:n}for(var r,i,o=zr(t),a=wr({},Cr),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var f=Jr(o[h],a);o[h]=f,Mr(o,s,h),c=o.length,"Z"===u&&l.push(h),a.x1=+(r=o[h])[(i=r.length)-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,l]:o}function $r(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(0>n*o-r*i?-1:1)*Math.acos(a/s)}function ti(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,f=Math.cos,d=Math.sqrt,p=Math.PI,v=l(n),y=l(r),g=(i%360+360)%360*(p/180);if(t===s&&e===u)return{x:t,y:e};if(0===v||0===y)return Kr(t,e,s,u,c).point;var m=(t-s)/2,T=(e-u)/2,b={x:f(g)*m+h(g)*T,y:-h(g)*m+f(g)*T},E=Math.pow(b.x,2)/Math.pow(v,2)+Math.pow(b.y,2)/Math.pow(y,2);E>1&&(v*=d(E),y*=d(E));var S=(Math.pow(v,2)*Math.pow(y,2)-Math.pow(v,2)*Math.pow(b.y,2)-Math.pow(y,2)*Math.pow(b.x,2))/(Math.pow(v,2)*Math.pow(b.y,2)+Math.pow(y,2)*Math.pow(b.x,2)),x=(o!==a?1:-1)*d(S=0>S?0:S),w=x*(v*b.y/y),P=x*(-y*b.x/v),N=f(g)*w-h(g)*P+(t+s)/2,k=h(g)*w+f(g)*P+(e+u)/2,C={x:(b.x-w)/v,y:(b.y-P)/y},M=$r({x:1,y:0},C),_=$r(C,{x:(-b.x-w)/v,y:(-b.y-P)/y});!a&&_>0?_-=2*p:a&&0>_&&(_+=2*p);var A=M+(_%=2*p)*c,O=v*f(A),I=y*h(A);return{x:f(g)*O-h(g)*I+N,y:h(g)*O+f(g)*I+k}}function ei(t,e,n,r,i,o,a,s,u,c){var l,h="number"==typeof c,f=t,d=e,p=0,v=[f,d,p],y=[f,d],g={x:0,y:0},m=[{x:f,y:d}];h&&0>=c&&(g={x:f,y:d});for(var T=0;100>=T;T+=1){if(l=ti(t,e,n,r,i,o,a,s,u,T/100),m=m.concat({x:f=l.x,y:d=l.y}),p+=Xr(y,[f,d]),y=[f,d],h&&p>=c&&c>v[2]){var b=(p-c)/(p-v[2]);g={x:y[0]*(1-b)+v[0]*b,y:y[1]*(1-b)+v[1]*b}}v=[f,d,p]}return h&&c>=p&&(g={x:s,y:u}),{length:p,point:g,min:{x:Math.min.apply(null,m.map((function(t){return t.x}))),y:Math.min.apply(null,m.map((function(t){return t.y})))},max:{x:Math.max.apply(null,m.map((function(t){return t.x}))),y:Math.max.apply(null,m.map((function(t){return t.y})))}}}function ni(t,e,n,r,i,o,a,s,u){var c=1-u;return{x:Math.pow(c,3)*t+3*Math.pow(c,2)*u*n+3*c*Math.pow(u,2)*i+Math.pow(u,3)*a,y:Math.pow(c,3)*e+3*Math.pow(c,2)*u*r+3*c*Math.pow(u,2)*o+Math.pow(u,3)*s}}function ri(t,e,n,r,i,o,a,s,u){var c,l="number"==typeof u,h=t,f=e,d=0,p=[h,f,d],v=[h,f],y={x:0,y:0},g=[{x:h,y:f}];l&&0>=u&&(y={x:h,y:f});for(var m=0;30>=m;m+=1){if(c=ni(t,e,n,r,i,o,a,s,m/30),g=g.concat({x:h=c.x,y:f=c.y}),d+=Xr(v,[h,f]),v=[h,f],l&&d>=u&&u>p[2]){var T=(d-u)/(d-p[2]);y={x:v[0]*(1-T)+p[0]*T,y:v[1]*(1-T)+p[1]*T}}p=[h,f,d]}return l&&u>=d&&(y={x:a,y:s}),{length:d,point:y,min:{x:Math.min.apply(null,g.map((function(t){return t.x}))),y:Math.min.apply(null,g.map((function(t){return t.y})))},max:{x:Math.max.apply(null,g.map((function(t){return t.x}))),y:Math.max.apply(null,g.map((function(t){return t.y})))}}}function ii(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function oi(t,e,n,r,i,o,a){var s,u="number"==typeof a,c=t,l=e,h=0,f=[c,l,h],d=[c,l],p={x:0,y:0},v=[{x:c,y:l}];u&&0>=a&&(p={x:c,y:l});for(var y=0;30>=y;y+=1){if(s=ii(t,e,n,r,i,o,y/30),v=v.concat({x:c=s.x,y:l=s.y}),h+=Xr(d,[c,l]),d=[c,l],u&&h>=a&&a>f[2]){var g=(h-a)/(h-f[2]);p={x:d[0]*(1-g)+f[0]*g,y:d[1]*(1-g)+f[1]*g}}f=[c,l,h]}return u&&a>=h&&(p={x:i,y:o}),{length:h,point:p,min:{x:Math.min.apply(null,v.map((function(t){return t.x}))),y:Math.min.apply(null,v.map((function(t){return t.y})))},max:{x:Math.max.apply(null,v.map((function(t){return t.x}))),y:Math.max.apply(null,v.map((function(t){return t.y})))}}}function ai(t,e){for(var n,r,i,o,a,s,u,c,l,h=zr(t),f="number"==typeof e,d=[],p=0,v=0,y=0,g=0,m=[],T=[],b=0,E={x:0,y:0},S=E,x=E,w=E,P=0,N=0,k=h.length;k>N;N+=1)d=(u="M"===(c=(l=h[N])[0]))?d:[p,v].concat(l.slice(1)),u?(S=E={x:y=l[1],y:g=l[2]},b=0,f&&.001>e&&(w=E)):"L"===c?(b=(n=Kr(d[0],d[1],d[2],d[3],(e||0)-P)).length,E=n.min,S=n.max,x=n.point):"A"===c?(b=(r=ei(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-P)).length,E=r.min,S=r.max,x=r.point):"C"===c?(b=(i=ri(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-P)).length,E=i.min,S=i.max,x=i.point):"Q"===c?(b=(o=oi(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-P)).length,E=o.min,S=o.max,x=o.point):"Z"===c&&(b=(a=Kr((d=[p,v,y,g])[0],d[1],d[2],d[3],(e||0)-P)).length,E=a.min,S=a.max,x=a.point),f&&e>P&&P+b>=e&&(w=x),T.push(S),m.push(E),P+=b,p=(s="Z"!==c?l.slice(-2):[y,g])[0],v=s[1];return f&&e>=P&&(w={x:p,y:v}),{length:P,point:w,min:{x:Math.min.apply(null,m.map((function(t){return t.x}))),y:Math.min.apply(null,m.map((function(t){return t.y})))},max:{x:Math.max.apply(null,T.map((function(t){return t.x}))),y:Math.max.apply(null,T.map((function(t){return t.y})))}}}function si(t){return function(t){var e=0,n=0,r=0;return Qr(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o,a,s,u,c,l,h,f,d=t.slice(1);return r=3*(((f=d[5])-(a=n))*((s=d[0])+(c=d[2]))-((h=d[4])-(o=e))*((u=d[1])+(l=d[3]))+u*(o-c)-s*(a-l)+f*(c+o/3)-h*(l+a/3))/20,i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function ui(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?ri(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8]).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=qr(n,r,e),s=qr(r,i,e),u=qr(i,o,e),c=qr(a,s,e),l=qr(s,u,e),h=qr(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function ci(t,e,n){var r=ui(t),i=ui(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],d=[h-o,h-a],p=0,v=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(p=n&&d[e]&&t.l>=f[e])?1:0,p?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:ci(v[0],v[1],h)}var li={}.toString,hi=function(t){return function(t,e){return li.call(t)==="[object "+e+"]"}(t,"Function")},fi=function(t,e){if(!hi(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};return n.cache=new Map,n};function di(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vi(){}var yi=.7,gi=1/yi,mi="\\s*([+-]?\\d+)\\s*",Ti="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ei=/^#([0-9a-f]{3,8})$/,Si=new RegExp("^rgb\\("+[mi,mi,mi]+"\\)$"),xi=new RegExp("^rgb\\("+[bi,bi,bi]+"\\)$"),wi=new RegExp("^rgba\\("+[mi,mi,mi,Ti]+"\\)$"),Pi=new RegExp("^rgba\\("+[bi,bi,bi,Ti]+"\\)$"),Ni=new RegExp("^hsl\\("+[Ti,bi,bi]+"\\)$"),ki=new RegExp("^hsla\\("+[Ti,bi,bi,Ti]+"\\)$"),Ci={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mi(){return this.rgb().formatHex()}function _i(){return this.rgb().formatRgb()}function Ai(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ei.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Oi(e):3===n?new Li(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ii(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ii(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Si.exec(t))?new Li(e[1],e[2],e[3],1):(e=xi.exec(t))?new Li(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=wi.exec(t))?Ii(e[1],e[2],e[3],e[4]):(e=Pi.exec(t))?Ii(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ni.exec(t))?Ui(e[1],e[2]/100,e[3]/100,1):(e=ki.exec(t))?Ui(e[1],e[2]/100,e[3]/100,e[4]):Ci.hasOwnProperty(t)?Oi(Ci[t]):"transparent"===t?new Li(NaN,NaN,NaN,0):null}function Oi(t){return new Li(t>>16&255,t>>8&255,255&t,1)}function Ii(t,e,n,r){return r>0||(t=e=n=NaN),new Li(t,e,n,r)}function Ri(t){return t instanceof vi||(t=Ai(t)),t?new Li((t=t.rgb()).r,t.g,t.b,t.opacity):new Li}function Li(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Di(){return"#"+Bi(this.r)+Bi(this.g)+Bi(this.b)}function Fi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Bi(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function Ui(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new Vi(t,e,n,r)}function ji(t){if(t instanceof Vi)return new Vi(t.h,t.s,t.l,t.opacity);if(t instanceof vi||(t=Ai(t)),!t)return new Vi;if(t instanceof Vi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(r>n):n===o?(r-e)/s+2:(e-n)/s+4,s/=.5>u?o+i:2-o-i,a*=60):s=u>0&&1>u?0:a,new Vi(a,s,u,t.opacity)}function Vi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Gi(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}di(vi,Ai,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Mi,formatHex:Mi,formatHsl:function(){return ji(this).formatHsl()},formatRgb:_i,toString:_i}),di(Li,(function(t,e,n,r){return 1===arguments.length?Ri(t):new Li(t,e,n,null==r?1:r)}),pi(vi,{brighter:function(t){return t=null==t?gi:Math.pow(gi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?yi:Math.pow(yi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return this.r>=-.5&&255.5>this.r&&this.g>=-.5&&255.5>this.g&&this.b>=-.5&&255.5>this.b&&this.opacity>=0&&1>=this.opacity},hex:Di,formatHex:Di,formatRgb:Fi,toString:Fi})),di(Vi,(function(t,e,n,r){return 1===arguments.length?ji(t):new Vi(t,e,n,null==r?1:r)}),pi(vi,{brighter:function(t){return t=null==t?gi:Math.pow(gi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?yi:Math.pow(yi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(0>this.h),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(.5>n?n:1-n)*e,i=2*n-r;return new Li(Gi(240>t?t+120:t-240,i,r),Gi(t,i,r),Gi(120>t?t+240:t-120,i,r),this.opacity)},displayable:function(){return(this.s>=0&&1>=this.s||isNaN(this.s))&&this.l>=0&&1>=this.l&&this.opacity>=0&&1>=this.opacity},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Hi={},zi=0;function Wi(t,e){if(t){var n="string"==typeof t?t:t.id||zi++;Hi[n]&&Hi[n].destroy(),Hi[n]=e}}var Yi="undefined"!=typeof window&&void 0!==window.document,qi=.1,Xi="function"==typeof Float32Array,Ki=function(t,e){return 1-3*e+3*t},Zi=function(t,e){return 3*e-6*t},Ji=function(t){return 3*t},Qi=function(t,e,n){return((Ki(e,n)*t+Zi(e,n))*t+Ji(e))*t},$i=function(t,e,n){return 3*Ki(e,n)*t*t+2*Zi(e,n)*t+Ji(e)},to=function(t,e,n,r){if(0>t||t>1||0>n||n>1)throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Xi?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=Qi(o*qi,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=qi;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*qi,s=$i(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Qi(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&10>++s);return a}(e,r,r+qi,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=$i(e,n,r);if(0===o)return e;e-=(Qi(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:Qi(a(t),e,r)}};function eo(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function no(t){return void 0===t?0:t>360||-360>t?t%360:t}function ro(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Re(t)?Un(t,e,n):Array.isArray(t)&&3===t.length?Fn(t):Un(t[0],t[1]||e,t[2]||n)}function io(t){return t*(Math.PI/180)}function oo(t){return t*(180/Math.PI)}function ao(t){return 360*t}function so(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=Nn(Dn(),e),a=o[0],s=o[1],u=o[2],c=Math.asin(-e[2]/a);return i>c?c>-i?(n=Math.atan2(e[6]/s,e[10]/u),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=c,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):-.499995*c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function uo(t,e,n,r,i){var o,a,s,u,c,l,h,f,d,p,v=Math.cos(t),y=Math.sin(t);return o=r*v,a=i*y,s=0,u=-r*y,c=i*v,l=0,h=e,f=n,d=1,(p=new ln(9))[0]=o,p[1]=a,p[2]=s,p[3]=u,p[4]=c,p[5]=l,p[6]=h,p[7]=f,p[8]=d,p}function co(t,e,n,r,i,o,a){var s=2*o/(r-i),u=(n+e)/(n-e),c=(r+i)/(r-i),l=-(a+o)/(a-o),h=-2*a*o/(a-o);return t[0]=2*o/(n-e),t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}function lo(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);0>e*i-n*r&&(i>e?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=oo(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var ho=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t},fo=function(t){return Math.pow(t,2)},po=function(t){return Math.pow(t,3)},vo=function(t){return Math.pow(t,4)},yo=function(t){return Math.pow(t,5)},go=function(t){return Math.pow(t,6)},mo=function(t){return 1-Math.cos(t*Math.PI/2)},To=function(t){return 1-Math.sqrt(1-t*t)},bo=function(t){return t*t*(3*t-2)},Eo=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},So=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=eo(Number(void 0===n?1:n),1,10),a=eo(Number(i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin((t-1-a/(2*Math.PI)*Math.asin(1/o))*(2*Math.PI)/a)},xo=function(t,e,n){void 0===e&&(e=[]);var r=e[0],i=void 0===r?1:r,o=e[1],a=void 0===o?100:o,s=e[2],u=void 0===s?10:s,c=e[3],l=void 0===c?0:c;i=eo(i,.1,1e3),a=eo(a,.1,1e3),u=eo(u,.1,1e3),l=eo(l,.1,1e3);var h=Math.sqrt(a/i),f=u/(2*Math.sqrt(a*i)),d=1>f?h*Math.sqrt(1-f*f):0,p=1>f?(f*h-l)/d:-l+h,v=n?n*t/1e3:t;return v=1>f?Math.exp(-v*f*h)*(1*Math.cos(d*v)+p*Math.sin(d*v)):(1+p*v)*Math.exp(-v*h),0===t||1===t?t:1-v},wo=function(t,e){void 0===e&&(e=[]);var n=e[0],r=void 0===n?10:n;return("start"==e[1]?Math.ceil:Math.floor)(eo(t,0,1)*r)/r},Po=function(t,e){void 0===e&&(e=[]);return to(e[0],e[1],e[2],e[3])(t)},No=to(.42,0,1,1),ko=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Co=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Mo=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},_o={steps:wo,"step-start":function(t){return wo(t,[1,"start"])},"step-end":function(t){return wo(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Po,ease:function(t){return Po(t,[.25,.1,.25,1])},in:No,out:ko(No),"in-out":Co(No),"out-in":Mo(No),"in-quad":fo,"out-quad":ko(fo),"in-out-quad":Co(fo),"out-in-quad":Mo(fo),"in-cubic":po,"out-cubic":ko(po),"in-out-cubic":Co(po),"out-in-cubic":Mo(po),"in-quart":vo,"out-quart":ko(vo),"in-out-quart":Co(vo),"out-in-quart":Mo(vo),"in-quint":yo,"out-quint":ko(yo),"in-out-quint":Co(yo),"out-in-quint":Mo(yo),"in-expo":go,"out-expo":ko(go),"in-out-expo":Co(go),"out-in-expo":Mo(go),"in-sine":mo,"out-sine":ko(mo),"in-out-sine":Co(mo),"out-in-sine":Mo(mo),"in-circ":To,"out-circ":ko(To),"in-out-circ":Co(To),"out-in-circ":Mo(To),"in-back":bo,"out-back":ko(bo),"in-out-back":Co(bo),"out-in-back":Mo(bo),"in-bounce":Eo,"out-bounce":ko(Eo),"in-out-bounce":Co(Eo),"out-in-bounce":Mo(Eo),"in-elastic":So,"out-elastic":ko(So),"in-out-elastic":Co(So),"out-in-elastic":Mo(So),spring:xo,"spring-in":xo,"spring-out":ko(xo),"spring-in-out":Co(xo),"spring-out-in":Mo(xo)},Ao=function(t){return _o[function(t){return ho(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||_o.linear},Oo=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,o=t.then((function(t){return i=!0,n=!1,e=t,t}),(function(t){throw r=!0,n=!1,t}));return o.isFulfilled=function(){return i},o.isPending=function(){return n},o.isRejected=function(){return r},o.getFullFilledValue=function(){return e},o},Io=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Ro={keys:Object.keys,values:Object.values,entries:Object.entries};function Lo(t,e){if(Yi)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function Do(t){var e=Lo(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}function Fo(t){var e=Lo(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}var Bo={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Uo(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var jo=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,h=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,f=/^\(/,d=/^\)/,p=/^,/,v=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,T=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,b="";function E(t){throw new Error(b+": "+t)}function S(){var t=O(x);return b.length>0&&E("Invalid input not EOF"),t}function x(){return w("linear-gradient",t,N)||w("repeating-linear-gradient",e,N)||w("radial-gradient",n,k)||w("repeating-radial-gradient",r,k)||w("conic-gradient",i,k)}function w(t,e,n){return P(e,(function(e){var r=n();return r&&(B(p)||E("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function P(t,e){var n=B(t);if(n){B(f)||E("Missing (");var r=e(n);return B(d)||E("Missing )"),r}}function N(){return F("directional",o,1)||F("angular",h,1)}function k(){var t,e,n=C();return n&&((t=[]).push(n),e=b,B(p)&&((n=C())?t.push(n):b=e)),t}function C(){var t=function(){var t=F("shape",/^(circle)/i,0);t&&(t.style=D()||M());return t}()||function(){var t=F("shape",/^(ellipse)/i,0);t&&(t.style=L()||M());return t}();if(t)t.at=_();else{var e=M();if(e){t=e;var n=_();n&&(t.at=n)}else{var r=A();r&&(t={type:"default-radial",at:r})}}return t}function M(){return F("extent-keyword",a,1)}function _(){if(F("position",/^at/,0)){var t=A();return t||E("Missing positioning value"),t}}function A(){var t={x:L(),y:L()};if(t.x||t.y)return{type:"position",value:t}}function O(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):E("One extra comma");return n}function I(){var t=F("hex",v,1)||P(m,(function(){return{type:"rgba",value:O(R)}}))||P(g,(function(){return{type:"rgb",value:O(R)}}))||F("literal",y,0);return t||E("Expected color definition"),t.length=L(),t}function R(){return B(T)[1]}function L(){return F("%",c,1)||F("position-keyword",s,1)||D()}function D(){return F("px",u,1)||F("em",l,1)}function F(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(b);e&&U(e[0].length);var n=t.exec(b);return n&&U(n[0].length),n}function U(t){b=b.substring(t)}return function(t){return b=t,S()}}();var Vo=function(t){return t};function Go(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Ho="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",zo=new RegExp("cubic-bezier\\("+Ho+","+Ho+","+Ho+","+Ho+"\\)"),Wo=/steps\(\s*(\d+)\s*\)/,Yo=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function qo(t){var e=zo.exec(t);if(e)return to.apply(void 0,e.slice(1).map(Number));var n=Wo.exec(t);if(n)return Go(Number(n[1]),0);var r=Yo.exec(t);return r?Go(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Ao(t)}function Xo(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Ko(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e<Math.min(n.delay+t+n.endDelay,r)?3:2}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Zo=fi((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function Jo(t){return!Ie(t)&&"string"==typeof t}function Qo(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if($o(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:qo(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;i.length-1>o;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:ea(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&t.applyTo>e})).forEach((function(n){var r=n.endOffset-n.startOffset,i=0===r?0:n.easingFunction((e-n.startOffset)/r);t.style[n.property]=n.interpolation(i)}));else for(var n in r)$o(n)&&(t.style[n]=null)}}function $o(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var ta=function(t,e,n){return function(r){return n(na(t,e,r))}};function ea(t,e,n,r){var i=is[t];if(i&&i.syntax&&i.interpolable){var o=_h.getPropertySyntax(i.syntax);if(o){var a=_h.parseProperty(t,e,r),s=_h.parseProperty(t,n,r),u=_h.computeProperty(t,a,r),c=_h.computeProperty(t,s,r),l=o.mixer(u,c,r);if(l){var h=ta.apply(void 0,l);return function(t){return 0===t?e:1===t?n:h(t)}}}}return ta(!1,!0,(function(t){return t?n:e}))}function na(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return.5>n?t:e;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){for(var r=[],i=0;t.length>i;i++)r.push(na(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var ra,ia={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},oa=fi((function(t){var e=Zo(t),n=ia[e];return[e=(null==n?void 0:n.alias)||e,n]}));function aa(t,e){var n,r=oa(t),i=r[1];return[r[0],Jo(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}(ra=t.Shape||(t.Shape={})).GROUP="g",ra.CIRCLE="circle",ra.ELLIPSE="ellipse",ra.IMAGE="image",ra.RECT="rect",ra.LINE="line",ra.POLYLINE="polyline",ra.POLYGON="polygon",ra.TEXT="text",ra.PATH="path",ra.HTML="html",ra.MESH="mesh";var sa=t.Syringe.defineToken("");function ua(t){for(var e=!1,n=t.length,r=0;n>r;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}function ca(t){for(var e=[],n=[],r=[],i=0;t.length>i;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}function la(t){for(var e,n,r=[],i=null,o=null,a=0,s=t.length,u=0;s>u;u++){var c=t[u];o=t[u+1];var l=c[0],h={command:l,prePoint:i,params:c,startTangent:null,endTangent:null};if("M"===l)a=u;var f=c.length;h.currentPoint=i=[c[f-2],c[f-1]],r[a]&&((e=i)[0]===(n=r[a].currentPoint)[0]&&e[1]===n[1])&&(r[a].prePoint=h.prePoint),h.nextPoint=o?[o[o.length-2],o[o.length-1]]:null;var d=h.prePoint;if("C"===l){var p=[c[1],c[2]],v=[c[3],c[4]];h.startTangent=[d[0]-p[0],d[1]-p[1]],h.endTangent=[i[0]-v[0],i[1]-v[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[p[0]-v[0],p[1]-v[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[v[0]-p[0],v[1]-p[1]])}r.push(h)}return r}function ha(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}var fa=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},da=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},pa=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},va=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=fa,this.call=fa,this._callAsync=da,this.callAsync=da,this._promise=pa,this.promise=pa,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e,n=Ee(this.interceptors);!(e=n()).done;){var r=e.value;if(r.register){var i=r.register(t);void 0!==i&&(t=i)}}return t},e.withOptions=function(t){var e=this,n=function(e){return Object.assign({},t,"string"==typeof e?{name:e}:e)};return{name:this.name,tap:function(t,r){return e.tap(n(t),r)},tapAsync:function(t,r){return e.tapAsync(n(t),r)},tapPromise:function(t,r){return e.tapPromise(n(t),r)},isUsed:function(){return e.isUsed()},withOptions:function(t){return e.withOptions(n(t))}}},e.isUsed=function(){return this.taps.length>0||this.interceptors.length>0},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){var e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));var n=0;"number"==typeof t.stage&&(n=t.stage);for(var r=this.taps.length;r>0;){r--;var i=this.taps[r];this.taps[r+1]=i;var o=i.stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(e.size>0)continue}if(n>=o){r++;break}}this.taps[r]=t},t}(),ya=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="";i+='"use strict";\n',i+=this.header(),i+="return new Promise((function(_resolve, _reject) {\n",n&&(i+="var _sync = true;\n",i+="function _error(_err) {\n",i+="if(_sync)\n",i+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",i+="else\n",i+="_reject(_err);\n",i+="};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map((function(t){return t.fn}))},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var e=this;if(this.options.interceptors.length>0){for(var n=t.onError,r=t.onResult,i=t.onDone,o="",a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.call&&(o+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.content(Object.assign(t,{onError:n&&function(t){for(var r="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].error&&(r+=e.getInterceptor(i)+".error("+t+");\n")}return r+=n(t)},onResult:r&&function(t){for(var n="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].result&&(n+=e.getInterceptor(i)+".result("+t+");\n")}return n+=r(t)},onDone:i&&function(){for(var t="",n=0;e.options.interceptors.length>n;n++){e.options.interceptors[n].done&&(t+=e.getInterceptor(n)+".done();\n")}return t+=i()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Ee(this.options.taps);!(t=e()).done;){if(t.value.context)return!0}return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,u=0;this.options.interceptors.length>u;u++){var c=this.options.interceptors[u];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(u)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var l=this.options.taps[t];switch(l.type){case"sync":o||(a+="var _hasError"+t+" = false;\n",a+="try {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",o||(a+="} catch(_err) {\n",a+="_hasError"+t+" = true;\n",a+=n("_err"),a+="}\n",a+="if(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h="";h+=r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n",h+="if(_err"+t+") {\n",h+=n("_err"+t),h+="} else {\n",r&&(h+=r("_result"+t)),i&&(h+=i()),h+="}\n",a+="_fn"+t+"("+this.args({before:l.context?"_context":void 0,after:h+="})"})+");\n";break;case"promise":a+="var _hasResult"+t+" = false;\n",a+="var _promise"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",a+="if (!_promise"+t+" || !_promise"+t+".then)\n",a+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n",a+="_promise"+t+".then((function(_result"+t+") {\n",a+="_hasResult"+t+" = true;\n",r&&(a+=r("_result"+t)),i&&(a+=i()),a+="}), function(_err"+t+") {\n",a+="if(_hasResult"+t+") throw _err"+t+";\n",a+=n("_err"+t),a+="});\n"}return a},e.callTapsSeries=function(t){var e=this,n=t.onError,r=t.onResult,i=t.resultReturns,o=t.onDone,a=t.doneReturns,s=t.rethrowIfPossible;if(0===this.options.taps.length)return o();for(var u=this.options.taps.findIndex((function(t){return"sync"!==t.type})),c=i||a,l="",h=o,f=0,d=function(t){var i=t;h!==o&&("sync"!==e.options.taps[i].type||f++>20)&&(f=0,l+="function _next"+i+"() {\n",l+=h(),l+="}\n",h=function(){return(c?"return ":"")+"_next"+i+"();\n"});var a=h,d=function(t){return t?"":o()},p=e.callTap(i,{onError:function(t){return n(i,t,a,d)},onResult:r&&function(t){return r(i,t,a,d)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return p}},p=this.options.taps.length-1;p>=0;p--)d(p);return l+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,r=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var i=this.options.taps.every((function(t){return"sync"===t.type})),o="";i||(o+="var _looper = (function() {\n",o+="var _loopAsync = false;\n"),o+="var _loop;\n",o+="do {\n",o+="_loop = false;\n";for(var a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.loop&&(o+=this.getInterceptor(a)+".loop("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var o="";return o+="if("+e+" !== undefined) {\n",o+="_loop = true;\n",i||(o+="if(_loopAsync) _looper();\n"),o+=r(!0),o+="} else {\n",o+=n(),o+="}\n"},onDone:n&&function(){var t="";return t+="if(!_loop) {\n",t+=n(),t+="}\n"},rethrowIfPossible:r&&i}),o+="} while(_loop);\n",i||(o+="_loopAsync = true;\n",o+="});\n",o+="_looper();\n"),o},e.callTapsParallel=function(t){var e=this,n=t.onError,r=t.onResult,i=t.onDone,o=t.rethrowIfPossible,a=t.onTap,s=void 0===a?function(t,e){return e()}:a;if(1>=this.options.taps.length)return this.callTapsSeries({onError:n,onResult:r,onDone:i,rethrowIfPossible:o});var u="";u+="do {\n",u+="var _counter = "+this.options.taps.length+";\n",i&&(u+="var _done = (function() {\n",u+=i(),u+="});\n");for(var c=function(t){var a=function(){return i?"if(--_counter === 0) _done();\n":"--_counter;"},c=function(t){return t||!i?"_counter = 0;\n":"_counter = 0;\n_done();\n"};u+="if(_counter <= 0) break;\n",u+=s(t,(function(){return e.callTap(t,{onError:function(e){var r="";return r+="if(_counter > 0) {\n",r+=n(t,e,a,c),r+="}\n"},onResult:r&&function(e){var n="";return n+="if(_counter > 0) {\n",n+=r(t,e,a,c),n+="}\n"},onDone:!r&&function(){return a()},rethrowIfPossible:o})}),a,c)},l=0;this.options.taps.length>l;l++)c(l);return u+="} while(false);\n"},e.args=function(t){var e=void 0===t?{}:t,n=e.before,r=e.after,i=this._args;return n&&(i=[n].concat(i)),r&&(i=i.concat(r)),0===i.length?"":i.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),ga=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsParallel({onError:function(t,n,r,i){return e(n)+i(!0)},onDone:t.onDone})},e}(ya),ma=new ga,Ta=function(t){return ma.setup(this,t),ma.create(t)},ba=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=Ta,r._call=void 0,r.call=void 0,r}return ye(e,t),e}(va),Ea=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e,r,i){return n(e)+i(!0)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])}})},e}(ya),Sa=new Ea,xa=function(t){return Sa.setup(this,t),Sa.create(t)},wa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=xa,r._call=void 0,r.call=void 0,r}return ye(e,t),e}(va),Pa=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsSeries({onError:function(t,n){return e(n)},onDone:t.onDone,rethrowIfPossible:t.rethrowIfPossible})},e}(ya),Na=new Pa,ka=function(){throw new Error("tapAsync is not supported on a SyncHook")},Ca=function(){throw new Error("tapPromise is not supported on a SyncHook")},Ma=function(t){return Na.setup(this,t),Na.create(t)},_a=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=ka,r.tapPromise=Ca,r.compile=Ma,r}return ye(e,t),e}(va),Aa=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])},doneReturns:t.resultReturns,rethrowIfPossible:t.rethrowIfPossible})},e}(ya),Oa=new Aa,Ia=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},Ra=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},La=function(t){return Oa.setup(this,t),Oa.create(t)},Da=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=Ia,r.tapPromise=Ra,r.compile=La,r}return ye(e,t),e}(_a),Fa=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Ba(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Re(e)&&e+"px"||"16px",s=Jo(n)?n.split(","):[n],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>Fa.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}var Ua,ja=t.Syringe.defineToken(""),Va=t.Syringe.defineToken(""),Ga=function(){function t(t,e){this.center=Dn(),this.halfExtents=Dn(),this.min=Dn(),this.max=Dn(),this.update(t,e)}t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var e=t.prototype;return e.update=function(t,e){t&&jn(this.center,t),e&&jn(this.halfExtents,e||Un(0,0,0)),this.min=tr(this.min,this.center,this.halfExtents),this.max=Gn(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Gn(this.center,e,t),Wn(this.center,this.center,.5),tr(this.halfExtents,e,t),Wn(this.halfExtents,this.halfExtents,.5),jn(this.min,t),jn(this.max,e)},e.getMin=function(){return this.min},e.getMax=function(){return this.max},e.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,d=i+u,p=o-c,v=o+c,y=e.center,g=y[0],m=y[1],T=y[2],b=e.halfExtents,E=b[0],S=b[1],x=b[2],w=g-E,P=g+E,N=m-S,k=m+S,C=T-x,M=T+x;l>w&&(l=w),P>h&&(h=P),f>N&&(f=N),k>d&&(d=k),p>C&&(p=C),M>v&&(v=M),n[0]=.5*(l+h),n[1]=.5*(f+d),n[2]=.5*(p+v),a[0]=.5*(h-l),a[1]=.5*(d-f),a[2]=.5*(v-p),this.min[0]=l,this.min[1]=f,this.min[2]=p,this.max[0]=h,this.max[1]=d,this.max[2]=v}},e.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],s=e[4],u=e[8],c=e[1],l=e[5],h=e[9],f=e[2],d=e[6],p=e[10],v=Math.abs(a),y=Math.abs(s),g=Math.abs(u),m=Math.abs(c),T=Math.abs(l),b=Math.abs(h),E=Math.abs(f),S=Math.abs(d),x=Math.abs(p);Vn(n,e[12]+a*i[0]+s*i[1]+u*i[2],e[13]+c*i[0]+l*i[1]+h*i[2],e[14]+f*i[0]+d*i[1]+p*i[2]),Vn(r,v*o[0]+y*o[1]+g*o[2],m*o[0]+T*o[1]+b*o[2],E*o[0]+S*o[1]+x*o[2]),this.min=tr(this.min,n,r),this.max=Gn(this.max,n,r)},e.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return!(n[0]>r[0]||i[0]>e[0]||n[1]>r[1]||i[1]>e[1]||n[2]>r[2]||i[2]>e[2])},e.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o=new t,a=(n=Dn(),r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),s=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}(Dn(),this.getMax(),e.getMax());return o.setMinMax(a,s),o},e.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(e[0]>t[0]||t[0]>n[0]||e[1]>t[1]||t[1]>n[1]||e[2]>t[2]||t[2]>n[2])},e.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?jn(Dn(),this.min):272===t.pnVertexFlag?Un(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?Un(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?Un(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?Un(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?Un(this.max[0],this.min[1],this.max[2]):Un(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?jn(Dn(),this.max):272===t.pnVertexFlag?Un(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?Un(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?Un(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?Un(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?Un(this.min[0],this.max[1],this.min[2]):Un(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),Ha=Dn(),za=function(){function t(t,e){this.center=void 0,this.radius=void 0,this.center=t||Dn(),this.radius=e||.5}var e=t.prototype;return e.containsPoint=function(t){return tr(Ha,t,this.center),Bn(Ha)<this.radius*this.radius},e.intersects=function(t){tr(Ha,t.center,this.center);var e=t.radius+this.radius;return Bn(Ha)<=e*e},t}(),Wa=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Un(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},e.distanceToPoint=function(t){return Xn(t,this.normal)-this.distance},e.normalize=function(){var t=1/rr(this.normal);Wn(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&1>=i;return o&&n&&Zn(n,t,e,i),o},t}();(Ua=t.Mask||(t.Mask={}))[Ua.OUTSIDE=4294967295]="OUTSIDE",Ua[Ua.INSIDE=0]="INSIDE",Ua[Ua.INDETERMINATE=2147483647]="INDETERMINATE";var Ya=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new Wa)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];Vn(this.planes[0].normal,i-e,u-o,f-c),this.planes[0].distance=y-d,Vn(this.planes[1].normal,i+e,u+o,f+c),this.planes[1].distance=y+d,Vn(this.planes[2].normal,i+n,u+a,f+l),this.planes[2].distance=y+p,Vn(this.planes[3].normal,i-n,u-a,f-l),this.planes[3].distance=y-p,Vn(this.planes[4].normal,i-r,u-s,f-h),this.planes[4].distance=y-v,Vn(this.planes[5].normal,i+r,u+s,f+h),this.planes[5].distance=y+v,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),qa=Dn(),Xa=Dn(),Ka=Dn(),Za=Dn(),Ja=Dn(),Qa=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||Dn(),this.direction=e||Un(0,0,-1)}var e=t.prototype;return e.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},e.intersectsSphere=function(t,e){var n=tr(qa,this.origin,t.center);qn(Xa,jn(Xa,this.direction));var r=Xn(n,Xa),i=Xn(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(0>o)return!1;var a=Math.abs(-r-Math.sqrt(o));return e&&(jn(e,this.direction),Yn(e,this.origin,e,a)),!0},e.intersectsPlane=function(t,e){var n=(t.distance-Xn(t.normal,this.origin))/Xn(t.normal,this.direction),r=n>=0;return r&&e&&Yn(e,this.origin,this.direction,n),r},e.intersectsAABBWithoutIntersection=function(t){var e=qa,n=Xa,r=Ka,i=Za,o=Ja,a=this.direction;return tr(e,this.origin,t.center),Vn(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),er(r,e,a),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(Vn(o,Math.abs(a[0]),Math.abs(a[1]),Math.abs(a[2])),Kn(n,a,e),Vn(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},e.intersectAABBWithIntersection=function(t,e){var n=jn(Dn(),t.getMin());tr(n,n,this.origin);var r=jn(Dn(),t.getMax());tr(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=0>n[0]?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=0>r[0]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=0>n[1]?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=0>r[1]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=0>n[2]?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=0>r[2]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=Vn(Ka,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),a=Vn(Za,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(a[0],a[1]),a[2]),u=Math.max(Math.max(o[0],o[1]),o[2]),c=s>=u&&u>=0;return c&&(jn(e,this.direction),Yn(e,this.origin,e,u)),c},t}(),$a=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),ts=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),es=t.Syringe.defineToken(""),ns=t.Syringe.defineToken(""),rs=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:t.PropertySyntax.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:t.PropertySyntax.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.FILTER},{name:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:t.PropertySyntax.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:t.PropertySyntax.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:t.PropertySyntax.NUMBER,defaultValue:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0},{name:"markerStart",syntax:t.PropertySyntax.MARKER},{name:"markerEnd",syntax:t.PropertySyntax.MARKER},{name:"markerMid",syntax:t.PropertySyntax.MARKER},{name:"markerStartOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"},{name:"markerEndOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"}],is={},os={},as={},ss=fi((function(t){return t.sort((function(t,e){return as[t]-as[e]}))})),us=Dn(),cs=Dn(),ls=Dn(),hs=new Ce("unset"),fs=new Ce("initial"),ds=new Ce("inherit"),ps=new sn(0,0,0,0,!0),vs=new sn(0,0,0,0),ys=fi((function(t,e,n,r){return new sn(t,e,n,r)}),(function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"})),gs={"":hs,unset:hs,initial:fs,inherit:ds},ms=function(t){return gs[t]||(gs[t]=new Ce(t)),gs[t]};t.DefaultStyleValueRegistry=function(){function e(){this.propertySyntaxFactory=void 0,this.geometryUpdaterFactory=void 0}var n=e.prototype;return n.init=function(){var t=this;rs.forEach((function(e){t.registerMetadata(e)}))},n.registerMetadata=function(t){[t.name].concat(t.alias||[]).forEach((function(e){is[e]=t,as[e]=t.parsePriority||0}))},n.unregisterMetadata=function(t){delete is[t]},n.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},n.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]});var i=n.skipUpdateAttribute,o=n.skipParse,a=n.usedAttributes,s=n.forceUpdateGeometry,u=Object.keys(e);u.forEach((function(n){var r,o=aa(n,e[n]),a=o[0];i||(t.attributes[a]=o[1]),!s&&(null===(r=is[a])||void 0===r?void 0:r.layoutDependent)&&(s=!0)})),o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)})),(u=ss((null==a?void 0:a.length)?Array.from(new Set(u.concat(a))):u)).forEach((function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t))})),s&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),t.children.length&&u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))}))},n.parseProperty=function(t,e,n){var r=is[t],i=e;if((""===e||Ie(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=ms(e);else if(r){var o=r.keywords,a=r.syntax,s=a&&this.getPropertySyntax(a);o&&o.indexOf(e)>-1?i=ms(e):s&&s.parser&&(i=s.parser(e,n))}return i},n.computeProperty=function(t,e,n){var r=is[t],i=e;if(r){var o=r.syntax,a=r.defaultValue;if(e instanceof Ce){var s=e.value;if("unset"===s&&(s=r.inherited&&!("g-root"===n.id)?"inherit":"initial"),"initial"===s)Ie(a)||(e=this.parseProperty(t,Le(a)?a(n.nodeName):a,n));else if("inherit"===s){var u=this.tryToResolveProperty(n,t,{inherited:!0});return Ie(u)?void this.addUnresolveProperty(n,t):u}}var c=o&&this.getPropertySyntax(o);if(c&&c.calculator)i=c.calculator(t,n.parsedStyle[t],e,n,this);else i=e instanceof Ce?e.value:e}return i},n.postProcessProperty=function(t,e){var n=is[t];if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.isPropertyResolved=function(t,e){return!os[t.entity]||0===os[t.entity].length||os[t.entity].includes(e)},n.addUnresolveProperty=function(t,e){os[t.entity]||(os[t.entity]=[]),-1===os[t.entity].indexOf(e)&&os[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"===r||"initial"===r||"inherit"===r)return;return r}},n.recalc=function(t){var e=os[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete os[t.entity]}},n.updateGeometry=function(e){var n=this.geometryUpdaterFactory(e.nodeName);if(n){var r=e.geometry;r.contentBounds||(r.contentBounds=new Ga),r.renderBounds||(r.renderBounds=new Ga);var i=e.parsedStyle,o=n.update(i,e),a=o.width,s=o.height,u=o.depth,c=void 0===u?0:u,l=o.offsetX,h=void 0===l?0:l,f=o.offsetY,d=void 0===f?0:f,p=o.offsetZ,v=void 0===p?0:p,y=0>a,g=0>s,m=Vn(us,Math.abs(a)/2,Math.abs(s)/2,c/2),T=i.stroke,b=i.lineWidth,E=i.increasedLineWidthForHitTesting,S=i.shadowType,x=i.shadowColor,w=i.filter,P=void 0===w?[]:w,N=i.transformOrigin,k=i.anchor;e.nodeName===t.Shape.TEXT&&delete i.anchor;var C=Vn(cs,(1-2*(k&&k[0]||0))*a/2+h,(1-2*(k&&k[1]||0))*s/2+d,(1-2*(k&&k[2]||0))*m[2]+v);r.contentBounds.update(C,m);var M=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(T&&!T.isNone){var _=((b||0)+(E||0))*M;Gn(m,m,Vn(ls,_,_,0))}if(r.renderBounds.update(C,m),x&&S&&"inner"!==S){var A=r.renderBounds,O=A.min,I=A.max,R=i.shadowBlur||0,L=i.shadowOffsetX||0,D=i.shadowOffsetY||0,F=I[0]+R+L,B=O[1]-R+D,U=I[1]+R+D;O[0]=Math.min(O[0],O[0]-R+L),I[0]=Math.max(I[0],F),O[1]=Math.min(O[1],B),I[1]=Math.max(I[1],U),r.renderBounds.setMinMax(O,I)}P.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,Gn(r.renderBounds.halfExtents,r.renderBounds.halfExtents,Un(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=r.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,f=c[1]-s+a,d=l[1]+s+a;c[0]=Math.min(c[0],c[0]-s+o),l[0]=Math.max(l[0],h),c[1]=Math.min(c[1],f),l[1]=Math.max(l[1],d),r.renderBounds.setMinMax(c,l)}})),k=i.anchor;var j=(y?-1:1)*Bs(N[0],0,e),V=(g?-1:1)*Bs(N[1],1,e);e.setOrigin(j-=(y?-1:1)*(k&&k[0]||0)*r.contentBounds.halfExtents[0]*2,V-=(g?-1:1)*(k&&k[1]||0)*r.contentBounds.halfExtents[1]*2),Mh.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=is[t];return!!e&&e.inherited},e}(),Pr([lt(es),kr("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"propertySyntaxFactory",void 0),Pr([lt(ja),kr("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"geometryUpdaterFactory",void 0),Pr([Y.postConstruct(),kr("design:type",Function),kr("design:paramtypes",[]),kr("design:returntype",void 0)],t.DefaultStyleValueRegistry.prototype,"init",null),t.DefaultStyleValueRegistry=Pr([ct({token:ce})],t.DefaultStyleValueRegistry);var Ts=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,bs=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Es=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Ss=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var xs={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},ws=fi((function(t){return"angular"===t.type?Number(t.value):xs[t.value]||0})),Ps=fi((function(t){var e=.5,n=.5;if("position"===(null==t?void 0:t.type)){var r=t.value,i=r.x,o=r.y;"position-keyword"===(null==i?void 0:i.type)&&("left"===i.value?e=0:"center"===i.value?e=.5:"right"===i.value?e=1:"top"===i.value?n=0:"bottom"===i.value&&(n=1)),"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?e=0:"center"===o.value?n=.5:"right"===o.value?e=1:"top"===o.value?n=0:"bottom"===o.value&&(n=1)),"%"===(null==i?void 0:i.type)&&(e=Number(i.value)/100),"%"===(null==o?void 0:o.type)&&(n=Number(i.value)/100)}return{cx:e,cy:n}})),Ns=fi((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return jo(e).map((function(n){var r=n.type,i=n.orientation,o=n.colorStops;!function(t){var e,n,r=t.length;t[r-1].length=null!==(e=t[r-1].length)&&void 0!==e?e:{type:"%",value:"100"},r>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var i=0,o=Number(t[0].length.value),a=1;r>a;a++){var s,u=null===(s=t[a].length)||void 0===s?void 0:s.value;if(!Ie(u)&&!Ie(o)){for(var c=1;a-i>c;c++)t[i+c].length={type:"%",value:""+(o+(Number(u)-o)*c/(a-i))};i=a,o=Number(u)}}}(o);var a=o.map((function(t){return[Number(t.length.value)/100,Uo(t)]}));if("linear-gradient"===r)return new un(t.GradientType.LinearGradient,{angle:i?ws(i):0,steps:a,hash:e});if("radial-gradient"===r&&(i||(i=[{type:"shape",value:"circle"}]),"shape"===i[0].type&&"circle"===i[0].value)){var s=Ps(i[0].at);return new un(t.GradientType.RadialGradient,{cx:s.cx,cy:s.cy,steps:a,hash:e})}}));var n=e[0];if("("===e[1]||"("===e[2])if("l"===n){var r=Ts.exec(e);if(r){var i,o=(null===(i=r[2].match(Ss))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new un(t.GradientType.LinearGradient,{angle:parseFloat(r[1]),steps:o.map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:e})]}}else if("r"===n){var a=function(t){var e=bs.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(Ss))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[]).map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:t}}return null}(e);if(a){if(!Jo(a))return[new un(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=Es.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(e)}));function ks(t){return Fe(t)&&!!t.image}var Cs=fi((function(t){if(ks(t))return ve({repetition:"repeat"},t);if(Ie(t)&&(t=""),"transparent"===t)return vs;"currentColor"===t&&(t="black");var e=Ns(t);if(e)return e;var n=Ai(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),ys.apply(void 0,r)}));function Ms(t,e){if(t instanceof sn&&e instanceof sn)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(eo(e[n],0,255));return e[3]=eo(e[3],0,1),"rgba("+e.join(",")+")"}]}function _s(t,e){if(Ie(e))return new qe(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return new qe(Number(e),"px");if("deg".search(t)>=0)return new qe(Number(e),"deg")}var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new qe(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var As=fi((function(t){return _s(new RegExp("px","g"),t)})),Os=fi((function(t){return _s(new RegExp("%","g"),t)})),Is=fi((function(t){return Re(t)||isFinite(Number(t))?new qe(Number(t),"px"):_s(new RegExp("px|%|em|rem","g"),t)})),Rs=fi((function(t){return _s(new RegExp("deg|rad|grad|turn","g"),t)}));function Ls(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=qe.toCanonicalUnit(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=qe.unitTypeToString(t.unit)):(qe.isLength(t.unit)||qe.isLength(e.unit))&&(a=Bs(t,i,n),s=Bs(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Ds(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=oo(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=ao(Number(e.value))),n}function Fs(t){return Jo(t)?t.split(" ").map((function(t){return Is(t)})):t.map((function(t){return Is(t.toString())}))}function Bs(e,n,r){if(e.unit===t.UnitType.kPixels)return Number(e.value);if(e.unit===t.UnitType.kPercentage&&r){var i=r.nodeName===t.Shape.GROUP?r.getLocalBounds():r.getGeometryBounds(),o=0;return Ga.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}function Us(t){return t.toString()}var js=fi((function(t){return"number"==typeof t?new qe(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new qe(Number(t)):new qe(0)})),Vs=fi((function(t){return Jo(t)?t.split(" ").map(js):t.map(js)}));function Gs(t,e){return[t,e,Us]}function Hs(t,e){return function(n,r){return[n,r,function(n){return Us(eo(n,t,e))}]}}function zs(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}var Ws=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var e;try{e=zr(t)}catch(n){e=zr(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=ua(e),r=ca(e),i=r.polygons,o=r.polylines,a=Qr(e,!0),s=a[0],u=a[1],c=la(s),l=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var e=ai(t),n=e.min,r=n.x,i=n.y,o=e.max,a=o.x,s=o.y,u=a-r,c=s-i;return{length:e.length,width:u,height:c,x:r,y:i,x2:a,y2:s,cx:r+u/2,cy:i+c/2,cz:Math.max(u,c)+Math.min(u,c)/2}}(e),h=l.x,f=l.y,d=l.width,p=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:l.length,zCommandIndexes:u,rect:{x:Number.isFinite(h)?h:0,y:Number.isFinite(f)?f:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(p)?p:0}}},Ys=fi(Ws);function qs(t,e){var n=Jo(t)?Ys(t):Ws(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function Xs(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=ci(r,i));var a,s,u,c,l,h,f,d,p=si(o[0])!==si(o[1])?(s=(a=o[0]).slice(1).map((function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):a[0].slice(1).concat(t.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map((function(t){return["C"].concat(t.slice(2))})))):xr(o[0]);return[p,(u=o[1],c=p,l=u.length-1,h=[],f=0,d=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a=i+o;return 0===o||t[a]&&"M"===t[a][0]?["M"].concat(t[a].slice(-2)):(e>a||(a-=n),t[a])}))}))}(u),d.forEach((function(t,e){u.slice(1).forEach((function(t,n){f+=Xr(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=f,f=0})),d[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function Ks(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Zs(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}var Js={box:function(t,e,n,r){return Zs([t,n],[e,r])},length:function(t,e,n,r){return Ks(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return 0>a?Ks(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Ks(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([i-t,o-e],s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};var Qs=function(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var r=t[n],i=t[n+1];e+=Ks(r[0],r[1],i[0],i[1])}return e}(t)};function $s(t,e){var n;n=Jo(t)?t.split(" ").map((function(t){var e=t.split(","),n=e[1];return[Number(e[0]),Number(n)]})):t;var r,i,o=[],a=0,s=Qs(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Js.length(t[0],t[1],n[e+1][0],n[e+1][1]),r[1]=(a+=i)/s,o.push(r))}));var u=Math.min.apply(Math,n.map((function(t){return t[0]}))),c=Math.min.apply(Math,n.map((function(t){return t[1]})));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var tu=function(t){return _s(/deg|rad|grad|turn|px|%/g,t)},eu=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function nu(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,eu.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return tu(t)||Cs(t)}))}),n.lastIndex===t.length)return r}return[]}var ru=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var iu=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};var ou=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)};var au=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,E=r*u-i*s,S=r*c-o*s,x=i*c-o*u,w=l*v-h*p,P=l*y-f*p,N=l*g-d*p,k=h*y-f*v,C=h*g-d*v,M=f*g-d*y,_=m*M-T*C+b*k+E*N-S*P+x*w;if(!_)return null;return t[0]=(s*M-u*C+c*k)*(_=1/_),t[1]=(i*C-r*M-o*k)*_,t[2]=(v*x-y*S+g*E)*_,t[3]=(f*S-h*x-d*E)*_,t[4]=(u*N-a*M-c*P)*_,t[5]=(n*M-i*N+o*P)*_,t[6]=(y*b-p*x-g*T)*_,t[7]=(l*x-f*b+d*T)*_,t[8]=(a*C-s*N+c*w)*_,t[9]=(r*N-n*C-o*w)*_,t[10]=(p*S-v*b+g*m)*_,t[11]=(h*b-l*S-d*m)*_,t[12]=(s*P-a*k-u*w)*_,t[13]=(n*k-r*P+i*w)*_,t[14]=(v*T-p*E-y*m)*_,t[15]=(l*E-h*T+f*m)*_,t};var su=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t};var uu=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t};var cu={length:function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},normalize:uu,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}},lu=ru(),hu=ru(),fu=[0,0,0,0],du=[[0,0,0],[0,0,0],[0,0,0]],pu=[0,0,0];function vu(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var yu,gu,mu,Tu,bu=t.Syringe.defineToken(""),Eu=t.Syringe.defineToken(""),Su=0;t.LayoutContext=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+Su++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),t.LayoutContext=Pr([ct(),Nr(0,lt(Eu)),kr("design:paramtypes",[Object])],t.LayoutContext),(yu=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",yu.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(gu||(gu={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(mu||(mu={})),(Tu=t.PropertyName||(t.PropertyName={})).LAYOUT="display",Tu.LEFT="left",Tu.TOP="top",Tu.BOTTOM="bottom",Tu.RIGHT="right",Tu.WIDTH="width",Tu.HEIGHT="height",Tu.MIN_WIDTH="minWidth",Tu.MAX_WIDTH="maxWidth",Tu.MIN_HEIGHT="minHeight",Tu.MAX_HEIGHT="maxHeight",Tu.BOX_SIZING="boxSizing",Tu.PADDING="padding",Tu.PADDING_TOP="paddingTop",Tu.PADDING_BOTTOM="paddingBottom",Tu.PADDING_START="paddingLeft",Tu.PADDING_END="paddingRight",Tu.MARGIN="margin",Tu.MARGIN_TOP="marginTop",Tu.MARGIN_BOTTOM="marginBottom",Tu.MARGIN_START="marginLeft",Tu.MARGIN_END="marginRight",Tu.BORDER="border",Tu.BORDER_TOP="borderTop",Tu.BORDER_BOTTOM="borderBottom",Tu.BORDER_START="borderLeft",Tu.BORDER_END="borderRight",Tu.FLEX_DIRECTION="flexDirection",Tu.FLEX_WRAP="flexWrap",Tu.FLEX_FLOW="flexFlow",Tu.ALIGN_ITEMS="alignItems",Tu.ALIGN_CONTENT="alignContent",Tu.JUSTIFY_CONTENT="justifyContent",Tu.FLEX="flex",Tu.ALIGN_SELF="alignSelf",Tu.FLEX_SHRINK="flexShrink",Tu.FLEX_BASIS="flexBasis",Tu.FLEX_GROW="flexGrow",Tu.OFFSET_WIDTH="offsetWidth",Tu.OFFSET_HEIGHT="offsetHeight",Tu.ORDER="order";var xu=1,wu=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=xu++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var n=e.prototype;return n.setMeasure=function(t){this.measureFn=t},n.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},n.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},n.insertChild=function(t,e){this.children.splice(t,0,e)},n.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},n.removeChildAtIndex=function(t){this.children.splice(t,1)},n.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},n.setStyle=function(t,e){this.style.set(t,e)},n.getStyle=function(){for(var t=this,e=new Map,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return r.forEach((function(n){var r=t.style.get(n);r&&e.set(n,r)})),e},n.getAllStyle=function(){return this.style},n.markDirty=function(){this.dirty=!0},n.idDirty=function(){return this.dirty},n.getSize=function(){var e,n,r,i;return{width:null!==(e=null===(n=this.style.get(t.PropertyName.WIDTH))||void 0===n?void 0:n.value)&&void 0!==e?e:0,height:null!==(r=null===(i=this.style.get(t.PropertyName.HEIGHT))||void 0===i?void 0:i.value)&&void 0!==r?r:0}},n.computeLayout=function(){var t=fe(le().mark((function t(){var e;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Ah.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.setComputedLayout=function(t){this.computedLayout=t},n.getComputedLayout=function(){return this.computedLayout},n.getAllComputedLayout=function(){},n.toString=function(){return"LayoutObject "+this.id},pe(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),Pu=t.Syringe.defineToken(""),Nu=t.Syringe.defineToken(""),ku=t.Syringe.defineToken("");t.FragmentResult=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},t.FragmentResult=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(ku)),Nr(2,lt(Nu)),kr("design:paramtypes",[t.LayoutContext,wu,Object])],t.FragmentResult);var Cu=t.Syringe.defineToken(""),Mu=t.Syringe.defineToken("");t.LayoutChildren=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var n=e.prototype;return n.intrinsicSizes=function(){var e=new Io;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},n.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var n=new Io;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(Mu)),kr("design:paramtypes",[t.LayoutContext,Object])],t.LayoutChildren);var _u=function(){};_u.inputProperties=void 0,_u.childrenInputProperties=void 0,_u.layoutOptions=void 0;var Au,Ou,Iu=t.Syringe.defineToken(""),Ru=t.Syringe.defineToken(""),Lu=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,y,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),T=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,b=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,E=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,S=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,x=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,w=null!==(f=null===(d=m.get(t.PropertyName.PADDING_END))||void 0===d?void 0:d.value)&&void 0!==f?f:0,P=null!==(p=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==p?p:0,N=null!==(y=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==y?y:0;this.blockStart=T+Lu[0]+x,this.inlineStart=b+Lu[1]+w,this.blockEnd=E+Lu[2]+P,this.inlineEnd=S+Lu[3]+N,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=Pr([ut(),Nr(0,lt(Ru)),kr("design:paramtypes",[Object])],t.LayoutEdges),t.LayoutRegistry=((Au=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw new Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(Ou.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},pe(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],Ou=Au),t.LayoutRegistry=Ou=Pr([ct()],t.LayoutRegistry);var Du=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))};t.LayoutEngine=function(){function e(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var n=e.prototype;return n.computeLayout=function(){var t=fe(le().mark((function t(e,n){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.determineAllIntrinsicSizes=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),n.getLayoutDefinitionName=function(e){var n=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!n)throw new Error("layout property not found");return n.value},n.determineIntrinsicSizes=function(){var t=fe(le().mark((function t(e,n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.invokeIntrinsicSizesCallback=function(){var e=fe(le().mark((function e(n,r,i){var o,a,s,u,c,l,h,f,d,p,v;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.layoutRegistry.getLayout(n),a=new o,s=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(u=o.inputProperties)?[]:u,l=[],i.forEach((function(t){var e=s.layoutChildrenFactory({node:t});l.push(e)})),h=this.layoutEdgesFactory({node:r}),f=r.getStyle.apply(r,c),d=a.intrinsicSizes(l,h,f),(p=this.runWorkQueue(d,s.workQueue)).next(),e.next=13,Du();case 13:v=p.next().value,s.clearWorkQueue(),r.setIntrisicSizes(v);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=fe(le().mark((function t(e,n,r){var i;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.invokeLayoutCallback=function(){var e=fe(le().mark((function e(n,r,i,o){var a,s,u,c,l,h,f,d,p,v,y,g,m;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layoutRegistry.getLayout(n),s=new a,u=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),l=void 0===(c=a.inputProperties)?[]:c,h=[],i.forEach((function(t){var e=u.layoutChildrenFactory({node:t});h.push(e)})),f=this.layoutEdgesFactory({node:r}),d=r.getStyle.apply(r,l),p=s.layout(h,f,o,d),(v=this.runWorkQueue(p,u.workQueue)).next(),e.next=13,Du();case 13:y=v.next().value,u.clearWorkQueue(),g=y instanceof t.FragmentResult?y:u.fragmentResultFactory(y),m=u.layoutFragmentFactory({inlineSize:g.inlineSize,blockSize:g.blockSize,data:g.data}),r.setComputedLayout(m),i.forEach((function(t,e){t.setComputedLayout(g.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.runWorkQueue=le().mark((function e(n,r){var i,o=this;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Oo(n),r.length>0&&i.isPending()&&r.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(o.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var n=e.layoutChild,r=e.deferred,i=n.layoutContext,a=o.getNodeFragment(n.node,e.layoutConstraints);r.resolve(i.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(i.isFulfilled()){e.next=6;break}throw new Error("promise not fullfilled!");case 6:return e.abrupt("return",i.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),n.getNodeIntrisicSizes=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p=e.getAllStyle();return{minContentInlineSize:(null===(n=p.get(t.PropertyName.MIN_WIDTH))||void 0===n?void 0:n.value)||(null===(r=e.intrisicSizes)||void 0===r?void 0:r.minContentInlineSize)||(null===(i=p.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=p.get(t.PropertyName.MAX_WIDTH))||void 0===o?void 0:o.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(s=p.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=p.get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(c=e.intrisicSizes)||void 0===c?void 0:c.minContentBlockSize)||(null===(l=p.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=p.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(f=e.intrisicSizes)||void 0===f?void 0:f.maxContentBlockSize)||(null===(d=p.get(t.PropertyName.HEIGHT))||void 0===d?void 0:d.value)||0}},n.getNodeFragment=function(e,n){var r,i,o,a,s,u;return{inlineSize:(null===(r=e.getComputedLayout())||void 0===r?void 0:r.inlineSize)||(null===(i=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===i?void 0:i.value)||(null===(o=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(s=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===u?void 0:u.value)||0,data:n.data}},e}(),t.LayoutEngine=Pr([ct(),Nr(0,lt(t.LayoutRegistry)),Nr(1,lt(bu)),Nr(2,lt(Iu)),kr("design:paramtypes",[t.LayoutRegistry,Function,Function])],t.LayoutEngine);var Fu=t.Syringe.defineToken(""),Bu=t.Syringe.defineToken("");t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutFragment=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(Bu)),kr("design:paramtypes",[t.LayoutContext,Object])],t.LayoutFragment);var Uu={number:function(t){return new qe(t)},percent:function(t){return new qe(t,"%")},px:function(t){return new qe(t,"px")},em:function(t){return new qe(t,"em")},rem:function(t){return new qe(t,"rem")},deg:function(t){return new qe(t,"deg")},grad:function(t){return new qe(t,"grad")},rad:function(t){return new qe(t,"rad")},turn:function(t){return new qe(t,"turn")},s:function(t){return new qe(t,"s")},ms:function(t){return new qe(t,"ms")},registerProperty:function(t){_h.registerMetadata({name:t.name,inherited:t.inherits,interpolable:t.interpolable,defaultValue:t.initialValue,syntax:t.syntax})},registerLayout:function(e,n){Ft.get(t.LayoutRegistry).registerLayout(e,n)}},ju=null;function Vu(t){return function(e){var n=0;return t.map((function(t){return t===ju?e[n++]:t}))}}function Gu(t){return t}var Hu={matrix:["NNNNNN",[ju,ju,0,0,ju,ju,0,0,0,0,1,0,ju,ju,0,1],Gu],matrix3d:["NNNNNNNNNNNNNNNN",Gu],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Vu([ju,ju,Uu.number(1)]),Gu],scalex:["N",Vu([ju,Uu.number(1),Uu.number(1)]),Vu([ju,Uu.number(1)])],scaley:["N",Vu([Uu.number(1),ju,Uu.number(1)]),Vu([Uu.number(1),ju])],scalez:["N",Vu([Uu.number(1),Uu.number(1),ju])],scale3d:["NNN",Gu],skew:["Aa",null,Gu],skewx:["A",null,Vu([ju,an])],skewy:["A",null,Vu([an,ju])],translate:["Tt",Vu([ju,ju,on]),Gu],translatex:["T",Vu([ju,on,on]),Vu([ju,on])],translatey:["T",Vu([on,ju,on]),Vu([on,ju])],translatez:["L",Vu([on,on,ju])],translate3d:["TTL",Gu]};function zu(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=Hu[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(s.length>u.length)return[];for(var c=[],l=0;u.length>l;l++){var h=s[l],f=u[l],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?an:Rs(t)},N:js,T:Is,L:As}[f.toUpperCase()](h):{a:an,n:c[0],t:on}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Wu(t){var e,n,r,i;switch(t.t){case"rotatex":return i=io(Ds(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=io(Ds(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=io(Ds(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=io(Ds(t.d[3]));var o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var s=Math.sin(i/2),u=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(e*n*c+r*u),2*(e*r*c-n*u),0,2*(e*n*c-r*u),1-2*(e*e+r*r)*c,2*(n*r*c+e*u),0,2*(e*r*c+n*u),2*(n*r*c-e*u),1-2*(e*e+n*n)*c,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var l=io(Ds(t.d[0])),h=io(Ds(t.d[1]));return[1,Math.tan(h),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=io(Ds(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=io(Ds(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Bs(t.d[0],0,null)||0,n=Bs(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Bs(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Bs(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Bs(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Bs(t.d[0],0,null)||0,n=Bs(t.d[1],0,null)||0,r=Bs(t.d[2],0,null)||0,1];case"perspective":var f=Bs(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map((function(t){return t.value}))}}function Yu(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function qu(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(e||(e=[0,0,0]),n||(n=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0,1]),o||(o=[0,0,0,1]),!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;16>i;i++)t[i]=e[i]*r;return!0}(lu,t))return!1;if(iu(hu),hu[3]=0,hu[7]=0,hu[11]=0,hu[15]=1,Math.abs(1e-8>ou(hu)))return!1;var a,s,u,c,l,h,f,d=lu[3],p=lu[7],v=lu[11],y=lu[12],g=lu[13],m=lu[14],T=lu[15];if(0!==d||0!==p||0!==v){if(fu[0]=d,fu[1]=p,fu[2]=v,fu[3]=T,!au(hu,hu))return!1;su(hu,hu),(a=i)[0]=(u=hu)[0]*(c=(s=fu)[0])+u[4]*(l=s[1])+u[8]*(h=s[2])+u[12]*(f=s[3]),a[1]=u[1]*c+u[5]*l+u[9]*h+u[13]*f,a[2]=u[2]*c+u[6]*l+u[10]*h+u[14]*f,a[3]=u[3]*c+u[7]*l+u[11]*h+u[15]*f}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=y,e[1]=g,e[2]=m,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(du,lu),n[0]=cu.length(du[0]),cu.normalize(du[0],du[0]),r[0]=cu.dot(du[0],du[1]),vu(du[1],du[1],du[0],1,-r[0]),n[1]=cu.length(du[1]),cu.normalize(du[1],du[1]),r[0]/=n[1],r[1]=cu.dot(du[0],du[2]),vu(du[2],du[2],du[0],1,-r[1]),r[2]=cu.dot(du[1],du[2]),vu(du[2],du[2],du[1],1,-r[2]),n[2]=cu.length(du[2]),cu.normalize(du[2],du[2]),r[1]/=n[2],r[2]/=n[2],cu.cross(pu,du[1],du[2]),0>cu.dot(du[0],pu))for(var b=0;3>b;b++)n[b]*=-1,du[b][0]*=-1,du[b][1]*=-1,du[b][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+du[0][0]-du[1][1]-du[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-du[0][0]+du[1][1]-du[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-du[0][0]-du[1][1]+du[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+du[0][0]+du[1][1]+du[2][2],0)),du[2][1]>du[1][2]&&(o[0]=-o[0]),du[0][2]>du[2][0]&&(o[1]=-o[1]),du[1][0]>du[0][1]&&(o[2]=-o[2])}(function(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Wu).reduce(Yu)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var Xu=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;4>r;r++)for(var i=0;4>i;i++)for(var o=0;4>o;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;4>s;s++)a[s][3]=o[s];for(var u=0;3>u;u++)for(var c=0;3>c;c++)a[3][u]+=e[c]*a[c][u];var l=i[0],h=i[1],f=i[2],d=i[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(h*h+f*f),p[0][1]=2*(l*h-f*d),p[0][2]=2*(l*f+h*d),p[1][0]=2*(l*h+f*d),p[1][1]=1-2*(l*l+f*f),p[1][2]=2*(h*f-l*d),p[2][0]=2*(l*f-h*d),p[2][1]=2*(h*f+l*d),p[2][2]=1-2*(l*l+h*h),a=t(a,p);var v,y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],a=t(a,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],a=t(a,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],a=t(a,y));for(var g=0;3>g;g++)for(var m=0;3>m;m++)a[g][m]*=n[g];return 0==(v=a)[0][2]&&0==v[0][3]&&0==v[1][2]&&0==v[1][3]&&0==v[2][0]&&0==v[2][1]&&1==v[2][2]&&0==v[2][3]&&0==v[3][2]&&1==v[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}}();function Ku(t){return t.toFixed(6).replace(".000000","")}function Zu(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=qu(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=qu(e)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;t.length>r;r++)n+=t[r]*e[r];return n}(t,e);r=eo(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),s=0;4>s;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(n[0][3],r[0][3],t[5]);return Xu(t[0],t[1],t[2],e,t[4]).map(Ku).join(",")}])}function Ju(t){return t.replace(/[xy]/,"")}function Qu(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function $u(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new qe(a):new qe(a,t.unit)}))})},o=0;t.length>o;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length){var h=Zu(t,e);u=[h[0]],c=[h[1]],l=[["matrix",[h[2]]]]}else for(var f=0;t.length>f;f++){var d=t[f].t,p=e[f].t,v=t[f].d,y=e[f].d,g=Hu[d],m=Hu[p],T=void 0;if(s=p,"perspective"===(a=d)&&"perspective"===s||!("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){var b=Zu([t[f]],[e[f]]);u.push(b[0]),c.push(b[1]),l.push(["matrix",[b[2]]])}else{if(d===p)T=d;else if(g[2]&&m[2]&&Ju(d)===Ju(p))T=Ju(d),v=g[2](v),y=m[2](y);else{if(!g[1]||!m[1]||Qu(d)!==Qu(p)){var E=Zu(t,e);u=[E[0]],c=[E[1]],l=[["matrix",[E[2]]]];break}T=Qu(d),v=g[1](v),y=m[1](y)}for(var S=[],x=[],w=[],P=0;v.length>P;P++){var N=Ls(v[P],y[P],n,!1,P);S[P]=N[0],x[P]=N[1],w.push(N[2])}u.push(S),c.push(x),l.push([T,w])}}if(r){var k=u;u=c,c=k}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"})).join(" ")}]}var tc,ec=fi((function(t){if(Jo(t)){if("text-anchor"===t)return[new qe(0,"px"),new qe(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Is(nc(e[0])),Is(nc(e[1]))]}return[new qe(t[0]||0,"px"),new qe(t[1]||0,"px")]}));function nc(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}t.CSSPropertyAngle=function(){function t(){this.parser=Rs,this.mixer=Gs}return t.prototype.calculator=function(t,e,n,r){return Ds(n)},t}(),t.CSSPropertyAngle=Pr([ct({token:{token:ns,named:t.PropertySyntax.ANGLE}})],t.CSSPropertyAngle),(tc=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",tc.ATTR_MODIFIED="DOMAttrModified",tc.INSERTED="DOMNodeInserted",tc.CHILD_INSERTED="child-inserted",tc.REMOVED="removed",tc.CHILD_REMOVED="child-removed",tc.MOUNTED="DOMNodeInsertedIntoDocument",tc.UNMOUNTED="DOMNodeRemovedFromDocument",tc.BOUNDS_CHANGED="bounds-changed",tc.RENDER_ORDER_CHANGED="render-order-changed",tc.CULLED="culled";var rc,ic=n((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}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 t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,i=e.length,o=new Array(i);i>r;r++)o[r]=e[r].fn;return o},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,a),!0}for(c=1,u=new Array(h-1);h>c;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;d>c;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);h>f;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;l>u;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&a(this,e):(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,t.exports=s})),oc=function(){function t(e){this.type=void 0,this.eventPhase=t.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new $a,this.page=new $a,this.canvas=new $a,this.viewport=new $a,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}var e=t.prototype;return e.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},e.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.stopPropagation=function(){this.propagationStopped=!0},e.initEvent=function(){},e.initUIEvent=function(){},e.clone=function(){throw new Error("Method not implemented.")},pe(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),t}(),ac=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(Te(r),n),r}return ye(e,t),e}(oc),sc=function(){function t(){this.emitter=new ic.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r=De(n)&&n||Fe(n)&&n.capture,i=Fe(n)&&n.once,o=Le(e)?void 0:e,a=!1,s="";if(t.indexOf(":")>-1){var u=t.split(":");t=u[1],s=u[0],a=!0}if(t=r?t+"capture":t,e=Le(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];(null===(t=n[0].target)||void 0===t?void 0:t.name)===s&&c.apply(void 0,n)}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,i=De(n)&&n||Fe(n)&&n.capture,o=Le(e)?void 0:e;return t=i?t+"capture":t,e=Le(e)?e:null===(r=e)||void 0===r?void 0:r.handleEvent,this.emitter.off(t,e,o),this},e.emit=function(t,e){this.dispatchEvent(new ac(t,e))},e.dispatchEvent=function(t){if(!(t instanceof oc))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var n;e=null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView}if(e){var r;if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],t.target=this,null===(r=t.manager)||void 0===r||r.dispatchEvent(t)}return!t.defaultPrevented},t}(),uc=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}ye(n,e),n.isNode=function(t){return!!t.childNodes};var r=n.prototype;return r.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},r.hasChildNodes=function(){return this.childNodes.length>0},r.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},r.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},r.lookupPrefix=function(t){throw new Error("Method not implemented.")},r.normalize=function(){throw new Error("Method not implemented.")},r.isEqualNode=function(t){return this===t},r.isSameNode=function(t){return this.isEqualNode(t)},r.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof n))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=t,r=this,i=[e],o=[r];null!==(a=e.parentNode)&&void 0!==a?a:r.parentNode;){var a;e=e.parentNode?(i.push(e.parentNode),e.parentNode):e,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r}if(e!==r)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var s=i.length>o.length?i:o,u=s===i?o:i;if(s[s.length-u.length]===u[0])return s===i?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var d=h.parentNode.childNodes;return d.indexOf(h)<d.indexOf(f)?u===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:s===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING},r.contain=function(t){return this.contains(t)},r.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},r.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},r.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},pe(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=Ee(this.childNodes);!(n=r()).done;){var i=n.value;e+=i.nodeName===t.Shape.TEXT?i.nodeValue:i.textContent}return e},set:function(e){var n=this;this.childNodes.slice().forEach((function(t){n.removeChild(t,!0)})),this.nodeName===t.Shape.TEXT&&(this.style.text=""+e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}}]),n}(sc);uc.DOCUMENT_POSITION_DISCONNECTED=1,uc.DOCUMENT_POSITION_PRECEDING=2,uc.DOCUMENT_POSITION_FOLLOWING=4,uc.DOCUMENT_POSITION_CONTAINS=8,uc.DOCUMENT_POSITION_CONTAINED_BY=16,uc.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,(rc=t.Strategy||(t.Strategy={}))[rc.Standard=0]="Standard";var cc=function(){function e(){this.strategy=t.Strategy.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return e.prototype.isCulled=function(){return this.enable&&!this.visible},e}();cc.tag="c-cullable";var lc=function(){this.contentBounds=void 0,this.renderBounds=void 0};lc.tag="c-geometry";var hc=function(){this.aabb=void 0};hc.tag="c-rbush-node";var fc=t.Syringe.defineToken(""),dc=function(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1,this.proxyNodeName=void 0};dc.tag="c-renderable";var pc=function(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0};pc.tag="c-sortable";var vc=function(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=Un(0,0,0),this.localRotation=mr(0,0,0,1),this.localScale=Un(1,1,1),this.localTransform=fn(),this.localSkew=Sr(0,0),this.position=Un(0,0,0),this.rotation=mr(0,0,0,1),this.scaling=Un(1,1,1),this.worldTransform=fn(),this.origin=Un(0,0,0)};vc.tag="c-transform";var yc=function(t){function e(e,n,r,i,o,a,s,u){var c;return(c=t.call(this,null)||this).relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return ye(e,t),e}(oc);yc.ADDITION=2,yc.MODIFICATION=1,yc.REMOVAL=3;var gc,mc=0,Tc=new ac(t.ElementEvent.CHILD_INSERTED,{child:null}),bc=new yc(t.ElementEvent.INSERTED,null,"","","",0,"",""),Ec=new yc(t.ElementEvent.REMOVED,null,"","","",0,"",""),Sc=new ac(t.ElementEvent.DESTROY),xc=new ac(t.ElementEvent.CHILD_REMOVED,{child:null}),wc=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).entity=mc++,e.renderable=new dc,e.cullable=new cc,e.transformable=new vc,e.sortable=new pc,e.geometry=new lc,e.rBushNode=new hc,e.id=void 0,e.name=void 0,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={anchor:hs,opacity:hs,fillOpacity:hs,strokeOpacity:hs,fill:hs,stroke:hs,transform:hs,transformOrigin:hs,visibility:hs,pointerEvents:hs,lineWidth:hs,lineCap:hs,lineJoin:hs,increasedLineWidthForHitTesting:hs,fontSize:hs,fontFamily:hs,fontStyle:hs,fontWeight:hs,fontVariant:hs,textAlign:hs,textBaseline:hs,textTransform:hs,zIndex:hs,filter:hs,shadowType:hs},e.parsedStyle={},e.attributes={},e}ye(e,t),e.isElement=function(t){return!!t.getAttribute};var n=e.prototype;return n.cloneNode=function(t){throw new Error("Method not implemented.")},n.appendChild=function(t,e){return Mh.attach(t,this,e),Tc.detail.child=t,this.dispatchEvent(Tc),bc.relatedNode=this,t.dispatchEvent(bc),t},n.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},n.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},n.removeChild=function(t,e){return void 0===e&&(e=!0),Ec.relatedNode=this,t.dispatchEvent(Ec),e&&(t.dispatchEvent(Sc),t.destroyed=!0),xc.detail.child=t,this.dispatchEvent(xc),Mh.detach(t),e&&(t.emitter.removeAllListeners(),Oh.remove(t.entity)),t},n.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},n.matches=function(t){return Mh.matches(t,this)},n.getElementById=function(t){return Mh.querySelector("#"+t,this)},n.getElementsByName=function(t){return Mh.querySelectorAll('[name="'+t+'"]',this)},n.getElementsByClassName=function(t){return Mh.querySelectorAll("."+t,this)},n.getElementsByTagName=function(t){return Mh.querySelectorAll(t,this)},n.querySelector=function(t){return Mh.querySelector(t,this)},n.querySelectorAll=function(t){return Mh.querySelectorAll(t,this)},n.closest=function(t){var e=this;do{if(Mh.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},n.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},n.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},n.after=function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];r.forEach((function(n,r){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(n,e+r+1)}))}},n.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},n.replaceWith=function(){this.after.apply(this,arguments),this.remove()},n.append=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e){return t.appendChild(e)}))},n.prepend=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e,n){return t.appendChild(e,n)}))},n.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},n.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},n.destroy=function(){this.dispatchEvent(Sc),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},n.getGeometryBounds=function(){return Mh.getGeometryBounds(this)},n.getRenderBounds=function(){return Mh.getBounds(this,!0)},n.getBounds=function(){return Mh.getBounds(this)},n.getLocalBounds=function(){return Mh.getLocalBounds(this)},n.getBoundingClientRect=function(){return Mh.getBoundingClientRect(this)},n.getClientRects=function(){return[this.getBoundingClientRect()]},n.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},n.getAttributeNames=function(){return Object.keys(this.attributes)},n.getAttribute=function(t){var e=this.attributes[t];if(void 0===e){var n=aa(t.toString(),"");e=this.attributes[n[0]]}return Ie(e)?null:e},n.hasAttribute=function(t){return this.getAttributeNames().includes(t)},n.hasAttributes=function(){return!!this.getAttributeNames().length},n.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},n.setAttribute=function(t,e,n){this.attributes[t]=e},n.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.getAttributeNode=function(t){throw new Error("Method not implemented.")},n.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},n.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.removeAttributeNode=function(t){throw new Error("Method not implemented.")},n.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},n.setAttributeNode=function(t){throw new Error("Method not implemented.")},n.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},n.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},pe(e,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}}]),e}(uc),Pc=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.isCustomElement=!1,i.activeAnimations=[],i.config=n,i.config.interactive=null!==(r=i.config.capture)&&void 0!==r?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||t.Shape.GROUP,i.config.style=ve({},i.config.style,i.config.attrs),null!=i.config.visible&&(i.config.style.visibility=!1===i.config.visible?"hidden":"visible"),null!=i.config.interactive&&(i.config.style.pointerEvents=!1===i.config.interactive?"none":"auto"),Object.assign(i.parsedStyle,{anchor:[0,0],fill:ps,stroke:ps,transform:[],zIndex:0,filter:[],shadowType:"outer"},i.config.initialParsedStyle),Object.assign(i.attributes,{anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""}),i.initAttributes(i.config.style),i.style=new Proxy({setProperty:function(t,e){i.setAttribute(t,e)},getPropertyValue:function(t){return i.getAttribute(t)},removeProperty:function(t){i.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:i.getAttribute(e)},set:function(t,e,n){return i.setAttribute(e,n),!0}}),Oh.add(i.entity,Te(i)),i}ye(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),Oh.remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t,e){var r=ve({},this.attributes);for(var i in r){var o=r[i];o instanceof n&&(r[i]=o.cloneNode(t)),e&&(r[i]=e(i,o))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(e){if(!e.style.isMarker){var n=e.cloneNode(t);a.appendChild(n)}})),a},r.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;_h.processProperties(this,t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=aa(t,n),o=i[0],a=i[1];Oe(n)||(r||a!==this.attributes[o])&&(this.internalSetAttribute(o,a),e.prototype.setAttribute.call(this,o,a))},r.internalSetAttribute=function(e,n,r){var i,o=this;void 0===r&&(r={});var a=this.renderable,s=this.attributes[e],u=this.parsedStyle[e];_h.processProperties(this,((i={})[e]=n,i),r),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach((function(e){Mh.dirtifyToRoot(e),e.dispatchEvent(new yc(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",yc.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0;var c=this.parsedStyle[e];this.isConnected&&(gc||(gc=new yc(t.ElementEvent.ATTR_MODIFIED,null,null,null,null,yc.MODIFICATION,null,null)),gc.relatedNode=this,gc.prevValue=s,gc.newValue=n,gc.attrName=e,gc.prevParsedValue=u,gc.newParsedValue=c,this.dispatchEvent(gc)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n,u,c)},r.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],r=e[1],i=t.getMax();return new ts(n,r,i[0]-n,i[1]-r)},r.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Mh.setOrigin(this,ro(t,e,n)),this},r.getOrigin=function(){return Mh.getOrigin(this)},r.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Mh.setPosition(this,ro(t,e,n)),this},r.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Mh.setLocalPosition(this,ro(t,e,n)),this},r.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Mh.translate(this,ro(t,e,n)),this},r.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Mh.translateLocal(this,ro(t,e,n)),this},r.getPosition=function(){return Mh.getPosition(this)},r.getLocalPosition=function(){return Mh.getLocalPosition(this)},r.scale=function(t,e,n){return this.scaleLocal(t,e,n)},r.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ro(t,e=e||t,n=n||t)),Mh.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ro(t,e=e||t,n=n||t)),Mh.setLocalScale(this,t),this},r.getLocalScale=function(){return Mh.getLocalScale(this)},r.getScale=function(){return Mh.getScale(this)},r.getEulerAngles=function(){var t=so(Dn(),Mh.getWorldTransform(this));return oo(t[2])},r.getLocalEulerAngles=function(){var t=so(Dn(),Mh.getLocalRotation(this));return oo(t[2])},r.setEulerAngles=function(t){return Mh.setEulerAngles(this,0,0,t),this},r.setLocalEulerAngles=function(t){return Mh.setLocalEulerAngles(this,0,0,t),this},r.rotateLocal=function(t,e,n){return Ie(e)&&Ie(n)?Mh.rotateLocal(this,0,0,t):Mh.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return Ie(e)&&Ie(n)?Mh.rotate(this,0,0,t):Mh.rotate(this,t,e,n),this},r.setRotation=function(t,e,n,r){return Mh.setRotation(this,t,e,n,r),this},r.setLocalRotation=function(t,e,n,r){return Mh.setLocalRotation(this,t,e,n,r),this},r.setLocalSkew=function(t,e){return Mh.setLocalSkew(this,t,e),this},r.getRotation=function(){return Mh.getRotation(this)},r.getLocalRotation=function(){return Mh.getLocalRotation(this)},r.getLocalSkew=function(){return Mh.getLocalSkew(this)},r.getLocalTransform=function(){return Mh.getLocalTransform(this)},r.getWorldTransform=function(){return Mh.getWorldTransform(this)},r.setLocalTransform=function(t){return Mh.setLocalTransform(this,t),this},r.resetLocalTransform=function(){Mh.resetLocalTransform(this)},r.getAnimations=function(){return this.activeAnimations},r.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(i=null===(r=this.parsedStyle.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new wl(this,t,e)):null},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},r.isVisible=function(){var t;return"visible"===(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)},r.isInteractive=function(){var t;return"none"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)},r.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},r.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))+1),this},r.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))-1),this},r.getCount=function(){return this.childElementCount},r.getParent=function(){return this.parentElement},r.getChildren=function(){return this.children},r.getFirst=function(){return this.firstElementChild},r.getLast=function(){return this.lastElementChild},r.getChildByIndex=function(t){return this.children[t]||null},r.add=function(t,e){return this.appendChild(t,e)},r.setClip=function(t){this.style.clipPath=t},r.getClip=function(){return this.style.clipPath||null},r.set=function(t,e){this.config[t]=e},r.get=function(t){return this.config[t]},r.getConfig=function(){return this.config},r.attr=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?Fe(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},r.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.setZIndex=function(t){return this.style.zIndex=t,this},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=Pn(Dn(),e),r=n[0],i=n[1],o=Nn(Dn(),e),a=o[0],s=o[1],u=kn(ar(),e),c=so(Dn(),u);return uo(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=lo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setEulerAngles(e[4]).setPosition(n,r).setLocalScale(i,o)},r.setLocalMatrix=function(t){var e=lo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},pe(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(wc),Nc=["style"],kc=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=me(r,Nc);return(n=t.call(this,ve({style:ve({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return ye(e,t),e}(Pc),Cc=["style"],Mc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Cc);return e.call(this,ve({type:t.Shape.CIRCLE,style:ve({cx:"",cy:"",r:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return ye(n,e),n}(Pc),_c=["style"],Ac=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,_c);return e.call(this,ve({type:t.Shape.ELLIPSE,style:ve({cx:"",cy:"",rx:"",ry:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return ye(n,e),n}(Pc),Oc=["style"],Ic=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Oc);return e.call(this,ve({type:t.Shape.GROUP,style:ve({x:"",y:"",width:"",height:""},i)},o))||this}return ye(n,e),n}(Pc),Rc=["style"],Lc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Rc);return e.call(this,ve({type:t.Shape.IMAGE,style:ve({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return ye(n,e),n}(Pc),Dc=["style"],Fc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Dc);(r=e.call(this,ve({type:t.Shape.LINE,style:ve({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0;var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd;return u&&u instanceof Pc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),c&&c instanceof Pc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Pc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof Pc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},r.transformMarker=function(t){var e=this.parsedStyle,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.defX,s=e.defY,u=t?e.markerStart:e.markerEnd;if(u&&u instanceof Pc){var c,l,h,f,d,p,v;t?(f=n-a,d=i-s,l=r-n,h=o-i,p=e.markerStartOffset||0,v=this.markerStartAngle):(f=r-a,d=o-s,l=n-r,h=i-o,p=e.markerEndOffset||0,v=this.markerEndAngle),c=Math.atan2(h,l),u.setLocalEulerAngles(180*c/Math.PI+v),u.setLocalPosition(f+Math.cos(c)*p,d+Math.sin(c)*p)}},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=Js.pointAt(e.x1,e.y1,e.x2,e.y2,t),o=i.x,a=i.y,s=Jn(Dn(),Un(o-n,a-r,0),this.getLocalTransform());return new $a(s[0],s[1])},r.getTotalLength=function(){var t=this.parsedStyle;return Js.length(t.x1,t.y1,t.x2,t.y2)},n}(Pc),Bc=["style"],Uc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Bc);(r=e.call(this,ve({type:t.Shape.PATH,style:ve({path:"",miterLimit:""},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof Pc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof Pc&&r.placeMarkerMid(l),c&&c instanceof Pc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Pc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof Pc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.markerStartOffset,r=e.markerEndOffset,i=e.defX,o=e.defY,a=t?e.markerStart:e.markerEnd;if(a&&a instanceof Pc){var s,u,c,l,h,f,d;if(t){var p=this.getStartTangent(),v=p[0],y=p[1];l=y[0]-i,h=y[1]-o,u=v[0]-y[0],c=v[1]-y[1],f=n||0,d=this.markerStartAngle}else{var g=this.getEndTangent(),m=g[0],T=g[1];l=T[0]-i,h=T[1]-o,u=m[0]-T[0],c=m[1]-T[1],f=r||0,d=this.markerEndAngle}s=Math.atan2(c,u),a.setLocalEulerAngles(180*s/Math.PI+d),a.setLocalPosition(l+Math.cos(s)*f,h+Math.sin(s)*f)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),t&&t instanceof Pc)for(var o=1;n.length-1>o;o++){var a=n[o].currentPoint,s=a[0],u=a[1],c=1===o?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,u-i)}},r.getTotalLength=function(){return this.parsedStyle.path.totalLength},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.path,o=function(t,e){return ai(t,e).point}(i.absolutePath,t*i.totalLength),a=o.x,s=o.y,u=Jn(Dn(),Un(a-n,s-r,0),this.getLocalTransform());return new $a(u[0],u[1])},r.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},r.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},n}(Pc),jc=["style"],Vc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,jc);(r=e.call(this,ve({type:t.Shape.POLYGON,style:ve({points:"",miterLimit:"",isClosed:!0},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof Pc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof Pc&&r.placeMarkerMid(l),c&&c instanceof Pc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Pc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof Pc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Pc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY,o=t?e.markerStart:e.markerEnd;if(o&&o instanceof Pc){var a,s,u,c,l,h,f;if(c=n[0][0]-r,l=n[0][1]-i,t)s=n[1][0]-n[0][0],u=n[1][1]-n[0][1],h=e.markerStartOffset||0,f=this.markerStartAngle;else{var d=n.length;this.style.isClosed?(s=n[d-1][0]-n[0][0],u=n[d-1][1]-n[0][1]):(c=n[d-1][0]-r,l=n[d-1][1]-i,s=n[d-2][0]-n[d-1][0],u=n[d-2][1]-n[d-1][1]),h=e.markerEndOffset||0,f=this.markerEndAngle}a=Math.atan2(u,s),o.setLocalEulerAngles(180*a/Math.PI+f),o.setLocalPosition(c+Math.cos(a)*h,l+Math.sin(a)*h)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),this.markerMidList=[],t&&t instanceof Pc)for(var o=1;(this.style.isClosed?n.length:n.length-1)>o;o++){var a=n[o][0]-r,s=n[o][1]-i,u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(a,s)}},n}(Pc),Gc=["style"],Hc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Gc);return e.call(this,ve({type:t.Shape.POLYLINE,style:ve({points:"",miterLimit:"",isClosed:!1},i)},o))||this}ye(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.points,o=i.points,a=0,s=0;i.segments.forEach((function(e,n){e[0]>t||t>e[1]||(a=(t-e[0])/(e[1]-e[0]),s=n)}));var u=Js.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Jn(Dn(),Un(c-n,l-r,0),this.getLocalTransform());return new $a(h[0],h[1])},r.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},r.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},n}(Vc),zc=["style"],Wc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,zc);return e.call(this,ve({type:t.Shape.RECT,style:ve({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return ye(n,e),n}(Pc),Yc=["style"],qc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Yc);return e.call(this,ve({type:t.Shape.TEXT,style:ve({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}ye(n,e);var r=n.prototype;return r.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},r.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},n}(Pc),Xc=["style"],Kc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Xc);return(r=e.call(this,ve({type:t.Shape.HTML,style:ve({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}ye(n,e);var r=n.prototype;return r.getDomElement=function(){return this.parsedStyle.$el},r.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(t=this.ownerDocument)||void 0===t||null===(e=t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,a=new Ga;return a.setMinMax(Un(i,o,0),Un(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=gn(fn(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Ga.isEmpty(e)){var n=new Ga;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(Pc),Zc=function(t){function e(e,n,r,i){var o;return(o=t.call(this,e)||this).currentTime=void 0,o.timelineTime=void 0,o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return ye(e,t),e}(oc),Jc=0,Qc=function(){function t(t,e){var n;this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+Jc++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},e.persist=function(){throw new Error("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},e.ensureAlive=function(){var t,e;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new Zc(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new Zc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},pe(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(t=Number(t),!isNaN(t)){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function $c(t,e){return Number(t.id)-Number(e.id)}var tl,el,nl=function(){function t(t){var e=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort($c),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){var e=new Qc(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort($c),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},e.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,a),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),rl=function(e){function n(){var n;(n=e.call(this)||this).defaultView=null,n.documentElement=void 0,n.timeline=void 0,n.ownerDocument=null,n.nodeName="document",n.timeline=new nl(Te(n));var r={};return rs.forEach((function(e){var n=e.defaultValue;e.inherited&&n&&(r[e.name]=Le(n)?n(t.Shape.GROUP):n)})),n.documentElement=new Ic({id:"g-root",style:r}),n.documentElement.ownerDocument=Te(n),n.documentElement.parentNode=Te(n),n.childNodes=[n.documentElement],n}ye(n,e);var r=n.prototype;return r.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?qc:Ic);var r=new n(e);return r.ownerDocument=this,r},r.createElementNS=function(t,e,n){return this.createElement(e,n)},r.cloneNode=function(t){throw new Error("Method not implemented.")},r.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},r.elementFromPoint=function(){var t=fe(le().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",null);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return t.abrupt("return",(f=t.sent.picked)&&f[0]||this.documentElement);case 10:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.elementsFromPoint=function(){var t=fe(le().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",[]);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return(f=t.sent.picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),t.abrupt("return",f);case 11:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},r.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},r.append=function(){throw new Error("Use document.documentElement instead.")},r.prepend=function(){throw new Error("Use document.documentElement instead.")},r.getElementById=function(t){return this.documentElement.getElementById(t)},r.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},r.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},r.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},r.querySelector=function(t){return this.documentElement.querySelector(t)},r.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},r.find=function(t){return this.documentElement.find(t)},r.findAll=function(t){return this.documentElement.findAll(t)},pe(n,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),n}(uc),il=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).altKey=void 0,e.button=void 0,e.buttons=void 0,e.ctrlKey=void 0,e.metaKey=void 0,e.relatedTarget=void 0,e.shiftKey=void 0,e.client=new $a,e.movement=new $a,e.offset=new $a,e.global=new $a,e.screen=new $a,e}ye(e,t);var n=e.prototype;return n.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},n.initMouseEvent=function(){throw new Error("Method not implemented.")},pe(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),e}(oc),ol=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).pointerId=void 0,e.width=0,e.height=0,e.isPrimary=!1,e.pointerType=void 0,e.pressure=void 0,e.tangentialPressure=void 0,e.tiltX=void 0,e.tiltY=void 0,e.twist=void 0,e}ye(e,t);var n=e.prototype;return n.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},n.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},n.clone=function(){return this.manager.clonePointerEvent(this)},e}(il),al=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).deltaMode=void 0,e.deltaX=void 0,e.deltaY=void 0,e.deltaZ=void 0,e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return ye(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(il),sl=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Vo,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return pe(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=qo(t),this._easing=t}}]),t}(),ul=function(){function t(t,e){this.type=void 0,this.target=void 0,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[],this.type=t,this.target=e}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),cl=0,ll=new WeakMap,hl=function(){function e(t,e,n){this.observer=void 0,this.target=void 0,this.options=void 0,this.transientObservedNodes=[],this.observer=t,this.target=e,this.options=n}var n=e.prototype;return n.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){return t===e?t:el&&function(t){return t===el||t===tl}(t)?el:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else yl.push(this.observer),vl||(vl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(gl):gl());e[n]=t},n.addListeners=function(){this.addListeners_(this.target)},n.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeListeners=function(){this.removeListeners_(this.target)},n.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=ll.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}}),this)},n.handleEvent=function(e){var n,r;switch(e.stopImmediatePropagation(),e.type){case t.ElementEvent.ATTR_MODIFIED:var i=e.attrName,o=e.relatedNode.namespaceURI;(n=dl("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===yc.ADDITION?null:e.prevValue;pl(r,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(i)||-1!==t.attributeFilter.indexOf(o)))return t.attributeOldValue?function(t){return el||((el=ul.copy(tl)).oldValue=t,el)}(a):n}));break;case t.ElementEvent.REMOVED:case t.ElementEvent.INSERTED:var s,u,c=e.target;e.type===t.ElementEvent.INSERTED?(s=[c],u=[]):(s=[],u=[c]);var l=c.previousSibling,h=c.nextSibling;(n=dl("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,pl(r,(function(t){if(t.childList)return n}))}tl=el=void 0},e}(),fl=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=cl++,this.callback=t}var e=t.prototype;return e.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=ll.get(t);r||ll.set(t,r=[]);for(var i=0;r.length>i;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new hl(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},e.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=ll.get(e),r=0;n.length>r;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},e.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function dl(t,e){return tl=new ul(t,e)}function pl(t,e){for(var n=t;n;n=n.parentNode){var r=ll.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var vl=!1,yl=[];function gl(){vl=!1;var t=yl;yl=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=ll.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&gl()}function ml(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;i>o;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}null!=r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(0>i||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error(i+" compositing is not supported");n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;n.length>o;o++){var a=n[o].offset;if(Ie(a))r=!1;else{if(i>a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;r>a;a++){var s=n[a].computedOffset;if(!Ie(s)&&!Ie(o)){for(var u=1;a-i>u;u++)n[i+u].computedOffset=o+(Number(s)-o)*u/(a-i);i=a,o=Number(s)}}}(),n}var Tl="backwards|forwards|both|none".split("|"),bl="reverse|alternate|alternate-reverse".split("|");function El(t,e){var n=new sl;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(null!=t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===Tl.indexOf(t[e]))return;if("direction"===e&&-1===bl.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function Sl(t,e){var n;return El(t=xl(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function xl(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var wl=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Sl(n,!1),this.timing.effect=this,this.timing.activeDuration=Xo(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=ml(e,this.timing),this.interpolations=Qo(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=Ko(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=ml(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),Pl=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,Mc),this.define(t.Shape.ELLIPSE,Ac),this.define(t.Shape.RECT,Wc),this.define(t.Shape.IMAGE,Lc),this.define(t.Shape.LINE,Fc),this.define(t.Shape.GROUP,Ic),this.define(t.Shape.PATH,Uc),this.define(t.Shape.POLYGON,Vc),this.define(t.Shape.POLYLINE,Hc),this.define(t.Shape.TEXT,qc),this.define(t.Shape.HTML,Kc)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),Nl=t.Syringe.defineToken(""),kl=t.Syringe.defineToken("",{multiple:!1}),Cl=/\[\s*(.*)=(.*)\s*\]/;function Ml(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}t.DefaultSceneGraphSelector=function(){function t(){}var e=t.prototype;return e.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find((function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.find((function(e){return e.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):null}return e.find((function(n){return e!==n&&n.nodeName===t}))},e.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll((function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.findAll((function(r){return e!==r&&r.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},e.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var e=t.match(Cl),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},e.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return Ie(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=Pr([ct({token:kl})],t.DefaultSceneGraphSelector);var _l=t.Syringe.defineToken("");t.DefaultSceneGraphService=function(){function e(){var e,n,r,i,o,a,s,u,c=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new ac(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(e=ar(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=Un(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=ar();hr(a,n[0],n[1],n[2]);var s=c.getRotation(t),u=c.getRotation(t.parentNode);Tr(e,u),lr(e,e),ur(a,e,a),ur(o.localRotation,a,s),Er(o.localRotation,o.localRotation),c.dirtifyLocal(t,o)}else c.rotateLocal(t,n)}),this.rotateLocal=(n=ar(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=Un(e,r,i));var o=t.transformable;hr(n,e[0],e[1],e[2]),br(o.localRotation,o.localRotation,n),c.dirtifyLocal(t,o)}),this.setEulerAngles=(r=ar(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=Un(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){hr(o.localRotation,e[0],e[1],e[2]);var a=c.getRotation(t.parentNode);Tr(r,lr(ar(),a)),br(o.localRotation,o.localRotation,r),c.dirtifyLocal(t,o)}else c.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;Qn(e,Dn())||(function(t,e,n){var r=n[0],i=n[1],o=n[2],a=e[0],s=e[1],u=e[2],c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,f=i*h-o*l,d=o*c-r*h,p=r*l-i*c,v=2*n[3];l*=v,h*=v,d*=2,p*=2,t[0]=a+(c*=v)+(f*=2),t[1]=s+l+d,t[2]=u+h+p}(e,e,i.localRotation),Gn(i.localPosition,i.localPosition,e),c.dirtifyLocal(t,i))},this.setPosition=(i=fn(),o=Dn(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,Qn(c.getPosition(t),o)||(jn(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(pn(i,t.parentNode.transformable.worldTransform),gn(i,i),Jn(n.localPosition,o,i)):jn(n.localPosition,o),c.dirtifyLocal(t,n))}),this.setLocalPosition=function(){var t=Dn();return function(e,n){var r=e.transformable;t[0]=n[0],t[1]=n[1],t[2]=n[2]||0,Qn(r.localPosition,t)||(jn(r.localPosition,t),c.dirtifyLocal(e,r))}}(),this.translate=(a=Dn(),s=Dn(),u=Dn(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Vn(s,e,n,r)),Qn(e,a)||(Gn(u,c.getPosition(t),e),c.setPosition(t,u))}),this.setRotation=function(){var t=ar();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=mr(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var s=c.getRotation(e.parentNode);Tr(t,s),lr(t,t),ur(a.localRotation,t,n),Er(a.localRotation,a.localRotation),c.dirtifyLocal(e,a)}else c.setLocalRotation(e,n)}},this.calcLocalTransform=function(){var t=fn(),e=Dn(),n=mr(0,0,0,1);return function(r){if(Cn(r.localTransform,r.localRotation,r.localPosition,Un(1,1,1),r.origin),0!==r.localSkew[0]||0!==r.localSkew[1]){var i=yn(t);i[4]=Math.tan(r.localSkew[0]),i[1]=Math.tan(r.localSkew[1]),mn(r.localTransform,r.localTransform,i)}var o=Cn(t,n,e,r.localScale,r.origin);mn(r.localTransform,r.localTransform,o)}}()}var n=e.prototype;return n.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},n.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},n.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},n.attach=function(t,e,n){var r,i;t.parentNode&&this.detach(t),t.parentNode=e,Ie(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var o=e.sortable;((null==o||null===(r=o.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(o.dirty=!0);var a=t.transformable;a&&this.dirtifyWorld(t,a),a.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e,n,r=t.transformable,i=t.parentNode.sortable;((null==i||null===(e=i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(i.dirty=!0);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},n.getOrigin=function(t){return t.transformable.origin},n.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;if(!Qn(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},n.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;hr(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.scaleLocal=function(t,e){var n=t.transformable;zn(n.localScale,n.localScale,Un(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},n.setLocalScale=function(t,e){var n=t.transformable,r=Un(e[0],e[1],e[2]||n.localScale[2]);Qn(r,n.localScale)||(jn(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=mr(e,n,r,i));var o=t.transformable;Tr(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=Sr(e,n));var r,i,o=t.transformable;(r=o.localSkew)[0]=(i=e)[0],r[1]=i[1],this.dirtifyLocal(t,o)},n.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},n.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},n.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){e.has(n.entity)||(t.boundsChangedEvent.detail=r,n.dispatchEvent(t.boundsChangedEvent),e.add(n.entity))};this.pendingEvents.forEach((function(t){var e=t[0],r=t[1];r.affectChildren?e.forEach((function(t){n(t,r)})):n(e,r)})),this.pendingEvents=[]},n.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.pendingEvents.push([t,{affectChildren:e}])},n.getPosition=function(t){var e=t.transformable;return Pn(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return kn(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return Nn(e.scaling,this.getWorldTransform(t,e))},n.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},n.getLocalPosition=function(t){return t.transformable.localPosition},n.getLocalRotation=function(t){return t.transformable.localRotation},n.getLocalScale=function(t){return t.transformable.localScale},n.getLocalSkew=function(t){return t.transformable.localSkew},n.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},n.setLocalTransform=function(t,e){var n=Pn(Dn(),e),r=kn(ar(),e),i=Nn(Dn(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},n.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},n.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(Ga.isEmpty(r))return null;var i=n||new Ga;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new Ga},n.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new Ga).update(r.center,r.halfExtents))}));var a=t.parsedStyle.clipPath;if(a){var s,u=this.getTransformedGeometryBounds(a,!0);u&&(s=new Ga).setFromTransformedAABB(u,this.getWorldTransform(t)),o?s&&(o=s.intersection(o)):o=s}return o||(o=new Ga),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},n.getLocalBounds=function(t){if(t.parentNode){var e=fn();t.parentNode.transformable&&(e=gn(fn(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Ga.isEmpty(n)){var r=new Ga;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Ga.isEmpty(i)||(r=new Ga).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(e=t.ownerDocument)||void 0===e||null===(n=e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=r.getMin(),s=a[0],u=a[1],c=r.getMax();return new ts(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new ts((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},n.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},n.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;n.length>r;r++)this.syncHierarchy(n[r])}},n.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?mn(e.worldTransform,r.worldTransform,e.localTransform):pn(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},n.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},e}(),Pr([lt(Nl),kr("design:type",Function)],t.DefaultSceneGraphService.prototype,"sceneGraphSelectorFactory",void 0),t.DefaultSceneGraphService=Pr([ct({token:_l})],t.DefaultSceneGraphService);var Al,Ol=t.Syringe.defineToken("",{multiple:!1});(Al=t.RenderReason||(t.RenderReason={}))[Al.CAMERA_CHANGED=0]="CAMERA_CHANGED",Al[Al.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Al[Al.NONE=2]="NONE";var Il,Rl,Ll,Dl=t.Syringe.defineToken(""),Fl=t.Syringe.defineToken("");(Il=t.CameraType||(t.CameraType={}))[Il.ORBITING=0]="ORBITING",Il[Il.EXPLORING=1]="EXPLORING",Il[Il.TRACKING=2]="TRACKING",(Rl=t.CameraTrackingMode||(t.CameraTrackingMode={}))[Rl.DEFAULT=0]="DEFAULT",Rl[Rl.ROTATIONAL=1]="ROTATIONAL",Rl[Rl.TRANSLATIONAL=2]="TRANSLATIONAL",Rl[Rl.CINEMATIC=3]="CINEMATIC",(Ll=t.CameraProjectionMode||(t.CameraProjectionMode={}))[Ll.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Ll[Ll.PERSPECTIVE=1]="PERSPECTIVE";var Bl={UPDATED:"updated"},Ul=Math.PI/180,jl=180/Math.PI,Vl=2e-4,Gl=function(e){function n(n,r){var i;return void 0===n&&(n=t.CameraType.EXPLORING),void 0===r&&(r=t.CameraTrackingMode.DEFAULT),(i=e.call(this)||this).canvas=void 0,i.matrix=fn(),i.right=Un(1,0,0),i.up=Un(0,1,0),i.forward=Un(0,0,1),i.position=Un(0,0,1),i.focalPoint=Un(0,0,0),i.distanceVector=Un(0,0,-1),i.distance=1,i.azimuth=0,i.elevation=0,i.roll=0,i.relAzimuth=0,i.relElevation=0,i.relRoll=0,i.dollyingStep=0,i.maxDistance=1/0,i.minDistance=-1/0,i.zoom=1,i.rotateWorld=!1,i.fov=30,i.near=.1,i.far=1e3,i.aspect=1,i.left=void 0,i.rright=void 0,i.top=void 0,i.bottom=void 0,i.projectionMatrix=fn(),i.projectionMatrixInverse=fn(),i.jitteredProjectionMatrix=void 0,i.view=void 0,i.enableUpdate=!0,i.type=t.CameraType.EXPLORING,i.trackingMode=t.CameraTrackingMode.DEFAULT,i.projectionMode=t.CameraProjectionMode.PERSPECTIVE,i.frustum=new Ya,i.landmarks=[],i.landmarkAnimationID=void 0,i.orthoMatrix=fn(),i.setType(n,r),i}ye(n,e);var r=n.prototype;return r.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},r.getProjectionMode=function(){return this.projectionMode},r.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},r.getPerspectiveInverse=function(){return this.projectionMatrixInverse},r.getFrustum=function(){return this.frustum},r.getPosition=function(){return this.position},r.getFocalPoint=function(){return this.focalPoint},r.getDollyingStep=function(){return this.dollyingStep},r.getNear=function(){return this.near},r.getFar=function(){return this.far},r.getZoom=function(){return this.zoom},r.getOrthoMatrix=function(){return this.orthoMatrix},r.getView=function(){return this.view},r.setEnableUpdate=function(t){this.enableUpdate=t},r.setType=function(e,n){return this.type=e,this.setWorldRotation(this.type===t.CameraType.EXPLORING),this._getAngles(),this.type===t.CameraType.TRACKING&&void 0!==n&&this.setTrackingMode(n),this},r.setProjectionMode=function(t){return this.projectionMode=t,this},r.setTrackingMode=function(e){if(this.type!==t.CameraType.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},r.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},r.getViewTransform=function(){return gn(fn(),this.matrix)},r.getWorldTransform=function(){return this.matrix},r.jitterProjectionMatrix=function(t,e){var n=xn(fn(),[t,e,0]);this.jitteredProjectionMatrix=mn(fn(),n,this.projectionMatrix)},r.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},r.setMatrix=function(t){return this.matrix=t,this._update(),this},r.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},r.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},r.setNear=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},r.setFar=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},r.setViewOffset=function(e,n,r,i,o,a){return this.aspect=e/n,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},r.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},r.setZoom=function(e){return this.zoom=e,this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t.CameraProjectionMode.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},r.setPerspective=function(e,n,r,i){var o;this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var a=this.near*Math.tan(.5*Ul*this.fov)/this.zoom,s=2*a,u=this.aspect*s,c=-.5*u;if(null===(o=this.view)||void 0===o?void 0:o.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,a-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return co(this.projectionMatrix,c,c+u,a,a-s,e,this.far),bn(this.projectionMatrix,this.projectionMatrix,Un(1,-1,1)),gn(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},r.setOrthographic=function(e,n,r,i,o,a){var s;this.projectionMode=t.CameraProjectionMode.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=o,this.far=a;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,d=l+u,p=h+c,v=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(f+=y*this.view.offsetX)+y*this.view.width,v=(p-=g*this.view.offsetY)-g*this.view.height}return On(this.projectionMatrix,f,d,v,p,o,a),bn(this.projectionMatrix,this.projectionMatrix,Un(1,-1,1)),gn(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},r.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=ro(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},r.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=Un(0,1,0);if(this.focalPoint=ro(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Hn(Dn(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=Bn(o),s=Math.asin(n/a)*jl,u=90+Math.atan2(r,e)*jl,c=fn();Sn(c,c,u*Ul),En(c,c,s*Ul),i=Jn(Dn(),[0,1,0],c)}return gn(this.matrix,In(fn(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},r.getDistance=function(){return this.distance},r.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Vl>this.distance&&(this.distance=Vl),this.dollyingStep=this.distance/100;var e=Dn(),n=this.forward,r=this.focalPoint;return e[0]=(t=this.distance)*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},r.setMaxDistance=function(t){return this.maxDistance=t,this},r.setMinDistance=function(t){return this.minDistance=t,this},r.setAzimuth=function(e){return this.azimuth=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getAzimuth=function(){return this.azimuth},r.setElevation=function(e){return this.elevation=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getElevation=function(){return this.elevation},r.setRoll=function(e){return this.roll=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getRoll=function(){return this.roll},r.rotate=function(e,n,r){if(this.relElevation=no(n),this.relAzimuth=no(e),this.relRoll=no(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=sr(ar(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Ul),o=sr(ar(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Ul),a=sr(ar(),[0,0,1],this.relRoll*Ul),s=ur(ar(),o,i);s=ur(ar(),s,a);var u=Mn(fn(),s);Tn(this.matrix,this.matrix,[0,0,-this.distance]),mn(this.matrix,this.matrix,u),Tn(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this._update(),this},r.pan=function(t,e){var n=ro(t,e,0),r=Fn(this.position);return Gn(r,r,Wn(Dn(),this.right,n[0])),Gn(r,r,Wn(Dn(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},r.dolly=function(e){var n,r=this.forward,i=Fn(this.position);return n=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,i[0]+=n*r[0],i[1]+=n*r[1],i[2]+=n*r[2],this._setPosition(i),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getDistance():this.type===t.CameraType.TRACKING&&Gn(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},r.createLandmark=function(t,e){void 0===e&&(e={});var r=e.position,i=void 0===r?this.position:r,o=e.focalPoint,a=void 0===o?this.focalPoint:o,s=e.roll,u=e.zoom,c=new n;c.setType(this.type,void 0),c.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),c.setFocalPoint(a[0],a[1]||this.focalPoint[1],a[2]||this.focalPoint[2]),c.setRoll(s||this.roll),c.setZoom(u||this.zoom);var l={name:t,matrix:dn(c.matrix),right:Fn(c.right),up:Fn(c.up),forward:Fn(c.forward),position:Fn(c.position),focalPoint:Fn(c.focalPoint),distanceVector:Fn(c.distanceVector),distance:c.distance,dollyingStep:c.dollyingStep,azimuth:c.azimuth,elevation:c.elevation,roll:c.roll,relAzimuth:c.relAzimuth,relElevation:c.relElevation,relRoll:c.relRoll,zoom:c.zoom};return this.landmarks.push(l),l},r.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=Jo(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Re(e)?{duration:e}:e,o=i.easing,a=void 0===o?"linear":o,s=i.duration,u=void 0===s?100:s,c=i.easingFunction,l=void 0===c?void 0:c,h=i.onfinish,f=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(r),void(f&&f());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,p=r.position,v=r.focalPoint,y=r.zoom,g=r.roll,m=l||qo(a),T=function(){n.setFocalPoint(v),n.setPosition(p),n.setRoll(g),n.setZoom(y),n.computeMatrix(),n.triggerUpdate(),f&&f()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(u<r)T();else{var i,o,a=m(r/u),s=Dn(),c=Dn();Zn(s,n.focalPoint,v,a),Zn(c,n.position,p,a),o=n.roll*(1-a)+g*a,i=n.zoom*(1-a)+y*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(i),nr(s,v)+nr(c,p)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):T()}}))}},r._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},r.computeMatrix=function(){var e=sr(ar(),[0,0,1],this.roll*Ul);yn(this.matrix);var n=sr(ar(),[1,0,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation*Ul),r=sr(ar(),[0,1,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth*Ul),i=ur(ar(),r,n);i=ur(ar(),i,e);var o=Mn(fn(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(Tn(this.matrix,this.matrix,this.focalPoint),mn(this.matrix,this.matrix,o),Tn(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(Tn(this.matrix,this.matrix,this.position),mn(this.matrix,this.matrix,o))},r._setPosition=function(t,e,n){this.position=ro(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},r._getAxes=function(){jn(this.right,ro(or(ir(),[1,0,0,0],this.matrix))),jn(this.up,ro(or(ir(),[0,1,0,0],this.matrix))),jn(this.forward,ro(or(ir(),[0,0,1,0],this.matrix))),qn(this.right,this.right),qn(this.up,this.up),qn(this.forward,this.forward)},r._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Bn(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Math.asin(n/i)*jl,this.azimuth=Math.atan2(-e,-r)*jl):(this.elevation=-Math.asin(n/i)*jl,this.azimuth=-Math.atan2(-e,-r)*jl)},r._getPosition=function(){jn(this.position,ro(or(ir(),[0,0,0,1],this.matrix))),this._getDistance()},r._getFocalPoint=function(){var t,e;!function(t,e,n){var r=e[0],i=e[1],o=e[2];t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],(t=hn(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Gn(this.focalPoint,this.position,this.distanceVector),this._getDistance()},r._getDistance=function(){this.distanceVector=Hn(Dn(),this.focalPoint,this.position),this.distance=Bn(this.distanceVector),this.dollyingStep=this.distance/100},r._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=sr(ar(),[0,0,1],-this.roll*Math.PI/180);Cn(this.orthoMatrix,n,Un((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Un(this.zoom,this.zoom,1),e)}},r.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=mn(fn(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(Bl.UPDATED)}},r.syncFromLandmark=function(t){this.matrix=pn(this.matrix,t.matrix),this.right=jn(this.right,t.right),this.up=jn(this.up,t.up),this.forward=jn(this.forward,t.forward),this.position=jn(this.position,t.position),this.focalPoint=jn(this.focalPoint,t.focalPoint),this.distanceVector=jn(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},n}(ic.EventEmitter),Hl=t.Syringe.defineToken("");t.RenderingService=function(){function e(){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new ac(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new ba,dirtycheck:new Da(["object"]),cull:new Da(["object","camera"]),beginFrame:new _a([]),beforeRender:new _a(["objectToRender"]),render:new _a(["objectToRender"]),afterRender:new _a(["objectToRender"]),endFrame:new _a([]),destroy:new _a([]),pick:new wa(["result"]),pointerDown:new _a(["event"]),pointerUp:new _a(["event"]),pointerMove:new _a(["event"]),pointerOut:new _a(["event"]),pointerOver:new _a(["event"]),pointerWheel:new _a(["event"]),pointerCancel:new _a(["event"])}}var n=e.prototype;return n.init=function(){var t=fe(le().mark((function t(){var e=this;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(t){t.apply(e)})),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getStats=function(){return this.stats},n.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(t.RenderReason.CAMERA_CHANGED)},n.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach((function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)})),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},n.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,o=r.enableCulling;this.styleValueRegistry.recalc(t);var a=i?this.hooks.dirtycheck.call(t):t;if(a){var s=o?this.hooks.cull.call(a,this.camera):a;s&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(s))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var u=t.sortable,c=!1;u.dirty&&(u.sorted=t.childNodes.slice().sort(Ml),c=!0,u.dirty=!1),(u.sorted||t.childNodes).forEach((function(t){n.renderDisplayObject(t,e)})),c&&t.forEach((function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)}))},n.destroy=function(){this.inited=!1,this.hooks.destroy.call()},n.dirtify=function(){this.renderingContext.renderReasons.add(t.RenderReason.DISPLAY_OBJECT_CHANGED)},e}(),Pr([Ut(Hl),kr("design:type",Object)],t.RenderingService.prototype,"renderingPluginProvider",void 0),Pr([lt(sa),kr("design:type",Object)],t.RenderingService.prototype,"canvasConfig",void 0),Pr([lt(Dl),kr("design:type",Object)],t.RenderingService.prototype,"renderingContext",void 0),Pr([lt(_l),kr("design:type",Object)],t.RenderingService.prototype,"sceneGraphService",void 0),Pr([lt(ce),kr("design:type",Object)],t.RenderingService.prototype,"styleValueRegistry",void 0),Pr([lt(Fl),kr("design:type",Gl)],t.RenderingService.prototype,"camera",void 0),t.RenderingService=Pr([ct()],t.RenderingService);t.EventService=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).renderingContext=void 0,e.contextService=void 0,e.canvasConfig=void 0,e.rootTarget=void 0,e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.pickHandler=void 0,e.tmpMatrix=fn(),e.tmpVec3=Dn(),e.onPointerDown=function(){var t=fe(le().mark((function t(n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:e.dispatchEvent(r=t.sent,"pointerdown"),"touch"===r.pointerType?e.dispatchEvent(r,"touchstart"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.dispatchEvent(r,2===r.button?"rightdown":"mousedown"),e.trackingData(n.pointerId).pressTargetsByButton[n.button]=r.composedPath(),e.freeEvent(r);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUp=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s,u,c,l,h;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:return r=performance.now(),t.next=5,e.createPointerEvent(n);case 5:if(e.dispatchEvent(i=t.sent,"pointerup"),"touch"===i.pointerType?e.dispatchEvent(i,"touchend"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.dispatchEvent(i,2===i.button?"rightup":"mouseup"),o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.pressTargetsByButton[n.button]),s=a,a&&!i.composedPath().includes(a)){for(u=a;u&&!i.composedPath().includes(u);)i.currentTarget=u,e.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType?e.notifyTarget(i,"touchendoutside"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),uc.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[n.button],s=u}s&&((l=e.clonePointerEvent(i,"click")).target=s,l.path=[],o.clicksByButton[n.button]||(o.clicksByButton[n.button]={clickCount:0,target:l.target,timeStamp:r}),(h=o.clicksByButton[n.button]).target===l.target&&200>r-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,(null===(c=i.detail)||void 0===c?void 0:c.preventClick)||e.dispatchEvent(l,"mouse"===l.pointerType||"touch"===l.pointerType?"click":"pointertap"),e.freeEvent(l)),e.freeEvent(i);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerMove=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:if(i="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.overTargets),!o.overTargets||a===r.target){t.next=23;break}return s="mousemove"===n.type?"mouseout":"pointerout",t.next=12,e.createPointerEvent(n,s,a||void 0);case 12:if(e.dispatchEvent(u=t.sent,"pointerout"),i&&e.dispatchEvent(u,"mouseout"),r.composedPath().includes(a)){t.next=22;break}return t.next=18,e.createPointerEvent(n,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!r.composedPath().includes(c.target);)c.currentTarget=c.target,e.notifyTarget(c),i&&e.notifyTarget(c,"mouseleave"),uc.isNode(c.target)&&(c.target=c.target.parentNode);e.freeEvent(c);case 22:e.freeEvent(u);case 23:if(a===r.target){t.next=38;break}l=e.clonePointerEvent(r,"mousemove"===n.type?"mouseover":"pointerover"),e.dispatchEvent(l,"pointerover"),i&&e.dispatchEvent(l,"mouseover"),h=a&&uc.isNode(a)&&a.parentNode;case 29:if(!h||h===(uc.isNode(e.rootTarget)&&e.rootTarget.parentNode)){t.next=35;break}if(h!==r.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(uc.isNode(e.rootTarget)&&e.rootTarget.parentNode)){for((f=e.clonePointerEvent(r,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(uc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)f.currentTarget=f.target,e.notifyTarget(f),i&&e.notifyTarget(f,"mouseenter"),uc.isNode(f.target)&&(f.target=f.target.parentNode);e.freeEvent(f)}e.freeEvent(l);case 38:e.dispatchEvent(r,"pointermove"),"touch"===r.pointerType&&e.dispatchEvent(r,"touchmove"),i&&(e.dispatchEvent(r,"mousemove"),e.cursor=e.getCursor(r.target)),o.overTargets=r.composedPath(),e.freeEvent(r);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOut=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:if(!(r=e.trackingData(n.pointerId)).overTargets){t.next=19;break}return i="mouse"===n.pointerType||"pen"===n.pointerType,o=e.findMountedTarget(r.overTargets),t.next=8,e.createPointerEvent(n,"pointerout",o||void 0);case 8:return e.dispatchEvent(a=t.sent),i&&e.dispatchEvent(a,"mouseout"),t.next=13,e.createPointerEvent(n,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(uc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)s.currentTarget=s.target,e.notifyTarget(s),i&&e.notifyTarget(s,"mouseleave"),uc.isNode(s.target)&&(s.target=s.target.parentNode);r.overTargets=null,e.freeEvent(a),e.freeEvent(s);case 19:e.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOver=function(){var t=fe(le().mark((function t(n){var r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),t.next=5,e.createPointerEvent(n);case 5:for(o="mouse"===(i=t.sent).pointerType||"pen"===i.pointerType,e.dispatchEvent(i,"pointerover"),o&&e.dispatchEvent(i,"mouseover"),"mouse"===i.pointerType&&(e.cursor=e.getCursor(i.target)),(a=e.clonePointerEvent(i,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(uc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)a.currentTarget=a.target,e.notifyTarget(a),o&&e.notifyTarget(a,"mouseenter"),uc.isNode(a.target)&&(a.target=a.target.parentNode);r.overTargets=i.composedPath(),e.freeEvent(i),e.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUpOutside=function(){var t=fe(le().mark((function t(n){var r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof ol){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),i=e.findMountedTarget(r.pressTargetsByButton[n.button]),t.next=6,e.createPointerEvent(n);case 6:if(o=t.sent,i){for(a=i;a;)o.currentTarget=a,e.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||e.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),uc.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[n.button]}e.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onWheel=function(){var t=fe(le().mark((function t(n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createWheelEvent(n);case 4:e.dispatchEvent(r=t.sent),e.freeEvent(r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}ye(e,t);var n=e.prototype;return n.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},n.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new $a(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},n.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new $a(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},n.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,o=i.width,a=i.height,s=r.getPerspectiveInverse(),u=r.getWorldTransform(),c=mn(this.tmpMatrix,u,s),l=Vn(this.tmpVec3,e/o*2-1,2*(1-n/a)-1,0);return Jn(l,l,c),new $a(l[0],l[1])},n.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=mn(this.tmpMatrix,n,r),o=Vn(this.tmpVec3,t.x,t.y,0);Jn(this.tmpVec3,this.tmpVec3,i);var a=this.canvasConfig;return new $a((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},n.setPickHandler=function(t){this.pickHandler=t},n.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},n.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;r>n;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},n.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},n.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;n.length>o;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},n.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;2048>r&&t!==this.rootTarget;r++)uc.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},n.hitTest=function(){var t=fe(le().mark((function t(e){var n,r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.viewportY,o=(i=this.canvasConfig).width,a=i.height,!(0>(n=e.viewportX)||0>r||n>o||r>a)){t.next=4;break}return t.abrupt("return",null);case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},n.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=Ee(Oh.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},n.pickTarget=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.createPointerEvent=function(){var t=fe(le().mark((function t(e,n,r){var i,o;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(ol),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r){t.next=11;break}t.t0=r,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(i),!t.t2){t.next=18;break}return t.next=17,this.pickTarget(i);case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.createWheelEvent=function(){var t=fe(le().mark((function t(e){var n,r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(al),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),!t.t1){t.next=14;break}return t.next=13,this.pickTarget(n);case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},n.cloneWheelEvent=function(t){var e=this.allocateEvent(al);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},n.clonePointerEvent=function(t,e){var n=this.allocateEvent(ol);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},n.copyPointerData=function(t,e){t instanceof ol&&e instanceof ol&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},n.copyMouseData=function(t,e){t instanceof il&&e instanceof il&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},n.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},n.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},n.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},n.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},n.notifyTarget=function(t,e){var n;e=null!==(n=e)&&void 0!==n?n:t.type,this.notifyListeners(t,t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},n.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;r.length>i&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},n.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||uc.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},n.getCursor=function(t){for(var e=t;e;){var n=wc.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=uc.isNode(e)&&e.parentNode}},e}(ic.EventEmitter),Pr([lt(Dl),kr("design:type",Object)],t.EventService.prototype,"renderingContext",void 0),Pr([lt(Ol),kr("design:type",Object)],t.EventService.prototype,"contextService",void 0),Pr([lt(sa),kr("design:type",Object)],t.EventService.prototype,"canvasConfig",void 0),Pr([Y.postConstruct(),kr("design:type",Function),kr("design:paramtypes",[]),kr("design:returntype",void 0)],t.EventService.prototype,"init",null),t.EventService=Pr([ct()],t.EventService),t.OffscreenCanvasCreator=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),t.OffscreenCanvasCreator=Pr([ct()],t.OffscreenCanvasCreator);var zl={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Wl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Yl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),ql=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);function Xl(t){var e=t.parsedStyle.fontSize;return Ie(e)?null:e}t.TextService=function(){function t(){var t=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!ql.exec(n)&&!Yl.exec(e))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=zl.MetricsString+zl.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(zl.BaselineSymbol).width),u=zl.HeightMultiplier*s;s=s*zl.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,d=0,p=!1;for(f=0;s>f;++f){for(var v=0;h>v;v+=4)if(255!==c[d+v]){p=!0;break}if(p)break;d+=h}for(n.ascent=s-f,d=l-h,p=!1,f=u;f>s;--f){for(var y=0;h>y;y+=4)if(255!==c[d+y]){p=!0;break}if(p)break;d-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,u=e.textAlign,c=e.letterSpacing,l=e.leading,h=void 0===l?0:l,f=Ba(e),d=this.measureFont(f,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var p=this.offscreenCanvas.getOrCreateContext(n);p.font=f;for(var v=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(v.length),g=0,m=0;v.length>m;m++){var T=p.measureText(v[m]).width+(v[m].length-1)*c;y[m]=T,g=Math.max(g,T)}var b=g+a,E=o||d.fontSize+a,S=Math.max(E,d.fontSize+a)+(v.length-1)*(E+h),x=0;return"middle"===s?x=-S/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?x=-S:"top"!==s&&"hanging"!==s||(x=0),{font:f,width:b,height:S,lines:v,lineWidths:y,lineHeight:E+=h,maxLineWidth:g,fontProperties:d,lineMetrics:y.map((function(t,e){var n=0;return"center"===u?n-=t/2:"right"!==u&&"end"!==u||(n-=t),new ts(n-a/2,x+e*E,t+a,E)}))}},e.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=this.offscreenCanvas.getOrCreateContext(n),u=o+a,c=[],l=0,h=0,f={},d=function(t){return r.getFromCache(t,a,f,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return l++,h=0,void(c[l]="");if(h>0&&h+a>u){if(l++,h=0,c[l]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(c=r.trimToBreakable(c),h=r.sumTextWidthByCache(c[l]||"",f)),r.shouldBreakByKinsokuShorui(e,o)&&(c=r.trimByKinsokuShorui(c),h+=d(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&zl.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&zl.Newlines.indexOf(t.charCodeAt(0))>=0},e.trimToBreakable=function(t){var e=[].concat(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,o),e},e.canBreakInLastChar=function(t){return!t||!Wl.test(t)},e.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},e.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!Wl.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),Pr([lt(t.OffscreenCanvasCreator),kr("design:type",t.OffscreenCanvasCreator)],t.TextService.prototype,"offscreenCanvas",void 0),t.TextService=Pr([ct()],t.TextService),t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),t.CircleUpdater=Pr([ct({token:{token:Va,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),t.EllipseUpdater=Pr([ct({token:{token:Va,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.RectUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!Jo(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),t.RectUpdater=Pr([ct({token:[{token:Va,named:t.Shape.RECT},{token:Va,named:t.Shape.IMAGE},{token:Va,named:t.Shape.GROUP}]})],t.RectUpdater),t.TextUpdater=function(){function t(){this.textService=void 0}var e=t.prototype;return e.isReadyToMeasure=function(t,e){return t.text&&t.fontSize&&t.fontStyle&&t.fontWeight&&t.fontVariant&&t.textAlign&&t.textBaseline&&!Ie(t.lineWidth)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,u=t.dx,c=t.dy,l=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(r=n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var h=this.textService.measureText(i,t,l);t.metrics=h;var f=[h.width/2,h.height/2,0],d=[0,1],p=0;"center"===o?(p=a/2,d=[.5,1]):"right"!==o&&"end"!==o||(p=a,d=[1,1]);var v=0;return"middle"===s?v=f[1]:"top"===s||"hanging"===s?v=2*f[1]:"alphabetic"===s?v=h.lineHeight-h.fontProperties.ascent:"bottom"!==s&&"ideographic"!==s||(v=0),u&&(p+=u),c&&(v+=c),t.anchor=[d[0],d[1],0],{width:2*f[0],height:2*f[1],offsetX:p,offsetY:v}},t}(),Pr([lt(t.TextService),kr("design:type",t.TextService)],t.TextUpdater.prototype,"textService",void 0),t.TextUpdater=Pr([ct({token:{token:Va,named:t.Shape.TEXT}})],t.TextUpdater),t.LineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s}},t}(),t.LineUpdater=Pr([ct({token:{token:Va,named:t.Shape.LINE}})],t.LineUpdater),t.PolylineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,e.map((function(t){return t[0]}))),r=Math.max.apply(Math,e.map((function(t){return t[0]}))),i=Math.min.apply(Math,e.map((function(t){return t[1]})));return{width:r-n,height:Math.max.apply(Math,e.map((function(t){return t[1]})))-i}},t}(),t.PolylineUpdater=Pr([ct({token:[{token:Va,named:t.Shape.POLYLINE},{token:Va,named:t.Shape.POLYGON}]})],t.PolylineUpdater),t.PathUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),t.PathUpdater=Pr([ct({token:{token:Va,named:t.Shape.PATH}})],t.PathUpdater),t.CSSPropertyClipPath=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){if(n instanceof Ce&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var i=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(i,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),Pr([lt(_l),kr("design:type",Object)],t.CSSPropertyClipPath.prototype,"sceneGraphService",void 0),t.CSSPropertyClipPath=Pr([ct({token:{token:ns,named:t.PropertySyntax.CLIP_PATH}})],t.CSSPropertyClipPath),t.CSSPropertyColor=function(){function t(){this.parser=Cs,this.mixer=Ms}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ce?"none"===n.value?ps:vs:n},t}(),t.CSSPropertyColor=Pr([ct({token:[{token:ns,named:t.PropertySyntax.PAINT},{token:ns,named:t.PropertySyntax.COLOR}]})],t.CSSPropertyColor),t.CSSPropertyFilter=function(){function t(){this.parser=nu}return t.prototype.calculator=function(t,e,n){return n instanceof Ce?[]:n},t}(),t.CSSPropertyFilter=Pr([ct({token:{token:ns,named:t.PropertySyntax.FILTER}})],t.CSSPropertyFilter),t.CSSPropertyLengthOrPercentage=function(){function e(){this.parser=Is,this.mixer=Gs}return e.prototype.calculator=function(e,n,r,i,o){if(!qe.isRelativeUnit(r.unit))return r.value;if(r.unit===t.UnitType.kPercentage)return 0;if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=Xl(i.parentNode);if(a)return a*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=Xl(i.ownerDocument.documentElement);if(u)return u*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}},e}(),t.CSSPropertyLengthOrPercentage=Pr([ct({token:[{token:ns,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:ns,named:t.PropertySyntax.LENGTH}]})],t.CSSPropertyLengthOrPercentage),t.CSSPropertyLengthOrPercentage12=function(){function t(){this.mixer=zs}var e=t.prototype;return e.parser=function(t){var e=Fs(Re(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}(),t.CSSPropertyLengthOrPercentage12=Pr([ct({token:{token:ns,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],t.CSSPropertyLengthOrPercentage12),t.CSSPropertyLengthOrPercentage14=function(){function t(){this.mixer=zs}var e=t.prototype;return e.parser=function(t){var e=Fs(Re(t)?[t]:t);return 1===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:3===e.length?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}(),t.CSSPropertyLengthOrPercentage14=Pr([ct({token:{token:ns,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],t.CSSPropertyLengthOrPercentage14),t.CSSPropertyLocalPosition=function(e){function n(){return e.apply(this,arguments)||this}return ye(n,e),n.prototype.postProcessor=function(e){var n,r,i;switch(e.nodeName){case t.Shape.CIRCLE:case t.Shape.ELLIPSE:var o=e.parsedStyle,a=o.cx,s=o.cy;Ie(a)||(n=a),Ie(s)||(r=s);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1,u.x2),r=Math.min(c,l),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:case t.Shape.MESH:Ie(e.parsedStyle.x)||(n=e.parsedStyle.x),Ie(e.parsedStyle.y)||(r=e.parsedStyle.y)}if(e.nodeName!==t.Shape.PATH&&e.nodeName!==t.Shape.POLYLINE&&e.nodeName!==t.Shape.POLYGON&&(e.parsedStyle.defX=n||0,e.parsedStyle.defY=r||0),!Ie(n)||!Ie(r)||!Ie(i)){var h=e.getLocalPosition(),f=h[0],d=h[1],p=h[2];e.setLocalPosition(Ie(n)?f:n,Ie(r)?d:r,Ie(i)?p:i)}},n}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyLocalPosition=Pr([ct({token:{token:ns,named:t.PropertySyntax.COORDINATE}})],t.CSSPropertyLocalPosition),t.CSSPropertyMarker=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;n instanceof Ce&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o},t}(),t.CSSPropertyMarker=Pr([ct({token:{token:ns,named:t.PropertySyntax.MARKER}})],t.CSSPropertyMarker),t.CSSPropertyNumber=function(){function t(){this.mixer=Gs,this.parser=js}return t.prototype.calculator=function(t,e,n){return n.value},t}(),t.CSSPropertyNumber=Pr([ct({token:{token:ns,named:t.PropertySyntax.NUMBER}})],t.CSSPropertyNumber),t.CSSPropertyOffsetDistance=function(){function e(){this.parser=js,this.mixer=Hs(0,1)}var n=e.prototype;return n.calculator=function(t,e,n){return n.value},n.postProcessor=function(e){if(e.attributes.offsetPath){var n=e.attributes.offsetPath.nodeName;if(n===t.Shape.LINE||n===t.Shape.PATH||n===t.Shape.POLYLINE){var r=e.attributes.offsetPath.getPoint(e.parsedStyle.offsetDistance);r&&e.setLocalPosition(r.x,r.y)}}},e}(),t.CSSPropertyOffsetDistance=Pr([ct({token:{token:ns,named:t.PropertySyntax.OFFSET_DISTANCE}})],t.CSSPropertyOffsetDistance),t.CSSPropertyOffsetPath=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}(),t.CSSPropertyOffsetPath=Pr([ct({token:{token:ns,named:t.PropertySyntax.OFFSET_PATH}})],t.CSSPropertyOffsetPath),t.CSSPropertyOpacity=function(){function t(){this.parser=js,this.mixer=Hs(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),t.CSSPropertyOpacity=Pr([ct({token:{token:ns,named:t.PropertySyntax.OPACITY_VALUE}})],t.CSSPropertyOpacity),t.CSSPropertyPath=function(){function e(){this.parser=qs,this.mixer=Xs}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Ce&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new ts(0,0,0,0)}:n},n.postProcessor=function(e){if(e.nodeName===t.Shape.PATH){var n=e.parsedStyle,r=n.defX,i=n.defY;e.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},e}(),t.CSSPropertyPath=Pr([ct({token:{token:ns,named:t.PropertySyntax.PATH}})],t.CSSPropertyPath),t.CSSPropertyPoints=function(){function e(){this.parser=$s}return e.prototype.postProcessor=function(e){if(e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.POLYLINE){var n=e.parsedStyle;e.setLocalPosition(n.defX,n.defY)}},e}(),t.CSSPropertyPoints=Pr([ct({token:{token:ns,named:t.PropertySyntax.LIST_OF_POINTS}})],t.CSSPropertyPoints),t.CSSPropertyShadowBlur=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).mixer=Hs(0,1/0),e}return ye(e,t),e}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyShadowBlur=Pr([ct({token:{token:ns,named:t.PropertySyntax.SHADOW_BLUR}})],t.CSSPropertyShadowBlur),t.CSSPropertyText=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ce?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),t.CSSPropertyText=Pr([ct({token:{token:ns,named:t.PropertySyntax.TEXT}})],t.CSSPropertyText),t.CSSPropertyTextTransform=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),t.CSSPropertyTextTransform=Pr([ct({token:{token:ns,named:t.PropertySyntax.TEXT_TRANSFORM}})],t.CSSPropertyTextTransform),t.CSSPropertyTransform=function(){function t(){this.tmpMat4=fn(),this.parser=zu,this.mixer=$u}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ce?[]:n},e.postProcessor=function(t){var e=this,n=t.parsedStyle,r=n.transform,i=n.defX,o=n.defY;r&&r.length&&(t.resetLocalTransform(),t.setLocalPosition(i,o),r.forEach((function(n){var r=n.t,a=n.d;if("scale"===r){var s=(null==a?void 0:a.map((function(t){return t.value})))||[1,1];t.scaleLocal(s[0],s[1],1)}else if("scalex"===r){var u=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(u[0],1,1)}else if("scaley"===r){var c=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,c[0],1)}else if("scalez"===r){var l=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,l[0])}else if("scale3d"===r){var h=(null==a?void 0:a.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(h[0],h[1],h[2])}else if("translate"===r){var f=a||[on,on];t.translateLocal(f[0].value,f[1].value,0)}else if("translatex"===r){t.translateLocal((a||[on])[0].value,0,0)}else if("translatey"===r){t.translateLocal(0,(a||[on])[0].value,0)}else if("translatez"===r){t.translateLocal(0,0,(a||[on])[0].value)}else if("translate3d"===r){var d=a||[on,on,on];t.translateLocal(d[0].value,d[1].value,d[2].value)}else if("rotate"===r){t.rotateLocal(0,0,(a||[an])[0].value)}else if("rotatex"===r){t.rotateLocal((a||[an])[0].value,0,0)}else if("rotatey"===r){t.rotateLocal(0,(a||[an])[0].value,0)}else if("rotatez"===r){t.rotateLocal(0,0,(a||[an])[0].value)}else if("rotate3d"===r);else if("skew"===r){var p=(null==a?void 0:a.map((function(t){return t.value})))||[0,0];t.setLocalSkew(io(p[0]),io(p[1]))}else if("skewx"===r){var v=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(io(v[0]),t.getLocalSkew()[1])}else if("skewy"===r){var y=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],io(y[0]))}else if("matrix"===r){var g=a.map((function(t){return t.value}));t.setLocalTransform(vn(e.tmpMat4,g[0],g[1],0,0,g[2],g[3],0,0,0,0,1,0,g[4]+i,g[5]+o,0,1))}else"matrix3d"===r&&(vn.apply(Ln,[e.tmpMat4].concat(a.map((function(t){return t.value})))),e.tmpMat4[12]+=i,e.tmpMat4[13]+=o,t.setLocalTransform(e.tmpMat4))})))},t}(),t.CSSPropertyTransform=Pr([ct({token:{token:ns,named:t.PropertySyntax.TRANSFORM}})],t.CSSPropertyTransform),t.CSSPropertyTransformOrigin=function(){this.parser=ec},t.CSSPropertyTransformOrigin=Pr([ct({token:{token:ns,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],t.CSSPropertyTransformOrigin),t.CSSPropertyZIndex=function(){function t(){this.parser=js}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t}(),t.CSSPropertyZIndex=Pr([ct({token:{token:ns,named:t.PropertySyntax.Z_INDEX}})],t.CSSPropertyZIndex);var Kl={},Zl=[];t.DisplayObjectPool=function(){function e(){}var n=e.prototype;return n.getByEntity=function(t){return Kl[t]},n.getAll=function(){return Object.keys(Kl).map((function(t){return Kl[t]}))},n.add=function(e,n){Kl[e]=n,n.nodeName===t.Shape.HTML&&Zl.push(n)},n.remove=function(e){var n=Kl[e];if(n&&(delete Kl[e],n.nodeName===t.Shape.HTML)){var r=Zl.indexOf(n);Zl.splice(r,1)}},n.getHTMLs=function(){return Zl},e}(),t.DisplayObjectPool=Pr([ct()],t.DisplayObjectPool);var Jl=At((function(e){Y.decorate(ut(),ic.EventEmitter),e(t.DisplayObjectPool),e(t.DefaultSceneGraphSelector),e({token:Nl,useFactory:function(t){return function(){return t.container.get(kl)}}}),e(t.DefaultSceneGraphService),e(t.OffscreenCanvasCreator),e(t.TextService),e(t.CircleUpdater),e(t.EllipseUpdater),e(t.RectUpdater),e(t.TextUpdater),e(t.LineUpdater),e(t.PolylineUpdater),e(t.PathUpdater),e({token:ja,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Va,n)&&(e[n]=t.container.getNamed(Va,n)),e[n]}}}),e(t.CSSPropertyNumber),e(t.CSSPropertyAngle),e(t.CSSPropertyClipPath),e(t.CSSPropertyColor),e(t.CSSPropertyFilter),e(t.CSSPropertyLengthOrPercentage),e(t.CSSPropertyLengthOrPercentage12),e(t.CSSPropertyLengthOrPercentage14),e(t.CSSPropertyLocalPosition),e(t.CSSPropertyOffsetDistance),e(t.CSSPropertyOffsetPath),e(t.CSSPropertyOpacity),e(t.CSSPropertyPath),e(t.CSSPropertyPoints),e(t.CSSPropertyShadowBlur),e(t.CSSPropertyText),e(t.CSSPropertyTextTransform),e(t.CSSPropertyTransform),e(t.CSSPropertyTransformOrigin),e(t.CSSPropertyZIndex),e(t.CSSPropertyMarker),e({token:es,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(ns,n)&&(e[n]=t.container.getNamed(ns,n)),e[n]}}}),e(t.DefaultStyleValueRegistry),e(t.LayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:Iu,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Ru,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:bu,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:Cu,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Mu,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:Pu,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:Nu,useValue:n}),i.register({token:ku,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:Fu,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Bu,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(Cu),o=r.get(Fu),a=r.get(Pu);return r.register({token:Eu,useValue:ve({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),Ql=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ve({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){this.plugins.push(t)},e.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}();let $l=1;const th="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},eh=Date.now();let nh={},rh=Date.now();const ih=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-rh,r=n>16?0:16-n,i=$l++;return nh[i]=t,Object.keys(nh).length>1||setTimeout((()=>{rh=e;const t=nh;nh={},Object.keys(t).forEach((e=>t[e](th.performance&&"function"==typeof th.performance.now?th.performance.now():Date.now()-eh)))}),r),i},oh=t=>{delete nh[t]},ah=t=>"string"!=typeof t?ih:""===t?th.requestAnimationFrame:th[t+"RequestAnimationFrame"],sh=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!ah(t))),uh=ah(sh),ch="string"!=typeof(lh=sh)?oh:""===lh?th.cancelAnimationFrame:th[lh+"CancelAnimationFrame"]||th[lh+"CancelRequestAnimationFrame"];var lh,hh,fh;th.requestAnimationFrame=uh,th.cancelAnimationFrame=ch,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:uh,cancelAnimationFrame:ch});var dh,ph,vh=t.Syringe.defineToken(""),yh=(hh=function(){function e(){this.strategyProvider=void 0,this.renderingContext=void 0}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(fh.tag,(function(e){if(e){var i=e.cullable;return i.visible=0===r.length?n.renderingContext.unculledEntities.indexOf(e.entity)>-1:r.every((function(t){return t.isVisible(e)})),!i.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new ac(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(fh.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),hh.tag="Culling",fh=hh);Pr([Ut(vh),kr("design:type",Object)],yh.prototype,"strategyProvider",void 0),Pr([lt(Dl),kr("design:type",Object)],yh.prototype,"renderingContext",void 0),yh=fh=Pr([ct({contrib:Hl})],yh);var gh,mh,Th=(dh=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(ph.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),dh.tag="DirtyCheck",ph=dh);Th=ph=Pr([ct({contrib:Hl})],Th);var bh=(gh=function(){function t(){var t=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new ol(null),this.rootWheelEvent=new al(null),this.onPointerMove=function(e){var n,r,i=null===(n=t.renderingContext.root)||void 0===n||null===(r=n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportsTouchEvents||"touch"!==e.pointerType){for(var o,a=Ee(t.normalizeToPointerEvent(e,i));!(o=a()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,o.value,i);t.eventService.mapEvent(s)}t.setCursor(t.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=fe(le().mark((function t(n){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.renderingService.hooks.pick.promise({position:n,picked:[],topmost:!0});case 2:return t.abrupt("return",t.sent.picked[0]||null);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(mh.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(mh.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var i,o=Ee(r);!(i=o()).done;){var a=e.bootstrapEvent(e.rootPointerEvent,i.value,n);e.eventService.mapEvent(a)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap(mh.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r,i=e.contextService.getDomElement(),o=i&&t.target&&t.target!==i&&i.contains&&!i.contains(t.target)?"outside":"",a=Ee(e.normalizeToPointerEvent(t,n));!(r=a()).done;){var s=e.bootstrapEvent(e.rootPointerEvent,r.value,n);s.type+=o,e.eventService.mapEvent(s)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(mh.tag,this.onPointerMove),t.hooks.pointerOver.tap(mh.tag,this.onPointerMove),t.hooks.pointerOut.tap(mh.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new $a(e.clientX,e.clientY)),i=r.y;t.viewport.x=r.x,t.viewport.y=i;var o=this.eventService.viewport2Canvas(t.viewport),a=o.y;return t.canvas.x=o.x,t.canvas.y=a,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Bo[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new $a(t.clientX,t.clientY)),r=n.y;e.viewport.x=n.x,e.viewport.y=r;var i=this.eventService.viewport2Canvas(e.viewport),o=i.y;return e.canvas.x=i.x,e.canvas.y=o,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;t.changedTouches.length>r;r++){var i=t.changedTouches[r];Oe(i.button)&&(i.button=0),Oe(i.buttons)&&(i.buttons=1),Oe(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Oe(i.width)&&(i.width=i.radiusX||1),Oe(i.height)&&(i.height=i.radiusY||1),Oe(i.tiltX)&&(i.tiltX=0),Oe(i.tiltY)&&(i.tiltY=0),Oe(i.pointerType)&&(i.pointerType="touch"),Oe(i.pointerId)&&(i.pointerId=i.identifier||0),Oe(i.pressure)&&(i.pressure=i.force||.5),Oe(i.twist)&&(i.twist=0),Oe(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Oe(o.isPrimary)&&(o.isPrimary=!0),Oe(o.width)&&(o.width=1),Oe(o.height)&&(o.height=1),Oe(o.tiltX)&&(o.tiltX=0),Oe(o.tiltY)&&(o.tiltY=0),Oe(o.pointerType)&&(o.pointerType="mouse"),Oe(o.pointerId)&&(o.pointerId=1),Oe(o.pressure)&&(o.pressure=.5),Oe(o.twist)&&(o.twist=0),Oe(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),gh.tag="Event",mh=gh);Pr([lt(sa),kr("design:type",Object)],bh.prototype,"canvasConfig",void 0),Pr([lt(Ol),kr("design:type",Object)],bh.prototype,"contextService",void 0),Pr([lt(t.RenderingService),kr("design:type",t.RenderingService)],bh.prototype,"renderingService",void 0),Pr([lt(Dl),kr("design:type",Object)],bh.prototype,"renderingContext",void 0),Pr([lt(t.EventService),kr("design:type",t.EventService)],bh.prototype,"eventService",void 0),bh=mh=Pr([ct({contrib:Hl})],bh);var Eh,Sh,xh=[t.Shape.CIRCLE,t.Shape.ELLIPSE,t.Shape.IMAGE,t.Shape.RECT,t.Shape.LINE,t.Shape.POLYLINE,t.Shape.POLYGON,t.Shape.TEXT,t.Shape.PATH,t.Shape.HTML],wh=function(){function e(){this.camera=void 0}var n=e.prototype;return n.isVisible=function(e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(Ga.isEmpty(o))return!1;var a=this.camera.getFrustum(),s=null===(n=e.parentNode)||void 0===n||null===(r=n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,s||t.Mask.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==t.Mask.OUTSIDE,i.visible},n.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===t.Mask.OUTSIDE||r===t.Mask.INSIDE)return r;for(var o=t.Mask.INSIDE,a=xh.indexOf(e.nodeName)>-1,s=0,u=i.length;u>s;++s){var c=1<<s;if(0!=(r&c)&&(!a||4!==s&&5!==s)){var l=i[s],h=l.normal,f=l.distance;if(0>Xn(h,n.getPositiveFarPoint(i[s]))+f)return t.Mask.OUTSIDE;0>Xn(h,n.getNegativeFarPoint(i[s]))+f&&(o|=c)}}return o},e}();Pr([lt(Fl),kr("design:type",Gl)],wh.prototype,"camera",void 0),wh=Pr([ct({contrib:vh})],wh);var Ph=(Eh=function(){function e(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}var n=e.prototype;return n.pushToSync=function(t){var e=this;t.forEach((function(t){e.toSync.add(t)}))},n.apply=function(e){var n=this,r=function(t){t.target.renderable.dirty=!0,e.dirtify()},i=function(t){t.detail.affectChildren&&t.target.forEach((function(t){n.pushToSync([t])})),n.pushToSync(t.composedPath().slice(0,-2)),e.dirtify()},o=function(t){var r=t.target;n.pushToSync(t.composedPath().slice(0,-2)),n.styleValueRegistry.recalc(r),n.sceneGraphService.dirtifyToRoot(r),e.dirtify()},a=function(t){var r=t.target,i=r.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(r),n.sceneGraphService.dirtifyToRoot(t.target),e.dirtify()};e.hooks.init.tapPromise(Sh.tag,fe(le().mark((function e(){return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.renderingContext.root.addEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.addEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.addEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(t.ElementEvent.BOUNDS_CHANGED,i);case 4:case"end":return e.stop()}}),e)})))),e.hooks.destroy.tap(Sh.tag,(function(){n.renderingContext.root.removeEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.removeEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.removeEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(t.ElementEvent.BOUNDS_CHANGED,i)})),e.hooks.endFrame.tap(Sh.tag,(function(){n.syncRTree()}))},n.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax(),c=u[0],l=u[1];r.aabb||(r.aabb={}),r.aabb.id=n.entity,r.aabb.minX=a,r.aabb.minY=s,r.aabb.maxX=c,r.aabb.maxY=l}r.aabb&&(isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb))})),this.rBush.load(e),e.length=0,this.toSync.clear()},e}(),Eh.tag="Prepare",Sh=Eh);Pr([lt(Dl),kr("design:type",Object)],Ph.prototype,"renderingContext",void 0),Pr([lt(ce),kr("design:type",Object)],Ph.prototype,"styleValueRegistry",void 0),Pr([lt(_l),kr("design:type",Object)],Ph.prototype,"sceneGraphService",void 0),Pr([lt(fc),kr("design:type",zt)],Ph.prototype,"rBush",void 0),Ph=Sh=Pr([ct({contrib:Hl})],Ph);var Nh,kh=At((function(e){t.Contribution.register(e,Hl,{cache:!1}),t.Contribution.register(e,vh,{cache:!1}),e({token:fc,useValue:new zt}),e(t.RenderingService),e(t.EventService),e(bh),e(Ph),e(Th),e(yh),e(wh)}));(Nh=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",Nh.BEFORE_RENDER="beforerender",Nh.AFTER_RENDER="afterrender",Nh.BEFORE_DESTROY="beforedestroy",Nh.AFTER_DESTROY="afterdestroy",Nh.RESIZE="resize",Nh.DIRTY_RECTANGLE="dirtyrectangle";var Ch=function(e){function n(n){var r;(r=e.call(this)||this).container=Ft.createChild(),r.document=void 0,r.customElements=void 0,r.requestAnimationFrame=void 0,r.cancelAnimationFrame=void 0,r.devicePixelRatio=void 0,r.supportsPointerEvents=void 0,r.supportsTouchEvents=void 0,r.isTouchEvent=void 0,r.isMouseEvent=void 0,r.Element=Pc,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.mountEvent=new ac(t.ElementEvent.MOUNTED),r.unmountEvent=new ac(t.ElementEvent.UNMOUNTED),r.beforeRenderEvent=new ac(t.CanvasEvent.BEFORE_RENDER),r.afterRenderEvent=new ac(t.CanvasEvent.AFTER_RENDER),r.document=new rl,r.document.defaultView=Te(r),r.customElements=new Pl;var i=n.container,o=n.canvas,a=n.offscreenCanvas,s=n.width,u=n.height,c=n.devicePixelRatio,l=n.renderer,h=n.background,f=n.cursor,d=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,y=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,T=n.isTouchEvent,b=n.isMouseEvent;Wi(i,Te(r));var E=s,S=u,x=c;return o&&(x=1>(x=c||Yi&&window.devicePixelRatio||1)?1:Math.ceil(x),E=s||Do(o)||o.width/x,S=u||Fo(o)||o.height/x),r.devicePixelRatio=x,r.requestAnimationFrame=null!=p?p:uh.bind(globalThis),r.cancelAnimationFrame=null!=v?v:ch.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=T?T:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=b?b:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:E,height:S,renderer:l,offscreenCanvas:a,devicePixelRatio:x,cursor:f||"default",background:h||"transparent",createImage:y,document:d}),r.initDefaultCamera(E,S),fe(le().mark((function e(){return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new ac(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}ye(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:sa,useValue:e}),this.container.register({token:Dl,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_INSERTED,(function(t){n.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_REMOVED,(function(t){n.unmountChildren(t.detail.child)}))},r.initDefaultCamera=function(e,n){var r=(new Gl).setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0).setOrthographic(e/-2,e/2,n/2,n/-2,.1,1e3);r.canvas=this;var i=this.container.get(Dl);r.on(Bl.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:Fl,useValue:r})},r.getConfig=function(){return this.container.get(sa)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(Fl)},r.getContextService=function(){return this.container.get(Ol)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(Dl)},r.getStats=function(){return this.getRenderingService().getStats()},r.destroy=function(e,n){(void 0===e&&(e=!0),void 0===n&&(n=!1),n||this.dispatchEvent(new ac(t.CanvasEvent.BEFORE_DESTROY)),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var r=this.getRoot();this.unmountChildren(r),e&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),n||this.dispatchEvent(new ac(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(sa);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(Fl),o=i.getProjectionMode();i.setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0),o===t.CameraProjectionMode.ORTHOGRAPHIC?i.setOrthographic(e/-2,e/2,n/2,n/-2,i.getNear(),i.getFar()):i.setAspect(e/n),this.dispatchEvent(new ac(t.CanvasEvent.RESIZE,{width:e,height:n}))},r.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},r.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},r.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},r.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},r.render=function(){(this.dispatchEvent(this.beforeRenderEvent),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(this.afterRenderEvent)},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=fe(le().mark((function e(n){var r;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(n),r=this.container.get(Ol),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),e.next=11,r.init();case 11:return e.next=13,this.renderingService.init();case 13:this.inited=!0,this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot()),n.getConfig().enableAutoRendering&&this.run();case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(kh),this.container.load(kh,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=fe(le().mark((function t(e){var n,r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer!==e){t.next=3;break}return t.abrupt("return");case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach((function(t){t.destroy()})),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.setCursor=function(t){this.container.get(sa).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(t){var e=this;if(this.inited){var n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t instanceof kc&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(e.unmountEvent),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))}},r.mountChildren=function(t){var e=this;this.inited?t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(e.mountEvent),t instanceof kc&&t.connectedCallback&&t.connectedCallback())})):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},r.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},r.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},r.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},r.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},r.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},r.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},pe(n,[{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),n}(sc);Ft.load(Jl);var Mh=Ft.get(_l),_h=Ft.get(ce),Ah=Ft.get(t.LayoutEngine),Oh=Ft.get(t.DisplayObjectPool);t.AABB=Ga,t.AbstractLayoutDefinition=_u,t.AbstractRenderer=Ql,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=Qc,t.AnimationEffectTiming=sl,t.AnimationEvent=Zc,t.AnimationTimeline=nl,t.AsyncParallelHook=ba,t.AsyncSeriesWaterfallHook=wa,t.BUILT_IN_PROPERTIES=rs,t.BoundingSphere=za,t.CSS=Uu,t.CSSColorValue=ke,t.CSSGradientValue=un,t.CSSKeywordValue=Ce,t.CSSMathInvert=Ke,t.CSSMathMax=en,t.CSSMathMin=tn,t.CSSMathNegate=Ze,t.CSSMathProduct=rn,t.CSSMathSum=nn,t.CSSMathValue=Xe,t.CSSMathVariadic=$e,t.CSSNumericValue=Ve,t.CSSNumericValueType=je,t.CSSProperty=ns,t.CSSPropertySyntaxFactory=es,t.CSSRGB=sn,t.CSSStyleValue=Ne,t.CSSUnitValue=qe,t.Camera=Gl,t.CameraEvent=Bl,t.Canvas=Ch,t.CanvasConfig=sa,t.Circle=Mc,t.Container=Dt,t.ContextNode=ku,t.ContextService=Ol,t.Cullable=cc,t.CustomElement=kc,t.CustomElementRegistry=Pl,t.CustomEvent=ac,t.DCHECK=Me,t.DCHECK_EQ=_e,t.DCHECK_NE=Ae,t.DELEGATION_SPLITTER=":",t.DefaultCamera=Fl,t.DefaultContributionProvider=Pt,t.Deferred=Io,t.DisplayObject=Pc,t.Document=rl,t.EasingFunctions=_o,t.Element=wc,t.Ellipse=Ac,t.EventTarget=sc,t.FederatedEvent=oc,t.FederatedMouseEvent=il,t.FederatedPointerEvent=ol,t.FederatedWheelEvent=al,t.FragmentResultFactory=Pu,t.FragmentResultOptions=Nu,t.Frustum=Ya,t.Geometry=lc,t.GeometryAABBUpdater=Va,t.GeometryUpdaterFactory=ja,t.GlobalContainer=Ft,t.Group=Ic,t.HTML=Kc,t.Image=Lc,t.KeyframeEffect=wl,t.LayoutChildrenFactory=Cu,t.LayoutChildrenOptions=Mu,t.LayoutContextFactory=bu,t.LayoutContextOptions=Eu,t.LayoutEdgesFactory=Iu,t.LayoutEdgesOptions=Ru,t.LayoutFragmentFactory=Fu,t.LayoutFragmentOptions=Bu,t.LayoutObject=wu,t.Line=Fc,t.MOUSE_POINTER_ID=1,t.Module=At,t.MutationEvent=yc,t.MutationObserver=fl,t.MutationRecord=ul,t.Node=uc,t.ObjectTyped=Ro,t.Odeg=an,t.OptionSymbol=ft,t.Opx=on,t.Path=Uc,t.Plane=Wa,t.Point=$a,t.Polygon=Vc,t.Polyline=Hc,t.Provider=mt,t.RBush=zt,t.RBushNode=hc,t.RBushRoot=fc,t.Ray=Qa,t.Rect=Wc,t.Rectangle=ts,t.Registration=hl,t.Renderable=dc,t.RenderingContext=Dl,t.RenderingPluginContribution=Hl,t.SceneGraphSelector=kl,t.SceneGraphSelectorFactory=Nl,t.SceneGraphService=_l,t.Sortable=pc,t.StyleValueRegistry=ce,t.SyncHook=_a,t.SyncWaterfallHook=Da,t.SyringeModule=Mt,t.TOUCH_TO_POINTER=Bo,t.Text=qc,t.Transform=vc,t.baseTypeToString=Ue,t.cache=is,t.camelCase=Zo,t.clamp=eo,t.clampedMergeNumbers=Hs,t.cleanExistedCanvas=Wi,t.colorStopToString=Uo,t.compareAnimations=$c,t.composeMatrix=Xu,t.computeLinearGradient=function(t,e,n){var r=n*Math.PI/180,i=0+t/2,o=0+e/2,a=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r));return{x1:i-Math.cos(r)*a/2,y1:o-Math.sin(r)*a/2,x2:i+Math.cos(r)*a/2,y2:o+Math.sin(r)*a/2}},t.computeRadialGradient=function(t,e,n,r){return{x:n*t,y:r*e,r:Math.sqrt(t*t+e*e)/2}},t.contrib=Ut,t.convertAngleUnit=Ds,t.convertEffectInput=Qo,t.convertItemToMatrix=Wu,t.convertPercentUnit=Bs,t.convertToDash=ho,t.convertToPath=function(e,n){void 0===n&&(n=!0);var r=[];switch(e.nodeName){case t.Shape.LINE:var i=e.parsedStyle;r=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.x1,i.y1,i.x2,i.y2);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=ha(a,a,o.cx,o.cy);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=ha(s.rx,s.ry,s.cx,s.cy);break;case t.Shape.POLYLINE:case t.Shape.POLYGON:r=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(e.parsedStyle.points.points,e.nodeName===t.Shape.POLYGON);break;case t.Shape.RECT:var u=e.parsedStyle,c=u.width,l=u.height,h=u.x,f=u.y,d=u.radius,p=d&&d.some((function(t){return 0!==t}));r=function(t,e,n,r,i){if(i){var o=i[0],a=i[1],s=i[2],u=i[3],c=t>0?1:-1,l=e>0?1:-1,h=c+l!==0?1:0;return[["M",c*o+n,r],["L",t-c*a+n,r],a?["A",a,a,0,0,h,t+n,l*a+r]:null,["L",t+n,e-l*s+r],s?["A",s,s,0,0,h,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,h,n,e+r-l*u]:null,["L",n,l*o+r],o?["A",o,o,0,0,h,c*o+n,r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(c,l,h,f,p&&d.map((function(t){return eo(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))})));break;case t.Shape.PATH:var v=e.parsedStyle.path,y=v.zCommandIndexes;r=[].concat(v.curve),y.forEach((function(t,e){r.splice(t+e,1,["Z"])}))}if(r.length)return function(t,e,n){var r;void 0===n&&(n=!0),n&&(r=e.getLocalTransform());var i=e.parsedStyle,o=i.defX,a=void 0===o?0:o,s=i.defY,u=void 0===s?0:s;return t.reduce((function(t,e){var i="";if("M"===e[0]||"L"===e[0]){var o=Un(e[1]-a,e[2]-u,0);n&&Jn(o,o,r),i=""+e[0]+o[0]+","+o[1]}else if("Z"===e[0])i=e[0];else if("C"===e[0]){var s=Un(e[1]-a,e[2]-u,0),c=Un(e[3]-a,e[4]-u,0),l=Un(e[5]-a,e[6]-u,0);n&&(Jn(s,s,r),Jn(c,c,r),Jn(l,l,r)),i=""+e[0]+s[0]+","+s[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}else if("A"===e[0]){var h=Un(e[6]-a,e[7]-u,0);n&&Jn(h,h,r),i=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+h[0]+","+h[1]}return t+i}),"")}(r,e,n)},t.createVec3=ro,t.decompose=lo,t.decorate=Y.decorate,t.deg2rad=io,t.deg2turn=function(t){return t/360},t.displayObjectPool=Oh,t.equalSet=function(t,e){if(t.size!==e.size)return!1;for(var n,r=Ee(t);!(n=r()).done;){if(!e.has(n.value))return!1}return!0},t.extractPolygons=ca,t.formatAttribute=aa,t.fromRotationTranslationScale=uo,t.getAngle=no,t.getEasingFunction=Ao,t.getEuler=so,t.getHeight=Fo,t.getOrCreateKeyword=ms,t.getOrCreateRGBA=ys,t.getRotationInRadians=function(t){return Math.atan2(t[1],t[4])},t.getScaling=function(t,e){var n=e[3],r=e[4];return t[0]=Math.hypot(e[0],e[1]),t[1]=Math.hypot(n,r),t},t.getStyle=Lo,t.getTranslation=function(t,e){return t[0]=e[6],t[1]=e[7],t},t.getWidth=Do,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.hasArcOrBezier=ua,t.inheritKeywordValue=ds,t.initialKeywordValue=fs,t.inject=lt,t.injectable=ut,t.isBoolean=De,t.isBrowser=Yi,t.isComparison=function(e){return e===t.CSSMathOperator.kMin||e===t.CSSMathOperator.kMax||e===t.CSSMathOperator.kClamp},t.isFillOrStrokeAffected=function(t,e,n){var r=!1,i=!1;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=!!e&&!e.isNone,i=!!n&&!n.isNone):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(r=!0,i=!0),[r,i]},t.isFunction=Le,t.isNil=Ie,t.isNumber=Re,t.isObject=Fe,t.isPattern=ks,t.isString=Jo,t.isSyringeModule=_t,t.isUndefined=Oe,t.layoutEngine=Ah,t.makePerspective=co,t.makeQuerablePromise=Oo,t.makeTiming=El,t.mergeColors=Ms,t.mergeDimensions=Ls,t.mergeNumberLists=zs,t.mergeNumbers=Gs,t.mergePaths=Xs,t.mergeTransforms=$u,t.named=ht,t.noneColor=ps,t.normalizeKeyframes=ml,t.normalizeTimingInput=Sl,t.numberToString=Us,t.numericTimingToObject=xl,t.optional=Y.optional,t.parseAngle=Rs,t.parseColor=Cs,t.parseDimension=_s,t.parseDimensionArray=Fs,t.parseFilter=nu,t.parseGradient=jo,t.parseLength=As,t.parseLengthOrPercentage=Is,t.parseNumber=js,t.parseNumberList=Vs,t.parseParam=tu,t.parsePath=qs,t.parsePoints=$s,t.parseTransform=zu,t.parseTransformOrigin=ec,t.parserPercentage=Os,t.path2Segments=la,t.postConstruct=Y.postConstruct,t.rad2deg=oo,t.register=Bt,t.registerSideOption=function(t,e){Reflect.defineMetadata(ft,t,e)},t.sceneGraphService=Mh,t.setDOMSize=function(t,e,n){Yi&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.sortByZIndex=Ml,t.styleValueRegistry=_h,t.toFontString=Ba,t.transient=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.transient}))},t.translatePathToString=function(t,e,n,r,i,o,a){void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=t.map((function(s,u){var c="Z"===t[t.length-1][0],l=u===t.length-(c?2:1)?o:0,h=u===t.length-(c?2:1)?a:0;switch(s[0]){case"M":return"M "+(s[1]-e+r)+","+(s[2]-n+i);case"L":return"L "+(s[1]-e+l)+","+(s[2]-n+h);case"Q":return"Q "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e+l)+" "+(s[4]-n+h);case"C":return"C "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e)+" "+(s[4]-n)+","+(s[5]-e+l)+" "+(s[6]-n+h);case"A":return"A "+s[1]+" "+s[2]+" "+s[3]+" "+s[4]+" "+s[5]+" "+(s[6]-e+l)+" "+(s[7]-n+h);case"Z":return"Z"}})).join(" ");return~s.indexOf("NaN")?"":s},t.transparentColor=vs,t.turn2deg=ao,t.typeCheck=Je,t.unitTypeToBaseType=Be,t.unmanaged=Y.unmanaged,t.unsetKeywordValue=hs,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
3
|
+
le=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new x(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(w([])));y&&y!==e&&n.call(y,i)&&(p=y);var g=d.prototype=h.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function w(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(T.prototype),s(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function he(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){he(o,r,i,a,s,"next",t)}function s(t){he(o,r,i,a,s,"throw",t)}a(void 0)}))}}function de(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pe(t,e,n){return e&&de(t.prototype,e),n&&de(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ve.apply(this,arguments)}function ye(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ge(t,e)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}function me(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(i[n]=t[n]);return i}function Te(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);e>n;n++)r[n]=t[n];return r}function Ee(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(ie=t.UnitType||(t.UnitType={}))[ie.kUnknown=0]="kUnknown",ie[ie.kNumber=1]="kNumber",ie[ie.kPercentage=2]="kPercentage",ie[ie.kEms=3]="kEms",ie[ie.kPixels=4]="kPixels",ie[ie.kRems=5]="kRems",ie[ie.kDegrees=6]="kDegrees",ie[ie.kRadians=7]="kRadians",ie[ie.kGradians=8]="kGradians",ie[ie.kTurns=9]="kTurns",ie[ie.kMilliseconds=10]="kMilliseconds",ie[ie.kSeconds=11]="kSeconds",ie[ie.kInteger=12]="kInteger",(oe=t.UnitCategory||(t.UnitCategory={}))[oe.kUNumber=0]="kUNumber",oe[oe.kUPercent=1]="kUPercent",oe[oe.kULength=2]="kULength",oe[oe.kUAngle=3]="kUAngle",oe[oe.kUTime=4]="kUTime",oe[oe.kUOther=5]="kUOther",(ae=t.ValueRange||(t.ValueRange={}))[ae.kAll=0]="kAll",ae[ae.kNonNegative=1]="kNonNegative",ae[ae.kInteger=2]="kInteger",ae[ae.kNonNegativeInteger=3]="kNonNegativeInteger",ae[ae.kPositiveInteger=4]="kPositiveInteger",(se=t.Nested||(t.Nested={}))[se.kYes=0]="kYes",se[se.kNo=1]="kNo",(ue=t.ParenLess||(t.ParenLess={}))[ue.kYes=0]="kYes",ue[ue.kNo=1]="kNo";var Se,xe=[{name:"em",unit_type:t.UnitType.kEms},{name:"px",unit_type:t.UnitType.kPixels},{name:"deg",unit_type:t.UnitType.kDegrees},{name:"rad",unit_type:t.UnitType.kRadians},{name:"grad",unit_type:t.UnitType.kGradians},{name:"ms",unit_type:t.UnitType.kMilliseconds},{name:"s",unit_type:t.UnitType.kSeconds},{name:"rem",unit_type:t.UnitType.kRems},{name:"turn",unit_type:t.UnitType.kTurns}];(Se=t.CSSStyleValueType||(t.CSSStyleValueType={}))[Se.kUnknownType=0]="kUnknownType",Se[Se.kUnparsedType=1]="kUnparsedType",Se[Se.kKeywordType=2]="kKeywordType",Se[Se.kUnitType=3]="kUnitType",Se[Se.kSumType=4]="kSumType",Se[Se.kProductType=5]="kProductType",Se[Se.kNegateType=6]="kNegateType",Se[Se.kInvertType=7]="kInvertType",Se[Se.kMinType=8]="kMinType",Se[Se.kMaxType=9]="kMaxType",Se[Se.kClampType=10]="kClampType",Se[Se.kTransformType=11]="kTransformType",Se[Se.kPositionType=12]="kPositionType",Se[Se.kURLImageType=13]="kURLImageType",Se[Se.kColorType=14]="kColorType",Se[Se.kUnsupportedColorType=15]="kUnsupportedColorType";var we,Pe,Ne=function(){function e(){}e.parse=function(t,e){return[][0]},e.parseAll=function(t,e){return[]},e.unitFromName=function(e){return e?"number"===e?t.UnitType.kNumber:"percent"===e||"%"===e?t.UnitType.kPercentage:this.stringToUnitType(e):t.UnitType.kUnknown},e.unitTypeToUnitCategory=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return t.UnitCategory.kUNumber;case t.UnitType.kPercentage:return t.UnitCategory.kUPercent;case t.UnitType.kPixels:return t.UnitCategory.kULength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.UnitCategory.kUTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.UnitCategory.kUAngle;default:return t.UnitCategory.kUOther}},e.unitTypeToString=function(e){switch(e){case t.UnitType.kNumber:case t.UnitType.kInteger:return"";case t.UnitType.kPercentage:return"%";case t.UnitType.kEms:return"em";case t.UnitType.kRems:return"rem";case t.UnitType.kPixels:return"px";case t.UnitType.kDegrees:return"deg";case t.UnitType.kRadians:return"rad";case t.UnitType.kGradians:return"grad";case t.UnitType.kMilliseconds:return"ms";case t.UnitType.kSeconds:return"s";case t.UnitType.kTurns:return"turn"}return""},e.stringToUnitType=function(t){return xe.find((function(e){return e.name===t})).unit_type},e.canonicalUnitTypeForCategory=function(e){switch(e){case t.UnitCategory.kUNumber:return t.UnitType.kNumber;case t.UnitCategory.kULength:return t.UnitType.kPixels;case t.UnitCategory.kUPercent:return t.UnitType.kPercentage;case t.UnitCategory.kUTime:return t.UnitType.kSeconds;case t.UnitCategory.kUAngle:return t.UnitType.kDegrees;default:return t.UnitType.kUnknown}},e.conversionToCanonicalUnitsScaleFactor=function(e){var n=1;switch(e){case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kSeconds:break;case t.UnitType.kMilliseconds:n=.001;break;case t.UnitType.kRadians:n=180/Math.PI;break;case t.UnitType.kGradians:n=.9;break;case t.UnitType.kTurns:n=360}return n},e.isAngle=function(e){return e===t.UnitType.kDegrees||e===t.UnitType.kRadians||e===t.UnitType.kGradians||e===t.UnitType.kTurns},e.isLength=function(e){return e>=t.UnitType.kEms&&t.UnitType.kDegrees>e},e.isRelativeUnit=function(e){return e===t.UnitType.kPercentage||e===t.UnitType.kEms||e===t.UnitType.kRems},e.isTime=function(e){return e===t.UnitType.kSeconds||e===t.UnitType.kMilliseconds};var n=e.prototype;return n.toString=function(){return this.buildCSSText(t.Nested.kNo,t.ParenLess.kNo,"")},n.isNumericValue=function(){return this.getType()>=t.CSSStyleValueType.kUnitType&&this.getType()<=t.CSSStyleValueType.kClampType},e}(),ke=function(e){function n(t){var n;return(n=e.call(this)||this).colorSpace=void 0,n.colorSpace=t,n}ye(n,e);var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kColorType},r.to=function(t){return this},n}(Ne),Ce=function(e){function n(t){var n;return(n=e.call(this)||this).value=void 0,n.value=t,n}ye(n,e);var r=n.prototype;return r.clone=function(){return new n(this.value)},r.getType=function(){return t.CSSStyleValueType.kKeywordType},r.buildCSSText=function(t,e,n){return n+this.value},n}(Ne);function Me(t){if(!t)throw new Error}function _e(t,e){if(t!==e)throw new Error}function Ae(t,e){if(t===e)throw new Error}function Oe(t){return void 0===t}function Ie(t){return null==t}function Re(t){return"number"==typeof t}function Le(t){return"function"==typeof t}function De(t){return"boolean"==typeof t}function Fe(t){return"[object Object]"===Object.prototype.toString.call(t)}function Be(e){switch(Ae(e,t.UnitType.kNumber),e){case t.UnitType.kEms:case t.UnitType.kPixels:case t.UnitType.kRems:return t.BaseType.kLength;case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:return t.BaseType.kTime;case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kTurns:return t.BaseType.kAngle;case t.UnitType.kPercentage:return t.BaseType.kPercent;default:return t.BaseType.kLength}}function Ue(e){switch(e){case t.BaseType.kLength:return"length";case t.BaseType.kAngle:return"angle";case t.BaseType.kTime:return"time";case t.BaseType.kFrequency:return"frequency";case t.BaseType.kResolution:return"resolution";case t.BaseType.kFlex:return"flex";case t.BaseType.kPercent:return"percent"}return""}(we=t.CSSMathOperator||(t.CSSMathOperator={})).kAdd="+",we.kSubtract="-",we.kMultiply="*",we.kDivide="/",we.kMin="min",we.kMax="max",we.kClamp="clamp",we.kInvalid="",(Pe=t.BaseType||(t.BaseType={}))[Pe.kLength=0]="kLength",Pe[Pe.kAngle=1]="kAngle",Pe[Pe.kTime=2]="kTime",Pe[Pe.kFrequency=3]="kFrequency",Pe[Pe.kResolution=4]="kResolution",Pe[Pe.kFlex=5]="kFlex",Pe[Pe.kPercent=6]="kPercent",Pe[Pe.kNumBaseTypes=7]="kNumBaseTypes";var je=function(){function e(e,n){void 0===e&&(e=t.UnitType.kNumber),void 0===n&&(n=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=t.BaseType.kPercent,this.hasPercentHint=!1,this.exponents=new Array(t.BaseType.kNumBaseTypes).fill(0),e!==t.UnitType.kNumber&&this.setExponent(Be(e),n)}var n=e.prototype;return n.applyPercentHint=function(e){Ae(e,t.BaseType.kPercent),this.setExponent(e,this.exponent(e)+this.exponent(t.BaseType.kPercent)),this.setExponent(t.BaseType.kPercent,0),this.percentHint=e,this.hasPercentHint=!0},n.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},n.isOnlyNonZeroEntry=function(t,e){return Ae(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},n.exponent=function(t){return this.exponents[t]},n.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},e.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},n.matchesBaseType=function(e){return Ae(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)&&!this.hasPercentHint},n.matchesPercentage=function(){return this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesBaseTypePercentage=function(e){return Ae(e,t.BaseType.kPercent),this.isOnlyNonZeroEntry(e,1)||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},n.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},n.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(t.BaseType.kPercent,1)},e.add=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint),_e(e.percentHint,n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;if(e.exponents[i]!==n.exponents[i]&&(o!==t.BaseType.kPercent&&(e.applyPercentHint(o),n.applyPercentHint(o)),e.exponents[i]!==n.exponents[i]))return e}return e},e.multiply=function(e,n,r){if(e.hasPercentHint&&n.hasPercentHint&&e.percentHint!=n.percentHint)return e;e.hasPercentHint?n.applyPercentHint(e.percentHint):n.hasPercentHint&&e.applyPercentHint(n.percentHint);for(var i=0;t.BaseType.kNumBaseTypes>i;++i){var o=i;e.setExponent(o,e.exponent(o)+n.exponent(o))}return e},e}(),Ve=function(e){function n(t){var n;return(n=e.call(this)||this).type_=void 0,n.type_=t,n}ye(n,e),n.fromNumberish=function(e){return"number"==typeof e?new qe(e,t.UnitType.kNumber):e},n.fromPercentish=function(e){return"number"==typeof e?new qe(100*e,t.UnitType.kPercentage):e};var r=n.prototype;return r.getType=function(){return t.CSSStyleValueType.kUnknownType},r.equals=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);return i.every((function(e){return t.equals(e)}))},r.add=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kSumType,i,this);var o=We(i,t.CSSMathOperator.kAdd);return o||nn.create(i)},r.sub=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);i=i.map((function(t){return t.negate()})),He(t.CSSStyleValueType.kSumType,i,this);var o=We(i,t.CSSMathOperator.kAdd);return o||nn.create(i)},r.mul=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kProductType,i,this);var o=Ye(i);return o||rn.create(i)},r.div=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);i=i.map((function(t){return t.invert()})),He(t.CSSStyleValueType.kProductType,i,this);var o=Ye(i);return o||rn.create(i)},r.min=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kMinType,i,this);var o=We(i,t.CSSMathOperator.kMin);return o||tn.create(i)},r.max=function(){for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=Ge(n);He(t.CSSStyleValueType.kMaxType,i,this);var o=We(i,t.CSSMathOperator.kMax);return o||en.create(i)},r.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=ze(e[0]);return r?(n="string"==typeof t?qe.unitFromName(t):t,r.convertTo(n)):null},r.toSum=function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=0,o=e;o.length>i;i++){var a=o[i];if(!n.isValidUnit(n.unitFromName(a)))return null}var s=this.sumValue();if(!s.length)return null;for(var u,c=[],l=Ee(s);!(u=l()).done;){var h=u.value,f=ze(h);if(!f)return null;c.push(f)}if(0===e.length){c.sort((function(t,e){return t.unit-e.unit}));var d=nn.create(c);return Me(!!d),d}for(var p=[],v=function(){var t=n.unitFromName(g[y]);Me(n.isValidUnit(t));var e=c.reduce((function(e,n,r){if(n){var i=n.convertTo(t);i&&(e+=i.value,c[r]=null)}return e}),0);p.push(new qe(e,t))},y=0,g=e;g.length>y;y++)v();if(c.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return nn.create(p)},r.type=function(){var e={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},n=this.type_.exponent(t.BaseType.kLength);return n&&(e.length=n),(n=this.type_.exponent(t.BaseType.kAngle))&&(e.angle=n),(n=this.type_.exponent(t.BaseType.kTime))&&(e.time=n),(n=this.type_.exponent(t.BaseType.kFrequency))&&(e.frequency=n),(n=this.type_.exponent(t.BaseType.kResolution))&&(e.resolution=n),(n=this.type_.exponent(t.BaseType.kFlex))&&(e.flex=n),(n=this.type_.exponent(t.BaseType.kPercent))&&(e.percent=n),this.type_.hasPercentHint&&(e.percentHint=Ue(this.type_.percentHint)),e},n.isValidUnit=function(e){return!!(e===t.UnitType.kNumber||e==t.UnitType.kPercentage||this.isLength(e)||this.isAngle(e)||this.isTime(e))},r.negate=function(){return Ze.create(this)},r.invert=function(){return Ke.create(this)},n}(Ne);function Ge(t){return t.map(Ve.fromNumberish)}function He(t,e,n){Me(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ze(t){return 0===Object.keys(t.units).length?new qe(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new qe(t.value,Number(Object.keys(t.units)[0])):null}function We(e,n){Me(!!e.length);var r=e[0]instanceof qe?e[0]:null;if(!r)return null;for(var i=r.value,o=1;e.length>o;o++){var a=e[o]instanceof qe?e[o]:null;if(!a||a.unit!==r.unit)return null;n===t.CSSMathOperator.kAdd?i+=a.value:n===t.CSSMathOperator.kMax?i=Math.max(i,a.value):n===t.CSSMathOperator.kMin&&(i=Math.min(i,a.value))}return new qe(i,r.unit)}function Ye(e){Me(!!e.length);for(var n=t.UnitType.kNumber,r=1,i=0;e.length>i;i++){var o=e[i]instanceof qe?e[i]:null;if(!o)return null;if(o.unit!==t.UnitType.kNumber){if(n!==t.UnitType.kNumber)return null;n=o.unit}r*=o.value}return new qe(r,n)}var qe=function(e){function n(r,i){var o,a;return void 0===i&&(i=t.UnitType.kNumber),a="string"==typeof i?n.unitFromName(i):i,Me(n.isValidUnit(a)),(o=e.call(this,new je(a))||this).unit=void 0,o.value=void 0,o.unit=a,o.value=r,o}ye(n,e),n.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},n.toCanonicalUnitIfPossible=function(e){var n=this.toCanonicalUnit(e);return n===t.UnitType.kUnknown?e:n},n.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Me(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},n.formatNumber=function(t,e){return void 0===e&&(e=""),t+e};var r=n.prototype;return r.clone=function(){return new n(this.value,this.unit)},r.convertTo=function(e){if(this.unit===e)return new n(this.value,this.unit);var r=n.toCanonicalUnit(this.unit);if(r!==n.toCanonicalUnit(e)||r===t.UnitType.kUnknown)return null;var i=Ne.conversionToCanonicalUnitsScaleFactor(this.unit)/Ne.conversionToCanonicalUnitsScaleFactor(e);return new n(this.value*i,e)},r.equals=function(t){return this.value===t.value&&this.unit===t.unit},r.getType=function(){return t.CSSStyleValueType.kUnitType},r.sumValue=function(){var e=[],r={};return this.unit!==t.UnitType.kNumber&&(r[n.toCanonicalUnitIfPossible(this.unit)]=1),e.push({value:this.value*Ne.conversionToCanonicalUnitsScaleFactor(this.unit),units:r}),e},r.negate=function(){return new n(-this.value,this.unit)},r.invert=function(){return this.unit===t.UnitType.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ke.create(this)},r.buildCSSText=function(e,r,i){var o;switch(this.unit){case t.UnitType.kUnknown:break;case t.UnitType.kInteger:o=Number(this.value).toFixed(0);break;case t.UnitType.kNumber:case t.UnitType.kPercentage:case t.UnitType.kEms:case t.UnitType.kRems:case t.UnitType.kPixels:case t.UnitType.kDegrees:case t.UnitType.kRadians:case t.UnitType.kGradians:case t.UnitType.kMilliseconds:case t.UnitType.kSeconds:case t.UnitType.kTurns:var a=this.value,s=n.unitTypeToString(this.unit);if(-999999>a||a>999999){var u=n.unitTypeToString(this.unit);o=!Number.isFinite(a)||Number.isNaN(a)?n.formatInfinityOrNaN(a,u):n.formatNumber(a,u)}else o=""+a+s}return i+=o},n}(Ve),Xe=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.isUnitValue=function(){return!1},e}(Ve),Ke=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="invert",r.value=t,r}ye(n,e),n.create=function(t){return new n(t,je.negateExponents(t.type_))};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kInvertType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kInvertType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="1 / "),n===t.ParenLess.kNo&&(r+=")"),r},n}(Xe),Ze=function(e){function n(t,n){var r;return(r=e.call(this,n)||this).value=void 0,r.operator="negate",r.value=t,r}ye(n,e),n.create=function(t){return new n(t,t.type_)};var r=n.prototype;return r.clone=function(){return new n(this.value,this.type_)},r.getType=function(){return t.CSSStyleValueType.kNegateType},r.equals=function(e){return e.getType()===t.CSSStyleValueType.kNegateType&&this.value.equals(e.value)},r.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},r.buildCSSText=function(e,n,r){return n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc("),r=this.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+="-"),n===t.ParenLess.kNo&&(r+=")"),r},n}(Xe);function Je(t,e,n){for(var r=t[0].type_,i=1;t.length>i;i++)r=e(r,t[i].type_,false);return r}var Qe,$e=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).values=void 0,r.values=e,r}ye(e,t);var n=e.prototype;return n.numericValues=function(){return this.values},n.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Xe),tn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="min",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMinType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=Ee(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},r.buildCSSText=function(e,n,r){r+="min(";for(var i,o=!0,a=Ee(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}($e),en=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="max",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kMaxType},r.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e,n=Ee(this.numericValues());!(e=n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;t[0].value>r[0].value&&(t=r)}return t},r.buildCSSText=function(e,n,r){r+="max(";for(var i,o=!0,a=Ee(this.numericValues());!(i=a()).done;){o||(r+=", "),o=!1,r=i.value.buildCSSText(t.Nested.kYes,t.ParenLess.kYes,r)}return r+=")"},n}($e),nn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="sum",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.add))},n.numericTypeFromUnitMap=function(t){var e=new je;return Object.keys(t).forEach((function(n){var r=t[n];e=je.multiply(e,new je(Number(n),r),false),Me(!0)})),e},n.canCreateNumericTypeFromSumValue=function(t){var e=this;Me(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return je.add(n,e.numericTypeFromUnitMap(t.units),false),!0}))};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kSumType},r.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(ve({},e)):t[n].value+=e.value}))})),n.canCreateNumericTypeFromSumValue(t)?t:null},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kNegateType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" - "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" + ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}($e),rn=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).operator="product",t}ye(n,e),n.create=function(t){return new n(t,Je(t,je.multiply))},n.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Ae(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t};var r=n.prototype;return r.clone=function(){return new n(this.values,this.type_)},r.getType=function(){return t.CSSStyleValueType.kProductType},r.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(e){var r=e.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(e){i.push({value:t.value*e.value,units:n.multiplyUnitMaps(t.units,e.units)})}))})),t=i})),t},r.buildCSSText=function(e,n,r){n==t.ParenLess.kNo&&(r+=e===t.Nested.kYes?"(":"calc(");var i=this.numericValues();r=i[0].buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r);for(var o=1;i.length>o;o++){var a=i[o];r=a.getType()===t.CSSStyleValueType.kInvertType?a.value.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" / "):a.buildCSSText(t.Nested.kYes,t.ParenLess.kNo,r+=" * ")}return n===t.ParenLess.kNo&&(r+=")"),r},n}($e),on=new qe(0,"px"),an=new qe(0,"deg"),sn=function(t){function e(e,n,r,i,o){var a;return void 0===i&&(i=1),void 0===o&&(o=!1),(a=t.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}ye(e,t);var n=e.prototype;return n.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},n.buildCSSText=function(t,e,n){return n+"rgba("+this.r+","+this.g+","+this.b+","+this.alpha+")"},e}(ke);(Qe=t.GradientType||(t.GradientType={}))[Qe.Constant=0]="Constant",Qe[Qe.LinearGradient=1]="LinearGradient",Qe[Qe.RadialGradient=2]="RadialGradient";var un=function(e){function n(t,n){var r;return(r=e.call(this)||this).type=void 0,r.value=void 0,r.type=t,r.value=n,r}ye(n,e);var r=n.prototype;return r.clone=function(){return new n(this.type,this.value)},r.buildCSSText=function(t,e,n){return n},r.getType=function(){return t.CSSStyleValueType.kColorType},n}(Ne),cn=1e-6,ln="undefined"!=typeof Float32Array?Float32Array:Array;function hn(){var t=new ln(9);return ln!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function fn(){var t=new ln(16);return ln!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function dn(t){var e=new ln(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function pn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function vn(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=y,t}function yn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,E=r*u-i*s,S=r*c-o*s,x=i*c-o*u,w=l*v-h*p,P=l*y-f*p,N=l*g-d*p,k=h*y-f*v,C=h*g-d*v,M=f*g-d*y,_=m*M-T*C+b*k+E*N-S*P+x*w;return _?(t[0]=(s*M-u*C+c*k)*(_=1/_),t[1]=(i*C-r*M-o*k)*_,t[2]=(v*x-y*S+g*E)*_,t[3]=(f*S-h*x-d*E)*_,t[4]=(u*N-a*M-c*P)*_,t[5]=(n*M-i*N+o*P)*_,t[6]=(y*b-p*x-g*T)*_,t[7]=(l*x-f*b+d*T)*_,t[8]=(a*C-s*N+c*w)*_,t[9]=(r*N-n*C-o*w)*_,t[10]=(p*S-v*b+g*m)*_,t[11]=(h*b-l*S-d*m)*_,t[12]=(s*P-a*k-u*w)*_,t[13]=(n*k-r*P+i*w)*_,t[14]=(v*T-p*E-y*m)*_,t[15]=(l*E-h*T+f*m)*_,t):null}function mn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],T=n[0],b=n[1],E=n[2],S=n[3];return t[0]=T*r+b*s+E*h+S*v,t[1]=T*i+b*u+E*f+S*y,t[2]=T*o+b*c+E*d+S*g,t[3]=T*a+b*l+E*p+S*m,t[4]=(T=n[4])*r+(b=n[5])*s+(E=n[6])*h+(S=n[7])*v,t[5]=T*i+b*u+E*f+S*y,t[6]=T*o+b*c+E*d+S*g,t[7]=T*a+b*l+E*p+S*m,t[8]=(T=n[8])*r+(b=n[9])*s+(E=n[10])*h+(S=n[11])*v,t[9]=T*i+b*u+E*f+S*y,t[10]=T*o+b*c+E*d+S*g,t[11]=T*a+b*l+E*p+S*m,t[12]=(T=n[12])*r+(b=n[13])*s+(E=n[14])*h+(S=n[15])*v,t[13]=T*i+b*u+E*f+S*y,t[14]=T*o+b*c+E*d+S*g,t[15]=T*a+b*l+E*p+S*m,t}function Tn(t,e,n){var r,i,o,a,s,u,c,l,h,f,d,p,v=n[0],y=n[1],g=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*v+s*y+h*g+e[12],t[13]=i*v+u*y+f*g+e[13],t[14]=o*v+c*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function bn(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function En(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function Sn(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function xn(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function wn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,d=i*u,p=i*c,v=o*c,y=a*s,g=a*u,m=a*c;return t[0]=1-(d+v),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+v),t[6]=p+y,t[7]=0,t[8]=f+g,t[9]=p-y,t[10]=1-(l+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Pn(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Nn(t,e){var n=e[4],r=e[5],i=e[6],o=e[8],a=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,i),t[2]=Math.hypot(o,a,s),t}function kn(t,e){var n=new ln(3);Nn(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,d=e[9]*i,p=e[10]*o,v=a+l+p,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):l>p?(y=2*Math.sqrt(1+l-a-p),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+p-a-l),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function Cn(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,d=o*l,p=o*h,v=a*l,y=a*h,g=s*h,m=u*c,T=u*l,b=u*h,E=r[0],S=r[1],x=r[2],w=i[0],P=i[1],N=i[2],k=(1-(v+g))*E,C=(d+b)*E,M=(p-T)*E,_=(d-b)*S,A=(1-(f+g))*S,O=(y+m)*S,I=(p+T)*x,R=(y-m)*x,L=(1-(f+v))*x;return t[0]=k,t[1]=C,t[2]=M,t[3]=0,t[4]=_,t[5]=A,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=L,t[11]=0,t[12]=n[0]+w-(k*w+_*P+I*N),t[13]=n[1]+P-(C*w+A*P+R*N),t[14]=n[2]+N-(M*w+O*P+L*N),t[15]=1,t}function Mn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,d=i*s,p=i*u,v=o*a,y=o*s,g=o*u;return t[0]=1-h-p,t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-c-p,t[6]=d+v,t[7]=0,t[8]=f+y,t[9]=d-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _n(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function An(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var On=An;function In(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p=e[0],v=e[1],y=e[2],g=r[0],m=r[1],T=r[2],b=n[0],E=n[1],S=n[2];return Math.abs(p-b)<cn&&Math.abs(v-E)<cn&&Math.abs(y-S)<cn?yn(t):(l=p-b,h=v-E,f=y-S,i=m*(f*=d=1/Math.hypot(l,h,f))-T*(h*=d),o=T*(l*=d)-g*f,a=g*h-m*l,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(d=Math.hypot(s,u,c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*v+a*y),t[13]=-(s*p+u*v+c*y),t[14]=-(l*p+h*v+f*y),t[15]=1,t)}function Rn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Ln=Object.freeze({__proto__:null,create:fn,clone:dn,copy:pn,fromValues:function(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,v){var y=new ln(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=u,y[9]=c,y[10]=l,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=v,y},set:vn,identity:yn,transpose:function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:gn,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15];return t[0]=s*(f*g-d*y)-h*(u*g-c*y)+v*(u*d-c*f),t[1]=-(r*(f*g-d*y)-h*(i*g-o*y)+v*(i*d-o*f)),t[2]=r*(u*g-c*y)-s*(i*g-o*y)+v*(i*c-o*u),t[3]=-(r*(u*d-c*f)-s*(i*d-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-d*y)-l*(u*g-c*y)+p*(u*d-c*f)),t[5]=n*(f*g-d*y)-l*(i*g-o*y)+p*(i*d-o*f),t[6]=-(n*(u*g-c*y)-a*(i*g-o*y)+p*(i*c-o*u)),t[7]=n*(u*d-c*f)-a*(i*d-o*f)+l*(i*c-o*u),t[8]=a*(h*g-d*v)-l*(s*g-c*v)+p*(s*d-c*h),t[9]=-(n*(h*g-d*v)-l*(r*g-o*v)+p*(r*d-o*h)),t[10]=n*(s*g-c*v)-a*(r*g-o*v)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*y-f*v)-l*(s*y-u*v)+p*(s*f-u*h)),t[13]=n*(h*y-f*v)-l*(r*y-i*v)+p*(r*f-i*h),t[14]=-(n*(s*y-u*v)-a*(r*y-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t},determinant:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)},multiply:mn,translate:Tn,scale:bn,rotate:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p,v,y,g,m,T,b,E,S,x,w,P,N,k,C=r[0],M=r[1],_=r[2],A=Math.hypot(C,M,_);return cn>A?null:(C*=A=1/A,M*=A,_*=A,i=Math.sin(n),o=Math.cos(n),u=e[1],c=e[2],l=e[3],f=e[5],d=e[6],p=e[7],y=e[9],g=e[10],m=e[11],S=C*M*(a=1-o)-_*i,x=M*M*a+o,w=_*M*a+C*i,P=C*_*a+M*i,N=M*_*a-C*i,k=_*_*a+o,t[0]=(s=e[0])*(T=C*C*a+o)+(h=e[4])*(b=M*C*a+_*i)+(v=e[8])*(E=_*C*a-M*i),t[1]=u*T+f*b+y*E,t[2]=c*T+d*b+g*E,t[3]=l*T+p*b+m*E,t[4]=s*S+h*x+v*w,t[5]=u*S+f*x+y*w,t[6]=c*S+d*x+g*w,t[7]=l*S+p*x+m*w,t[8]=s*P+h*N+v*k,t[9]=u*P+f*N+y*k,t[10]=c*P+d*N+g*k,t[11]=l*P+p*N+m*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:En,rotateY:Sn,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t},fromTranslation:xn,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return cn>c?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),i=Math.cos(e),t[0]=a*a*(o=1-i)+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:wn,fromQuat2:function(t,e){var n=new ln(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),wn(t,e,n),t},getTranslation:Pn,getScaling:Nn,getRotation:kn,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,d=i*l,p=o*c,v=o*l,y=a*l,g=s*u,m=s*c,T=s*l,b=r[0],E=r[1],S=r[2];return t[0]=(1-(p+y))*b,t[1]=(f+T)*b,t[2]=(d-m)*b,t[3]=0,t[4]=(f-T)*E,t[5]=(1-(h+y))*E,t[6]=(v+g)*E,t[7]=0,t[8]=(d+m)*S,t[9]=(v-g)*S,t[10]=(1-(h+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Cn,fromQuat:Mn,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:_n,perspective:_n,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(o=1/(r-i)),t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:An,ortho:On,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t},lookAt:In,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],d=l*l+h*h+f*f;d>0&&(l*=d=1/Math.sqrt(d),h*=d,f*=d);var p=u*f-c*h,v=c*l-s*f,y=s*h-u*l;return(d=p*p+v*v+y*y)>0&&(p*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=p,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-f*v,t[5]=f*p-l*y,t[6]=l*v-h*p,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Rn,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],d=t[11],p=t[12],v=t[13],y=t[14],g=t[15],m=e[0],T=e[1],b=e[2],E=e[3],S=e[4],x=e[5],w=e[6],P=e[7],N=e[8],k=e[9],C=e[10],M=e[11],_=e[12],A=e[13],O=e[14],I=e[15];return!(Math.abs(n-m)>cn*Math.max(1,Math.abs(n),Math.abs(m))||Math.abs(r-T)>cn*Math.max(1,Math.abs(r),Math.abs(T))||Math.abs(i-b)>cn*Math.max(1,Math.abs(i),Math.abs(b))||Math.abs(o-E)>cn*Math.max(1,Math.abs(o),Math.abs(E))||Math.abs(a-S)>cn*Math.max(1,Math.abs(a),Math.abs(S))||Math.abs(s-x)>cn*Math.max(1,Math.abs(s),Math.abs(x))||Math.abs(u-w)>cn*Math.max(1,Math.abs(u),Math.abs(w))||Math.abs(c-P)>cn*Math.max(1,Math.abs(c),Math.abs(P))||Math.abs(l-N)>cn*Math.max(1,Math.abs(l),Math.abs(N))||Math.abs(h-k)>cn*Math.max(1,Math.abs(h),Math.abs(k))||Math.abs(f-C)>cn*Math.max(1,Math.abs(f),Math.abs(C))||Math.abs(d-M)>cn*Math.max(1,Math.abs(d),Math.abs(M))||Math.abs(p-_)>cn*Math.max(1,Math.abs(p),Math.abs(_))||Math.abs(v-A)>cn*Math.max(1,Math.abs(v),Math.abs(A))||Math.abs(y-O)>cn*Math.max(1,Math.abs(y),Math.abs(O))||Math.abs(g-I)>cn*Math.max(1,Math.abs(g),Math.abs(I)))},mul:mn,sub:Rn});function Dn(){var t=new ln(3);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Fn(t){var e=new ln(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Bn(t){return Math.hypot(t[0],t[1],t[2])}function Un(t,e,n){var r=new ln(3);return r[0]=t,r[1]=e,r[2]=n,r}function jn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Vn(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Gn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Hn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function zn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Wn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Yn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function qn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Xn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Kn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Zn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Jn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Qn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=cn*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=cn*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=cn*Math.max(1,Math.abs(i),Math.abs(s))}var $n,tr=Hn,er=zn,nr=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},rr=Bn;$n=Dn();function ir(){var t=new ln(4);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function or(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}!function(){var t=ir()}();function ar(){var t=new ln(4);return ln!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function sr(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ur(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function cr(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(o=c*d+l*p+h*v+f*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>cn?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*l+u*p,t[2]=s*h+u*v,t[3]=s*f+u*y,t}function lr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function hr(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}var fr,dr,pr,vr,yr,gr,mr=function(t,e,n,r){var i=new ln(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Tr=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},br=ur,Er=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};fr=Dn(),dr=Un(1,0,0),pr=Un(0,1,0),vr=ar(),yr=ar(),gr=hn();function Sr(t,e){var n=new ln(2);return n[0]=t,n[1]=e,n}!function(){var t,e=(t=new ln(2),ln!=Float32Array&&(t[0]=0,t[1]=0),t)}();function xr(t){return t.map((function(t){return Array.isArray(t)?[].concat(t):t}))}var wr=function(){return wr=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},wr.apply(this,arguments)};function Pr(t,e,n,r){var i,o=arguments.length,a=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function Nr(t,e){return function(n,r){e(n,r,t)}}function kr(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var Cr={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Mr(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var _r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Ar(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return _r[e]===t.length-1&&"achlmqstvz".includes(e)}))}function Or(t){return Ar(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function Ir(t){return Or(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function Rr(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=_r[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,_r[n]))),_r[n]););}function Lr(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e)}function Dr(t){return t>=48&&57>=t||43===t||45===t||46===t}function Fr(t){return t>=48&&57>=t}function Br(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,u=!1,c=!1;if(n>o)if(43!==(e=r.charCodeAt(o))&&45!==e||(e=r.charCodeAt(o+=1)),Fr(e)||46===e){if(46!==e){if(a=48===e,e=r.charCodeAt(o+=1),a&&n>o&&e&&Fr(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;n>o&&Fr(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(c=!0,o+=1;Fr(r.charCodeAt(o));)o+=1,u=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(c&&!s&&!u)return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent');if(43!==(e=r.charCodeAt(o+=1))&&45!==e||(o+=1),o>=n||!Fr(r.charCodeAt(o)))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;n>o&&Fr(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';else t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param'}function Ur(t){for(var e,n=t.pathValue,r=t.max;r>t.index&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function jr(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=_r[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,Ur(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?Br(t):Lr(t),t.err.length)return;t.data.push(t.param),Ur(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,Ur(t))}if(t.index>=t.max)break;if(!Dr(n.charCodeAt(t.index)))break}Rr(t)}else Rr(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var Vr=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Gr(t){if(Or(t))return xr(t);var e=function(t){if(Ar(t))return xr(t);var e=new Vr(t);for(Ur(e);e.max>e.index&&!e.err.length;)jr(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],u=s.toUpperCase();if("M"===s)return i=n=a[0],o=r=a[1],["M",n,r];if(s!==u)switch(u){case"A":e=[u,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[u,a[0]+r];break;case"H":e=[u,a[0]+n];break;default:var c=a.map((function(t,e){return t+(e%2?r:n)}));e=[u].concat(c)}else e=[u].concat(a);var l=e.length;switch(u){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[l-2],r=e[l-1],"M"===u&&(i=n,o=r)}return e}))}function Hr(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),u=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)u=["L",t[1],i];else if("V"===n)u=["L",r,t[1]];else if("S"===n){var c=2*r-o,l=2*i-a;e.x1=c,e.y1=l,u=["C",c,l].concat(s)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=["Q",h,f].concat(s)}else if("Q"===n){var d=s[1];e.qx=s[0],e.qy=d}return u}function zr(t){if(Ir(t))return xr(t);for(var e=Gr(t),n=wr({},Cr),r=0;e.length>r;r+=1){e[r]=Hr(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function Wr(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Yr(t,e,n,r,i,o,a,s,u,c){var l,h,f,d,p,v=t,y=e,g=n,m=r,T=s,b=u,E=120*Math.PI/180,S=Math.PI/180*(+i||0),x=[];if(c)h=c[0],f=c[1],d=c[2],p=c[3];else{y=(l=Wr(v,y,-S)).y;var w=((v=l.x)-(T=(l=Wr(T,b,-S)).x))/2,P=(y-(b=l.y))/2,N=w*w/(g*g)+P*P/(m*m);N>1&&(g*=N=Math.sqrt(N),m*=N);var k=g*g,C=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((k*C-k*P*P-C*w*w)/(k*P*P+C*w*w)));d=M*g*P/m+(v+T)/2,p=M*-m*w/g+(y+b)/2,h=Math.asin(((y-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=Math.asin(((b-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=d>v?Math.PI-h:h,f=d>T?Math.PI-f:f,0>h&&(h=2*Math.PI+h),0>f&&(f=2*Math.PI+f),a&&h>f&&(h-=2*Math.PI),!a&&f>h&&(f-=2*Math.PI)}var _=f-h;if(Math.abs(_)>E){var A=f,O=T,I=b;f=h+E*(a&&f>h?1:-1),x=Yr(T=d+g*Math.cos(f),b=p+m*Math.sin(f),g,m,i,0,a,O,I,[f,A,d,p])}_=f-h;var R=Math.cos(h),L=Math.sin(h),D=Math.cos(f),F=Math.sin(f),B=Math.tan(_/4),U=4/3*g*B,j=4/3*m*B,V=[v,y],G=[v+U*L,y-j*R],H=[T+U*F,b-j*D],z=[T,b];if(G[0]=2*V[0]-G[0],G[1]=2*V[1]-G[1],c)return G.concat(H,z,x);for(var W=[],Y=0,q=(x=G.concat(H,z,x)).length;q>Y;Y+=1)W[Y]=Y%2?Wr(x[Y-1],x[Y],S).y:Wr(x[Y],x[Y+1],S).x;return W}function qr(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function Xr(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Kr(t,e,n,r,i){var o=Xr([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(0<i)if(i<o){var s=qr([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}else a={x:n,y:r};else a={x:t,y:e};return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Zr(t,e,n,r){var i=.5,o=[t,e],a=[n,r],s=qr(o,a,i),u=qr(a,s,i),c=qr(s,u,i),l=qr(u,c,i),h=qr(c,l,i),f=Kr(o[0],o[1],s[0],s[1],c[0]).point,d=Kr(h[0],h[1],l[0],l[1],u[0]).point;return[f.x,f.y,d.x,d.y,n,r]}function Jr(t,e){var n,r,i,o,a,s,u,c=t[0],l=t.slice(1).map(Number),h=l[0],f=l[1],d=e.x1,p=e.y1,v=e.x,y=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=h,e.y=f,t;case"A":return n=[d,p].concat(l),["C"].concat(Yr(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=h,e.qy=f,n=[d,p].concat(l),["C"].concat([(s=1/3)*n[0]+(u=2/3)*(r=n[2]),s*n[1]+u*(i=n[3]),s*(o=n[4])+u*r,s*(a=n[5])+u*i,o,a]);case"L":return["C"].concat(Zr(d,p,h,f));case"Z":return d===v&&p===y?["C",d,p,v,y,v,y]:["C"].concat(Zr(d,p,v,y))}return t}function Qr(t,e){if(void 0===e&&(e=!1),function(t){return Ir(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=xr(t);return e?[n,[]]:n}for(var r,i,o=zr(t),a=wr({},Cr),s=[],u="",c=o.length,l=[],h=0;c>h;h+=1){o[h]&&(u=o[h][0]),s[h]=u;var f=Jr(o[h],a);o[h]=f,Mr(o,s,h),c=o.length,"Z"===u&&l.push(h),a.x1=+(r=o[h])[(i=r.length)-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,l]:o}function $r(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(0>n*o-r*i?-1:1)*Math.acos(a/s)}function ti(t,e,n,r,i,o,a,s,u,c){var l=Math.abs,h=Math.sin,f=Math.cos,d=Math.sqrt,p=Math.PI,v=l(n),y=l(r),g=(i%360+360)%360*(p/180);if(t===s&&e===u)return{x:t,y:e};if(0===v||0===y)return Kr(t,e,s,u,c).point;var m=(t-s)/2,T=(e-u)/2,b={x:f(g)*m+h(g)*T,y:-h(g)*m+f(g)*T},E=Math.pow(b.x,2)/Math.pow(v,2)+Math.pow(b.y,2)/Math.pow(y,2);E>1&&(v*=d(E),y*=d(E));var S=(Math.pow(v,2)*Math.pow(y,2)-Math.pow(v,2)*Math.pow(b.y,2)-Math.pow(y,2)*Math.pow(b.x,2))/(Math.pow(v,2)*Math.pow(b.y,2)+Math.pow(y,2)*Math.pow(b.x,2)),x=(o!==a?1:-1)*d(S=0>S?0:S),w=x*(v*b.y/y),P=x*(-y*b.x/v),N=f(g)*w-h(g)*P+(t+s)/2,k=h(g)*w+f(g)*P+(e+u)/2,C={x:(b.x-w)/v,y:(b.y-P)/y},M=$r({x:1,y:0},C),_=$r(C,{x:(-b.x-w)/v,y:(-b.y-P)/y});!a&&_>0?_-=2*p:a&&0>_&&(_+=2*p);var A=M+(_%=2*p)*c,O=v*f(A),I=y*h(A);return{x:f(g)*O-h(g)*I+N,y:h(g)*O+f(g)*I+k}}function ei(t,e,n,r,i,o,a,s,u,c,l){var h,f=l.bbox,d=void 0===f||f,p=l.length,v=void 0===p||p,y=l.sampleSize,g=void 0===y?10:y,m="number"==typeof c,T=t,b=e,E=0,S=[T,b,E],x=[T,b],w={x:0,y:0},P=[{x:T,y:b}];m&&0>=c&&(w={x:T,y:b});for(var N=0;g>=N;N+=1){if(T=(h=ti(t,e,n,r,i,o,a,s,u,N/g)).x,b=h.y,d&&P.push({x:T,y:b}),v&&(E+=Xr(x,[T,b])),x=[T,b],m&&E>=c&&c>S[2]){var k=(E-c)/(E-S[2]);w={x:x[0]*(1-k)+S[0]*k,y:x[1]*(1-k)+S[1]*k}}S=[T,b,E]}return m&&c>=E&&(w={x:s,y:u}),{length:E,point:w,min:{x:Math.min.apply(null,P.map((function(t){return t.x}))),y:Math.min.apply(null,P.map((function(t){return t.y})))},max:{x:Math.max.apply(null,P.map((function(t){return t.x}))),y:Math.max.apply(null,P.map((function(t){return t.y})))}}}function ni(t,e,n,r,i,o,a,s,u){var c=1-u;return{x:Math.pow(c,3)*t+3*Math.pow(c,2)*u*n+3*c*Math.pow(u,2)*i+Math.pow(u,3)*a,y:Math.pow(c,3)*e+3*Math.pow(c,2)*u*r+3*c*Math.pow(u,2)*o+Math.pow(u,3)*s}}function ri(t,e,n,r,i,o,a,s,u,c){var l,h=c.bbox,f=void 0===h||h,d=c.length,p=void 0===d||d,v=c.sampleSize,y=void 0===v?10:v,g="number"==typeof u,m=t,T=e,b=0,E=[m,T,b],S=[m,T],x={x:0,y:0},w=[{x:m,y:T}];g&&0>=u&&(x={x:m,y:T});for(var P=0;y>=P;P+=1){if(m=(l=ni(t,e,n,r,i,o,a,s,P/y)).x,T=l.y,f&&w.push({x:m,y:T}),p&&(b+=Xr(S,[m,T])),S=[m,T],g&&b>=u&&u>E[2]){var N=(b-u)/(b-E[2]);x={x:S[0]*(1-N)+E[0]*N,y:S[1]*(1-N)+E[1]*N}}E=[m,T,b]}return g&&u>=b&&(x={x:a,y:s}),{length:b,point:x,min:{x:Math.min.apply(null,w.map((function(t){return t.x}))),y:Math.min.apply(null,w.map((function(t){return t.y})))},max:{x:Math.max.apply(null,w.map((function(t){return t.x}))),y:Math.max.apply(null,w.map((function(t){return t.y})))}}}function ii(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function oi(t,e,n,r,i,o,a,s){var u,c=s.bbox,l=void 0===c||c,h=s.length,f=void 0===h||h,d=s.sampleSize,p=void 0===d?10:d,v="number"==typeof a,y=t,g=e,m=0,T=[y,g,m],b=[y,g],E={x:0,y:0},S=[{x:y,y:g}];v&&0>=a&&(E={x:y,y:g});for(var x=0;p>=x;x+=1){if(y=(u=ii(t,e,n,r,i,o,x/p)).x,g=u.y,l&&S.push({x:y,y:g}),f&&(m+=Xr(b,[y,g])),b=[y,g],v&&m>=a&&a>T[2]){var w=(m-a)/(m-T[2]);E={x:b[0]*(1-w)+T[0]*w,y:b[1]*(1-w)+T[1]*w}}T=[y,g,m]}return v&&a>=m&&(E={x:i,y:o}),{length:m,point:E,min:{x:Math.min.apply(null,S.map((function(t){return t.x}))),y:Math.min.apply(null,S.map((function(t){return t.y})))},max:{x:Math.max.apply(null,S.map((function(t){return t.x}))),y:Math.max.apply(null,S.map((function(t){return t.y})))}}}function ai(t,e,n){for(var r,i,o,a,s,u,c,l,h,f=zr(t),d="number"==typeof e,p=[],v=0,y=0,g=0,m=0,T=[],b=[],E=0,S={x:0,y:0},x=S,w=S,P=S,N=0,k=0,C=f.length;C>k;k+=1)p=(c="M"===(l=(h=f[k])[0]))?p:[v,y].concat(h.slice(1)),c?(x=S={x:g=h[1],y:m=h[2]},E=0,d&&.001>e&&(P=S)):"L"===l?(E=(r=Kr(p[0],p[1],p[2],p[3],(e||0)-N)).length,S=r.min,x=r.max,w=r.point):"A"===l?(E=(i=ei(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-N,n||{})).length,S=i.min,x=i.max,w=i.point):"C"===l?(E=(o=ri(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-N,n||{})).length,S=o.min,x=o.max,w=o.point):"Q"===l?(E=(a=oi(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-N,n||{})).length,S=a.min,x=a.max,w=a.point):"Z"===l&&(E=(s=Kr((p=[v,y,g,m])[0],p[1],p[2],p[3],(e||0)-N)).length,S=s.min,x=s.max,w=s.point),d&&e>N&&N+E>=e&&(P=w),b.push(x),T.push(S),N+=E,v=(u="Z"!==l?h.slice(-2):[g,m])[0],y=u[1];return d&&e>=N&&(P={x:v,y:y}),{length:N,point:P,min:{x:Math.min.apply(null,T.map((function(t){return t.x}))),y:Math.min.apply(null,T.map((function(t){return t.y})))},max:{x:Math.max.apply(null,b.map((function(t){return t.x}))),y:Math.max.apply(null,b.map((function(t){return t.y})))}}}function si(t){return function(t){var e=0,n=0,r=0;return Qr(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o,a,s,u,c,l,h,f,d=t.slice(1);return r=3*(((f=d[5])-(a=n))*((s=d[0])+(c=d[2]))-((h=d[4])-(o=e))*((u=d[1])+(l=d[3]))+u*(o-c)-s*(a-l)+f*(c+o/3)-h*(l+a/3))/20,i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function ui(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?ri(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=qr(n,r,e),s=qr(r,i,e),u=qr(i,o,e),c=qr(a,s,e),l=qr(s,u,e),h=qr(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function ci(t,e,n){var r=ui(t),i=ui(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],d=[h-o,h-a],p=0,v=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(p=n&&d[e]&&t.l>=f[e])?1:0,p?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:ci(v[0],v[1],h)}var li={}.toString,hi=function(t){return function(t,e){return li.call(t)==="[object "+e+"]"}(t,"Function")},fi=function(t,e){if(!hi(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};return n.cache=new Map,n};function di(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vi(){}var yi=.7,gi=1/yi,mi="\\s*([+-]?\\d+)\\s*",Ti="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ei=/^#([0-9a-f]{3,8})$/,Si=new RegExp("^rgb\\("+[mi,mi,mi]+"\\)$"),xi=new RegExp("^rgb\\("+[bi,bi,bi]+"\\)$"),wi=new RegExp("^rgba\\("+[mi,mi,mi,Ti]+"\\)$"),Pi=new RegExp("^rgba\\("+[bi,bi,bi,Ti]+"\\)$"),Ni=new RegExp("^hsl\\("+[Ti,bi,bi]+"\\)$"),ki=new RegExp("^hsla\\("+[Ti,bi,bi,Ti]+"\\)$"),Ci={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mi(){return this.rgb().formatHex()}function _i(){return this.rgb().formatRgb()}function Ai(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ei.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Oi(e):3===n?new Li(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ii(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ii(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Si.exec(t))?new Li(e[1],e[2],e[3],1):(e=xi.exec(t))?new Li(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=wi.exec(t))?Ii(e[1],e[2],e[3],e[4]):(e=Pi.exec(t))?Ii(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ni.exec(t))?Ui(e[1],e[2]/100,e[3]/100,1):(e=ki.exec(t))?Ui(e[1],e[2]/100,e[3]/100,e[4]):Ci.hasOwnProperty(t)?Oi(Ci[t]):"transparent"===t?new Li(NaN,NaN,NaN,0):null}function Oi(t){return new Li(t>>16&255,t>>8&255,255&t,1)}function Ii(t,e,n,r){return r>0||(t=e=n=NaN),new Li(t,e,n,r)}function Ri(t){return t instanceof vi||(t=Ai(t)),t?new Li((t=t.rgb()).r,t.g,t.b,t.opacity):new Li}function Li(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Di(){return"#"+Bi(this.r)+Bi(this.g)+Bi(this.b)}function Fi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Bi(t){return(16>(t=Math.max(0,Math.min(255,Math.round(t)||0)))?"0":"")+t.toString(16)}function Ui(t,e,n,r){return r>0?n>0&&1>n?e>0||(t=NaN):t=e=NaN:t=e=n=NaN,new Vi(t,e,n,r)}function ji(t){if(t instanceof Vi)return new Vi(t.h,t.s,t.l,t.opacity);if(t instanceof vi||(t=Ai(t)),!t)return new Vi;if(t instanceof Vi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(r>n):n===o?(r-e)/s+2:(e-n)/s+4,s/=.5>u?o+i:2-o-i,a*=60):s=u>0&&1>u?0:a,new Vi(a,s,u,t.opacity)}function Vi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Gi(t,e,n){return 255*(60>t?e+(n-e)*t/60:180>t?n:240>t?e+(n-e)*(240-t)/60:e)}di(vi,Ai,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Mi,formatHex:Mi,formatHsl:function(){return ji(this).formatHsl()},formatRgb:_i,toString:_i}),di(Li,(function(t,e,n,r){return 1===arguments.length?Ri(t):new Li(t,e,n,null==r?1:r)}),pi(vi,{brighter:function(t){return t=null==t?gi:Math.pow(gi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?yi:Math.pow(yi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return this.r>=-.5&&255.5>this.r&&this.g>=-.5&&255.5>this.g&&this.b>=-.5&&255.5>this.b&&this.opacity>=0&&1>=this.opacity},hex:Di,formatHex:Di,formatRgb:Fi,toString:Fi})),di(Vi,(function(t,e,n,r){return 1===arguments.length?ji(t):new Vi(t,e,n,null==r?1:r)}),pi(vi,{brighter:function(t){return t=null==t?gi:Math.pow(gi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?yi:Math.pow(yi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(0>this.h),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(.5>n?n:1-n)*e,i=2*n-r;return new Li(Gi(240>t?t+120:t-240,i,r),Gi(t,i,r),Gi(120>t?t+240:t-120,i,r),this.opacity)},displayable:function(){return(this.s>=0&&1>=this.s||isNaN(this.s))&&this.l>=0&&1>=this.l&&this.opacity>=0&&1>=this.opacity},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Hi={},zi=0;function Wi(t,e){if(t){var n="string"==typeof t?t:t.id||zi++;Hi[n]&&Hi[n].destroy(),Hi[n]=e}}var Yi="undefined"!=typeof window&&void 0!==window.document,qi=.1,Xi="function"==typeof Float32Array,Ki=function(t,e){return 1-3*e+3*t},Zi=function(t,e){return 3*e-6*t},Ji=function(t){return 3*t},Qi=function(t,e,n){return((Ki(e,n)*t+Zi(e,n))*t+Ji(e))*t},$i=function(t,e,n){return 3*Ki(e,n)*t*t+2*Zi(e,n)*t+Ji(e)},to=function(t,e,n,r){if(0>t||t>1||0>n||n>1)throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Xi?new Float32Array(11):new Array(11),o=0;11>o;++o)i[o]=Qi(o*qi,t,n);var a=function(e){for(var r=0,o=1;10!==o&&e>=i[o];++o)r+=qi;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*qi,s=$i(a,t,n);return.001>s?0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Qi(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&10>++s);return a}(e,r,r+qi,t,n):function(t,e,n,r){for(var i=0;4>i;++i){var o=$i(e,n,r);if(0===o)return e;e-=(Qi(e,n,r)-t)/o}return e}(e,a,t,n)};return function(t){return 0===t||1===t?t:Qi(a(t),e,r)}};function eo(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function no(t){return void 0===t?0:t>360||-360>t?t%360:t}function ro(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Re(t)?Un(t,e,n):Array.isArray(t)&&3===t.length?Fn(t):Un(t[0],t[1]||e,t[2]||n)}function io(t){return t*(Math.PI/180)}function oo(t){return t*(180/Math.PI)}function ao(t){return 360*t}function so(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,o=Nn(Dn(),e),a=o[0],s=o[1],u=o[2],c=Math.asin(-e[2]/a);return i>c?c>-i?(n=Math.atan2(e[6]/s,e[10]/u),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=c,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):-.499995*c>l?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function uo(t,e,n,r,i){var o,a,s,u,c,l,h,f,d,p,v=Math.cos(t),y=Math.sin(t);return o=r*v,a=i*y,s=0,u=-r*y,c=i*v,l=0,h=e,f=n,d=1,(p=new ln(9))[0]=o,p[1]=a,p[2]=s,p[3]=u,p[4]=c,p[5]=l,p[6]=h,p[7]=f,p[8]=d,p}function co(t,e,n,r,i,o,a){var s=2*o/(r-i),u=(n+e)/(n-e),c=(r+i)/(r-i),l=-(a+o)/(a-o),h=-2*a*o/(a-o);return t[0]=2*o/(n-e),t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}function lo(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);0>e*i-n*r&&(i>e?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=oo(Math.atan2(n,e));return[t[6],t[7],o,a,s]}var ho=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))).charAt(0)?t.substring(1):t},fo=function(t){return Math.pow(t,2)},po=function(t){return Math.pow(t,3)},vo=function(t){return Math.pow(t,4)},yo=function(t){return Math.pow(t,5)},go=function(t){return Math.pow(t,6)},mo=function(t){return 1-Math.cos(t*Math.PI/2)},To=function(t){return 1-Math.sqrt(1-t*t)},bo=function(t){return t*t*(3*t-2)},Eo=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},So=function(t,e){void 0===e&&(e=[]);var n=e[0],r=e[1],i=void 0===r?.5:r,o=eo(Number(void 0===n?1:n),1,10),a=eo(Number(i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin((t-1-a/(2*Math.PI)*Math.asin(1/o))*(2*Math.PI)/a)},xo=function(t,e,n){void 0===e&&(e=[]);var r=e[0],i=void 0===r?1:r,o=e[1],a=void 0===o?100:o,s=e[2],u=void 0===s?10:s,c=e[3],l=void 0===c?0:c;i=eo(i,.1,1e3),a=eo(a,.1,1e3),u=eo(u,.1,1e3),l=eo(l,.1,1e3);var h=Math.sqrt(a/i),f=u/(2*Math.sqrt(a*i)),d=1>f?h*Math.sqrt(1-f*f):0,p=1>f?(f*h-l)/d:-l+h,v=n?n*t/1e3:t;return v=1>f?Math.exp(-v*f*h)*(1*Math.cos(d*v)+p*Math.sin(d*v)):(1+p*v)*Math.exp(-v*h),0===t||1===t?t:1-v},wo=function(t,e){void 0===e&&(e=[]);var n=e[0],r=void 0===n?10:n;return("start"==e[1]?Math.ceil:Math.floor)(eo(t,0,1)*r)/r},Po=function(t,e){void 0===e&&(e=[]);return to(e[0],e[1],e[2],e[3])(t)},No=to(.42,0,1,1),ko=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Co=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Mo=function(t){return function(e,n,r){return void 0===n&&(n=[]),.5>e?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},_o={steps:wo,"step-start":function(t){return wo(t,[1,"start"])},"step-end":function(t){return wo(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Po,ease:function(t){return Po(t,[.25,.1,.25,1])},in:No,out:ko(No),"in-out":Co(No),"out-in":Mo(No),"in-quad":fo,"out-quad":ko(fo),"in-out-quad":Co(fo),"out-in-quad":Mo(fo),"in-cubic":po,"out-cubic":ko(po),"in-out-cubic":Co(po),"out-in-cubic":Mo(po),"in-quart":vo,"out-quart":ko(vo),"in-out-quart":Co(vo),"out-in-quart":Mo(vo),"in-quint":yo,"out-quint":ko(yo),"in-out-quint":Co(yo),"out-in-quint":Mo(yo),"in-expo":go,"out-expo":ko(go),"in-out-expo":Co(go),"out-in-expo":Mo(go),"in-sine":mo,"out-sine":ko(mo),"in-out-sine":Co(mo),"out-in-sine":Mo(mo),"in-circ":To,"out-circ":ko(To),"in-out-circ":Co(To),"out-in-circ":Mo(To),"in-back":bo,"out-back":ko(bo),"in-out-back":Co(bo),"out-in-back":Mo(bo),"in-bounce":Eo,"out-bounce":ko(Eo),"in-out-bounce":Co(Eo),"out-in-bounce":Mo(Eo),"in-elastic":So,"out-elastic":ko(So),"in-out-elastic":Co(So),"out-in-elastic":Mo(So),spring:xo,"spring-in":xo,"spring-out":ko(xo),"spring-in-out":Co(xo),"spring-out-in":Mo(xo)},Ao=function(t){return _o[function(t){return ho(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||_o.linear},Oo=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,o=t.then((function(t){return i=!0,n=!1,e=t,t}),(function(t){throw r=!0,n=!1,t}));return o.isFulfilled=function(){return i},o.isPending=function(){return n},o.isRejected=function(){return r},o.getFullFilledValue=function(){return e},o},Io=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Ro={keys:Object.keys,values:Object.values,entries:Object.entries};function Lo(t,e){if(Yi)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function Do(t){var e=Lo(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}function Fo(t){var e=Lo(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}var Bo={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Uo(t){var e=t.type,n=t.value;return"hex"===e?"#"+n:"literal"===e?n:"rgb"===e?"rgb("+n.join(",")+")":"rgba("+n.join(",")+")"}var jo=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,h=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,f=/^\(/,d=/^\)/,p=/^,/,v=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,g=/^rgb/i,m=/^rgba/i,T=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,b="";function E(t){throw new Error(b+": "+t)}function S(){var t=O(x);return b.length>0&&E("Invalid input not EOF"),t}function x(){return w("linear-gradient",t,N)||w("repeating-linear-gradient",e,N)||w("radial-gradient",n,k)||w("repeating-radial-gradient",r,k)||w("conic-gradient",i,k)}function w(t,e,n){return P(e,(function(e){var r=n();return r&&(B(p)||E("Missing comma before color stops")),{type:t,orientation:r,colorStops:O(I)}}))}function P(t,e){var n=B(t);if(n){B(f)||E("Missing (");var r=e(n);return B(d)||E("Missing )"),r}}function N(){return F("directional",o,1)||F("angular",h,1)}function k(){var t,e,n=C();return n&&((t=[]).push(n),e=b,B(p)&&((n=C())?t.push(n):b=e)),t}function C(){var t=function(){var t=F("shape",/^(circle)/i,0);t&&(t.style=D()||M());return t}()||function(){var t=F("shape",/^(ellipse)/i,0);t&&(t.style=L()||M());return t}();if(t)t.at=_();else{var e=M();if(e){t=e;var n=_();n&&(t.at=n)}else{var r=A();r&&(t={type:"default-radial",at:r})}}return t}function M(){return F("extent-keyword",a,1)}function _(){if(F("position",/^at/,0)){var t=A();return t||E("Missing positioning value"),t}}function A(){var t={x:L(),y:L()};if(t.x||t.y)return{type:"position",value:t}}function O(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):E("One extra comma");return n}function I(){var t=F("hex",v,1)||P(m,(function(){return{type:"rgba",value:O(R)}}))||P(g,(function(){return{type:"rgb",value:O(R)}}))||F("literal",y,0);return t||E("Expected color definition"),t.length=L(),t}function R(){return B(T)[1]}function L(){return F("%",c,1)||F("position-keyword",s,1)||D()}function D(){return F("px",u,1)||F("em",l,1)}function F(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(b);e&&U(e[0].length);var n=t.exec(b);return n&&U(n[0].length),n}function U(t){b=b.substring(t)}return function(t){return b=t,S()}}();var Vo=function(t){return t};function Go(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Ho="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",zo=new RegExp("cubic-bezier\\("+Ho+","+Ho+","+Ho+","+Ho+"\\)"),Wo=/steps\(\s*(\d+)\s*\)/,Yo=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function qo(t){var e=zo.exec(t);if(e)return to.apply(void 0,e.slice(1).map(Number));var n=Wo.exec(t);if(n)return Go(Number(n[1]),0);var r=Yo.exec(t);return r?Go(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Ao(t)}function Xo(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Ko(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e<Math.min(n.delay+t+n.endDelay,r)?3:2}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Zo=fi((function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}));function Jo(t){return!Ie(t)&&"string"==typeof t}function Qo(t,e,n){var r=function(t,e){for(var n={},r=0;t.length>r;r++)for(var i in t[r])if($o(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:qo(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;i.length-1>o;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:ea(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&t.applyTo>e})).forEach((function(n){var r=n.endOffset-n.startOffset,i=0===r?0:n.easingFunction((e-n.startOffset)/r);t.style[n.property]=n.interpolation(i)}));else for(var n in r)$o(n)&&(t.style[n]=null)}}function $o(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var ta=function(t,e,n){return function(r){return n(na(t,e,r))}};function ea(t,e,n,r){var i=os[t];if(i&&i.syntax&&i.interpolable){var o=Oh.getPropertySyntax(i.syntax);if(o){var a=Oh.parseProperty(t,e,r),s=Oh.parseProperty(t,n,r),u=Oh.computeProperty(t,a,r),c=Oh.computeProperty(t,s,r),l=o.mixer(u,c,r);if(l){var h=ta.apply(void 0,l);return function(t){return 0===t?e:1===t?n:h(t)}}}}return ta(!1,!0,(function(t){return t?n:e}))}function na(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return.5>n?t:e;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){for(var r=[],i=0;t.length>i;i++)r.push(na(t[i],e[i],n));return r}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var ra,ia={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},oa=fi((function(t){var e=Zo(t),n=ia[e];return[e=(null==n?void 0:n.alias)||e,n]}));function aa(t,e){var n,r=oa(t),i=r[1];return[r[0],Jo(e)&&(null==i||null===(n=i.values)||void 0===n?void 0:n[e])||e]}(ra=t.Shape||(t.Shape={})).GROUP="g",ra.CIRCLE="circle",ra.ELLIPSE="ellipse",ra.IMAGE="image",ra.RECT="rect",ra.LINE="line",ra.POLYLINE="polyline",ra.POLYGON="polygon",ra.TEXT="text",ra.PATH="path",ra.HTML="html",ra.MESH="mesh";var sa=t.Syringe.defineToken("");function ua(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=ai(t.parsedStyle.path.absolutePath,void 0,wr(wr({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function ca(t){for(var e=!1,n=t.length,r=0;n>r;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}function la(t){for(var e=[],n=[],r=[],i=0;t.length>i;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}function ha(t){for(var e,n,r=[],i=null,o=null,a=0,s=t.length,u=0;s>u;u++){var c=t[u];o=t[u+1];var l=c[0],h={command:l,prePoint:i,params:c,startTangent:null,endTangent:null};if("M"===l)a=u;var f=c.length;h.currentPoint=i=[c[f-2],c[f-1]],r[a]&&((e=i)[0]===(n=r[a].currentPoint)[0]&&e[1]===n[1])&&(r[a].prePoint=h.prePoint),h.nextPoint=o?[o[o.length-2],o[o.length-1]]:null;var d=h.prePoint;if("C"===l){var p=[c[1],c[2]],v=[c[3],c[4]];h.startTangent=[d[0]-p[0],d[1]-p[1]],h.endTangent=[i[0]-v[0],i[1]-v[1]],0===h.startTangent[0]&&0===h.startTangent[1]&&(h.startTangent=[p[0]-v[0],p[1]-v[1]]),0===h.endTangent[0]&&0===h.endTangent[1]&&(h.endTangent=[v[0]-p[0],v[1]-p[1]])}r.push(h)}return r}function fa(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}var da=function(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)},pa=function(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)},va=function(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)},ya=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=da,this.call=da,this._callAsync=pa,this.callAsync=pa,this._promise=va,this.promise=va,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e,n=Ee(this.interceptors);!(e=n()).done;){var r=e.value;if(r.register){var i=r.register(t);void 0!==i&&(t=i)}}return t},e.withOptions=function(t){var e=this,n=function(e){return Object.assign({},t,"string"==typeof e?{name:e}:e)};return{name:this.name,tap:function(t,r){return e.tap(n(t),r)},tapAsync:function(t,r){return e.tapAsync(n(t),r)},tapPromise:function(t,r){return e.tapPromise(n(t),r)},isUsed:function(){return e.isUsed()},withOptions:function(t){return e.withOptions(n(t))}}},e.isUsed=function(){return this.taps.length>0||this.interceptors.length>0},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){var e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));var n=0;"number"==typeof t.stage&&(n=t.stage);for(var r=this.taps.length;r>0;){r--;var i=this.taps[r];this.taps[r+1]=i;var o=i.stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(e.size>0)continue}if(n>=o){r++;break}}this.taps[r]=t},t}(),ga=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="";i+='"use strict";\n',i+=this.header(),i+="return new Promise((function(_resolve, _reject) {\n",n&&(i+="var _sync = true;\n",i+="function _error(_err) {\n",i+="if(_sync)\n",i+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",i+="else\n",i+="_reject(_err);\n",i+="};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map((function(t){return t.fn}))},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var e=this;if(this.options.interceptors.length>0){for(var n=t.onError,r=t.onResult,i=t.onDone,o="",a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.call&&(o+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.content(Object.assign(t,{onError:n&&function(t){for(var r="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].error&&(r+=e.getInterceptor(i)+".error("+t+");\n")}return r+=n(t)},onResult:r&&function(t){for(var n="",i=0;e.options.interceptors.length>i;i++){e.options.interceptors[i].result&&(n+=e.getInterceptor(i)+".result("+t+");\n")}return n+=r(t)},onDone:i&&function(){for(var t="",n=0;e.options.interceptors.length>n;n++){e.options.interceptors[n].done&&(t+=e.getInterceptor(n)+".done();\n")}return t+=i()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Ee(this.options.taps);!(t=e()).done;){if(t.value.context)return!0}return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,u=0;this.options.interceptors.length>u;u++){var c=this.options.interceptors[u];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(u)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var l=this.options.taps[t];switch(l.type){case"sync":o||(a+="var _hasError"+t+" = false;\n",a+="try {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",o||(a+="} catch(_err) {\n",a+="_hasError"+t+" = true;\n",a+=n("_err"),a+="}\n",a+="if(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h="";h+=r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n",h+="if(_err"+t+") {\n",h+=n("_err"+t),h+="} else {\n",r&&(h+=r("_result"+t)),i&&(h+=i()),h+="}\n",a+="_fn"+t+"("+this.args({before:l.context?"_context":void 0,after:h+="})"})+");\n";break;case"promise":a+="var _hasResult"+t+" = false;\n",a+="var _promise"+t+" = _fn"+t+"("+this.args({before:l.context?"_context":void 0})+");\n",a+="if (!_promise"+t+" || !_promise"+t+".then)\n",a+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n",a+="_promise"+t+".then((function(_result"+t+") {\n",a+="_hasResult"+t+" = true;\n",r&&(a+=r("_result"+t)),i&&(a+=i()),a+="}), function(_err"+t+") {\n",a+="if(_hasResult"+t+") throw _err"+t+";\n",a+=n("_err"+t),a+="});\n"}return a},e.callTapsSeries=function(t){var e=this,n=t.onError,r=t.onResult,i=t.resultReturns,o=t.onDone,a=t.doneReturns,s=t.rethrowIfPossible;if(0===this.options.taps.length)return o();for(var u=this.options.taps.findIndex((function(t){return"sync"!==t.type})),c=i||a,l="",h=o,f=0,d=function(t){var i=t;h!==o&&("sync"!==e.options.taps[i].type||f++>20)&&(f=0,l+="function _next"+i+"() {\n",l+=h(),l+="}\n",h=function(){return(c?"return ":"")+"_next"+i+"();\n"});var a=h,d=function(t){return t?"":o()},p=e.callTap(i,{onError:function(t){return n(i,t,a,d)},onResult:r&&function(t){return r(i,t,a,d)},onDone:!r&&a,rethrowIfPossible:s&&(0>u||u>i)});h=function(){return p}},p=this.options.taps.length-1;p>=0;p--)d(p);return l+=h()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,r=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var i=this.options.taps.every((function(t){return"sync"===t.type})),o="";i||(o+="var _looper = (function() {\n",o+="var _loopAsync = false;\n"),o+="var _loop;\n",o+="do {\n",o+="_loop = false;\n";for(var a=0;this.options.interceptors.length>a;a++){var s=this.options.interceptors[a];s.loop&&(o+=this.getInterceptor(a)+".loop("+this.args({before:s.context?"_context":void 0})+");\n")}return o+=this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var o="";return o+="if("+e+" !== undefined) {\n",o+="_loop = true;\n",i||(o+="if(_loopAsync) _looper();\n"),o+=r(!0),o+="} else {\n",o+=n(),o+="}\n"},onDone:n&&function(){var t="";return t+="if(!_loop) {\n",t+=n(),t+="}\n"},rethrowIfPossible:r&&i}),o+="} while(_loop);\n",i||(o+="_loopAsync = true;\n",o+="});\n",o+="_looper();\n"),o},e.callTapsParallel=function(t){var e=this,n=t.onError,r=t.onResult,i=t.onDone,o=t.rethrowIfPossible,a=t.onTap,s=void 0===a?function(t,e){return e()}:a;if(1>=this.options.taps.length)return this.callTapsSeries({onError:n,onResult:r,onDone:i,rethrowIfPossible:o});var u="";u+="do {\n",u+="var _counter = "+this.options.taps.length+";\n",i&&(u+="var _done = (function() {\n",u+=i(),u+="});\n");for(var c=function(t){var a=function(){return i?"if(--_counter === 0) _done();\n":"--_counter;"},c=function(t){return t||!i?"_counter = 0;\n":"_counter = 0;\n_done();\n"};u+="if(_counter <= 0) break;\n",u+=s(t,(function(){return e.callTap(t,{onError:function(e){var r="";return r+="if(_counter > 0) {\n",r+=n(t,e,a,c),r+="}\n"},onResult:r&&function(e){var n="";return n+="if(_counter > 0) {\n",n+=r(t,e,a,c),n+="}\n"},onDone:!r&&function(){return a()},rethrowIfPossible:o})}),a,c)},l=0;this.options.taps.length>l;l++)c(l);return u+="} while(false);\n"},e.args=function(t){var e=void 0===t?{}:t,n=e.before,r=e.after,i=this._args;return n&&(i=[n].concat(i)),r&&(i=i.concat(r)),0===i.length?"":i.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),ma=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsParallel({onError:function(t,n,r,i){return e(n)+i(!0)},onDone:t.onDone})},e}(ga),Ta=new ma,ba=function(t){return Ta.setup(this,t),Ta.create(t)},Ea=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=ba,r._call=void 0,r.call=void 0,r}return ye(e,t),e}(ya),Sa=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e,r,i){return n(e)+i(!0)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])}})},e}(ga),xa=new Sa,wa=function(t){return xa.setup(this,t),xa.create(t)},Pa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).compile=wa,r._call=void 0,r.call=void 0,r}return ye(e,t),e}(ya),Na=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=t.onError;return this.callTapsSeries({onError:function(t,n){return e(n)},onDone:t.onDone,rethrowIfPossible:t.rethrowIfPossible})},e}(ga),ka=new Na,Ca=function(){throw new Error("tapAsync is not supported on a SyncHook")},Ma=function(){throw new Error("tapPromise is not supported on a SyncHook")},_a=function(t){return ka.setup(this,t),ka.create(t)},Aa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=Ca,r.tapPromise=Ma,r.compile=_a,r}return ye(e,t),e}(ya),Oa=function(t){function e(){return t.apply(this,arguments)||this}return ye(e,t),e.prototype.content=function(t){var e=this,n=t.onError,r=t.onResult;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,n,r){var i="";return i+="if("+n+" !== undefined) {\n",i+=e._args[0]+" = "+n+";\n",i+="}\n",i+=r()},onDone:function(){return r(e._args[0])},doneReturns:t.resultReturns,rethrowIfPossible:t.rethrowIfPossible})},e}(ga),Ia=new Oa,Ra=function(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")},La=function(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")},Da=function(t){return Ia.setup(this,t),Ia.create(t)},Fa=function(t){function e(e,n){var r;return void 0===e&&(e=[]),void 0===n&&(n=void 0),(r=t.call(this,e,n)||this).tapAsync=Ra,r.tapPromise=La,r.compile=Da,r}return ye(e,t),e}(Aa),Ba=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Ua(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Re(e)&&e+"px"||"16px",s=Jo(n)?n.split(","):[n],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&0>Ba.indexOf(c)&&(c='"'+c+'"'),s[u]=c}return r+" "+i+" "+o+" "+a+" "+s.join(",")}var ja,Va=t.Syringe.defineToken(""),Ga=t.Syringe.defineToken(""),Ha=function(){function t(t,e){this.center=Dn(),this.halfExtents=Dn(),this.min=Dn(),this.max=Dn(),this.update(t,e)}t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var e=t.prototype;return e.update=function(t,e){t&&jn(this.center,t),e&&jn(this.halfExtents,e||Un(0,0,0)),this.min=tr(this.min,this.center,this.halfExtents),this.max=Gn(this.max,this.center,this.halfExtents)},e.setMinMax=function(t,e){Gn(this.center,e,t),Wn(this.center,this.center,.5),tr(this.halfExtents,e,t),Wn(this.halfExtents,this.halfExtents,.5),jn(this.min,t),jn(this.max,e)},e.getMin=function(){return this.min},e.getMax=function(){return this.max},e.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,d=i+u,p=o-c,v=o+c,y=e.center,g=y[0],m=y[1],T=y[2],b=e.halfExtents,E=b[0],S=b[1],x=b[2],w=g-E,P=g+E,N=m-S,k=m+S,C=T-x,M=T+x;l>w&&(l=w),P>h&&(h=P),f>N&&(f=N),k>d&&(d=k),p>C&&(p=C),M>v&&(v=M),n[0]=.5*(l+h),n[1]=.5*(f+d),n[2]=.5*(p+v),a[0]=.5*(h-l),a[1]=.5*(d-f),a[2]=.5*(v-p),this.min[0]=l,this.min[1]=f,this.min[2]=p,this.max[0]=h,this.max[1]=d,this.max[2]=v}},e.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],s=e[4],u=e[8],c=e[1],l=e[5],h=e[9],f=e[2],d=e[6],p=e[10],v=Math.abs(a),y=Math.abs(s),g=Math.abs(u),m=Math.abs(c),T=Math.abs(l),b=Math.abs(h),E=Math.abs(f),S=Math.abs(d),x=Math.abs(p);Vn(n,e[12]+a*i[0]+s*i[1]+u*i[2],e[13]+c*i[0]+l*i[1]+h*i[2],e[14]+f*i[0]+d*i[1]+p*i[2]),Vn(r,v*o[0]+y*o[1]+g*o[2],m*o[0]+T*o[1]+b*o[2],E*o[0]+S*o[1]+x*o[2]),this.min=tr(this.min,n,r),this.max=Gn(this.max,n,r)},e.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return!(n[0]>r[0]||i[0]>e[0]||n[1]>r[1]||i[1]>e[1]||n[2]>r[2]||i[2]>e[2])},e.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o=new t,a=(n=Dn(),r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),s=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}(Dn(),this.getMax(),e.getMax());return o.setMinMax(a,s),o},e.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(e[0]>t[0]||t[0]>n[0]||e[1]>t[1]||t[1]>n[1]||e[2]>t[2]||t[2]>n[2])},e.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?jn(Dn(),this.min):272===t.pnVertexFlag?Un(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?Un(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?Un(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?Un(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?Un(this.max[0],this.min[1],this.max[2]):Un(this.max[0],this.max[1],1===t.pnVertexFlag?this.min[2]:this.max[2])},e.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?jn(Dn(),this.max):272===t.pnVertexFlag?Un(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?Un(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?Un(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?Un(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?Un(this.min[0],this.max[1],this.min[2]):Un(this.min[0],this.min[1],1===t.pnVertexFlag?this.max[2]:this.min[2])},t}(),za=Dn(),Wa=function(){function t(t,e){this.center=void 0,this.radius=void 0,this.center=t||Dn(),this.radius=e||.5}var e=t.prototype;return e.containsPoint=function(t){return tr(za,t,this.center),Bn(za)<this.radius*this.radius},e.intersects=function(t){tr(za,t.center,this.center);var e=t.radius+this.radius;return Bn(za)<=e*e},t}(),Ya=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Un(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},e.distanceToPoint=function(t){return Xn(t,this.normal)-this.distance},e.normalize=function(){var t=1/rr(this.normal);Wn(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&1>=i;return o&&n&&Zn(n,t,e,i),o},t}();(ja=t.Mask||(t.Mask={}))[ja.OUTSIDE=4294967295]="OUTSIDE",ja[ja.INSIDE=0]="INSIDE",ja[ja.INDETERMINATE=2147483647]="INDETERMINATE";var qa=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;6>e;e++)this.planes.push(new Ya)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];Vn(this.planes[0].normal,i-e,u-o,f-c),this.planes[0].distance=y-d,Vn(this.planes[1].normal,i+e,u+o,f+c),this.planes[1].distance=y+d,Vn(this.planes[2].normal,i+n,u+a,f+l),this.planes[2].distance=y+p,Vn(this.planes[3].normal,i-n,u-a,f-l),this.planes[3].distance=y-p,Vn(this.planes[4].normal,i-r,u-s,f-h),this.planes[4].distance=y-v,Vn(this.planes[5].normal,i+r,u+s,f+h),this.planes[5].distance=y+v,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Xa=Dn(),Ka=Dn(),Za=Dn(),Ja=Dn(),Qa=Dn(),$a=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||Dn(),this.direction=e||Un(0,0,-1)}var e=t.prototype;return e.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},e.intersectsSphere=function(t,e){var n=tr(Xa,this.origin,t.center);qn(Ka,jn(Ka,this.direction));var r=Xn(n,Ka),i=Xn(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(0>o)return!1;var a=Math.abs(-r-Math.sqrt(o));return e&&(jn(e,this.direction),Yn(e,this.origin,e,a)),!0},e.intersectsPlane=function(t,e){var n=(t.distance-Xn(t.normal,this.origin))/Xn(t.normal,this.direction),r=n>=0;return r&&e&&Yn(e,this.origin,this.direction,n),r},e.intersectsAABBWithoutIntersection=function(t){var e=Xa,n=Ka,r=Za,i=Ja,o=Qa,a=this.direction;return tr(e,this.origin,t.center),Vn(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),er(r,e,a),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(Vn(o,Math.abs(a[0]),Math.abs(a[1]),Math.abs(a[2])),Kn(n,a,e),Vn(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},e.intersectAABBWithIntersection=function(t,e){var n=jn(Dn(),t.getMin());tr(n,n,this.origin);var r=jn(Dn(),t.getMax());tr(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=0>n[0]?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=0>r[0]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=0>n[1]?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=0>r[1]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=0>n[2]?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=0>r[2]?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=Vn(Za,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),a=Vn(Ja,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(a[0],a[1]),a[2]),u=Math.max(Math.max(o[0],o[1]),o[2]),c=s>=u&&u>=0;return c&&(jn(e,this.direction),Yn(e,this.origin,e,u)),c},t}(),ts=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),es=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),ns=t.Syringe.defineToken(""),rs=t.Syringe.defineToken(""),is=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:t.PropertySyntax.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:t.PropertySyntax.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:t.PropertySyntax.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:t.PropertySyntax.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:t.PropertySyntax.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.FILTER},{name:"clipPath",syntax:t.PropertySyntax.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:t.PropertySyntax.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"center":e===t.Shape.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:t.PropertySyntax.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(e){return e===t.Shape.CIRCLE||e===t.Shape.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:t.PropertySyntax.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:t.PropertySyntax.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:t.PropertySyntax.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:t.PropertySyntax.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:t.PropertySyntax.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:t.PropertySyntax.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:t.PropertySyntax.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:t.PropertySyntax.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:t.PropertySyntax.NUMBER,defaultValue:function(e){return e===t.Shape.PATH||e===t.Shape.POLYGON||e===t.Shape.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0},{name:"markerStart",syntax:t.PropertySyntax.MARKER},{name:"markerEnd",syntax:t.PropertySyntax.MARKER},{name:"markerMid",syntax:t.PropertySyntax.MARKER},{name:"markerStartOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"},{name:"markerEndOffset",syntax:t.PropertySyntax.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"}],os={},as={},ss={},us=fi((function(t){return t.sort((function(t,e){return ss[t]-ss[e]}))})),cs=Dn(),ls=Dn(),hs=Dn(),fs=new Ce("unset"),ds=new Ce("initial"),ps=new Ce("inherit"),vs=new sn(0,0,0,0,!0),ys=new sn(0,0,0,0),gs=fi((function(t,e,n,r){return new sn(t,e,n,r)}),(function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"})),ms={"":fs,unset:fs,initial:ds,inherit:ps},Ts=function(t){return ms[t]||(ms[t]=new Ce(t)),ms[t]};t.DefaultStyleValueRegistry=function(){function e(){this.propertySyntaxFactory=void 0,this.geometryUpdaterFactory=void 0}var n=e.prototype;return n.init=function(){var t=this;is.forEach((function(e){t.registerMetadata(e)}))},n.registerMetadata=function(t){[t.name].concat(t.alias||[]).forEach((function(e){os[e]=t,ss[e]=t.parsePriority||0}))},n.unregisterMetadata=function(t){delete os[t]},n.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},n.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]});var i=n.skipUpdateAttribute,o=n.skipParse,a=n.usedAttributes,s=n.forceUpdateGeometry,u=Object.keys(e);u.forEach((function(n){var r,o=aa(n,e[n]),a=o[0];i||(t.attributes[a]=o[1]),!s&&(null===(r=os[a])||void 0===r?void 0:r.layoutDependent)&&(s=!0)})),o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t)})),(u=us((null==a?void 0:a.length)?Array.from(new Set(u.concat(a))):u)).forEach((function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t))})),s&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),t.children.length&&u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))}))},n.parseProperty=function(t,e,n){var r=os[t],i=e;if((""===e||Ie(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)i=Ts(e);else if(r){var o=r.keywords,a=r.syntax,s=a&&this.getPropertySyntax(a);o&&o.indexOf(e)>-1?i=Ts(e):s&&s.parser&&(i=s.parser(e,n))}return i},n.computeProperty=function(t,e,n){var r=os[t],i=e;if(r){var o=r.syntax,a=r.defaultValue;if(e instanceof Ce){var s=e.value;if("unset"===s&&(s=r.inherited&&!("g-root"===n.id)?"inherit":"initial"),"initial"===s)Ie(a)||(e=this.parseProperty(t,Le(a)?a(n.nodeName):a,n));else if("inherit"===s){var u=this.tryToResolveProperty(n,t,{inherited:!0});return Ie(u)?void this.addUnresolveProperty(n,t):u}}var c=o&&this.getPropertySyntax(o);if(c&&c.calculator)i=c.calculator(t,n.parsedStyle[t],e,n,this);else i=e instanceof Ce?e.value:e}return i},n.postProcessProperty=function(t,e){var n=os[t];if(n&&n.syntax){var r=n.syntax&&this.getPropertySyntax(n.syntax);r&&r.postProcessor&&r.postProcessor(e)}},n.isPropertyResolved=function(t,e){return!as[t.entity]||0===as[t.entity].length||as[t.entity].includes(e)},n.addUnresolveProperty=function(t,e){as[t.entity]||(as[t.entity]=[]),-1===as[t.entity].indexOf(e)&&as[t.entity].push(e)},n.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"===r||"initial"===r||"inherit"===r)return;return r}},n.recalc=function(t){var e=as[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete as[t.entity]}},n.updateGeometry=function(e){var n=this.geometryUpdaterFactory(e.nodeName);if(n){var r=e.geometry;r.contentBounds||(r.contentBounds=new Ha),r.renderBounds||(r.renderBounds=new Ha);var i=e.parsedStyle,o=n.update(i,e),a=o.width,s=o.height,u=o.depth,c=void 0===u?0:u,l=o.offsetX,h=void 0===l?0:l,f=o.offsetY,d=void 0===f?0:f,p=o.offsetZ,v=void 0===p?0:p,y=0>a,g=0>s,m=Vn(cs,Math.abs(a)/2,Math.abs(s)/2,c/2),T=i.stroke,b=i.lineWidth,E=i.increasedLineWidthForHitTesting,S=i.shadowType,x=i.shadowColor,w=i.filter,P=void 0===w?[]:w,N=i.transformOrigin,k=i.anchor;e.nodeName===t.Shape.TEXT&&delete i.anchor;var C=Vn(ls,(1-2*(k&&k[0]||0))*a/2+h,(1-2*(k&&k[1]||0))*s/2+d,(1-2*(k&&k[2]||0))*m[2]+v);r.contentBounds.update(C,m);var M=e.nodeName===t.Shape.POLYLINE||e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.PATH?Math.SQRT2:.5;if(T&&!T.isNone){var _=((b||0)+(E||0))*M;Gn(m,m,Vn(hs,_,_,0))}if(r.renderBounds.update(C,m),x&&S&&"inner"!==S){var A=r.renderBounds,O=A.min,I=A.max,R=i.shadowBlur||0,L=i.shadowOffsetX||0,D=i.shadowOffsetY||0,F=I[0]+R+L,B=O[1]-R+D,U=I[1]+R+D;O[0]=Math.min(O[0],O[0]-R+L),I[0]=Math.max(I[0],F),O[1]=Math.min(O[1],B),I[1]=Math.max(I[1],U),r.renderBounds.setMinMax(O,I)}P.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,Gn(r.renderBounds.halfExtents,r.renderBounds.halfExtents,Un(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,u=r.renderBounds,c=u.min,l=u.max,h=l[0]+s+o,f=c[1]-s+a,d=l[1]+s+a;c[0]=Math.min(c[0],c[0]-s+o),l[0]=Math.max(l[0],h),c[1]=Math.min(c[1],f),l[1]=Math.max(l[1],d),r.renderBounds.setMinMax(c,l)}})),k=i.anchor;var j=(y?-1:1)*Us(N[0],0,e),V=(g?-1:1)*Us(N[1],1,e);e.setOrigin(j-=(y?-1:1)*(k&&k[0]||0)*r.contentBounds.halfExtents[0]*2,V-=(g?-1:1)*(k&&k[1]||0)*r.contentBounds.halfExtents[1]*2),Ah.dirtifyToRoot(e)}},n.isPropertyInheritable=function(t){var e=os[t];return!!e&&e.inherited},e}(),Pr([lt(ns),kr("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"propertySyntaxFactory",void 0),Pr([lt(Va),kr("design:type",Function)],t.DefaultStyleValueRegistry.prototype,"geometryUpdaterFactory",void 0),Pr([Y.postConstruct(),kr("design:type",Function),kr("design:paramtypes",[]),kr("design:returntype",void 0)],t.DefaultStyleValueRegistry.prototype,"init",null),t.DefaultStyleValueRegistry=Pr([ct({token:ce})],t.DefaultStyleValueRegistry);var bs=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Es=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Ss=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,xs=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ws={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Ps=fi((function(t){return"angular"===t.type?Number(t.value):ws[t.value]||0})),Ns=fi((function(t){var e=.5,n=.5;if("position"===(null==t?void 0:t.type)){var r=t.value,i=r.x,o=r.y;"position-keyword"===(null==i?void 0:i.type)&&("left"===i.value?e=0:"center"===i.value?e=.5:"right"===i.value?e=1:"top"===i.value?n=0:"bottom"===i.value&&(n=1)),"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?e=0:"center"===o.value?n=.5:"right"===o.value?e=1:"top"===o.value?n=0:"bottom"===o.value&&(n=1)),"%"===(null==i?void 0:i.type)&&(e=Number(i.value)/100),"%"===(null==o?void 0:o.type)&&(n=Number(i.value)/100)}return{cx:e,cy:n}})),ks=fi((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return jo(e).map((function(n){var r=n.type,i=n.orientation,o=n.colorStops;!function(t){var e,n,r=t.length;t[r-1].length=null!==(e=t[r-1].length)&&void 0!==e?e:{type:"%",value:"100"},r>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var i=0,o=Number(t[0].length.value),a=1;r>a;a++){var s,u=null===(s=t[a].length)||void 0===s?void 0:s.value;if(!Ie(u)&&!Ie(o)){for(var c=1;a-i>c;c++)t[i+c].length={type:"%",value:""+(o+(Number(u)-o)*c/(a-i))};i=a,o=Number(u)}}}(o);var a=o.map((function(t){return[Number(t.length.value)/100,Uo(t)]}));if("linear-gradient"===r)return new un(t.GradientType.LinearGradient,{angle:i?Ps(i):0,steps:a,hash:e});if("radial-gradient"===r&&(i||(i=[{type:"shape",value:"circle"}]),"shape"===i[0].type&&"circle"===i[0].value)){var s=Ns(i[0].at);return new un(t.GradientType.RadialGradient,{cx:s.cx,cy:s.cy,steps:a,hash:e})}}));var n=e[0];if("("===e[1]||"("===e[2])if("l"===n){var r=bs.exec(e);if(r){var i,o=(null===(i=r[2].match(xs))||void 0===i?void 0:i.map((function(t){return t.split(":")})))||[];return[new un(t.GradientType.LinearGradient,{angle:parseFloat(r[1]),steps:o.map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:e})]}}else if("r"===n){var a=function(t){var e=Es.exec(t);if(e){var n;return{cx:.5,cy:.5,steps:((null===(n=e[4].match(xs))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[]).map((function(t){var e=t[1];return[Number(t[0]),e]})),hash:t}}return null}(e);if(a){if(!Jo(a))return[new un(t.GradientType.RadialGradient,a)];e=a}}else if("p"===n)return function(t){var e=Ss.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(e)}));function Cs(t){return Fe(t)&&!!t.image}var Ms=fi((function(t){if(Cs(t))return ve({repetition:"repeat"},t);if(Ie(t)&&(t=""),"transparent"===t)return ys;"currentColor"===t&&(t="black");var e=ks(t);if(e)return e;var n=Ai(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),gs.apply(void 0,r)}));function _s(t,e){if(t instanceof sn&&e instanceof sn)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(eo(e[n],0,255));return e[3]=eo(e[3],0,1),"rgba("+e.join(",")+")"}]}function As(t,e){if(Ie(e))return new qe(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return new qe(Number(e),"px");if("deg".search(t)>=0)return new qe(Number(e),"deg")}var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new qe(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var Os=fi((function(t){return As(new RegExp("px","g"),t)})),Is=fi((function(t){return As(new RegExp("%","g"),t)})),Rs=fi((function(t){return Re(t)||isFinite(Number(t))?new qe(Number(t),"px"):As(new RegExp("px|%|em|rem","g"),t)})),Ls=fi((function(t){return As(new RegExp("deg|rad|grad|turn","g"),t)}));function Ds(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,u=qe.toCanonicalUnit(t.unit),c=t.convertTo(u),l=e.convertTo(u);return c&&l?(a=c.value,s=l.value,o=qe.unitTypeToString(t.unit)):(qe.isLength(t.unit)||qe.isLength(e.unit))&&(a=Us(t,i,n),s=Us(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Fs(e){var n=0;return e.unit===t.UnitType.kDegrees?n=e.value:e.unit===t.UnitType.kRadians?n=oo(Number(e.value)):e.unit===t.UnitType.kTurns&&(n=ao(Number(e.value))),n}function Bs(t){return Jo(t)?t.split(" ").map((function(t){return Rs(t)})):t.map((function(t){return Rs(t.toString())}))}function Us(e,n,r){if(e.unit===t.UnitType.kPixels)return Number(e.value);if(e.unit===t.UnitType.kPercentage&&r){var i=r.nodeName===t.Shape.GROUP?r.getLocalBounds():r.getGeometryBounds(),o=0;return Ha.isEmpty(i)||(o=2*i.halfExtents[n]),Number(e.value)/100*o}return 0}function js(t){return t.toString()}var Vs=fi((function(t){return"number"==typeof t?new qe(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new qe(Number(t)):new qe(0)})),Gs=fi((function(t){return Jo(t)?t.split(" ").map(Vs):t.map(Vs)}));function Hs(t,e){return[t,e,js]}function zs(t,e){return function(n,r){return[n,r,function(n){return js(eo(n,t,e))}]}}function Ws(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}var Ys=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var e;try{e=zr(t)}catch(n){e=zr(""),console.error("[g]: Invalid SVG Path definition: "+t)}var n=ca(e),r=la(e),i=r.polygons,o=r.polylines,a=Qr(e,!0),s=a[0],u=a[1],c=ha(s),l=function(t,e){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=ai(t,void 0,wr(wr({},e),{length:!1})),r=n.min,i=r.x,o=r.y,a=n.max,s=a.x,u=a.y,c=s-i,l=u-o;return{width:c,height:l,x:i,y:o,x2:s,y2:u,cx:i+c/2,cy:o+l/2,cz:Math.max(c,l)+Math.min(c,l)/2}}(e),h=l.x,f=l.y,d=l.width,p=l.height;return{absolutePath:e,hasArc:n,segments:c,polygons:i,polylines:o,curve:s,totalLength:0,zCommandIndexes:u,rect:{x:Number.isFinite(h)?h:0,y:Number.isFinite(f)?f:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(p)?p:0}}},qs=fi(Ys);function Xs(t,e){var n=Jo(t)?qs(t):Ys(t);return e&&(e.parsedStyle.defX=n.rect.x,e.parsedStyle.defY=n.rect.y),n}function Ks(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=ci(r,i));var a,s,u,c,l,h,f,d,p=si(o[0])!==si(o[1])?(s=(a=o[0]).slice(1).map((function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):a[0].slice(1).concat(t.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map((function(t){return["C"].concat(t.slice(2))})))):xr(o[0]);return[p,(u=o[1],c=p,l=u.length-1,h=[],f=0,d=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a=i+o;return 0===o||t[a]&&"M"===t[a][0]?["M"].concat(t[a].slice(-2)):(e>a||(a-=n),t[a])}))}))}(u),d.forEach((function(t,e){u.slice(1).forEach((function(t,n){f+=Xr(u[(e+n)%l].slice(-2),c[n%l].slice(-2))})),h[e]=f,f=0})),d[h.indexOf(Math.min.apply(null,h))]),function(t){return t}]}function Zs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Js(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}var Qs={box:function(t,e,n,r){return Js([t,n],[e,r])},length:function(t,e,n,r){return Zs(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return 0>a?Zs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Zs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([i-t,o-e],s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};var $s=function(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var r=t[n],i=t[n+1];e+=Zs(r[0],r[1],i[0],i[1])}return e}(t)};function tu(t,e){var n;n=Jo(t)?t.split(" ").map((function(t){var e=t.split(","),n=e[1];return[Number(e[0]),Number(n)]})):t;var r,i,o=[],a=0,s=$s(n);n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Qs.length(t[0],t[1],n[e+1][0],n[e+1][1]),r[1]=(a+=i)/s,o.push(r))}));var u=Math.min.apply(Math,n.map((function(t){return t[0]}))),c=Math.min.apply(Math,n.map((function(t){return t[1]})));return e&&(e.parsedStyle.defX=u,e.parsedStyle.defY=c),{points:n,totalLength:s,segments:o}}var eu=function(t){return As(/deg|rad|grad|turn|px|%/g,t)},nu=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ru(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,nu.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return eu(t)||Ms(t)}))}),n.lastIndex===t.length)return r}return[]}var iu=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var ou=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};var au=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(e*a-n*o)*(h*y-f*v)-(e*s-r*o)*(l*y-f*p)+(e*u-i*o)*(l*v-h*p)+(n*s-r*a)*(c*y-f*d)-(n*u-i*a)*(c*v-h*d)+(r*u-i*s)*(c*p-l*d)};var su=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],y=e[14],g=e[15],m=n*s-r*a,T=n*u-i*a,b=n*c-o*a,E=r*u-i*s,S=r*c-o*s,x=i*c-o*u,w=l*v-h*p,P=l*y-f*p,N=l*g-d*p,k=h*y-f*v,C=h*g-d*v,M=f*g-d*y,_=m*M-T*C+b*k+E*N-S*P+x*w;if(!_)return null;return t[0]=(s*M-u*C+c*k)*(_=1/_),t[1]=(i*C-r*M-o*k)*_,t[2]=(v*x-y*S+g*E)*_,t[3]=(f*S-h*x-d*E)*_,t[4]=(u*N-a*M-c*P)*_,t[5]=(n*M-i*N+o*P)*_,t[6]=(y*b-p*x-g*T)*_,t[7]=(l*x-f*b+d*T)*_,t[8]=(a*C-s*N+c*w)*_,t[9]=(r*N-n*C-o*w)*_,t[10]=(p*S-v*b+g*m)*_,t[11]=(h*b-l*S-d*m)*_,t[12]=(s*P-a*k-u*w)*_,t[13]=(n*k-r*P+i*w)*_,t[14]=(v*T-p*E-y*m)*_,t[15]=(l*E-h*T+f*m)*_,t};var uu=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t};var cu=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t};var lu={length:function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},normalize:cu,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}},hu=iu(),fu=iu(),du=[0,0,0,0],pu=[[0,0,0],[0,0,0],[0,0,0]],vu=[0,0,0];function yu(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var gu,mu,Tu,bu,Eu=t.Syringe.defineToken(""),Su=t.Syringe.defineToken(""),xu=0;t.LayoutContext=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+xu++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),t.LayoutContext=Pr([ct(),Nr(0,lt(Su)),kr("design:paramtypes",[Object])],t.LayoutContext),(gu=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",gu.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(mu||(mu={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(Tu||(Tu={})),(bu=t.PropertyName||(t.PropertyName={})).LAYOUT="display",bu.LEFT="left",bu.TOP="top",bu.BOTTOM="bottom",bu.RIGHT="right",bu.WIDTH="width",bu.HEIGHT="height",bu.MIN_WIDTH="minWidth",bu.MAX_WIDTH="maxWidth",bu.MIN_HEIGHT="minHeight",bu.MAX_HEIGHT="maxHeight",bu.BOX_SIZING="boxSizing",bu.PADDING="padding",bu.PADDING_TOP="paddingTop",bu.PADDING_BOTTOM="paddingBottom",bu.PADDING_START="paddingLeft",bu.PADDING_END="paddingRight",bu.MARGIN="margin",bu.MARGIN_TOP="marginTop",bu.MARGIN_BOTTOM="marginBottom",bu.MARGIN_START="marginLeft",bu.MARGIN_END="marginRight",bu.BORDER="border",bu.BORDER_TOP="borderTop",bu.BORDER_BOTTOM="borderBottom",bu.BORDER_START="borderLeft",bu.BORDER_END="borderRight",bu.FLEX_DIRECTION="flexDirection",bu.FLEX_WRAP="flexWrap",bu.FLEX_FLOW="flexFlow",bu.ALIGN_ITEMS="alignItems",bu.ALIGN_CONTENT="alignContent",bu.JUSTIFY_CONTENT="justifyContent",bu.FLEX="flex",bu.ALIGN_SELF="alignSelf",bu.FLEX_SHRINK="flexShrink",bu.FLEX_BASIS="flexBasis",bu.FLEX_GROW="flexGrow",bu.OFFSET_WIDTH="offsetWidth",bu.OFFSET_HEIGHT="offsetHeight",bu.ORDER="order";var wu=1,Pu=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=wu++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var n=e.prototype;return n.setMeasure=function(t){this.measureFn=t},n.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},n.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},n.insertChild=function(t,e){this.children.splice(t,0,e)},n.removeChild=function(t){var e,n=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(n)},n.removeChildAtIndex=function(t){this.children.splice(t,1)},n.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},n.setStyle=function(t,e){this.style.set(t,e)},n.getStyle=function(){for(var t=this,e=new Map,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return r.forEach((function(n){var r=t.style.get(n);r&&e.set(n,r)})),e},n.getAllStyle=function(){return this.style},n.markDirty=function(){this.dirty=!0},n.idDirty=function(){return this.dirty},n.getSize=function(){var e,n,r,i;return{width:null!==(e=null===(n=this.style.get(t.PropertyName.WIDTH))||void 0===n?void 0:n.value)&&void 0!==e?e:0,height:null!==(r=null===(i=this.style.get(t.PropertyName.HEIGHT))||void 0===i?void 0:i.value)&&void 0!==r?r:0}},n.computeLayout=function(){var t=fe(le().mark((function t(){var e;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Ih.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.setComputedLayout=function(t){this.computedLayout=t},n.getComputedLayout=function(){return this.computedLayout},n.getAllComputedLayout=function(){},n.toString=function(){return"LayoutObject "+this.id},pe(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),Nu=t.Syringe.defineToken(""),ku=t.Syringe.defineToken(""),Cu=t.Syringe.defineToken("");t.FragmentResult=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},t.FragmentResult=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(Cu)),Nr(2,lt(ku)),kr("design:paramtypes",[t.LayoutContext,Pu,Object])],t.FragmentResult);var Mu=t.Syringe.defineToken(""),_u=t.Syringe.defineToken("");t.LayoutChildren=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var n=e.prototype;return n.intrinsicSizes=function(){var e=new Io;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},n.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var n=new Io;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:n}),n.promise},e}(),t.LayoutChildren=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(_u)),kr("design:paramtypes",[t.LayoutContext,Object])],t.LayoutChildren);var Au=function(){};Au.inputProperties=void 0,Au.childrenInputProperties=void 0,Au.layoutOptions=void 0;var Ou,Iu,Ru=t.Syringe.defineToken(""),Lu=t.Syringe.defineToken(""),Du=[0,0,0,0];t.LayoutEdges=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,y,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),T=null!==(n=null===(r=m.get(t.PropertyName.PADDING_TOP))||void 0===r?void 0:r.value)&&void 0!==n?n:0,b=null!==(i=null===(o=m.get(t.PropertyName.PADDING_END))||void 0===o?void 0:o.value)&&void 0!==i?i:0,E=null!==(a=null===(s=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===s?void 0:s.value)&&void 0!==a?a:0,S=null!==(u=null===(c=m.get(t.PropertyName.PADDING_START))||void 0===c?void 0:c.value)&&void 0!==u?u:0,x=null!==(l=null===(h=m.get(t.PropertyName.PADDING_TOP))||void 0===h?void 0:h.value)&&void 0!==l?l:0,w=null!==(f=null===(d=m.get(t.PropertyName.PADDING_END))||void 0===d?void 0:d.value)&&void 0!==f?f:0,P=null!==(p=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==p?p:0,N=null!==(y=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==y?y:0;this.blockStart=T+Du[0]+x,this.inlineStart=b+Du[1]+w,this.blockEnd=E+Du[2]+P,this.inlineEnd=S+Du[3]+N,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEdges=Pr([ut(),Nr(0,lt(Lu)),kr("design:paramtypes",[Object])],t.LayoutEdges),t.LayoutRegistry=((Ou=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw new Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(Iu.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},pe(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],Iu=Ou),t.LayoutRegistry=Iu=Pr([ct()],t.LayoutRegistry);var Fu=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))};t.LayoutEngine=function(){function e(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var n=e.prototype;return n.computeLayout=function(){var t=fe(le().mark((function t(e,n){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.determineAllIntrinsicSizes=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),n.getLayoutDefinitionName=function(e){var n=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!n)throw new Error("layout property not found");return n.value},n.determineIntrinsicSizes=function(){var t=fe(le().mark((function t(e,n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),n.invokeIntrinsicSizesCallback=function(){var e=fe(le().mark((function e(n,r,i){var o,a,s,u,c,l,h,f,d,p,v;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.layoutRegistry.getLayout(n),a=new o,s=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(u=o.inputProperties)?[]:u,l=[],i.forEach((function(t){var e=s.layoutChildrenFactory({node:t});l.push(e)})),h=this.layoutEdgesFactory({node:r}),f=r.getStyle.apply(r,c),d=a.intrinsicSizes(l,h,f),(p=this.runWorkQueue(d,s.workQueue)).next(),e.next=13,Fu();case 13:v=p.next().value,s.clearWorkQueue(),r.setIntrisicSizes(v);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.calculateLayout=function(){var t=fe(le().mark((function t(e,n,r){var i;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.invokeLayoutCallback=function(){var e=fe(le().mark((function e(n,r,i,o){var a,s,u,c,l,h,f,d,p,v,y,g,m;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layoutRegistry.getLayout(n),s=new a,u=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),l=void 0===(c=a.inputProperties)?[]:c,h=[],i.forEach((function(t){var e=u.layoutChildrenFactory({node:t});h.push(e)})),f=this.layoutEdgesFactory({node:r}),d=r.getStyle.apply(r,l),p=s.layout(h,f,o,d),(v=this.runWorkQueue(p,u.workQueue)).next(),e.next=13,Fu();case 13:y=v.next().value,u.clearWorkQueue(),g=y instanceof t.FragmentResult?y:u.fragmentResultFactory(y),m=u.layoutFragmentFactory({inlineSize:g.inlineSize,blockSize:g.blockSize,data:g.data}),r.setComputedLayout(m),i.forEach((function(t,e){t.setComputedLayout(g.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.runWorkQueue=le().mark((function e(n,r){var i,o=this;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Oo(n),r.length>0&&i.isPending()&&r.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(o.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var n=e.layoutChild,r=e.deferred,i=n.layoutContext,a=o.getNodeFragment(n.node,e.layoutConstraints);r.resolve(i.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(i.isFulfilled()){e.next=6;break}throw new Error("promise not fullfilled!");case 6:return e.abrupt("return",i.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),n.getNodeIntrisicSizes=function(e){var n,r,i,o,a,s,u,c,l,h,f,d,p=e.getAllStyle();return{minContentInlineSize:(null===(n=p.get(t.PropertyName.MIN_WIDTH))||void 0===n?void 0:n.value)||(null===(r=e.intrisicSizes)||void 0===r?void 0:r.minContentInlineSize)||(null===(i=p.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)||0,maxContentInlineSize:(null===(o=p.get(t.PropertyName.MAX_WIDTH))||void 0===o?void 0:o.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(s=p.get(t.PropertyName.WIDTH))||void 0===s?void 0:s.value)||0,minContentBlockSize:(null===(u=p.get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(c=e.intrisicSizes)||void 0===c?void 0:c.minContentBlockSize)||(null===(l=p.get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,maxContentBlockSize:(null===(h=p.get(t.PropertyName.MAX_HEIGHT))||void 0===h?void 0:h.value)||(null===(f=e.intrisicSizes)||void 0===f?void 0:f.maxContentBlockSize)||(null===(d=p.get(t.PropertyName.HEIGHT))||void 0===d?void 0:d.value)||0}},n.getNodeFragment=function(e,n){var r,i,o,a,s,u;return{inlineSize:(null===(r=e.getComputedLayout())||void 0===r?void 0:r.inlineSize)||(null===(i=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===i?void 0:i.value)||(null===(o=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(s=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===s?void 0:s.value)||(null===(u=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===u?void 0:u.value)||0,data:n.data}},e}(),t.LayoutEngine=Pr([ct(),Nr(0,lt(t.LayoutRegistry)),Nr(1,lt(Eu)),Nr(2,lt(Ru)),kr("design:paramtypes",[t.LayoutRegistry,Function,Function])],t.LayoutEngine);var Bu=t.Syringe.defineToken(""),Uu=t.Syringe.defineToken("");t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutFragment=Pr([ut(),Nr(0,lt(t.LayoutContext)),Nr(1,lt(Uu)),kr("design:paramtypes",[t.LayoutContext,Object])],t.LayoutFragment);var ju={number:function(t){return new qe(t)},percent:function(t){return new qe(t,"%")},px:function(t){return new qe(t,"px")},em:function(t){return new qe(t,"em")},rem:function(t){return new qe(t,"rem")},deg:function(t){return new qe(t,"deg")},grad:function(t){return new qe(t,"grad")},rad:function(t){return new qe(t,"rad")},turn:function(t){return new qe(t,"turn")},s:function(t){return new qe(t,"s")},ms:function(t){return new qe(t,"ms")},registerProperty:function(t){Oh.registerMetadata({name:t.name,inherited:t.inherits,interpolable:t.interpolable,defaultValue:t.initialValue,syntax:t.syntax})},registerLayout:function(e,n){Ft.get(t.LayoutRegistry).registerLayout(e,n)}},Vu=null;function Gu(t){return function(e){var n=0;return t.map((function(t){return t===Vu?e[n++]:t}))}}function Hu(t){return t}var zu={matrix:["NNNNNN",[Vu,Vu,0,0,Vu,Vu,0,0,0,0,1,0,Vu,Vu,0,1],Hu],matrix3d:["NNNNNNNNNNNNNNNN",Hu],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Gu([Vu,Vu,ju.number(1)]),Hu],scalex:["N",Gu([Vu,ju.number(1),ju.number(1)]),Gu([Vu,ju.number(1)])],scaley:["N",Gu([ju.number(1),Vu,ju.number(1)]),Gu([ju.number(1),Vu])],scalez:["N",Gu([ju.number(1),ju.number(1),Vu])],scale3d:["NNN",Hu],skew:["Aa",null,Hu],skewx:["A",null,Gu([Vu,an])],skewy:["A",null,Gu([an,Vu])],translate:["Tt",Gu([Vu,Vu,on]),Hu],translatex:["T",Gu([Vu,on,on]),Gu([Vu,on])],translatey:["T",Gu([on,Vu,on]),Gu([on,Vu])],translatez:["L",Gu([on,on,Vu])],translate3d:["TTL",Hu]};function Wu(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=zu[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(s.length>u.length)return[];for(var c=[],l=0;u.length>l;l++){var h=s[l],f=u[l],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?an:Ls(t)},N:Vs,T:Rs,L:Os}[f.toUpperCase()](h):{a:an,n:c[0],t:on}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Yu(t){var e,n,r,i;switch(t.t){case"rotatex":return i=io(Fs(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=io(Fs(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=io(Fs(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=io(Fs(t.d[3]));var o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var s=Math.sin(i/2),u=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(e*n*c+r*u),2*(e*r*c-n*u),0,2*(e*n*c-r*u),1-2*(e*e+r*r)*c,2*(n*r*c+e*u),0,2*(e*r*c+n*u),2*(n*r*c-e*u),1-2*(e*e+n*n)*c,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var l=io(Fs(t.d[0])),h=io(Fs(t.d[1]));return[1,Math.tan(h),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=io(Fs(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=io(Fs(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Us(t.d[0],0,null)||0,n=Us(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Us(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Us(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Us(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Us(t.d[0],0,null)||0,n=Us(t.d[1],0,null)||0,r=Us(t.d[2],0,null)||0,1];case"perspective":var f=Us(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map((function(t){return t.value}))}}function qu(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Xu(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(e||(e=[0,0,0]),n||(n=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0,1]),o||(o=[0,0,0,1]),!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;16>i;i++)t[i]=e[i]*r;return!0}(hu,t))return!1;if(ou(fu),fu[3]=0,fu[7]=0,fu[11]=0,fu[15]=1,Math.abs(1e-8>au(fu)))return!1;var a,s,u,c,l,h,f,d=hu[3],p=hu[7],v=hu[11],y=hu[12],g=hu[13],m=hu[14],T=hu[15];if(0!==d||0!==p||0!==v){if(du[0]=d,du[1]=p,du[2]=v,du[3]=T,!su(fu,fu))return!1;uu(fu,fu),(a=i)[0]=(u=fu)[0]*(c=(s=du)[0])+u[4]*(l=s[1])+u[8]*(h=s[2])+u[12]*(f=s[3]),a[1]=u[1]*c+u[5]*l+u[9]*h+u[13]*f,a[2]=u[2]*c+u[6]*l+u[10]*h+u[14]*f,a[3]=u[3]*c+u[7]*l+u[11]*h+u[15]*f}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=y,e[1]=g,e[2]=m,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(pu,hu),n[0]=lu.length(pu[0]),lu.normalize(pu[0],pu[0]),r[0]=lu.dot(pu[0],pu[1]),yu(pu[1],pu[1],pu[0],1,-r[0]),n[1]=lu.length(pu[1]),lu.normalize(pu[1],pu[1]),r[0]/=n[1],r[1]=lu.dot(pu[0],pu[2]),yu(pu[2],pu[2],pu[0],1,-r[1]),r[2]=lu.dot(pu[1],pu[2]),yu(pu[2],pu[2],pu[1],1,-r[2]),n[2]=lu.length(pu[2]),lu.normalize(pu[2],pu[2]),r[1]/=n[2],r[2]/=n[2],lu.cross(vu,pu[1],pu[2]),0>lu.dot(pu[0],vu))for(var b=0;3>b;b++)n[b]*=-1,pu[b][0]*=-1,pu[b][1]*=-1,pu[b][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+pu[0][0]-pu[1][1]-pu[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-pu[0][0]+pu[1][1]-pu[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-pu[0][0]-pu[1][1]+pu[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+pu[0][0]+pu[1][1]+pu[2][2],0)),pu[2][1]>pu[1][2]&&(o[0]=-o[0]),pu[0][2]>pu[2][0]&&(o[1]=-o[1]),pu[1][0]>pu[0][1]&&(o[2]=-o[2])}(function(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Yu).reduce(qu)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var Ku=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;4>r;r++)for(var i=0;4>i;i++)for(var o=0;4>o;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;4>s;s++)a[s][3]=o[s];for(var u=0;3>u;u++)for(var c=0;3>c;c++)a[3][u]+=e[c]*a[c][u];var l=i[0],h=i[1],f=i[2],d=i[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(h*h+f*f),p[0][1]=2*(l*h-f*d),p[0][2]=2*(l*f+h*d),p[1][0]=2*(l*h+f*d),p[1][1]=1-2*(l*l+f*f),p[1][2]=2*(h*f-l*d),p[2][0]=2*(l*f-h*d),p[2][1]=2*(h*f+l*d),p[2][2]=1-2*(l*l+h*h),a=t(a,p);var v,y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],a=t(a,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],a=t(a,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],a=t(a,y));for(var g=0;3>g;g++)for(var m=0;3>m;m++)a[g][m]*=n[g];return 0==(v=a)[0][2]&&0==v[0][3]&&0==v[1][2]&&0==v[1][3]&&0==v[2][0]&&0==v[2][1]&&1==v[2][2]&&0==v[2][3]&&0==v[3][2]&&1==v[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}}();function Zu(t){return t.toFixed(6).replace(".000000","")}function Ju(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=Xu(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=Xu(e)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;t.length>r;r++)n+=t[r]*e[r];return n}(t,e);r=eo(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),s=0;4>s;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(n[0][3],r[0][3],t[5]);return Ku(t[0],t[1],t[2],e,t[4]).map(Zu).join(",")}])}function Qu(t){return t.replace(/[xy]/,"")}function $u(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function tc(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new qe(a):new qe(a,t.unit)}))})},o=0;t.length>o;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length){var h=Ju(t,e);u=[h[0]],c=[h[1]],l=[["matrix",[h[2]]]]}else for(var f=0;t.length>f;f++){var d=t[f].t,p=e[f].t,v=t[f].d,y=e[f].d,g=zu[d],m=zu[p],T=void 0;if(s=p,"perspective"===(a=d)&&"perspective"===s||!("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){var b=Ju([t[f]],[e[f]]);u.push(b[0]),c.push(b[1]),l.push(["matrix",[b[2]]])}else{if(d===p)T=d;else if(g[2]&&m[2]&&Qu(d)===Qu(p))T=Qu(d),v=g[2](v),y=m[2](y);else{if(!g[1]||!m[1]||$u(d)!==$u(p)){var E=Ju(t,e);u=[E[0]],c=[E[1]],l=[["matrix",[E[2]]]];break}T=$u(d),v=g[1](v),y=m[1](y)}for(var S=[],x=[],w=[],P=0;v.length>P;P++){var N=Ds(v[P],y[P],n,!1,P);S[P]=N[0],x[P]=N[1],w.push(N[2])}u.push(S),c.push(x),l.push([T,w])}}if(r){var k=u;u=c,c=k}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"})).join(" ")}]}var ec,nc=fi((function(t){if(Jo(t)){if("text-anchor"===t)return[new qe(0,"px"),new qe(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Rs(rc(e[0])),Rs(rc(e[1]))]}return[new qe(t[0]||0,"px"),new qe(t[1]||0,"px")]}));function rc(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}t.CSSPropertyAngle=function(){function t(){this.parser=Ls,this.mixer=Hs}return t.prototype.calculator=function(t,e,n,r){return Fs(n)},t}(),t.CSSPropertyAngle=Pr([ct({token:{token:rs,named:t.PropertySyntax.ANGLE}})],t.CSSPropertyAngle),(ec=t.ElementEvent||(t.ElementEvent={})).DESTROY="destroy",ec.ATTR_MODIFIED="DOMAttrModified",ec.INSERTED="DOMNodeInserted",ec.CHILD_INSERTED="child-inserted",ec.REMOVED="removed",ec.CHILD_REMOVED="child-removed",ec.MOUNTED="DOMNodeInsertedIntoDocument",ec.UNMOUNTED="DOMNodeRemovedFromDocument",ec.BOUNDS_CHANGED="bounds-changed",ec.RENDER_ORDER_CHANGED="render-order-changed",ec.CULLED="culled";var ic,oc=n((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}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 t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,i=e.length,o=new Array(i);i>r;r++)o[r]=e[r].fn;return o},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,a),!0}for(c=1,u=new Array(h-1);h>c;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;d>c;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);h>f;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;l>u;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&a(this,e):(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,t.exports=s})),ac=function(){function t(e){this.type=void 0,this.eventPhase=t.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new ts,this.page=new ts,this.canvas=new ts,this.viewport=new ts,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}var e=t.prototype;return e.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},e.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.stopPropagation=function(){this.propagationStopped=!0},e.initEvent=function(){},e.initUIEvent=function(){},e.clone=function(){throw new Error("Method not implemented.")},pe(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),t}(),sc=function(t){function e(e,n){var r;return(r=t.call(this,null)||this).type=e,r.detail=n,Object.assign(Te(r),n),r}return ye(e,t),e}(ac),uc=function(){function t(){this.emitter=new oc.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r=De(n)&&n||Fe(n)&&n.capture,i=Fe(n)&&n.once,o=Le(e)?void 0:e,a=!1,s="";if(t.indexOf(":")>-1){var u=t.split(":");t=u[1],s=u[0],a=!0}if(t=r?t+"capture":t,e=Le(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];(null===(t=n[0].target)||void 0===t?void 0:t.name)===s&&c.apply(void 0,n)}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,i=De(n)&&n||Fe(n)&&n.capture,o=Le(e)?void 0:e;return t=i?t+"capture":t,e=Le(e)?e:null===(r=e)||void 0===r?void 0:r.handleEvent,this.emitter.off(t,e,o),this},e.emit=function(t,e){this.dispatchEvent(new sc(t,e))},e.dispatchEvent=function(t){if(!(t instanceof ac))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var n;e=null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView}if(e){var r;if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],t.target=this,null===(r=t.manager)||void 0===r||r.dispatchEvent(t)}return!t.defaultPrevented},t}(),cc=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}ye(n,e),n.isNode=function(t){return!!t.childNodes};var r=n.prototype;return r.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},r.hasChildNodes=function(){return this.childNodes.length>0},r.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},r.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},r.lookupPrefix=function(t){throw new Error("Method not implemented.")},r.normalize=function(){throw new Error("Method not implemented.")},r.isEqualNode=function(t){return this===t},r.isSameNode=function(t){return this.isEqualNode(t)},r.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof n))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=t,r=this,i=[e],o=[r];null!==(a=e.parentNode)&&void 0!==a?a:r.parentNode;){var a;e=e.parentNode?(i.push(e.parentNode),e.parentNode):e,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r}if(e!==r)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var s=i.length>o.length?i:o,u=s===i?o:i;if(s[s.length-u.length]===u[0])return s===i?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var d=h.parentNode.childNodes;return d.indexOf(h)<d.indexOf(f)?u===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:s===i?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING},r.contain=function(t){return this.contains(t)},r.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},r.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},r.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},pe(n,[{key:"textContent",get:function(){var e="";this.nodeName===t.Shape.TEXT&&(e+=this.style.text);for(var n,r=Ee(this.childNodes);!(n=r()).done;){var i=n.value;e+=i.nodeName===t.Shape.TEXT?i.nodeValue:i.textContent}return e},set:function(e){var n=this;this.childNodes.slice().forEach((function(t){n.removeChild(t,!0)})),this.nodeName===t.Shape.TEXT&&(this.style.text=""+e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}}]),n}(uc);cc.DOCUMENT_POSITION_DISCONNECTED=1,cc.DOCUMENT_POSITION_PRECEDING=2,cc.DOCUMENT_POSITION_FOLLOWING=4,cc.DOCUMENT_POSITION_CONTAINS=8,cc.DOCUMENT_POSITION_CONTAINED_BY=16,cc.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,(ic=t.Strategy||(t.Strategy={}))[ic.Standard=0]="Standard";var lc=function(){function e(){this.strategy=t.Strategy.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return e.prototype.isCulled=function(){return this.enable&&!this.visible},e}();lc.tag="c-cullable";var hc=function(){this.contentBounds=void 0,this.renderBounds=void 0};hc.tag="c-geometry";var fc=function(){this.aabb=void 0};fc.tag="c-rbush-node";var dc=t.Syringe.defineToken(""),pc=function(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1,this.proxyNodeName=void 0};pc.tag="c-renderable";var vc=function(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0};vc.tag="c-sortable";var yc=function(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=Un(0,0,0),this.localRotation=mr(0,0,0,1),this.localScale=Un(1,1,1),this.localTransform=fn(),this.localSkew=Sr(0,0),this.position=Un(0,0,0),this.rotation=mr(0,0,0,1),this.scaling=Un(1,1,1),this.worldTransform=fn(),this.origin=Un(0,0,0)};yc.tag="c-transform";var gc=function(t){function e(e,n,r,i,o,a,s,u){var c;return(c=t.call(this,null)||this).relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return ye(e,t),e}(ac);gc.ADDITION=2,gc.MODIFICATION=1,gc.REMOVAL=3;var mc,Tc=0,bc=new sc(t.ElementEvent.CHILD_INSERTED,{child:null}),Ec=new gc(t.ElementEvent.INSERTED,null,"","","",0,"",""),Sc=new gc(t.ElementEvent.REMOVED,null,"","","",0,"",""),xc=new sc(t.ElementEvent.DESTROY),wc=new sc(t.ElementEvent.CHILD_REMOVED,{child:null}),Pc=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).entity=Tc++,e.renderable=new pc,e.cullable=new lc,e.transformable=new yc,e.sortable=new vc,e.geometry=new hc,e.rBushNode=new fc,e.id=void 0,e.name=void 0,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={anchor:fs,opacity:fs,fillOpacity:fs,strokeOpacity:fs,fill:fs,stroke:fs,transform:fs,transformOrigin:fs,visibility:fs,pointerEvents:fs,lineWidth:fs,lineCap:fs,lineJoin:fs,increasedLineWidthForHitTesting:fs,fontSize:fs,fontFamily:fs,fontStyle:fs,fontWeight:fs,fontVariant:fs,textAlign:fs,textBaseline:fs,textTransform:fs,zIndex:fs,filter:fs,shadowType:fs},e.parsedStyle={},e.attributes={},e}ye(e,t),e.isElement=function(t){return!!t.getAttribute};var n=e.prototype;return n.cloneNode=function(t){throw new Error("Method not implemented.")},n.appendChild=function(t,e){return Ah.attach(t,this,e),bc.detail.child=t,this.dispatchEvent(bc),Ec.relatedNode=this,t.dispatchEvent(Ec),t},n.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},n.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},n.removeChild=function(t,e){return void 0===e&&(e=!0),Sc.relatedNode=this,t.dispatchEvent(Sc),e&&(t.dispatchEvent(xc),t.destroyed=!0),wc.detail.child=t,this.dispatchEvent(wc),Ah.detach(t),e&&(t.emitter.removeAllListeners(),Rh.remove(t.entity)),t},n.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},n.matches=function(t){return Ah.matches(t,this)},n.getElementById=function(t){return Ah.querySelector("#"+t,this)},n.getElementsByName=function(t){return Ah.querySelectorAll('[name="'+t+'"]',this)},n.getElementsByClassName=function(t){return Ah.querySelectorAll("."+t,this)},n.getElementsByTagName=function(t){return Ah.querySelectorAll(t,this)},n.querySelector=function(t){return Ah.querySelector(t,this)},n.querySelectorAll=function(t){return Ah.querySelectorAll(t,this)},n.closest=function(t){var e=this;do{if(Ah.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},n.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},n.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},n.after=function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];r.forEach((function(n,r){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(n,e+r+1)}))}},n.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},n.replaceWith=function(){this.after.apply(this,arguments),this.remove()},n.append=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e){return t.appendChild(e)}))},n.prepend=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];n.forEach((function(e,n){return t.appendChild(e,n)}))},n.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},n.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},n.destroy=function(){this.dispatchEvent(xc),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},n.getGeometryBounds=function(){return Ah.getGeometryBounds(this)},n.getRenderBounds=function(){return Ah.getBounds(this,!0)},n.getBounds=function(){return Ah.getBounds(this)},n.getLocalBounds=function(){return Ah.getLocalBounds(this)},n.getBoundingClientRect=function(){return Ah.getBoundingClientRect(this)},n.getClientRects=function(){return[this.getBoundingClientRect()]},n.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},n.getAttributeNames=function(){return Object.keys(this.attributes)},n.getAttribute=function(t){var e=this.attributes[t];if(void 0===e){var n=aa(t.toString(),"");e=this.attributes[n[0]]}return Ie(e)?null:e},n.hasAttribute=function(t){return this.getAttributeNames().includes(t)},n.hasAttributes=function(){return!!this.getAttributeNames().length},n.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},n.setAttribute=function(t,e,n){this.attributes[t]=e},n.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.getAttributeNode=function(t){throw new Error("Method not implemented.")},n.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},n.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},n.removeAttributeNode=function(t){throw new Error("Method not implemented.")},n.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},n.setAttributeNode=function(t){throw new Error("Method not implemented.")},n.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},n.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},pe(e,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}}]),e}(cc),Nc=function(e){function n(n){var r,i;return(i=e.call(this)||this).config=void 0,i.isCustomElement=!1,i.activeAnimations=[],i.config=n,i.config.interactive=null!==(r=i.config.capture)&&void 0!==r?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||t.Shape.GROUP,i.config.style=ve({},i.config.style,i.config.attrs),null!=i.config.visible&&(i.config.style.visibility=!1===i.config.visible?"hidden":"visible"),null!=i.config.interactive&&(i.config.style.pointerEvents=!1===i.config.interactive?"none":"auto"),Object.assign(i.parsedStyle,{anchor:[0,0],fill:vs,stroke:vs,transform:[],zIndex:0,filter:[],shadowType:"outer"},i.config.initialParsedStyle),Object.assign(i.attributes,{anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""}),i.initAttributes(i.config.style),i.style=new Proxy({setProperty:function(t,e){i.setAttribute(t,e)},getPropertyValue:function(t){return i.getAttribute(t)},removeProperty:function(t){i.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:i.getAttribute(e)},set:function(t,e,n){return i.setAttribute(e,n),!0}}),Rh.add(i.entity,Te(i)),i}ye(n,e);var r=n.prototype;return r.destroy=function(){e.prototype.destroy.call(this),Rh.remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},r.cloneNode=function(t,e){var r=ve({},this.attributes);for(var i in r){var o=r[i];o instanceof n&&(r[i]=o.cloneNode(t)),e&&(r[i]=e(i,o))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(e){if(!e.style.isMarker){var n=e.cloneNode(t);a.appendChild(n)}})),a},r.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;Oh.processProperties(this,t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},r.setAttribute=function(t,n,r){void 0===r&&(r=!1);var i=aa(t,n),o=i[0],a=i[1];Oe(n)||(r||a!==this.attributes[o])&&(this.internalSetAttribute(o,a),e.prototype.setAttribute.call(this,o,a))},r.internalSetAttribute=function(e,n,r){var i,o=this;void 0===r&&(r={});var a=this.renderable,s=this.attributes[e],u=this.parsedStyle[e];Oh.processProperties(this,((i={})[e]=n,i),r),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach((function(e){Ah.dirtifyToRoot(e),e.dispatchEvent(new gc(t.ElementEvent.ATTR_MODIFIED,e,o,o,"clipPath",gc.MODIFICATION,o,o)),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback("clipPath",o,o)})),a.dirty=!0;var c=this.parsedStyle[e];this.isConnected&&(mc||(mc=new gc(t.ElementEvent.ATTR_MODIFIED,null,null,null,null,gc.MODIFICATION,null,null)),mc.relatedNode=this,mc.prevValue=s,mc.newValue=n,mc.attrName=e,mc.prevParsedValue=u,mc.newParsedValue=c,this.dispatchEvent(mc)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(e,s,n,u,c)},r.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],r=e[1],i=t.getMax();return new es(n,r,i[0]-n,i[1]-r)},r.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ah.setOrigin(this,ro(t,e,n)),this},r.getOrigin=function(){return Ah.getOrigin(this)},r.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ah.setPosition(this,ro(t,e,n)),this},r.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ah.setLocalPosition(this,ro(t,e,n)),this},r.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ah.translate(this,ro(t,e,n)),this},r.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Ah.translateLocal(this,ro(t,e,n)),this},r.getPosition=function(){return Ah.getPosition(this)},r.getLocalPosition=function(){return Ah.getLocalPosition(this)},r.scale=function(t,e,n){return this.scaleLocal(t,e,n)},r.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ro(t,e=e||t,n=n||t)),Ah.scaleLocal(this,t),this},r.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ro(t,e=e||t,n=n||t)),Ah.setLocalScale(this,t),this},r.getLocalScale=function(){return Ah.getLocalScale(this)},r.getScale=function(){return Ah.getScale(this)},r.getEulerAngles=function(){var t=so(Dn(),Ah.getWorldTransform(this));return oo(t[2])},r.getLocalEulerAngles=function(){var t=so(Dn(),Ah.getLocalRotation(this));return oo(t[2])},r.setEulerAngles=function(t){return Ah.setEulerAngles(this,0,0,t),this},r.setLocalEulerAngles=function(t){return Ah.setLocalEulerAngles(this,0,0,t),this},r.rotateLocal=function(t,e,n){return Ie(e)&&Ie(n)?Ah.rotateLocal(this,0,0,t):Ah.rotateLocal(this,t,e,n),this},r.rotate=function(t,e,n){return Ie(e)&&Ie(n)?Ah.rotate(this,0,0,t):Ah.rotate(this,t,e,n),this},r.setRotation=function(t,e,n,r){return Ah.setRotation(this,t,e,n,r),this},r.setLocalRotation=function(t,e,n,r){return Ah.setLocalRotation(this,t,e,n,r),this},r.setLocalSkew=function(t,e){return Ah.setLocalSkew(this,t,e),this},r.getRotation=function(){return Ah.getRotation(this)},r.getLocalRotation=function(){return Ah.getLocalRotation(this)},r.getLocalSkew=function(){return Ah.getLocalSkew(this)},r.getLocalTransform=function(){return Ah.getLocalTransform(this)},r.getWorldTransform=function(){return Ah.getWorldTransform(this)},r.setLocalTransform=function(t){return Ah.setLocalTransform(this,t),this},r.resetLocalTransform=function(){Ah.resetLocalTransform(this)},r.getAnimations=function(){return this.activeAnimations},r.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(i=null===(r=this.parsedStyle.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new Pl(this,t,e)):null},r.show=function(){this.style.visibility="visible"},r.hide=function(){this.style.visibility="hidden"},r.isVisible=function(){var t;return"visible"===(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)},r.isInteractive=function(){var t;return"none"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)},r.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},r.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))+1),this},r.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map((function(t){return Number(t.style.zIndex)})))-1),this},r.getCount=function(){return this.childElementCount},r.getParent=function(){return this.parentElement},r.getChildren=function(){return this.children},r.getFirst=function(){return this.firstElementChild},r.getLast=function(){return this.lastElementChild},r.getChildByIndex=function(t){return this.children[t]||null},r.add=function(t,e){return this.appendChild(t,e)},r.setClip=function(t){this.style.clipPath=t},r.getClip=function(){return this.style.clipPath||null},r.set=function(t,e){this.config[t]=e},r.get=function(t){return this.config[t]},r.getConfig=function(){return this.config},r.attr=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?Fe(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},r.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},r.setZIndex=function(t){return this.style.zIndex=t,this},r.getMatrix=function(t){var e=t||this.getWorldTransform(),n=Pn(Dn(),e),r=n[0],i=n[1],o=Nn(Dn(),e),a=o[0],s=o[1],u=kn(ar(),e),c=so(Dn(),u);return uo(c[0]||c[2],r,i,a,s)},r.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},r.setMatrix=function(t){var e=lo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setEulerAngles(e[4]).setPosition(n,r).setLocalScale(i,o)},r.setLocalMatrix=function(t){var e=lo(t),n=e[0],r=e[1],i=e[2],o=e[3];this.setLocalEulerAngles(e[4]).setLocalPosition(n,r).setLocalScale(i,o)},pe(n,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),n}(Pc),kc=["style"],Cc=function(t){function e(e){var n,r=void 0===e?{}:e,i=r.style,o=me(r,kc);return(n=t.call(this,ve({style:ve({x:"",y:""},i)},o))||this).isCustomElement=!0,n}return ye(e,t),e}(Nc),Mc=["style"],_c=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Mc);return e.call(this,ve({type:t.Shape.CIRCLE,style:ve({cx:"",cy:"",r:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return ye(n,e),n}(Nc),Ac=["style"],Oc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Ac);return e.call(this,ve({type:t.Shape.ELLIPSE,style:ve({cx:"",cy:"",rx:"",ry:""},i),initialParsedStyle:{anchor:[.5,.5]}},o))||this}return ye(n,e),n}(Nc),Ic=["style"],Rc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Ic);return e.call(this,ve({type:t.Shape.GROUP,style:ve({x:"",y:"",width:"",height:""},i)},o))||this}return ye(n,e),n}(Nc),Lc=["style"],Dc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Lc);return e.call(this,ve({type:t.Shape.IMAGE,style:ve({x:"",y:"",img:"",width:"",height:""},i)},o))||this}return ye(n,e),n}(Nc),Fc=["style"],Bc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Fc);(r=e.call(this,ve({type:t.Shape.LINE,style:ve({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0;var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd;return u&&u instanceof Nc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),c&&c instanceof Nc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Nc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof Nc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},r.transformMarker=function(t){var e=this.parsedStyle,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.defX,s=e.defY,u=t?e.markerStart:e.markerEnd;if(u&&u instanceof Nc){var c,l,h,f,d,p,v;t?(f=n-a,d=i-s,l=r-n,h=o-i,p=e.markerStartOffset||0,v=this.markerStartAngle):(f=r-a,d=o-s,l=n-r,h=i-o,p=e.markerEndOffset||0,v=this.markerEndAngle),c=Math.atan2(h,l),u.setLocalEulerAngles(180*c/Math.PI+v),u.setLocalPosition(f+Math.cos(c)*p,d+Math.sin(c)*p)}},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=Qs.pointAt(e.x1,e.y1,e.x2,e.y2,t),o=i.x,a=i.y,s=Jn(Dn(),Un(o-n,a-r,0),this.getLocalTransform());return new ts(s[0],s[1])},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getTotalLength=function(){var t=this.parsedStyle;return Qs.length(t.x1,t.y1,t.x2,t.y2)},n}(Nc),Uc=["style"],jc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Uc);(r=e.call(this,ve({type:t.Shape.PATH,style:ve({path:"",miterLimit:""},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof Nc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof Nc&&r.placeMarkerMid(l),c&&c instanceof Nc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Nc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof Nc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.markerStartOffset,r=e.markerEndOffset,i=e.defX,o=e.defY,a=t?e.markerStart:e.markerEnd;if(a&&a instanceof Nc){var s,u,c,l,h,f,d;if(t){var p=this.getStartTangent(),v=p[0],y=p[1];l=y[0]-i,h=y[1]-o,u=v[0]-y[0],c=v[1]-y[1],f=n||0,d=this.markerStartAngle}else{var g=this.getEndTangent(),m=g[0],T=g[1];l=T[0]-i,h=T[1]-o,u=m[0]-T[0],c=m[1]-T[1],f=r||0,d=this.markerEndAngle}s=Math.atan2(c,u),a.setLocalEulerAngles(180*s/Math.PI+d),a.setLocalPosition(l+Math.cos(s)*f,h+Math.sin(s)*f)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),t&&t instanceof Nc)for(var o=1;n.length-1>o;o++){var a=n[o].currentPoint,s=a[0],u=a[1],c=1===o?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,u-i)}},r.getTotalLength=function(){return ua(this)},r.getPointAtLength=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=function(t,e,n){return ai(t,e,wr(wr({},n),{bbox:!1,length:!0})).point}(e.path.absolutePath,t),o=i.x,a=i.y,s=Jn(Dn(),Un(o-n,a-r,0),this.getLocalTransform());return new ts(s[0],s[1])},r.getPoint=function(t){return this.getPointAtLength(t*ua(this))},r.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},r.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},n}(Nc),Vc=["style"],Gc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Vc);(r=e.call(this,ve({type:t.Shape.POLYGON,style:ve({points:"",miterLimit:"",isClosed:!0},o)},a))||this).markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var s=r.parsedStyle,u=s.markerStart,c=s.markerEnd,l=s.markerMid;return u&&u instanceof Nc&&(r.markerStartAngle=u.getLocalEulerAngles(),r.appendChild(u)),l&&l instanceof Nc&&r.placeMarkerMid(l),c&&c instanceof Nc&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}ye(n,e);var r=n.prototype;return r.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof Nc&&(this.markerStartAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof Nc&&(this.markerEndAngle=0,r.remove()),i&&i instanceof Nc&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},r.transformMarker=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY,o=t?e.markerStart:e.markerEnd;if(o&&o instanceof Nc){var a,s,u,c,l,h,f;if(c=n[0][0]-r,l=n[0][1]-i,t)s=n[1][0]-n[0][0],u=n[1][1]-n[0][1],h=e.markerStartOffset||0,f=this.markerStartAngle;else{var d=n.length;this.style.isClosed?(s=n[d-1][0]-n[0][0],u=n[d-1][1]-n[0][1]):(c=n[d-1][0]-r,l=n[d-1][1]-i,s=n[d-2][0]-n[d-1][0],u=n[d-2][1]-n[d-1][1]),h=e.markerEndOffset||0,f=this.markerEndAngle}a=Math.atan2(u,s),o.setLocalEulerAngles(180*a/Math.PI+f),o.setLocalPosition(c+Math.cos(a)*h,l+Math.sin(a)*h)}},r.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach((function(t){t.remove()})),this.markerMidList=[],t&&t instanceof Nc)for(var o=1;(this.style.isClosed?n.length:n.length-1)>o;o++){var a=n[o][0]-r,s=n[o][1]-i,u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(a,s)}},n}(Nc),Hc=["style"],zc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Hc);return e.call(this,ve({type:t.Shape.POLYLINE,style:ve({points:"",miterLimit:"",isClosed:!1},i)},o))||this}ye(n,e);var r=n.prototype;return r.getTotalLength=function(){return this.parsedStyle.points.totalLength},r.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},r.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,i=e.points,o=i.points,a=0,s=0;i.segments.forEach((function(e,n){e[0]>t||t>e[1]||(a=(t-e[0])/(e[1]-e[0]),s=n)}));var u=Qs.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a),c=u.x,l=u.y,h=Jn(Dn(),Un(c-n,l-r,0),this.getLocalTransform());return new ts(h[0],h[1])},r.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},r.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},n}(Gc),Wc=["style"],Yc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,Wc);return e.call(this,ve({type:t.Shape.RECT,style:ve({x:"",y:"",width:"",height:"",radius:""},i)},o))||this}return ye(n,e),n}(Nc),qc=["style"],Xc=function(e){function n(n){var r=void 0===n?{}:n,i=r.style,o=me(r,qc);return e.call(this,ve({type:t.Shape.TEXT,style:ve({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},i)},o))||this}ye(n,e);var r=n.prototype;return r.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},r.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},n}(Nc),Kc=["style"],Zc=function(e){function n(n){var r,i=void 0===n?{}:n,o=i.style,a=me(i,Kc);return(r=e.call(this,ve({type:t.Shape.HTML,style:ve({x:"",y:"",width:"auto",height:"auto",innerHTML:""},o)},a))||this).cullable.enable=!1,r}ye(n,e);var r=n.prototype;return r.getDomElement=function(){return this.parsedStyle.$el},r.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},r.getClientRects=function(){return[this.getBoundingClientRect()]},r.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(t=this.ownerDocument)||void 0===t||null===(e=t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,a=new Ha;return a.setMinMax(Un(i,o,0),Un(i+n.width,o+n.height,0)),a}return null},r.getLocalBounds=function(){if(this.parentNode){var t=gn(fn(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Ha.isEmpty(e)){var n=new Ha;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},n}(Nc),Jc=function(t){function e(e,n,r,i){var o;return(o=t.call(this,e)||this).currentTime=void 0,o.timelineTime=void 0,o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return ye(e,t),e}(ac),Qc=0,$c=function(){function t(t,e){var n;this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=t,t.animation=this,this.timeline=e,this.id=""+Qc++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},e.persist=function(){throw new Error("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},e.ensureAlive=function(){var t,e;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new Jc(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new Jc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},pe(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(t=Number(t),!isNaN(t)){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function tl(t,e){return Number(t.id)-Number(e.id)}var el,nl,rl=function(){function t(t){var e=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(tl),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){var e=new $c(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(tl),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},e.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,a),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),il=function(e){function n(){var n;(n=e.call(this)||this).defaultView=null,n.documentElement=void 0,n.timeline=void 0,n.ownerDocument=null,n.nodeName="document",n.timeline=new rl(Te(n));var r={};return is.forEach((function(e){var n=e.defaultValue;e.inherited&&n&&(r[e.name]=Le(n)?n(t.Shape.GROUP):n)})),n.documentElement=new Rc({id:"g-root",style:r}),n.documentElement.ownerDocument=Te(n),n.documentElement.parentNode=Te(n),n.childNodes=[n.documentElement],n}ye(n,e);var r=n.prototype;return r.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Xc:Rc);var r=new n(e);return r.ownerDocument=this,r},r.createElementNS=function(t,e,n){return this.createElement(e,n)},r.cloneNode=function(t){throw new Error("Method not implemented.")},r.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},r.elementFromPoint=function(){var t=fe(le().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",null);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return t.abrupt("return",(f=t.sent.picked)&&f[0]||this.documentElement);case 10:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.elementsFromPoint=function(){var t=fe(le().mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,u=a.height,!(0>i||0>o||i>s||o>u)){t.next=4;break}return t.abrupt("return",[]);case 4:return c=this.defaultView.viewport2Client({x:i,y:o}),l=c.x,h=c.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:l,clientY:h},picked:[]});case 7:return(f=t.sent.picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),t.abrupt("return",f);case 11:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},r.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},r.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},r.append=function(){throw new Error("Use document.documentElement instead.")},r.prepend=function(){throw new Error("Use document.documentElement instead.")},r.getElementById=function(t){return this.documentElement.getElementById(t)},r.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},r.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},r.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},r.querySelector=function(t){return this.documentElement.querySelector(t)},r.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},r.find=function(t){return this.documentElement.find(t)},r.findAll=function(t){return this.documentElement.findAll(t)},pe(n,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),n}(cc),ol=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).altKey=void 0,e.button=void 0,e.buttons=void 0,e.ctrlKey=void 0,e.metaKey=void 0,e.relatedTarget=void 0,e.shiftKey=void 0,e.client=new ts,e.movement=new ts,e.offset=new ts,e.global=new ts,e.screen=new ts,e}ye(e,t);var n=e.prototype;return n.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},n.initMouseEvent=function(){throw new Error("Method not implemented.")},pe(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),e}(ac),al=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).pointerId=void 0,e.width=0,e.height=0,e.isPrimary=!1,e.pointerType=void 0,e.pressure=void 0,e.tangentialPressure=void 0,e.tiltX=void 0,e.tiltY=void 0,e.twist=void 0,e}ye(e,t);var n=e.prototype;return n.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},n.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},n.clone=function(){return this.manager.clonePointerEvent(this)},e}(ol),sl=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).deltaMode=void 0,e.deltaX=void 0,e.deltaY=void 0,e.deltaZ=void 0,e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return ye(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(ol),ul=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Vo,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return pe(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=qo(t),this._easing=t}}]),t}(),cl=function(){function t(t,e){this.type=void 0,this.target=void 0,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[],this.type=t,this.target=e}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),ll=0,hl=new WeakMap,fl=function(){function e(t,e,n){this.observer=void 0,this.target=void 0,this.options=void 0,this.transientObservedNodes=[],this.observer=t,this.target=e,this.options=n}var n=e.prototype;return n.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){return t===e?t:nl&&function(t){return t===nl||t===el}(t)?nl:null}(e[n-1],t);if(r)return void(e[n-1]=r)}else gl.push(this.observer),yl||(yl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(ml):ml());e[n]=t},n.addListeners=function(){this.addListeners_(this.target)},n.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeListeners=function(){this.removeListeners_(this.target)},n.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(t.ElementEvent.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(t.ElementEvent.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(t.ElementEvent.REMOVED,this,!0)},n.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=hl.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}}),this)},n.handleEvent=function(e){var n,r;switch(e.stopImmediatePropagation(),e.type){case t.ElementEvent.ATTR_MODIFIED:var i=e.attrName,o=e.relatedNode.namespaceURI;(n=pl("attributes",r=e.target)).attributeName=i,n.attributeNamespace=o;var a=e.attrChange===gc.ADDITION?null:e.prevValue;vl(r,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(i)||-1!==t.attributeFilter.indexOf(o)))return t.attributeOldValue?function(t){return nl||((nl=cl.copy(el)).oldValue=t,nl)}(a):n}));break;case t.ElementEvent.REMOVED:case t.ElementEvent.INSERTED:var s,u,c=e.target;e.type===t.ElementEvent.INSERTED?(s=[c],u=[]):(s=[],u=[c]);var l=c.previousSibling,h=c.nextSibling;(n=pl("childList",r=e.relatedNode)).addedNodes=s,n.removedNodes=u,n.previousSibling=l,n.nextSibling=h,vl(r,(function(t){if(t.childList)return n}))}el=nl=void 0},e}(),dl=function(){function t(t){this.callback=void 0,this.nodes=[],this.records=[],this.uid=ll++,this.callback=t}var e=t.prototype;return e.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=hl.get(t);r||hl.set(t,r=[]);for(var i=0;r.length>i;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new fl(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},e.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=hl.get(e),r=0;n.length>r;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},e.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function pl(t,e){return el=new cl(t,e)}function vl(t,e){for(var n=t;n;n=n.parentNode){var r=hl.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var yl=!1,gl=[];function ml(){yl=!1;var t=gl;gl=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=hl.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&ml()}function Tl(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;i>o;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}null!=r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(0>i||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error(i+" compositing is not supported");n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;n.length>o;o++){var a=n[o].offset;if(Ie(a))r=!1;else{if(i>a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;r>a;a++){var s=n[a].computedOffset;if(!Ie(s)&&!Ie(o)){for(var u=1;a-i>u;u++)n[i+u].computedOffset=o+(Number(s)-o)*u/(a-i);i=a,o=Number(s)}}}(),n}var bl="backwards|forwards|both|none".split("|"),El="reverse|alternate|alternate-reverse".split("|");function Sl(t,e){var n=new ul;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(null!=t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===bl.indexOf(t[e]))return;if("direction"===e&&-1===El.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function xl(t,e){var n;return Sl(t=wl(null!==(n=t)&&void 0!==n?n:{duration:"auto"}),e)}function wl(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var Pl=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=xl(n,!1),this.timing.effect=this,this.timing.activeDuration=Xo(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Tl(e,this.timing),this.interpolations=Qo(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=Ko(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Tl(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),Nl=function(){function e(){this.registry={},this.define(t.Shape.CIRCLE,_c),this.define(t.Shape.ELLIPSE,Oc),this.define(t.Shape.RECT,Yc),this.define(t.Shape.IMAGE,Dc),this.define(t.Shape.LINE,Bc),this.define(t.Shape.GROUP,Rc),this.define(t.Shape.PATH,jc),this.define(t.Shape.POLYGON,Gc),this.define(t.Shape.POLYLINE,zc),this.define(t.Shape.TEXT,Xc),this.define(t.Shape.HTML,Zc)}var n=e.prototype;return n.define=function(t,e){this.registry[t]=e},n.get=function(t){return this.registry[t]},e}(),kl=t.Syringe.defineToken(""),Cl=t.Syringe.defineToken("",{multiple:!1}),Ml=/\[\s*(.*)=(.*)\s*\]/;function _l(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function Al(t){var e=t;do{var n;if(null===(n=e.style)||void 0===n?void 0:n.clipPath)return e;e=e.parentElement}while(null!==e);return null}t.DefaultSceneGraphSelector=function(){function t(){}var e=t.prototype;return e.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find((function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.find((function(e){return e.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):null}return e.find((function(n){return e!==n&&n.nodeName===t}))},e.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll((function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.findAll((function(r){return e!==r&&r.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},e.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var e=t.match(Ml),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},e.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return Ie(n)?"":n.toString?n.toString():""},t}(),t.DefaultSceneGraphSelector=Pr([ct({token:Cl})],t.DefaultSceneGraphSelector);var Ol=t.Syringe.defineToken("");t.DefaultSceneGraphService=function(){function e(){var e,n,r,i,o,a,s,u,c=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new sc(t.ElementEvent.BOUNDS_CHANGED),this.rotate=(e=ar(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=Un(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=ar();hr(a,n[0],n[1],n[2]);var s=c.getRotation(t),u=c.getRotation(t.parentNode);Tr(e,u),lr(e,e),ur(a,e,a),ur(o.localRotation,a,s),Er(o.localRotation,o.localRotation),c.dirtifyLocal(t,o)}else c.rotateLocal(t,n)}),this.rotateLocal=(n=ar(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=Un(e,r,i));var o=t.transformable;hr(n,e[0],e[1],e[2]),br(o.localRotation,o.localRotation,n),c.dirtifyLocal(t,o)}),this.setEulerAngles=(r=ar(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=Un(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){hr(o.localRotation,e[0],e[1],e[2]);var a=c.getRotation(t.parentNode);Tr(r,lr(ar(),a)),br(o.localRotation,o.localRotation,r),c.dirtifyLocal(t,o)}else c.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;Qn(e,Dn())||(function(t,e,n){var r=n[0],i=n[1],o=n[2],a=e[0],s=e[1],u=e[2],c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,f=i*h-o*l,d=o*c-r*h,p=r*l-i*c,v=2*n[3];l*=v,h*=v,d*=2,p*=2,t[0]=a+(c*=v)+(f*=2),t[1]=s+l+d,t[2]=u+h+p}(e,e,i.localRotation),Gn(i.localPosition,i.localPosition,e),c.dirtifyLocal(t,i))},this.setPosition=(i=fn(),o=Dn(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,Qn(c.getPosition(t),o)||(jn(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(pn(i,t.parentNode.transformable.worldTransform),gn(i,i),Jn(n.localPosition,o,i)):jn(n.localPosition,o),c.dirtifyLocal(t,n))}),this.setLocalPosition=function(){var t=Dn();return function(e,n){var r=e.transformable;t[0]=n[0],t[1]=n[1],t[2]=n[2]||0,Qn(r.localPosition,t)||(jn(r.localPosition,t),c.dirtifyLocal(e,r))}}(),this.translate=(a=Dn(),s=Dn(),u=Dn(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Vn(s,e,n,r)),Qn(e,a)||(Gn(u,c.getPosition(t),e),c.setPosition(t,u))}),this.setRotation=function(){var t=ar();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=mr(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var s=c.getRotation(e.parentNode);Tr(t,s),lr(t,t),ur(a.localRotation,t,n),Er(a.localRotation,a.localRotation),c.dirtifyLocal(e,a)}else c.setLocalRotation(e,n)}},this.calcLocalTransform=function(){var t=fn(),e=Dn(),n=mr(0,0,0,1);return function(r){if(Cn(r.localTransform,r.localRotation,r.localPosition,Un(1,1,1),r.origin),0!==r.localSkew[0]||0!==r.localSkew[1]){var i=yn(t);i[4]=Math.tan(r.localSkew[0]),i[1]=Math.tan(r.localSkew[1]),mn(r.localTransform,r.localTransform,i)}var o=Cn(t,n,e,r.localScale,r.origin);mn(r.localTransform,r.localTransform,o)}}()}var n=e.prototype;return n.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},n.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},n.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},n.attach=function(t,e,n){var r,i;t.parentNode&&this.detach(t),t.parentNode=e,Ie(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var o=e.sortable;((null==o||null===(r=o.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(o.dirty=!0);var a=t.transformable;a&&this.dirtifyWorld(t,a),a.frozen&&this.unfreezeParentToRoot(t)},n.detach=function(t){if(t.parentNode){var e,n,r=t.transformable,i=t.parentNode.sortable;((null==i||null===(e=i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(i.dirty=!0);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},n.getOrigin=function(t){return t.transformable.origin},n.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;if(!Qn(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},n.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Un(e,n,r));var i=t.transformable;hr(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},n.scaleLocal=function(t,e){var n=t.transformable;zn(n.localScale,n.localScale,Un(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},n.setLocalScale=function(t,e){var n=t.transformable,r=Un(e[0],e[1],e[2]||n.localScale[2]);Qn(r,n.localScale)||(jn(n.localScale,r),this.dirtifyLocal(t,n))},n.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=mr(e,n,r,i));var o=t.transformable;Tr(o.localRotation,e),this.dirtifyLocal(t,o)},n.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=Sr(e,n));var r,i,o=t.transformable;(r=o.localSkew)[0]=(i=e)[0],r[1]=i[1],this.dirtifyLocal(t,o)},n.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},n.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},n.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){e.has(n.entity)||(t.boundsChangedEvent.detail=r,n.dispatchEvent(t.boundsChangedEvent),e.add(n.entity))};this.pendingEvents.forEach((function(t){var e=t[0],r=t[1];r.affectChildren?e.forEach((function(t){n(t,r)})):n(e,r)})),this.pendingEvents=[]},n.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.pendingEvents.push([t,{affectChildren:e}])},n.getPosition=function(t){var e=t.transformable;return Pn(e.position,this.getWorldTransform(t,e))},n.getRotation=function(t){var e=t.transformable;return kn(e.rotation,this.getWorldTransform(t,e))},n.getScale=function(t){var e=t.transformable;return Nn(e.scaling,this.getWorldTransform(t,e))},n.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},n.getLocalPosition=function(t){return t.transformable.localPosition},n.getLocalRotation=function(t){return t.transformable.localRotation},n.getLocalScale=function(t){return t.transformable.localScale},n.getLocalSkew=function(t){return t.transformable.localSkew},n.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},n.setLocalTransform=function(t,e){var n=Pn(Dn(),e),r=kn(ar(),e),i=Nn(Dn(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},n.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},n.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(Ha.isEmpty(r))return null;var i=n||new Ha;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},n.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new Ha},n.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new Ha).update(r.center,r.halfExtents))}));var a=Al(t);if(a){var s,u=this.getTransformedGeometryBounds(a.style.clipPath,!0);u&&(s=new Ha).setFromTransformedAABB(u,this.getWorldTransform(a)),o?s&&(o=s.intersection(o)):o=s}return o||(o=new Ha),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},n.getLocalBounds=function(t){if(t.parentNode){var e=fn();t.parentNode.transformable&&(e=gn(fn(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Ha.isEmpty(n)){var r=new Ha;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},n.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Ha.isEmpty(i)||(r=new Ha).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(e=t.ownerDocument)||void 0===e||null===(n=e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=r.getMin(),s=a[0],u=a[1],c=r.getMax();return new es(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),c[0]-s,c[1]-u)}return new es((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},n.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},n.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;n.length>r;r++)this.syncHierarchy(n[r])}},n.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?mn(e.worldTransform,r.worldTransform,e.localTransform):pn(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},n.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},e}(),Pr([lt(kl),kr("design:type",Function)],t.DefaultSceneGraphService.prototype,"sceneGraphSelectorFactory",void 0),t.DefaultSceneGraphService=Pr([ct({token:Ol})],t.DefaultSceneGraphService);var Il,Rl=t.Syringe.defineToken("",{multiple:!1});(Il=t.RenderReason||(t.RenderReason={}))[Il.CAMERA_CHANGED=0]="CAMERA_CHANGED",Il[Il.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Il[Il.NONE=2]="NONE";var Ll,Dl,Fl,Bl=t.Syringe.defineToken(""),Ul=t.Syringe.defineToken("");(Ll=t.CameraType||(t.CameraType={}))[Ll.ORBITING=0]="ORBITING",Ll[Ll.EXPLORING=1]="EXPLORING",Ll[Ll.TRACKING=2]="TRACKING",(Dl=t.CameraTrackingMode||(t.CameraTrackingMode={}))[Dl.DEFAULT=0]="DEFAULT",Dl[Dl.ROTATIONAL=1]="ROTATIONAL",Dl[Dl.TRANSLATIONAL=2]="TRANSLATIONAL",Dl[Dl.CINEMATIC=3]="CINEMATIC",(Fl=t.CameraProjectionMode||(t.CameraProjectionMode={}))[Fl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Fl[Fl.PERSPECTIVE=1]="PERSPECTIVE";var jl={UPDATED:"updated"},Vl=Math.PI/180,Gl=180/Math.PI,Hl=2e-4,zl=function(e){function n(n,r){var i;return void 0===n&&(n=t.CameraType.EXPLORING),void 0===r&&(r=t.CameraTrackingMode.DEFAULT),(i=e.call(this)||this).canvas=void 0,i.matrix=fn(),i.right=Un(1,0,0),i.up=Un(0,1,0),i.forward=Un(0,0,1),i.position=Un(0,0,1),i.focalPoint=Un(0,0,0),i.distanceVector=Un(0,0,-1),i.distance=1,i.azimuth=0,i.elevation=0,i.roll=0,i.relAzimuth=0,i.relElevation=0,i.relRoll=0,i.dollyingStep=0,i.maxDistance=1/0,i.minDistance=-1/0,i.zoom=1,i.rotateWorld=!1,i.fov=30,i.near=.1,i.far=1e3,i.aspect=1,i.left=void 0,i.rright=void 0,i.top=void 0,i.bottom=void 0,i.projectionMatrix=fn(),i.projectionMatrixInverse=fn(),i.jitteredProjectionMatrix=void 0,i.view=void 0,i.enableUpdate=!0,i.type=t.CameraType.EXPLORING,i.trackingMode=t.CameraTrackingMode.DEFAULT,i.projectionMode=t.CameraProjectionMode.PERSPECTIVE,i.frustum=new qa,i.landmarks=[],i.landmarkAnimationID=void 0,i.orthoMatrix=fn(),i.setType(n,r),i}ye(n,e);var r=n.prototype;return r.isOrtho=function(){return this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC},r.getProjectionMode=function(){return this.projectionMode},r.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},r.getPerspectiveInverse=function(){return this.projectionMatrixInverse},r.getFrustum=function(){return this.frustum},r.getPosition=function(){return this.position},r.getFocalPoint=function(){return this.focalPoint},r.getDollyingStep=function(){return this.dollyingStep},r.getNear=function(){return this.near},r.getFar=function(){return this.far},r.getZoom=function(){return this.zoom},r.getOrthoMatrix=function(){return this.orthoMatrix},r.getView=function(){return this.view},r.setEnableUpdate=function(t){this.enableUpdate=t},r.setType=function(e,n){return this.type=e,this.setWorldRotation(this.type===t.CameraType.EXPLORING),this._getAngles(),this.type===t.CameraType.TRACKING&&void 0!==n&&this.setTrackingMode(n),this},r.setProjectionMode=function(t){return this.projectionMode=t,this},r.setTrackingMode=function(e){if(this.type!==t.CameraType.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},r.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},r.getViewTransform=function(){return gn(fn(),this.matrix)},r.getWorldTransform=function(){return this.matrix},r.jitterProjectionMatrix=function(t,e){var n=xn(fn(),[t,e,0]);this.jitteredProjectionMatrix=mn(fn(),n,this.projectionMatrix)},r.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},r.setMatrix=function(t){return this.matrix=t,this._update(),this},r.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},r.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},r.setNear=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},r.setFar=function(e){return this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},r.setViewOffset=function(e,n,r,i,o,a){return this.aspect=e/n,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},r.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t.CameraProjectionMode.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},r.setZoom=function(e){return this.zoom=e,this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t.CameraProjectionMode.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},r.setPerspective=function(e,n,r,i){var o;this.projectionMode=t.CameraProjectionMode.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var a=this.near*Math.tan(.5*Vl*this.fov)/this.zoom,s=2*a,u=this.aspect*s,c=-.5*u;if(null===(o=this.view)||void 0===o?void 0:o.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,a-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return co(this.projectionMatrix,c,c+u,a,a-s,e,this.far),bn(this.projectionMatrix,this.projectionMatrix,Un(1,-1,1)),gn(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},r.setOrthographic=function(e,n,r,i,o,a){var s;this.projectionMode=t.CameraProjectionMode.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=o,this.far=a;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,d=l+u,p=h+c,v=h-c;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(f+=y*this.view.offsetX)+y*this.view.width,v=(p-=g*this.view.offsetY)-g*this.view.height}return On(this.projectionMatrix,f,d,v,p,o,a),bn(this.projectionMatrix,this.projectionMatrix,Un(1,-1,1)),gn(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},r.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=ro(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},r.setFocalPoint=function(e,n,r){void 0===n&&(n=this.focalPoint[1]),void 0===r&&(r=this.focalPoint[2]);var i=Un(0,1,0);if(this.focalPoint=ro(e,n,r),this.trackingMode===t.CameraTrackingMode.CINEMATIC){var o=Hn(Dn(),this.focalPoint,this.position);e=o[0],n=o[1],r=o[2];var a=Bn(o),s=Math.asin(n/a)*Gl,u=90+Math.atan2(r,e)*Gl,c=fn();Sn(c,c,u*Vl),En(c,c,s*Vl),i=Jn(Dn(),[0,1,0],c)}return gn(this.matrix,In(fn(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},r.getDistance=function(){return this.distance},r.setDistance=function(t){if(this.distance===t||0>t)return this;this.distance=t,Hl>this.distance&&(this.distance=Hl),this.dollyingStep=this.distance/100;var e=Dn(),n=this.forward,r=this.focalPoint;return e[0]=(t=this.distance)*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},r.setMaxDistance=function(t){return this.maxDistance=t,this},r.setMinDistance=function(t){return this.minDistance=t,this},r.setAzimuth=function(e){return this.azimuth=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getAzimuth=function(){return this.azimuth},r.setElevation=function(e){return this.elevation=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getElevation=function(){return this.elevation},r.setRoll=function(e){return this.roll=no(e),this.computeMatrix(),this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},r.getRoll=function(){return this.roll},r.rotate=function(e,n,r){if(this.relElevation=no(n),this.relAzimuth=no(e),this.relRoll=no(r),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===t.CameraType.EXPLORING){var i=sr(ar(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Vl),o=sr(ar(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Vl),a=sr(ar(),[0,0,1],this.relRoll*Vl),s=ur(ar(),o,i);s=ur(ar(),s,a);var u=Mn(fn(),s);Tn(this.matrix,this.matrix,[0,0,-this.distance]),mn(this.matrix,this.matrix,u),Tn(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getPosition():this.type===t.CameraType.TRACKING&&this._getFocalPoint(),this._update(),this},r.pan=function(t,e){var n=ro(t,e,0),r=Fn(this.position);return Gn(r,r,Wn(Dn(),this.right,n[0])),Gn(r,r,Wn(Dn(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},r.dolly=function(e){var n,r=this.forward,i=Fn(this.position);return n=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,i[0]+=n*r[0],i[1]+=n*r[1],i[2]+=n*r[2],this._setPosition(i),this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?this._getDistance():this.type===t.CameraType.TRACKING&&Gn(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},r.createLandmark=function(t,e){void 0===e&&(e={});var r=e.position,i=void 0===r?this.position:r,o=e.focalPoint,a=void 0===o?this.focalPoint:o,s=e.roll,u=e.zoom,c=new n;c.setType(this.type,void 0),c.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),c.setFocalPoint(a[0],a[1]||this.focalPoint[1],a[2]||this.focalPoint[2]),c.setRoll(s||this.roll),c.setZoom(u||this.zoom);var l={name:t,matrix:dn(c.matrix),right:Fn(c.right),up:Fn(c.up),forward:Fn(c.forward),position:Fn(c.position),focalPoint:Fn(c.focalPoint),distanceVector:Fn(c.distanceVector),distance:c.distance,dollyingStep:c.dollyingStep,azimuth:c.azimuth,elevation:c.elevation,roll:c.roll,relAzimuth:c.relAzimuth,relElevation:c.relElevation,relRoll:c.relRoll,zoom:c.zoom};return this.landmarks.push(l),l},r.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=Jo(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Re(e)?{duration:e}:e,o=i.easing,a=void 0===o?"linear":o,s=i.duration,u=void 0===s?100:s,c=i.easingFunction,l=void 0===c?void 0:c,h=i.onfinish,f=void 0===h?void 0:h;if(0===u)return this.syncFromLandmark(r),void(f&&f());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,p=r.position,v=r.focalPoint,y=r.zoom,g=r.roll,m=l||qo(a),T=function(){n.setFocalPoint(v),n.setPosition(p),n.setRoll(g),n.setZoom(y),n.computeMatrix(),n.triggerUpdate(),f&&f()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(u<r)T();else{var i,o,a=m(r/u),s=Dn(),c=Dn();Zn(s,n.focalPoint,v,a),Zn(c,n.position,p,a),o=n.roll*(1-a)+g*a,i=n.zoom*(1-a)+y*a,n.setFocalPoint(s),n.setPosition(c),n.setRoll(o),n.setZoom(i),nr(s,v)+nr(c,p)>.01?(n.computeMatrix(),n.triggerUpdate(),u>r&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))):T()}}))}},r._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},r.computeMatrix=function(){var e=sr(ar(),[0,0,1],this.roll*Vl);yn(this.matrix);var n=sr(ar(),[1,0,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.elevation*Vl),r=sr(ar(),[0,1,0],(this.rotateWorld&&this.type!==t.CameraType.TRACKING||this.type===t.CameraType.TRACKING?1:-1)*this.azimuth*Vl),i=ur(ar(),r,n);i=ur(ar(),i,e);var o=Mn(fn(),i);this.type===t.CameraType.ORBITING||this.type===t.CameraType.EXPLORING?(Tn(this.matrix,this.matrix,this.focalPoint),mn(this.matrix,this.matrix,o),Tn(this.matrix,this.matrix,[0,0,this.distance])):this.type===t.CameraType.TRACKING&&(Tn(this.matrix,this.matrix,this.position),mn(this.matrix,this.matrix,o))},r._setPosition=function(t,e,n){this.position=ro(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},r._getAxes=function(){jn(this.right,ro(or(ir(),[1,0,0,0],this.matrix))),jn(this.up,ro(or(ir(),[0,1,0,0],this.matrix))),jn(this.forward,ro(or(ir(),[0,0,1,0],this.matrix))),qn(this.right,this.right),qn(this.up,this.up),qn(this.forward,this.forward)},r._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Bn(this.distanceVector);if(0===i)return this.elevation=0,void(this.azimuth=0);this.type===t.CameraType.TRACKING||this.rotateWorld?(this.elevation=Math.asin(n/i)*Gl,this.azimuth=Math.atan2(-e,-r)*Gl):(this.elevation=-Math.asin(n/i)*Gl,this.azimuth=-Math.atan2(-e,-r)*Gl)},r._getPosition=function(){jn(this.position,ro(or(ir(),[0,0,0,1],this.matrix))),this._getDistance()},r._getFocalPoint=function(){var t,e;!function(t,e,n){var r=e[0],i=e[1],o=e[2];t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],(t=hn(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Gn(this.focalPoint,this.position,this.distanceVector),this._getDistance()},r._getDistance=function(){this.distanceVector=Hn(Dn(),this.focalPoint,this.position),this.distance=Bn(this.distanceVector),this.dollyingStep=this.distance/100},r._getOrthoMatrix=function(){if(this.projectionMode===t.CameraProjectionMode.ORTHOGRAPHIC){var e=this.position,n=sr(ar(),[0,0,1],-this.roll*Math.PI/180);Cn(this.orthoMatrix,n,Un((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Un(this.zoom,this.zoom,1),e)}},r.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=mn(fn(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(jl.UPDATED)}},r.syncFromLandmark=function(t){this.matrix=pn(this.matrix,t.matrix),this.right=jn(this.right,t.right),this.up=jn(this.up,t.up),this.forward=jn(this.forward,t.forward),this.position=jn(this.position,t.position),this.focalPoint=jn(this.focalPoint,t.focalPoint),this.distanceVector=jn(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},n}(oc.EventEmitter),Wl=t.Syringe.defineToken("");t.RenderingService=function(){function e(){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new sc(t.ElementEvent.RENDER_ORDER_CHANGED),this.hooks={init:new Ea,dirtycheck:new Fa(["object"]),cull:new Fa(["object","camera"]),beginFrame:new Aa([]),beforeRender:new Aa(["objectToRender"]),render:new Aa(["objectToRender"]),afterRender:new Aa(["objectToRender"]),endFrame:new Aa([]),destroy:new Aa([]),pick:new Pa(["result"]),pointerDown:new Aa(["event"]),pointerUp:new Aa(["event"]),pointerMove:new Aa(["event"]),pointerOut:new Aa(["event"]),pointerOver:new Aa(["event"]),pointerWheel:new Aa(["event"]),pointerCancel:new Aa(["event"])}}var n=e.prototype;return n.init=function(){var t=fe(le().mark((function t(){var e=this;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(t){t.apply(e)})),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getStats=function(){return this.stats},n.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(t.RenderReason.CAMERA_CHANGED)},n.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach((function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)})),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},n.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,o=r.enableCulling;this.styleValueRegistry.recalc(t);var a=i?this.hooks.dirtycheck.call(t):t;if(a){var s=o?this.hooks.cull.call(a,this.camera):a;s&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(s))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var u=t.sortable,c=!1;u.dirty&&(u.sorted=t.childNodes.slice().sort(_l),c=!0,u.dirty=!1),(u.sorted||t.childNodes).forEach((function(t){n.renderDisplayObject(t,e)})),c&&t.forEach((function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)}))},n.destroy=function(){this.inited=!1,this.hooks.destroy.call()},n.dirtify=function(){this.renderingContext.renderReasons.add(t.RenderReason.DISPLAY_OBJECT_CHANGED)},e}(),Pr([Ut(Wl),kr("design:type",Object)],t.RenderingService.prototype,"renderingPluginProvider",void 0),Pr([lt(sa),kr("design:type",Object)],t.RenderingService.prototype,"canvasConfig",void 0),Pr([lt(Bl),kr("design:type",Object)],t.RenderingService.prototype,"renderingContext",void 0),Pr([lt(Ol),kr("design:type",Object)],t.RenderingService.prototype,"sceneGraphService",void 0),Pr([lt(ce),kr("design:type",Object)],t.RenderingService.prototype,"styleValueRegistry",void 0),Pr([lt(Ul),kr("design:type",zl)],t.RenderingService.prototype,"camera",void 0),t.RenderingService=Pr([ct()],t.RenderingService);t.EventService=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).renderingContext=void 0,e.contextService=void 0,e.canvasConfig=void 0,e.rootTarget=void 0,e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.pickHandler=void 0,e.tmpMatrix=fn(),e.tmpVec3=Dn(),e.onPointerDown=function(){var t=fe(le().mark((function t(n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:e.dispatchEvent(r=t.sent,"pointerdown"),"touch"===r.pointerType?e.dispatchEvent(r,"touchstart"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||e.dispatchEvent(r,2===r.button?"rightdown":"mousedown"),e.trackingData(n.pointerId).pressTargetsByButton[n.button]=r.composedPath(),e.freeEvent(r);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUp=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s,u,c,l,h;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return r=performance.now(),t.next=5,e.createPointerEvent(n);case 5:if(e.dispatchEvent(i=t.sent,"pointerup"),"touch"===i.pointerType?e.dispatchEvent(i,"touchend"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.dispatchEvent(i,2===i.button?"rightup":"mouseup"),o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.pressTargetsByButton[n.button]),s=a,a&&!i.composedPath().includes(a)){for(u=a;u&&!i.composedPath().includes(u);)i.currentTarget=u,e.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType?e.notifyTarget(i,"touchendoutside"):"mouse"!==i.pointerType&&"pen"!==i.pointerType||e.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),cc.isNode(u)&&(u=u.parentNode);delete o.pressTargetsByButton[n.button],s=u}s&&((l=e.clonePointerEvent(i,"click")).target=s,l.path=[],o.clicksByButton[n.button]||(o.clicksByButton[n.button]={clickCount:0,target:l.target,timeStamp:r}),(h=o.clicksByButton[n.button]).target===l.target&&200>r-h.timeStamp?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,(null===(c=i.detail)||void 0===c?void 0:c.preventClick)||e.dispatchEvent(l,"mouse"===l.pointerType||"touch"===l.pointerType?"click":"pointertap"),e.freeEvent(l)),e.freeEvent(i);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerMove=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s,u,c,l,h,f;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createPointerEvent(n);case 4:if(i="mouse"===(r=t.sent).pointerType||"pen"===r.pointerType,o=e.trackingData(n.pointerId),a=e.findMountedTarget(o.overTargets),!o.overTargets||a===r.target){t.next=23;break}return s="mousemove"===n.type?"mouseout":"pointerout",t.next=12,e.createPointerEvent(n,s,a||void 0);case 12:if(e.dispatchEvent(u=t.sent,"pointerout"),i&&e.dispatchEvent(u,"mouseout"),r.composedPath().includes(a)){t.next=22;break}return t.next=18,e.createPointerEvent(n,"pointerleave",a||void 0);case 18:for((c=t.sent).eventPhase=c.AT_TARGET;c.target&&!r.composedPath().includes(c.target);)c.currentTarget=c.target,e.notifyTarget(c),i&&e.notifyTarget(c,"mouseleave"),cc.isNode(c.target)&&(c.target=c.target.parentNode);e.freeEvent(c);case 22:e.freeEvent(u);case 23:if(a===r.target){t.next=38;break}l=e.clonePointerEvent(r,"mousemove"===n.type?"mouseover":"pointerover"),e.dispatchEvent(l,"pointerover"),i&&e.dispatchEvent(l,"mouseover"),h=a&&cc.isNode(a)&&a.parentNode;case 29:if(!h||h===(cc.isNode(e.rootTarget)&&e.rootTarget.parentNode)){t.next=35;break}if(h!==r.target){t.next=32;break}return t.abrupt("break",35);case 32:h=h.parentNode,t.next=29;break;case 35:if(!h||h===(cc.isNode(e.rootTarget)&&e.rootTarget.parentNode)){for((f=e.clonePointerEvent(r,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(cc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)f.currentTarget=f.target,e.notifyTarget(f),i&&e.notifyTarget(f,"mouseenter"),cc.isNode(f.target)&&(f.target=f.target.parentNode);e.freeEvent(f)}e.freeEvent(l);case 38:e.dispatchEvent(r,"pointermove"),"touch"===r.pointerType&&e.dispatchEvent(r,"touchmove"),i&&(e.dispatchEvent(r,"mousemove"),e.cursor=e.getCursor(r.target)),o.overTargets=r.composedPath(),e.freeEvent(r);case 43:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOut=function(){var t=fe(le().mark((function t(n){var r,i,o,a,s;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:if(!(r=e.trackingData(n.pointerId)).overTargets){t.next=19;break}return i="mouse"===n.pointerType||"pen"===n.pointerType,o=e.findMountedTarget(r.overTargets),t.next=8,e.createPointerEvent(n,"pointerout",o||void 0);case 8:return e.dispatchEvent(a=t.sent),i&&e.dispatchEvent(a,"mouseout"),t.next=13,e.createPointerEvent(n,"pointerleave",o||void 0);case 13:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&s.target!==(cc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)s.currentTarget=s.target,e.notifyTarget(s),i&&e.notifyTarget(s,"mouseleave"),cc.isNode(s.target)&&(s.target=s.target.parentNode);r.overTargets=null,e.freeEvent(a),e.freeEvent(s);case 19:e.cursor=null;case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerOver=function(){var t=fe(le().mark((function t(n){var r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),t.next=5,e.createPointerEvent(n);case 5:for(o="mouse"===(i=t.sent).pointerType||"pen"===i.pointerType,e.dispatchEvent(i,"pointerover"),o&&e.dispatchEvent(i,"mouseover"),"mouse"===i.pointerType&&(e.cursor=e.getCursor(i.target)),(a=e.clonePointerEvent(i,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(cc.isNode(e.rootTarget)&&e.rootTarget.parentNode);)a.currentTarget=a.target,e.notifyTarget(a),o&&e.notifyTarget(a,"mouseenter"),cc.isNode(a.target)&&(a.target=a.target.parentNode);r.overTargets=i.composedPath(),e.freeEvent(i),e.freeEvent(a);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onPointerUpOutside=function(){var t=fe(le().mark((function t(n){var r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof al){t.next=2;break}return t.abrupt("return");case 2:return r=e.trackingData(n.pointerId),i=e.findMountedTarget(r.pressTargetsByButton[n.button]),t.next=6,e.createPointerEvent(n);case 6:if(o=t.sent,i){for(a=i;a;)o.currentTarget=a,e.notifyTarget(o,"pointerupoutside"),"touch"===o.pointerType||"mouse"!==o.pointerType&&"pen"!==o.pointerType||e.notifyTarget(o,2===o.button?"rightupoutside":"mouseupoutside"),cc.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[n.button]}e.freeEvent(o);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.onWheel=function(){var t=fe(le().mark((function t(n){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n instanceof sl){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.createWheelEvent(n);case 4:e.dispatchEvent(r=t.sent),e.freeEvent(r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}ye(e,t);var n=e.prototype;return n.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},n.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new ts(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},n.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new ts(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},n.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,o=i.width,a=i.height,s=r.getPerspectiveInverse(),u=r.getWorldTransform(),c=mn(this.tmpMatrix,u,s),l=Vn(this.tmpVec3,e/o*2-1,2*(1-n/a)-1,0);return Jn(l,l,c),new ts(l[0],l[1])},n.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=mn(this.tmpMatrix,n,r),o=Vn(this.tmpVec3,t.x,t.y,0);Jn(this.tmpVec3,this.tmpVec3,i);var a=this.canvasConfig;return new ts((o[0]+1)/2*a.width,(1-(o[1]+1)/2)*a.height)},n.setPickHandler=function(t){this.pickHandler=t},n.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},n.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;r>n;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},n.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},n.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;n.length>o;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},n.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;2048>r&&t!==this.rootTarget;r++)cc.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},n.hitTest=function(){var t=fe(le().mark((function t(e){var n,r,i,o,a;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.viewportY,o=(i=this.canvasConfig).width,a=i.height,!(0>(n=e.viewportX)||0>r||n>o||r>a)){t.next=4;break}return t.abrupt("return",null);case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},n.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e,n=Ee(Rh.getHTMLs());!(e=n()).done;){var r=e.value;if(t.nativeEvent.composedPath().indexOf(r)>-1)return r}return null},n.pickTarget=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.createPointerEvent=function(){var t=fe(le().mark((function t(e,n,r){var i,o;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(al),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r){t.next=11;break}t.t0=r,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(i),!t.t2){t.next=18;break}return t.next=17,this.pickTarget(i);case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),n.createWheelEvent=function(){var t=fe(le().mark((function t(e){var n,r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(sl),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),!t.t1){t.next=14;break}return t.next=13,this.pickTarget(n);case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},n.cloneWheelEvent=function(t){var e=this.allocateEvent(sl);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},n.clonePointerEvent=function(t,e){var n=this.allocateEvent(al);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},n.copyPointerData=function(t,e){t instanceof al&&e instanceof al&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},n.copyMouseData=function(t,e){t instanceof ol&&e instanceof ol&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},n.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},n.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},n.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},n.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},n.notifyTarget=function(t,e){var n;e=null!==(n=e)&&void 0!==n?n:t.type,this.notifyListeners(t,t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},n.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;r.length>i&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},n.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||cc.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},n.getCursor=function(t){for(var e=t;e;){var n=Pc.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=cc.isNode(e)&&e.parentNode}},e}(oc.EventEmitter),Pr([lt(Bl),kr("design:type",Object)],t.EventService.prototype,"renderingContext",void 0),Pr([lt(Rl),kr("design:type",Object)],t.EventService.prototype,"contextService",void 0),Pr([lt(sa),kr("design:type",Object)],t.EventService.prototype,"canvasConfig",void 0),Pr([Y.postConstruct(),kr("design:type",Function),kr("design:paramtypes",[]),kr("design:returntype",void 0)],t.EventService.prototype,"init",null),t.EventService=Pr([ct()],t.EventService),t.OffscreenCanvasCreator=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),t.OffscreenCanvasCreator=Pr([ct()],t.OffscreenCanvasCreator);var Yl={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},ql=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Xl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Kl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source);function Zl(t){var e=t.parsedStyle.fontSize;return Ie(e)?null:e}t.TextService=function(){function t(){var t=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!Kl.exec(n)&&!Xl.exec(e))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=Yl.MetricsString+Yl.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(Yl.BaselineSymbol).width),u=Yl.HeightMultiplier*s;s=s*Yl.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,d=0,p=!1;for(f=0;s>f;++f){for(var v=0;h>v;v+=4)if(255!==c[d+v]){p=!0;break}if(p)break;d+=h}for(n.ascent=s-f,d=l-h,p=!1,f=u;f>s;--f){for(var y=0;h>y;y+=4)if(255!==c[d+y]){p=!0;break}if(p)break;d-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,u=e.textAlign,c=e.letterSpacing,l=e.leading,h=void 0===l?0:l,f=Ua(e),d=this.measureFont(f,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var p=this.offscreenCanvas.getOrCreateContext(n);p.font=f;for(var v=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(v.length),g=0,m=0;v.length>m;m++){var T=p.measureText(v[m]).width+(v[m].length-1)*c;y[m]=T,g=Math.max(g,T)}var b=g+a,E=o||d.fontSize+a,S=Math.max(E,d.fontSize+a)+(v.length-1)*(E+h),x=0;return"middle"===s?x=-S/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?x=-S:"top"!==s&&"hanging"!==s||(x=0),{font:f,width:b,height:S,lines:v,lineWidths:y,lineHeight:E+=h,maxLineWidth:g,fontProperties:d,lineMetrics:y.map((function(t,e){var n=0;return"center"===u?n-=t/2:"right"!==u&&"end"!==u||(n-=t),new es(n-a/2,x+e*E,t+a,E)}))}},e.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=this.offscreenCanvas.getOrCreateContext(n),u=o+a,c=[],l=0,h=0,f={},d=function(t){return r.getFromCache(t,a,f,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return l++,h=0,void(c[l]="");if(h>0&&h+a>u){if(l++,h=0,c[l]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(c=r.trimToBreakable(c),h=r.sumTextWidthByCache(c[l]||"",f)),r.shouldBreakByKinsokuShorui(e,o)&&(c=r.trimByKinsokuShorui(c),h+=d(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&Yl.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.isNewline=function(t){return"string"==typeof t&&Yl.Newlines.indexOf(t.charCodeAt(0))>=0},e.trimToBreakable=function(t){var e=[].concat(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,o),e},e.canBreakInLastChar=function(t){return!t||!ql.test(t)},e.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},e.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!ql.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),Pr([lt(t.OffscreenCanvasCreator),kr("design:type",t.OffscreenCanvasCreator)],t.TextService.prototype,"offscreenCanvas",void 0),t.TextService=Pr([ct()],t.TextService),t.CircleUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),t.CircleUpdater=Pr([ct({token:{token:Ga,named:t.Shape.CIRCLE}})],t.CircleUpdater),t.EllipseUpdater=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),t.EllipseUpdater=Pr([ct({token:{token:Ga,named:t.Shape.ELLIPSE}})],t.EllipseUpdater),t.RectUpdater=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!Jo(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),t.RectUpdater=Pr([ct({token:[{token:Ga,named:t.Shape.RECT},{token:Ga,named:t.Shape.IMAGE},{token:Ga,named:t.Shape.GROUP}]})],t.RectUpdater),t.TextUpdater=function(){function t(){this.textService=void 0}var e=t.prototype;return e.isReadyToMeasure=function(t,e){return t.text&&t.fontSize&&t.fontStyle&&t.fontWeight&&t.fontVariant&&t.textAlign&&t.textBaseline&&!Ie(t.lineWidth)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,u=t.dx,c=t.dy,l=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(r=n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var h=this.textService.measureText(i,t,l);t.metrics=h;var f=[h.width/2,h.height/2,0],d=[0,1],p=0;"center"===o?(p=a/2,d=[.5,1]):"right"!==o&&"end"!==o||(p=a,d=[1,1]);var v=0;return"middle"===s?v=f[1]:"top"===s||"hanging"===s?v=2*f[1]:"alphabetic"===s?v=h.lineHeight-h.fontProperties.ascent:"bottom"!==s&&"ideographic"!==s||(v=0),u&&(p+=u),c&&(v+=c),t.anchor=[d[0],d[1],0],{width:2*f[0],height:2*f[1],offsetX:p,offsetY:v}},t}(),Pr([lt(t.TextService),kr("design:type",t.TextService)],t.TextUpdater.prototype,"textService",void 0),t.TextUpdater=Pr([ct({token:{token:Ga,named:t.Shape.TEXT}})],t.TextUpdater),t.LineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s}},t}(),t.LineUpdater=Pr([ct({token:{token:Ga,named:t.Shape.LINE}})],t.LineUpdater),t.PolylineUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,e.map((function(t){return t[0]}))),r=Math.max.apply(Math,e.map((function(t){return t[0]}))),i=Math.min.apply(Math,e.map((function(t){return t[1]})));return{width:r-n,height:Math.max.apply(Math,e.map((function(t){return t[1]})))-i}},t}(),t.PolylineUpdater=Pr([ct({token:[{token:Ga,named:t.Shape.POLYLINE},{token:Ga,named:t.Shape.POLYGON}]})],t.PolylineUpdater),t.PathUpdater=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),t.PathUpdater=Pr([ct({token:{token:Ga,named:t.Shape.PATH}})],t.PathUpdater),t.CSSPropertyClipPath=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){if(n instanceof Ce&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets){var i=e.parsedStyle.clipPathTargets.indexOf(r);e.parsedStyle.clipPathTargets.splice(i,1)}return n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),Pr([lt(Ol),kr("design:type",Object)],t.CSSPropertyClipPath.prototype,"sceneGraphService",void 0),t.CSSPropertyClipPath=Pr([ct({token:{token:rs,named:t.PropertySyntax.CLIP_PATH}})],t.CSSPropertyClipPath),t.CSSPropertyColor=function(){function t(){this.parser=Ms,this.mixer=_s}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ce?"none"===n.value?vs:ys:n},t}(),t.CSSPropertyColor=Pr([ct({token:[{token:rs,named:t.PropertySyntax.PAINT},{token:rs,named:t.PropertySyntax.COLOR}]})],t.CSSPropertyColor),t.CSSPropertyFilter=function(){function t(){this.parser=ru}return t.prototype.calculator=function(t,e,n){return n instanceof Ce?[]:n},t}(),t.CSSPropertyFilter=Pr([ct({token:{token:rs,named:t.PropertySyntax.FILTER}})],t.CSSPropertyFilter),t.CSSPropertyLengthOrPercentage=function(){function e(){this.parser=Rs,this.mixer=Hs}return e.prototype.calculator=function(e,n,r,i,o){if(!qe.isRelativeUnit(r.unit))return r.value;if(r.unit===t.UnitType.kPercentage)return 0;if(r.unit===t.UnitType.kEms){if(i.parentNode){var a=Zl(i.parentNode);if(a)return a*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}if(r.unit===t.UnitType.kRems){var s;if(null==i||null===(s=i.ownerDocument)||void 0===s?void 0:s.documentElement){var u=Zl(i.ownerDocument.documentElement);if(u)return u*=r.value;o.addUnresolveProperty(i,e)}else o.addUnresolveProperty(i,e);return 0}},e}(),t.CSSPropertyLengthOrPercentage=Pr([ct({token:[{token:rs,named:t.PropertySyntax.LENGTH_PERCENTAGE},{token:rs,named:t.PropertySyntax.LENGTH}]})],t.CSSPropertyLengthOrPercentage),t.CSSPropertyLengthOrPercentage12=function(){function t(){this.mixer=Ws}var e=t.prototype;return e.parser=function(t){var e=Bs(Re(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}(),t.CSSPropertyLengthOrPercentage12=Pr([ct({token:{token:rs,named:t.PropertySyntax.LENGTH_PERCENTAGE_12}})],t.CSSPropertyLengthOrPercentage12),t.CSSPropertyLengthOrPercentage14=function(){function t(){this.mixer=Ws}var e=t.prototype;return e.parser=function(t){var e=Bs(Re(t)?[t]:t);return 1===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:3===e.length?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},e.calculator=function(t,e,n){return n.map((function(t){return t.value}))},t}(),t.CSSPropertyLengthOrPercentage14=Pr([ct({token:{token:rs,named:t.PropertySyntax.LENGTH_PERCENTAGE_14}})],t.CSSPropertyLengthOrPercentage14),t.CSSPropertyLocalPosition=function(e){function n(){return e.apply(this,arguments)||this}return ye(n,e),n.prototype.postProcessor=function(e){var n,r,i;switch(e.nodeName){case t.Shape.CIRCLE:case t.Shape.ELLIPSE:var o=e.parsedStyle,a=o.cx,s=o.cy;Ie(a)||(n=a),Ie(s)||(r=s);break;case t.Shape.LINE:var u=e.parsedStyle,c=u.y1,l=u.y2;n=Math.min(u.x1,u.x2),r=Math.min(c,l),i=0;break;case t.Shape.RECT:case t.Shape.IMAGE:case t.Shape.GROUP:case t.Shape.HTML:case t.Shape.TEXT:case t.Shape.MESH:Ie(e.parsedStyle.x)||(n=e.parsedStyle.x),Ie(e.parsedStyle.y)||(r=e.parsedStyle.y)}if(e.nodeName!==t.Shape.PATH&&e.nodeName!==t.Shape.POLYLINE&&e.nodeName!==t.Shape.POLYGON&&(e.parsedStyle.defX=n||0,e.parsedStyle.defY=r||0),!Ie(n)||!Ie(r)||!Ie(i)){var h=e.getLocalPosition(),f=h[0],d=h[1],p=h[2];e.setLocalPosition(Ie(n)?f:n,Ie(r)?d:r,Ie(i)?p:i)}},n}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyLocalPosition=Pr([ct({token:{token:rs,named:t.PropertySyntax.COORDINATE}})],t.CSSPropertyLocalPosition),t.CSSPropertyMarker=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;n instanceof Ce&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o},t}(),t.CSSPropertyMarker=Pr([ct({token:{token:rs,named:t.PropertySyntax.MARKER}})],t.CSSPropertyMarker),t.CSSPropertyNumber=function(){function t(){this.mixer=Hs,this.parser=Vs}return t.prototype.calculator=function(t,e,n){return n.value},t}(),t.CSSPropertyNumber=Pr([ct({token:{token:rs,named:t.PropertySyntax.NUMBER}})],t.CSSPropertyNumber),t.CSSPropertyOffsetDistance=function(){function e(){this.parser=Vs,this.mixer=zs(0,1)}var n=e.prototype;return n.calculator=function(t,e,n){return n.value},n.postProcessor=function(e){if(e.attributes.offsetPath){var n=e.attributes.offsetPath.nodeName;if(n===t.Shape.LINE||n===t.Shape.PATH||n===t.Shape.POLYLINE){var r=e.attributes.offsetPath.getPoint(e.parsedStyle.offsetDistance);r&&e.setLocalPosition(r.x,r.y)}}},e}(),t.CSSPropertyOffsetDistance=Pr([ct({token:{token:rs,named:t.PropertySyntax.OFFSET_DISTANCE}})],t.CSSPropertyOffsetDistance),t.CSSPropertyOffsetPath=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}(),t.CSSPropertyOffsetPath=Pr([ct({token:{token:rs,named:t.PropertySyntax.OFFSET_PATH}})],t.CSSPropertyOffsetPath),t.CSSPropertyOpacity=function(){function t(){this.parser=Vs,this.mixer=zs(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),t.CSSPropertyOpacity=Pr([ct({token:{token:rs,named:t.PropertySyntax.OPACITY_VALUE}})],t.CSSPropertyOpacity),t.CSSPropertyPath=function(){function e(){this.parser=Xs,this.mixer=Ks}var n=e.prototype;return n.calculator=function(t,e,n){return n instanceof Ce&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new es(0,0,0,0)}:n},n.postProcessor=function(e){if(e.nodeName===t.Shape.PATH){var n=e.parsedStyle,r=n.defX,i=n.defY;e.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},e}(),t.CSSPropertyPath=Pr([ct({token:{token:rs,named:t.PropertySyntax.PATH}})],t.CSSPropertyPath),t.CSSPropertyPoints=function(){function e(){this.parser=tu}return e.prototype.postProcessor=function(e){if(e.nodeName===t.Shape.POLYGON||e.nodeName===t.Shape.POLYLINE){var n=e.parsedStyle;e.setLocalPosition(n.defX,n.defY)}},e}(),t.CSSPropertyPoints=Pr([ct({token:{token:rs,named:t.PropertySyntax.LIST_OF_POINTS}})],t.CSSPropertyPoints),t.CSSPropertyShadowBlur=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).mixer=zs(0,1/0),e}return ye(e,t),e}(t.CSSPropertyLengthOrPercentage),t.CSSPropertyShadowBlur=Pr([ct({token:{token:rs,named:t.PropertySyntax.SHADOW_BLUR}})],t.CSSPropertyShadowBlur),t.CSSPropertyText=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ce?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),t.CSSPropertyText=Pr([ct({token:{token:rs,named:t.PropertySyntax.TEXT}})],t.CSSPropertyText),t.CSSPropertyTextTransform=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),t.CSSPropertyTextTransform=Pr([ct({token:{token:rs,named:t.PropertySyntax.TEXT_TRANSFORM}})],t.CSSPropertyTextTransform),t.CSSPropertyTransform=function(){function t(){this.tmpMat4=fn(),this.parser=Wu,this.mixer=tc}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ce?[]:n},e.postProcessor=function(t){var e=this,n=t.parsedStyle,r=n.transform,i=n.defX,o=n.defY;r&&r.length&&(t.resetLocalTransform(),t.setLocalPosition(i,o),r.forEach((function(n){var r=n.t,a=n.d;if("scale"===r){var s=(null==a?void 0:a.map((function(t){return t.value})))||[1,1];t.scaleLocal(s[0],s[1],1)}else if("scalex"===r){var u=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(u[0],1,1)}else if("scaley"===r){var c=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,c[0],1)}else if("scalez"===r){var l=(null==a?void 0:a.map((function(t){return t.value})))||[1];t.scaleLocal(1,1,l[0])}else if("scale3d"===r){var h=(null==a?void 0:a.map((function(t){return t.value})))||[1,1,1];t.scaleLocal(h[0],h[1],h[2])}else if("translate"===r){var f=a||[on,on];t.translateLocal(f[0].value,f[1].value,0)}else if("translatex"===r){t.translateLocal((a||[on])[0].value,0,0)}else if("translatey"===r){t.translateLocal(0,(a||[on])[0].value,0)}else if("translatez"===r){t.translateLocal(0,0,(a||[on])[0].value)}else if("translate3d"===r){var d=a||[on,on,on];t.translateLocal(d[0].value,d[1].value,d[2].value)}else if("rotate"===r){t.rotateLocal(0,0,(a||[an])[0].value)}else if("rotatex"===r){t.rotateLocal((a||[an])[0].value,0,0)}else if("rotatey"===r){t.rotateLocal(0,(a||[an])[0].value,0)}else if("rotatez"===r){t.rotateLocal(0,0,(a||[an])[0].value)}else if("rotate3d"===r);else if("skew"===r){var p=(null==a?void 0:a.map((function(t){return t.value})))||[0,0];t.setLocalSkew(io(p[0]),io(p[1]))}else if("skewx"===r){var v=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(io(v[0]),t.getLocalSkew()[1])}else if("skewy"===r){var y=(null==a?void 0:a.map((function(t){return t.value})))||[0];t.setLocalSkew(t.getLocalSkew()[0],io(y[0]))}else if("matrix"===r){var g=a.map((function(t){return t.value}));t.setLocalTransform(vn(e.tmpMat4,g[0],g[1],0,0,g[2],g[3],0,0,0,0,1,0,g[4]+i,g[5]+o,0,1))}else"matrix3d"===r&&(vn.apply(Ln,[e.tmpMat4].concat(a.map((function(t){return t.value})))),e.tmpMat4[12]+=i,e.tmpMat4[13]+=o,t.setLocalTransform(e.tmpMat4))})))},t}(),t.CSSPropertyTransform=Pr([ct({token:{token:rs,named:t.PropertySyntax.TRANSFORM}})],t.CSSPropertyTransform),t.CSSPropertyTransformOrigin=function(){this.parser=nc},t.CSSPropertyTransformOrigin=Pr([ct({token:{token:rs,named:t.PropertySyntax.TRANSFORM_ORIGIN}})],t.CSSPropertyTransformOrigin),t.CSSPropertyZIndex=function(){function t(){this.parser=Vs}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t}(),t.CSSPropertyZIndex=Pr([ct({token:{token:rs,named:t.PropertySyntax.Z_INDEX}})],t.CSSPropertyZIndex);var Jl={},Ql=[];t.DisplayObjectPool=function(){function e(){}var n=e.prototype;return n.getByEntity=function(t){return Jl[t]},n.getAll=function(){return Object.keys(Jl).map((function(t){return Jl[t]}))},n.add=function(e,n){Jl[e]=n,n.nodeName===t.Shape.HTML&&Ql.push(n)},n.remove=function(e){var n=Jl[e];if(n&&(delete Jl[e],n.nodeName===t.Shape.HTML)){var r=Ql.indexOf(n);Ql.splice(r,1)}},n.getHTMLs=function(){return Ql},e}(),t.DisplayObjectPool=Pr([ct()],t.DisplayObjectPool);var $l=At((function(e){Y.decorate(ut(),oc.EventEmitter),e(t.DisplayObjectPool),e(t.DefaultSceneGraphSelector),e({token:kl,useFactory:function(t){return function(){return t.container.get(Cl)}}}),e(t.DefaultSceneGraphService),e(t.OffscreenCanvasCreator),e(t.TextService),e(t.CircleUpdater),e(t.EllipseUpdater),e(t.RectUpdater),e(t.TextUpdater),e(t.LineUpdater),e(t.PolylineUpdater),e(t.PathUpdater),e({token:Va,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(Ga,n)&&(e[n]=t.container.getNamed(Ga,n)),e[n]}}}),e(t.CSSPropertyNumber),e(t.CSSPropertyAngle),e(t.CSSPropertyClipPath),e(t.CSSPropertyColor),e(t.CSSPropertyFilter),e(t.CSSPropertyLengthOrPercentage),e(t.CSSPropertyLengthOrPercentage12),e(t.CSSPropertyLengthOrPercentage14),e(t.CSSPropertyLocalPosition),e(t.CSSPropertyOffsetDistance),e(t.CSSPropertyOffsetPath),e(t.CSSPropertyOpacity),e(t.CSSPropertyPath),e(t.CSSPropertyPoints),e(t.CSSPropertyShadowBlur),e(t.CSSPropertyText),e(t.CSSPropertyTextTransform),e(t.CSSPropertyTransform),e(t.CSSPropertyTransformOrigin),e(t.CSSPropertyZIndex),e(t.CSSPropertyMarker),e({token:ns,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(rs,n)&&(e[n]=t.container.getNamed(rs,n)),e[n]}}}),e(t.DefaultStyleValueRegistry),e(t.LayoutRegistry),e(t.LayoutEngine),e(t.LayoutEdges),e({token:Ru,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Lu,useValue:n}),r.get(t.LayoutEdges)}}}),e({token:Eu,useFactory:function(e){return function(n){var r=e.container.createChild();r.register(t.LayoutContext),r.register(t.LayoutChildren),r.register({token:Mu,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:_u,useValue:n}),r.get(t.LayoutChildren)}}}),r.register(t.FragmentResult),r.register({token:Nu,useFactory:function(e){return function(n,r){var i=e.container.createChild();return i.register({token:ku,useValue:n}),i.register({token:Cu,useValue:r}),i.get(t.FragmentResult)}}}),r.register(t.LayoutFragment),r.register({token:Bu,useFactory:function(e){return function(n){var r=e.container.createChild();return r.register({token:Uu,useValue:n}),r.get(t.LayoutFragment)}}});var i=r.get(Mu),o=r.get(Bu),a=r.get(Nu);return r.register({token:Su,useValue:ve({},n,{layoutChildrenFactory:i,layoutFragmentFactory:o,fragmentResultFactory:a})}),r.get(t.LayoutContext)}}})})),th=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ve({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){this.plugins.push(t)},e.unregisterPlugin=function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(t){return this.plugins.find((function(e){return e.name===t}))},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}();let eh=1;const nh="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},rh=Date.now();let ih={},oh=Date.now();const ah=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-oh,r=n>16?0:16-n,i=eh++;return ih[i]=t,Object.keys(ih).length>1||setTimeout((()=>{oh=e;const t=ih;ih={},Object.keys(t).forEach((e=>t[e](nh.performance&&"function"==typeof nh.performance.now?nh.performance.now():Date.now()-rh)))}),r),i},sh=t=>{delete ih[t]},uh=t=>"string"!=typeof t?ah:""===t?nh.requestAnimationFrame:nh[t+"RequestAnimationFrame"],ch=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],(t=>!!uh(t))),lh=uh(ch),hh="string"!=typeof(fh=ch)?sh:""===fh?nh.cancelAnimationFrame:nh[fh+"CancelAnimationFrame"]||nh[fh+"CancelRequestAnimationFrame"];var fh,dh,ph;nh.requestAnimationFrame=lh,nh.cancelAnimationFrame=hh,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:lh,cancelAnimationFrame:hh});var vh,yh,gh=t.Syringe.defineToken(""),mh=(dh=function(){function e(){this.strategyProvider=void 0,this.renderingContext=void 0}return e.prototype.apply=function(e){var n=this,r=this.strategyProvider.getContributions();e.hooks.cull.tap(ph.tag,(function(e){if(e){var i=e.cullable;return i.visible=0===r.length?n.renderingContext.unculledEntities.indexOf(e.entity)>-1:r.every((function(t){return t.isVisible(e)})),!i.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new sc(t.ElementEvent.CULLED)),null)}return e})),e.hooks.afterRender.tap(ph.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},e}(),dh.tag="Culling",ph=dh);Pr([Ut(gh),kr("design:type",Object)],mh.prototype,"strategyProvider",void 0),Pr([lt(Bl),kr("design:type",Object)],mh.prototype,"renderingContext",void 0),mh=ph=Pr([ct({contrib:Wl})],mh);var Th,bh,Eh=(vh=function(){function t(){}return t.prototype.apply=function(t){t.hooks.dirtycheck.tap(yh.tag,(function(e){return e?e.renderable.dirty||t.disableDirtyRectangleRendering()?e:null:e}))},t}(),vh.tag="DirtyCheck",yh=vh);Eh=yh=Pr([ct({contrib:Wl})],Eh);var Sh=(Th=function(){function t(){var t=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new al(null),this.rootWheelEvent=new sl(null),this.onPointerMove=function(e){var n,r,i=null===(n=t.renderingContext.root)||void 0===n||null===(r=n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportsTouchEvents||"touch"!==e.pointerType){for(var o,a=Ee(t.normalizeToPointerEvent(e,i));!(o=a()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,o.value,i);t.eventService.mapEvent(s)}t.setCursor(t.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var t=fe(le().mark((function t(n){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.renderingService.hooks.pick.promise({position:n,picked:[],topmost:!0});case 2:return t.abrupt("return",t.sent.picked[0]||null);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(bh.tag,(function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap(bh.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var i,o=Ee(r);!(i=o()).done;){var a=e.bootstrapEvent(e.rootPointerEvent,i.value,n);e.eventService.mapEvent(a)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap(bh.tag,(function(t){if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r,i=e.contextService.getDomElement(),o=i&&t.target&&t.target!==i&&i.contains&&!i.contains(t.target)?"outside":"",a=Ee(e.normalizeToPointerEvent(t,n));!(r=a()).done;){var s=e.bootstrapEvent(e.rootPointerEvent,r.value,n);s.type+=o,e.eventService.mapEvent(s)}e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(bh.tag,this.onPointerMove),t.hooks.pointerOver.tap(bh.tag,this.onPointerMove),t.hooks.pointerOut.tap(bh.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new ts(e.clientX,e.clientY)),i=r.y;t.viewport.x=r.x,t.viewport.y=i;var o=this.eventService.viewport2Canvas(t.viewport),a=o.y;return t.canvas.x=o.x,t.canvas.y=a,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Bo[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new ts(t.clientX,t.clientY)),r=n.y;e.viewport.x=n.x,e.viewport.y=r;var i=this.eventService.viewport2Canvas(e.viewport),o=i.y;return e.canvas.x=i.x,e.canvas.y=o,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;t.changedTouches.length>r;r++){var i=t.changedTouches[r];Oe(i.button)&&(i.button=0),Oe(i.buttons)&&(i.buttons=1),Oe(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Oe(i.width)&&(i.width=i.radiusX||1),Oe(i.height)&&(i.height=i.radiusY||1),Oe(i.tiltX)&&(i.tiltX=0),Oe(i.tiltY)&&(i.tiltY=0),Oe(i.pointerType)&&(i.pointerType="touch"),Oe(i.pointerId)&&(i.pointerId=i.identifier||0),Oe(i.pressure)&&(i.pressure=i.force||.5),Oe(i.twist)&&(i.twist=0),Oe(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Oe(o.isPrimary)&&(o.isPrimary=!0),Oe(o.width)&&(o.width=1),Oe(o.height)&&(o.height=1),Oe(o.tiltX)&&(o.tiltX=0),Oe(o.tiltY)&&(o.tiltY=0),Oe(o.pointerType)&&(o.pointerType="mouse"),Oe(o.pointerId)&&(o.pointerId=1),Oe(o.pressure)&&(o.pressure=.5),Oe(o.twist)&&(o.twist=0),Oe(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t}(),Th.tag="Event",bh=Th);Pr([lt(sa),kr("design:type",Object)],Sh.prototype,"canvasConfig",void 0),Pr([lt(Rl),kr("design:type",Object)],Sh.prototype,"contextService",void 0),Pr([lt(t.RenderingService),kr("design:type",t.RenderingService)],Sh.prototype,"renderingService",void 0),Pr([lt(Bl),kr("design:type",Object)],Sh.prototype,"renderingContext",void 0),Pr([lt(t.EventService),kr("design:type",t.EventService)],Sh.prototype,"eventService",void 0),Sh=bh=Pr([ct({contrib:Wl})],Sh);var xh,wh,Ph=[t.Shape.CIRCLE,t.Shape.ELLIPSE,t.Shape.IMAGE,t.Shape.RECT,t.Shape.LINE,t.Shape.POLYLINE,t.Shape.POLYGON,t.Shape.TEXT,t.Shape.PATH,t.Shape.HTML],Nh=function(){function e(){this.camera=void 0}var n=e.prototype;return n.isVisible=function(e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(Ha.isEmpty(o))return!1;var a=this.camera.getFrustum(),s=null===(n=e.parentNode)||void 0===n||null===(r=n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,s||t.Mask.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==t.Mask.OUTSIDE,i.visible},n.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===t.Mask.OUTSIDE||r===t.Mask.INSIDE)return r;for(var o=t.Mask.INSIDE,a=Ph.indexOf(e.nodeName)>-1,s=0,u=i.length;u>s;++s){var c=1<<s;if(0!=(r&c)&&(!a||4!==s&&5!==s)){var l=i[s],h=l.normal,f=l.distance;if(0>Xn(h,n.getPositiveFarPoint(i[s]))+f)return t.Mask.OUTSIDE;0>Xn(h,n.getNegativeFarPoint(i[s]))+f&&(o|=c)}}return o},e}();Pr([lt(Ul),kr("design:type",zl)],Nh.prototype,"camera",void 0),Nh=Pr([ct({contrib:gh})],Nh);var kh=(xh=function(){function e(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}var n=e.prototype;return n.pushToSync=function(t){var e=this;t.forEach((function(t){e.toSync.add(t)}))},n.apply=function(e){var n=this,r=function(t){t.target.renderable.dirty=!0,e.dirtify()},i=function(t){t.detail.affectChildren&&t.target.forEach((function(t){n.pushToSync([t])})),n.pushToSync(t.composedPath().slice(0,-2)),e.dirtify()},o=function(t){var r=t.target;n.pushToSync(t.composedPath().slice(0,-2)),n.styleValueRegistry.recalc(r),n.sceneGraphService.dirtifyToRoot(r),e.dirtify()},a=function(t){var r=t.target,i=r.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(r),n.sceneGraphService.dirtifyToRoot(t.target),e.dirtify()};e.hooks.init.tapPromise(wh.tag,fe(le().mark((function e(){return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.renderingContext.root.addEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.addEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.addEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(t.ElementEvent.BOUNDS_CHANGED,i);case 4:case"end":return e.stop()}}),e)})))),e.hooks.destroy.tap(wh.tag,(function(){n.renderingContext.root.removeEventListener(t.ElementEvent.MOUNTED,o),n.renderingContext.root.removeEventListener(t.ElementEvent.UNMOUNTED,a),n.renderingContext.root.removeEventListener(t.ElementEvent.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(t.ElementEvent.BOUNDS_CHANGED,i)})),e.hooks.endFrame.tap(wh.tag,(function(){n.syncRTree()}))},n.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=i.getMin(),a=o[0],s=o[1],u=i.getMax(),c=u[0],l=u[1];r.aabb||(r.aabb={}),r.aabb.id=n.entity,r.aabb.minX=a,r.aabb.minY=s,r.aabb.maxX=c,r.aabb.maxY=l}r.aabb&&(isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb))})),this.rBush.load(e),e.length=0,this.toSync.clear()},e}(),xh.tag="Prepare",wh=xh);Pr([lt(Bl),kr("design:type",Object)],kh.prototype,"renderingContext",void 0),Pr([lt(ce),kr("design:type",Object)],kh.prototype,"styleValueRegistry",void 0),Pr([lt(Ol),kr("design:type",Object)],kh.prototype,"sceneGraphService",void 0),Pr([lt(dc),kr("design:type",zt)],kh.prototype,"rBush",void 0),kh=wh=Pr([ct({contrib:Wl})],kh);var Ch,Mh=At((function(e){t.Contribution.register(e,Wl,{cache:!1}),t.Contribution.register(e,gh,{cache:!1}),e({token:dc,useValue:new zt}),e(t.RenderingService),e(t.EventService),e(Sh),e(kh),e(Eh),e(mh),e(Nh)}));(Ch=t.CanvasEvent||(t.CanvasEvent={})).READY="ready",Ch.BEFORE_RENDER="beforerender",Ch.AFTER_RENDER="afterrender",Ch.BEFORE_DESTROY="beforedestroy",Ch.AFTER_DESTROY="afterdestroy",Ch.RESIZE="resize",Ch.DIRTY_RECTANGLE="dirtyrectangle";var _h=function(e){function n(n){var r;(r=e.call(this)||this).container=Ft.createChild(),r.document=void 0,r.customElements=void 0,r.requestAnimationFrame=void 0,r.cancelAnimationFrame=void 0,r.devicePixelRatio=void 0,r.supportsPointerEvents=void 0,r.supportsTouchEvents=void 0,r.isTouchEvent=void 0,r.isMouseEvent=void 0,r.Element=Nc,r.frameId=void 0,r.eventService=void 0,r.renderingService=void 0,r.inited=!1,r.readyPromise=void 0,r.resolveReadyPromise=void 0,r.mountEvent=new sc(t.ElementEvent.MOUNTED),r.unmountEvent=new sc(t.ElementEvent.UNMOUNTED),r.beforeRenderEvent=new sc(t.CanvasEvent.BEFORE_RENDER),r.afterRenderEvent=new sc(t.CanvasEvent.AFTER_RENDER),r.document=new il,r.document.defaultView=Te(r),r.customElements=new Nl;var i=n.container,o=n.canvas,a=n.offscreenCanvas,s=n.width,u=n.height,c=n.devicePixelRatio,l=n.renderer,h=n.background,f=n.cursor,d=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,y=n.createImage,g=n.supportsPointerEvents,m=n.supportsTouchEvents,T=n.isTouchEvent,b=n.isMouseEvent;Wi(i,Te(r));var E=s,S=u,x=c;return o&&(x=1>(x=c||Yi&&window.devicePixelRatio||1)?1:Math.ceil(x),E=s||Do(o)||o.width/x,S=u||Fo(o)||o.height/x),r.devicePixelRatio=x,r.requestAnimationFrame=null!=p?p:lh.bind(globalThis),r.cancelAnimationFrame=null!=v?v:hh.bind(globalThis),r.supportsTouchEvents=null!=m?m:"ontouchstart"in globalThis,r.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,r.isTouchEvent=null!=T?T:function(t){return r.supportsTouchEvents&&t instanceof globalThis.TouchEvent},r.isMouseEvent=null!=b?b:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!r.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:o,width:E,height:S,renderer:l,offscreenCanvas:a,devicePixelRatio:x,cursor:f||"default",background:h||"transparent",createImage:y,document:d}),r.initDefaultCamera(E,S),fe(le().mark((function e(){return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.initRenderer(l);case 2:r.dispatchEvent(new sc(t.CanvasEvent.READY)),r.readyPromise&&r.resolveReadyPromise();case 4:case"end":return e.stop()}}),e)})))(),r}ye(n,e);var r=n.prototype;return r.initRenderingContext=function(e){var n=this;this.container.register({token:sa,useValue:e}),this.container.register({token:Bl,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_INSERTED,(function(t){n.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(t.ElementEvent.CHILD_REMOVED,(function(t){n.unmountChildren(t.detail.child)}))},r.initDefaultCamera=function(e,n){var r=(new zl).setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0).setOrthographic(e/-2,e/2,n/2,n/-2,.1,1e3);r.canvas=this;var i=this.container.get(Bl);r.on(jl.UPDATED,(function(){i.renderReasons.add(t.RenderReason.CAMERA_CHANGED)})),this.container.register({token:Ul,useValue:r})},r.getConfig=function(){return this.container.get(sa)},r.getContainer=function(){return this.container},r.getRoot=function(){return this.document.documentElement},r.getCamera=function(){return this.container.get(Ul)},r.getContextService=function(){return this.container.get(Rl)},r.getEventService=function(){return this.eventService},r.getRenderingService=function(){return this.renderingService},r.getRenderingContext=function(){return this.container.get(Bl)},r.getStats=function(){return this.getRenderingService().getStats()},r.destroy=function(e,n){(void 0===e&&(e=!0),void 0===n&&(n=!1),n||this.dispatchEvent(new sc(t.CanvasEvent.BEFORE_DESTROY)),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var r=this.getRoot();this.unmountChildren(r),e&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),n||this.dispatchEvent(new sc(t.CanvasEvent.AFTER_DESTROY))},r.changeSize=function(t,e){this.resize(t,e)},r.resize=function(e,n){var r=this.container.get(sa);r.width=e,r.height=n,this.getContextService().resize(e,n);var i=this.container.get(Ul),o=i.getProjectionMode();i.setPosition(e/2,n/2,500).setFocalPoint(e/2,n/2,0),o===t.CameraProjectionMode.ORTHOGRAPHIC?i.setOrthographic(e/-2,e/2,n/2,n/-2,i.getNear(),i.getFar()):i.setAspect(e/n),this.dispatchEvent(new sc(t.CanvasEvent.RESIZE,{width:e,height:n}))},r.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},r.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},r.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},r.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},r.render=function(){(this.dispatchEvent(this.beforeRenderEvent),this.container.isBound(t.RenderingService))&&this.container.get(t.RenderingService).render(this.getConfig());this.dispatchEvent(this.afterRenderEvent)},r.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},r.initRenderer=function(){var e=fe(le().mark((function e(n){var r;return le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(n),r=this.container.get(Rl),this.renderingService=this.container.get(t.RenderingService),this.eventService=this.container.get(t.EventService),e.next=11,r.init();case 11:return e.next=13,this.renderingService.init();case 13:this.inited=!0,this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot()),n.getConfig().enableAutoRendering&&this.run();case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadCommonContainerModule=function(){this.container.unload(Mh),this.container.load(Mh,!0)},r.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.container=e.container,t.init()}))},r.setRenderer=function(){var t=fe(le().mark((function t(e){var n,r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer!==e){t.next=3;break}return t.abrupt("return");case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach((function(t){t.destroy()})),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.setCursor=function(t){this.container.get(sa).cursor=t,this.getContextService().applyCursorStyle(t)},r.unmountChildren=function(t){var e=this;if(this.inited){var n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t instanceof Cc&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(e.unmountEvent),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))}},r.mountChildren=function(t){var e=this;this.inited?t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(e.mountEvent),t instanceof Cc&&t.connectedCallback&&t.connectedCallback())})):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},r.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},r.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},r.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},r.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},r.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},r.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},pe(n,[{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),n}(uc);Ft.load($l);var Ah=Ft.get(Ol),Oh=Ft.get(ce),Ih=Ft.get(t.LayoutEngine),Rh=Ft.get(t.DisplayObjectPool);t.AABB=Ha,t.AbstractLayoutDefinition=Au,t.AbstractRenderer=th,t.AbstractRendererPlugin=function(){this.container=void 0},t.Animation=$c,t.AnimationEffectTiming=ul,t.AnimationEvent=Jc,t.AnimationTimeline=rl,t.AsyncParallelHook=Ea,t.AsyncSeriesWaterfallHook=Pa,t.BUILT_IN_PROPERTIES=is,t.BoundingSphere=Wa,t.CSS=ju,t.CSSColorValue=ke,t.CSSGradientValue=un,t.CSSKeywordValue=Ce,t.CSSMathInvert=Ke,t.CSSMathMax=en,t.CSSMathMin=tn,t.CSSMathNegate=Ze,t.CSSMathProduct=rn,t.CSSMathSum=nn,t.CSSMathValue=Xe,t.CSSMathVariadic=$e,t.CSSNumericValue=Ve,t.CSSNumericValueType=je,t.CSSProperty=rs,t.CSSPropertySyntaxFactory=ns,t.CSSRGB=sn,t.CSSStyleValue=Ne,t.CSSUnitValue=qe,t.Camera=zl,t.CameraEvent=jl,t.Canvas=_h,t.CanvasConfig=sa,t.Circle=_c,t.Container=Dt,t.ContextNode=Cu,t.ContextService=Rl,t.Cullable=lc,t.CustomElement=Cc,t.CustomElementRegistry=Nl,t.CustomEvent=sc,t.DCHECK=Me,t.DCHECK_EQ=_e,t.DCHECK_NE=Ae,t.DELEGATION_SPLITTER=":",t.DefaultCamera=Ul,t.DefaultContributionProvider=Pt,t.Deferred=Io,t.DisplayObject=Nc,t.Document=il,t.EasingFunctions=_o,t.Element=Pc,t.Ellipse=Oc,t.EventTarget=uc,t.FederatedEvent=ac,t.FederatedMouseEvent=ol,t.FederatedPointerEvent=al,t.FederatedWheelEvent=sl,t.FragmentResultFactory=Nu,t.FragmentResultOptions=ku,t.Frustum=qa,t.Geometry=hc,t.GeometryAABBUpdater=Ga,t.GeometryUpdaterFactory=Va,t.GlobalContainer=Ft,t.Group=Rc,t.HTML=Zc,t.Image=Dc,t.KeyframeEffect=Pl,t.LayoutChildrenFactory=Mu,t.LayoutChildrenOptions=_u,t.LayoutContextFactory=Eu,t.LayoutContextOptions=Su,t.LayoutEdgesFactory=Ru,t.LayoutEdgesOptions=Lu,t.LayoutFragmentFactory=Bu,t.LayoutFragmentOptions=Uu,t.LayoutObject=Pu,t.Line=Bc,t.MOUSE_POINTER_ID=1,t.Module=At,t.MutationEvent=gc,t.MutationObserver=dl,t.MutationRecord=cl,t.Node=cc,t.ObjectTyped=Ro,t.Odeg=an,t.OptionSymbol=ft,t.Opx=on,t.Path=jc,t.Plane=Ya,t.Point=ts,t.Polygon=Gc,t.Polyline=zc,t.Provider=mt,t.RBush=zt,t.RBushNode=fc,t.RBushRoot=dc,t.Ray=$a,t.Rect=Yc,t.Rectangle=es,t.Registration=fl,t.Renderable=pc,t.RenderingContext=Bl,t.RenderingPluginContribution=Wl,t.SceneGraphSelector=Cl,t.SceneGraphSelectorFactory=kl,t.SceneGraphService=Ol,t.Sortable=vc,t.StyleValueRegistry=ce,t.SyncHook=Aa,t.SyncWaterfallHook=Fa,t.SyringeModule=Mt,t.TOUCH_TO_POINTER=Bo,t.Text=Xc,t.Transform=yc,t.baseTypeToString=Ue,t.cache=os,t.camelCase=Zo,t.clamp=eo,t.clampedMergeNumbers=zs,t.cleanExistedCanvas=Wi,t.colorStopToString=Uo,t.compareAnimations=tl,t.composeMatrix=Ku,t.computeLinearGradient=function(t,e,n){var r=n*Math.PI/180,i=0+t/2,o=0+e/2,a=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r));return{x1:i-Math.cos(r)*a/2,y1:o-Math.sin(r)*a/2,x2:i+Math.cos(r)*a/2,y2:o+Math.sin(r)*a/2}},t.computeRadialGradient=function(t,e,n,r){return{x:n*t,y:r*e,r:Math.sqrt(t*t+e*e)/2}},t.contrib=Ut,t.convertAngleUnit=Fs,t.convertEffectInput=Qo,t.convertItemToMatrix=Yu,t.convertPercentUnit=Us,t.convertToDash=ho,t.convertToPath=function(e,n){void 0===n&&(n=!0);var r=[];switch(e.nodeName){case t.Shape.LINE:var i=e.parsedStyle;r=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.x1,i.y1,i.x2,i.y2);break;case t.Shape.CIRCLE:var o=e.parsedStyle,a=o.r;r=fa(a,a,o.cx,o.cy);break;case t.Shape.ELLIPSE:var s=e.parsedStyle;r=fa(s.rx,s.ry,s.cx,s.cy);break;case t.Shape.POLYLINE:case t.Shape.POLYGON:r=function(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}(e.parsedStyle.points.points,e.nodeName===t.Shape.POLYGON);break;case t.Shape.RECT:var u=e.parsedStyle,c=u.width,l=u.height,h=u.x,f=u.y,d=u.radius,p=d&&d.some((function(t){return 0!==t}));r=function(t,e,n,r,i){if(i){var o=i[0],a=i[1],s=i[2],u=i[3],c=t>0?1:-1,l=e>0?1:-1,h=c+l!==0?1:0;return[["M",c*o+n,r],["L",t-c*a+n,r],a?["A",a,a,0,0,h,t+n,l*a+r]:null,["L",t+n,e-l*s+r],s?["A",s,s,0,0,h,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,h,n,e+r-l*u]:null,["L",n,l*o+r],o?["A",o,o,0,0,h,c*o+n,r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(c,l,h,f,p&&d.map((function(t){return eo(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))})));break;case t.Shape.PATH:var v=e.parsedStyle.path,y=v.zCommandIndexes;r=[].concat(v.curve),y.forEach((function(t,e){r.splice(t+e,1,["Z"])}))}if(r.length)return function(t,e,n){var r;void 0===n&&(n=!0),n&&(r=e.getLocalTransform());var i=e.parsedStyle,o=i.defX,a=void 0===o?0:o,s=i.defY,u=void 0===s?0:s;return t.reduce((function(t,e){var i="";if("M"===e[0]||"L"===e[0]){var o=Un(e[1]-a,e[2]-u,0);n&&Jn(o,o,r),i=""+e[0]+o[0]+","+o[1]}else if("Z"===e[0])i=e[0];else if("C"===e[0]){var s=Un(e[1]-a,e[2]-u,0),c=Un(e[3]-a,e[4]-u,0),l=Un(e[5]-a,e[6]-u,0);n&&(Jn(s,s,r),Jn(c,c,r),Jn(l,l,r)),i=""+e[0]+s[0]+","+s[1]+","+c[0]+","+c[1]+","+l[0]+","+l[1]}else if("A"===e[0]){var h=Un(e[6]-a,e[7]-u,0);n&&Jn(h,h,r),i=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+h[0]+","+h[1]}return t+i}),"")}(r,e,n)},t.createVec3=ro,t.decompose=lo,t.decorate=Y.decorate,t.deg2rad=io,t.deg2turn=function(t){return t/360},t.displayObjectPool=Rh,t.equalSet=function(t,e){if(t.size!==e.size)return!1;for(var n,r=Ee(t);!(n=r()).done;){if(!e.has(n.value))return!1}return!0},t.extractPolygons=la,t.findClosestClipPathTarget=Al,t.formatAttribute=aa,t.fromRotationTranslationScale=uo,t.getAngle=no,t.getEasingFunction=Ao,t.getEuler=so,t.getHeight=Fo,t.getOrCalculatePathTotalLength=ua,t.getOrCreateKeyword=Ts,t.getOrCreateRGBA=gs,t.getRotationInRadians=function(t){return Math.atan2(t[1],t[4])},t.getScaling=function(t,e){var n=e[3],r=e[4];return t[0]=Math.hypot(e[0],e[1]),t[1]=Math.hypot(n,r),t},t.getStyle=Lo,t.getTranslation=function(t,e){return t[0]=e[6],t[1]=e[7],t},t.getWidth=Do,t.grad2deg=function(t){return 0>(t%=400)&&(t+=400),t/400*360},t.hasArcOrBezier=ca,t.inheritKeywordValue=ps,t.initialKeywordValue=ds,t.inject=lt,t.injectable=ut,t.isBoolean=De,t.isBrowser=Yi,t.isComparison=function(e){return e===t.CSSMathOperator.kMin||e===t.CSSMathOperator.kMax||e===t.CSSMathOperator.kClamp},t.isFillOrStrokeAffected=function(t,e,n){var r=!1,i=!1;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=!!e&&!e.isNone,i=!!n&&!n.isNone):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(r=!0,i=!0),[r,i]},t.isFunction=Le,t.isNil=Ie,t.isNumber=Re,t.isObject=Fe,t.isPattern=Cs,t.isString=Jo,t.isSyringeModule=_t,t.isUndefined=Oe,t.layoutEngine=Ih,t.makePerspective=co,t.makeQuerablePromise=Oo,t.makeTiming=Sl,t.mergeColors=_s,t.mergeDimensions=Ds,t.mergeNumberLists=Ws,t.mergeNumbers=Hs,t.mergePaths=Ks,t.mergeTransforms=tc,t.named=ht,t.noneColor=vs,t.normalizeKeyframes=Tl,t.normalizeTimingInput=xl,t.numberToString=js,t.numericTimingToObject=wl,t.optional=Y.optional,t.parseAngle=Ls,t.parseColor=Ms,t.parseDimension=As,t.parseDimensionArray=Bs,t.parseFilter=ru,t.parseGradient=jo,t.parseLength=Os,t.parseLengthOrPercentage=Rs,t.parseNumber=Vs,t.parseNumberList=Gs,t.parseParam=eu,t.parsePath=Xs,t.parsePoints=tu,t.parseTransform=Wu,t.parseTransformOrigin=nc,t.parserPercentage=Is,t.path2Segments=ha,t.postConstruct=Y.postConstruct,t.rad2deg=oo,t.register=Bt,t.registerSideOption=function(t,e){Reflect.defineMetadata(ft,t,e)},t.sceneGraphService=Ah,t.setDOMSize=function(t,e,n){Yi&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")},t.singleton=ct,t.sortByZIndex=_l,t.styleValueRegistry=Oh,t.toFontString=Ua,t.transient=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(at(at({},e),{},{lifecycle:t.Syringe.Lifecycle.transient}))},t.translatePathToString=function(t,e,n,r,i,o,a){void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=t.map((function(s,u){var c="Z"===t[t.length-1][0],l=u===t.length-(c?2:1)?o:0,h=u===t.length-(c?2:1)?a:0;switch(s[0]){case"M":return"M "+(s[1]-e+r)+","+(s[2]-n+i);case"L":return"L "+(s[1]-e+l)+","+(s[2]-n+h);case"Q":return"Q "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e+l)+" "+(s[4]-n+h);case"C":return"C "+(s[1]-e)+" "+(s[2]-n)+","+(s[3]-e)+" "+(s[4]-n)+","+(s[5]-e+l)+" "+(s[6]-n+h);case"A":return"A "+s[1]+" "+s[2]+" "+s[3]+" "+s[4]+" "+s[5]+" "+(s[6]-e+l)+" "+(s[7]-n+h);case"Z":return"Z"}})).join(" ");return~s.indexOf("NaN")?"":s},t.transparentColor=ys,t.turn2deg=ao,t.typeCheck=Je,t.unitTypeToBaseType=Be,t.unmanaged=Y.unmanaged,t.unsetKeywordValue=fs,Object.defineProperty(t,"__esModule",{value:!0})}));
|