@pixodesk/svg-animator-web 1.0.21 → 1.0.24
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/README.md +3 -3
- package/dist/index.cjs +615 -412
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +613 -411
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +1687 -0
- package/dist/index.prerendered-waapi.umd.js.map +1 -0
- package/dist/index.prerendered-waapi.umd.min.js +1 -0
- package/dist/index.prerendered.umd.js +2200 -0
- package/dist/index.prerendered.umd.js.map +1 -0
- package/dist/index.prerendered.umd.min.js +1 -0
- package/dist/index.umd.js +756 -976
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +17 -12
package/dist/index.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,u=(t,e)=>{for(var n in e||(e={}))i.call(e,n)&&l(t,n,e[n]);if(a)for(var n of a(e))s.call(e,n)&&l(t,n,e[n]);return t},c=(t,n)=>e(t,r(n)),f={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(f,{COLOUR_ATTR_NAMES:()=>ne,PX_ANIMATOR_DATA_KEY:()=>ia,PX_ANIM_ATTR_NAME:()=>G,PX_ANIM_SRC_ATTR_NAME:()=>B,PX_TRANSFORM_PART_KEYS:()=>tt,PxAnimatedSvgDocumentSchema:()=>Ct,PxAnimationDefinitionSchema:()=>rt,PxAnimatorConfigSchema:()=>ut,PxAnimatorEngine:()=>q,PxAnimatorMode:()=>K,PxAttrValueSchema:()=>ft,PxBezierPathSchema:()=>Ft,PxBindingSchema:()=>ct,PxCloneEffectSchema:()=>At,PxDefsSchema:()=>lt,PxEasingOrRefSchema:()=>Q,PxEffectsSchema:()=>It,PxElementAnimationSchema:()=>ot,PxFillGradientEffectSchema:()=>jt,PxGradientSpreadMethod:()=>wt,PxGradientStopSchema:()=>Pt,PxGradientType:()=>xt,PxGradientUnits:()=>kt,PxKeyframeSchema:()=>J,PxLoopSchema:()=>H,PxMaskedByEffectSchema:()=>yt,PxNodeBase:()=>Tt,PxNodeSchema:()=>Et,PxPropertyAnimationSchema:()=>$,PxRepeaterEffectSchema:()=>mt,PxRetimeEffectSchema:()=>bt,PxStrokeGradientEffectSchema:()=>Ot,PxSvgNodeExtra:()=>Nt,PxTextEffectSchema:()=>_t,PxTextPathEffectSchema:()=>Mt,PxTransformPartsSchema:()=>et,PxTransformValueSchema:()=>nt,PxTransformationEffectSchema:()=>pt,PxTriggerSchema:()=>at,PxTrimPathEffectSchema:()=>vt,STYLE_ATTR_NAMES:()=>ie,TRANSFORM_FN_NAMES:()=>re,applyPlayerEffects:()=>xo,calcAnimationValues:()=>kn,camelCaseToKebabWordIfNeeded:()=>fe,collectSampleTimes:()=>Ko,createAnimator:()=>sa,createAnimatorImpl:()=>oa,createBasicFrameLoopAnimator:()=>Oo,createFrameLoopAnimator:()=>$o,createPathSampler:()=>wr,createWebApiAnimator:()=>ra,describeSchema:()=>V,diffInEffect:()=>Zo,evaluateMotionPathSegment:()=>Ue,extendedPathForBrowser:()=>Mr,generateNewIds:()=>we,getAnimatorConfig:()=>Rt,getBindings:()=>Vt,getChildren:()=>Wt,getDefs:()=>Ut,getNormalizedProps:()=>Ee,isPxElementFileFormat:()=>Lt,isPxElementFileFormatDeep:()=>Dt,jsonElementFactory:()=>Ir,layoutGlyphTextChars:()=>Xr,loadTagAnimators:()=>la,materialiseAllInTree:()=>So,materialiseAnimatedUseInstances:()=>jn,materialiseGlyphText:()=>ao,materialiseGlyphTextAlongPath:()=>Jr,materialiseGlyphTextHorizontal:()=>Zr,materialiseInternalLoopsInPropAnim:()=>mn,materialiseInternalLoopsInTree:()=>yn,materialiseMotionPathInPropAnim:()=>Ge,materialiseMotionPathsInTree:()=>rn,normalizeDocument:()=>bn,propAnimIsMotionPath:()=>Le,px:()=>W,renderNode:()=>Qo,schemaKeys:()=>U,setupAnimationTriggers:()=>Jo,shiftAnimatable:()=>Or,toRGBA:()=>te,validateNodeEffects:()=>zt,visualModelAt:()=>qo});var d=Object.defineProperty,h=Object.defineProperties,p=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=Math.pow,b=(t,e,n)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))y.call(e,n)&&b(t,n,e[n]);if(m)for(var n of m(e))g.call(e,n)&&b(t,n,e[n]);return t},k=(t,e)=>h(t,p(e)),w=(t,e)=>{var n={};for(var r in t)y.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&m)for(var r of m(t))e.indexOf(r)<0&&g.call(t,r)&&(n[r]=t[r]);return n};function x(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var P=class{_canSanitize(t){return this.isValid(t)}optional(){return new S(this)}},S=class extends P{constructor(t){super(),this.inner=t,this._default=void 0}sanitize(t){if(null!=t)return this.inner._canSanitize(t)?this.inner.sanitize(t):void 0}isValid(t,e,n){return null==t||this.inner.isValid(t,e,n)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},j=class extends P{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,e,n){return"string"==typeof t||(null==e||e.errors.push(x(null!=n?n:[])+": expected string, got "+typeof t),!1)}},O=class extends P{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,e,n){return!("number"!=typeof t||!isFinite(t))||(null==e||e.errors.push(x(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},M=class extends P{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,e,n){return"boolean"==typeof t||(null==e||e.errors.push(x(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},_=class extends P{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,e,n){return t===this.value||(null==e||e.errors.push(x(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},I=class extends P{constructor(t,e){super(),this.values=t,this._default=null!=e?e:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,e,n){return!!this.values.includes(t)||(null==e||e.errors.push(x(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},z=class extends P{constructor(t,e){super(),this.schemas=t,this._default=null!=e?e:t[0]._default}sanitize(t){for(const e of this.schemas)if(e.isValid(t))return e.sanitize(t);return this._default}isValid(t,e,n){var r;return!!this.schemas.some(e=>e.isValid(t))||(null==e||e.errors.push(x(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,60)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},T=class extends P{constructor(t,e,n){super(),this._key=t,this._schemas=e,this._default=null!=n?n:e[0]._default,this._map=new Map;for(const n of e){const e=n._shape[t];e&&this._map.set(e._default,n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null!=e?this._map.get(e):void 0}sanitize(t){var e;return(null!=(e=this._findSchema(t))?e:this._schemas[0]).sanitize(t)}isValid(t,e,n){const r=this._findSchema(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this._key];return null==e||e.errors.push(x(null!=n?n:[])+": no discriminated union member matched "+this._key+"="+JSON.stringify(r)),!1}return r.isValid(t,e,n)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const e=this._findSchema(t);return e?e._canSanitize(t):this._schemas[0]._canSanitize(t)}},E=class extends P{constructor(t){super(),this._shape=t;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n={};for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(x(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let a=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(a=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||(o.push(t),e.errors.push(x(o)+": unexpected extra key"),o.pop(),a=!1);return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},N=class extends P{constructor(t,e){super(),this._shape=t,this._openSchema=e;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n=A({},e);for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);if(this._openSchema)for(const t of Object.keys(e))t in this._shape||(n[t]=this._openSchema.sanitize(e[t]));return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(x(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let a=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(a=!1),o.pop();if(this._openSchema)for(const t of Object.keys(r))t in this._shape||(o.push(t),this._openSchema.isValid(r[t],e,o)||(a=!1),o.pop());return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},C=class extends P{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const e=[];for(const n of t)this.item._canSanitize(n)&&e.push(this.item.sanitize(n));return e}isValid(t,e,n){if(!Array.isArray(t))return null==e||e.errors.push(x(null!=n?n:[])+": expected array, got "+typeof t),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<t.length;n++)r.push("["+n+"]"),this.item.isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},F=class extends P{constructor(t){super(),this.value=t,this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,r]of Object.entries(t))this.value._canSanitize(r)&&(e[n]=this.value.sanitize(r));return e}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(x(null!=n?n:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(const[n,a]of Object.entries(t))r.push(n),this.value.isValid(a,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},L=class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},D=class extends P{constructor(t,e){super(),this.fn=t,this._default=e,this.resolved=null}get schema(){var t;return null!=(t=this.resolved)?t:this.resolved=this.fn()}sanitize(t){return this.schema.sanitize(t)}isValid(t,e,n){return this.schema.isValid(t,e,n)}_canSanitize(t){return this.schema._canSanitize(t)}},R=class extends P{constructor(t){super(),this.schemas=t,this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.schemas.length?this.schemas.map((e,n)=>e.sanitize(t[n])):this._default}isValid(t,e,n){if(!Array.isArray(t)||t.length!==this.schemas.length)return null==e||e.errors.push(x(null!=n?n:[])+": expected tuple of length "+this.schemas.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<this.schemas.length;n++)r.push("["+n+"]"),this.schemas[n].isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.schemas.length}};function U(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function V(t){var e;const n=t;return"_shape"in n?{kind:"shape",shape:n._shape}:"item"in n?{kind:"array",item:n.item}:"inner"in n?{kind:"optional",inner:n.inner}:"fn"in n?{kind:"lazy",resolved:null!=(e=n.resolved)?e:n.fn()}:{kind:"leaf"}}var W={string:(t="")=>new j(t),number:(t=0)=>new O(t),boolean:(t=!1)=>new M(t),literal:t=>new _(t),enum:(t,e)=>new I(t,e),union:(t,e)=>new z(t,e),discriminatedUnion:(t,e)=>new T(t,e),object:t=>new E(t),openObject:(t,e)=>new N(t,e),extendedObject:(t,e)=>new E(A(A({},t._shape),e)),array:t=>new C(t),record:t=>new F(t),any:()=>new L,tuple:t=>new R(t),lazy:(t,e)=>new D(t,e)},B="data-px-animation-src",G="_px_animator",K={auto:"auto",webapi:"webapi",frames:"frames"},q={webapi:K.webapi,frames:K.frames},Z="text",X="textContent",Y=new Set(["type","children","animator","meta","animate",Z,X]),Q=W.union([W.string(),W.tuple([W.number(),W.number(),W.number(),W.number()])]),J=(W.union([W.string(),W.number(),W.array(W.number()),W.lazy(()=>et,{}),W.object({path:W.string()}),W.lazy(()=>W.object({paths:W.array(Ft)}),{paths:[]})]),W.object({time:W.number().optional(),t:W.number().optional(),value:W.any().optional(),v:W.any().optional(),easing:Q.optional(),e:Q.optional(),tangentOut:W.tuple([W.number(),W.number()]).optional(),to:W.tuple([W.number(),W.number()]).optional(),tangentIn:W.tuple([W.number(),W.number()]).optional(),ti:W.tuple([W.number(),W.number()]).optional(),selected:W.boolean().optional()})),H=W.object({segmentCount:W.number().optional(),before:W.boolean().optional(),alternate:W.boolean().optional()}),$=W.object({keyframes:W.array(J).optional(),kfs:W.array(J).optional(),loop:W.union([H,W.boolean()]).optional(),autoOrient:W.boolean().optional()}),tt=["translate","rotate","scale","origin"],et=W.object({translate:W.tuple([W.number(),W.number()]).optional(),rotate:W.number().optional(),skew:W.number().optional(),scale:W.tuple([W.number(),W.number()]).optional(),origin:W.tuple([W.number(),W.number()]).optional()}),nt=W.union([W.string(),W.object({value:et}),$]),rt=W.record($),ot=W.union([W.string(),W.array(W.union([W.string(),rt])),rt]),at=W.object({startOn:W.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:W.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:W.number().optional()}),it=W.object({width:W.number(),d:W.string()}),st=W.object({fFamily:W.string(),style:W.string(),ascent:W.number(),unitsPerEm:W.number(),glyphs:W.record(it)}),lt=W.object({easings:W.record(W.tuple([W.number(),W.number(),W.number(),W.number()])).optional(),animations:W.record(rt).optional(),styles:W.record(W.any()).optional(),glyphs:W.record(st).optional()}),ut=W.object({mode:W.enum([K.auto,K.webapi,K.frames]).optional(),duration:W.number().optional(),delay:W.number().optional(),iterations:W.union([W.number(),W.literal("infinite")]).optional(),fill:W.enum(["forwards","backwards","both","none"]).optional(),direction:W.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:W.number().optional(),trigger:at.optional(),resetOnFinish:W.boolean().optional(),definitions:lt.optional(),animate:W.record(ot).optional(),debug:W.boolean().optional(),debugInstName:W.string().optional()}),ct=W.object({id:W.string(),animate:ot}),ft=W.union([W.string(),W.number(),W.object({value:W.any()}),$]),dt=W.union([W.number(),W.object({value:W.number()}),W.object({keyframes:W.array(J),autoOrient:W.boolean().optional()})]),ht=W.union([W.tuple([W.number(),W.number()]),W.object({value:W.tuple([W.number(),W.number()])}),W.object({keyframes:W.array(J),autoOrient:W.boolean().optional()})]),pt=W.object({translate:ht.optional(),rotate:dt.optional(),scale:ht.optional(),skew:dt.optional(),origin:ht.optional()}),mt=W.object({copies:W.number().optional(),translate:ht.optional(),rotate:dt.optional(),scale:ht.optional(),origin:ht.optional()}),yt=W.object({href:W.string().optional(),maskType:W.string().optional(),maskUnits:W.string().optional(),maskContentUnits:W.string().optional()}),gt=W.object({d:W.string().optional(),animate:$.optional()}),vt=W.object({offset:dt.optional(),range:ht.optional(),trimAllAsOne:W.boolean().optional()}),bt=W.object({baseId:W.string().optional(),start:W.number().optional(),stretch:W.number().optional(),timeCrop:W.tuple([W.number(),W.number()]).optional()}),At=W.object({type:W.string().optional(),baseId:W.string().optional(),retime:bt.optional()}),kt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},wt={pad:"pad",reflect:"reflect",repeat:"repeat"},xt={linear:"linear",radial:"radial"},Pt=W.object({offset:W.number(),color:W.string()}),St=W.union([W.array(Pt),W.object({value:W.array(Pt)}),W.object({keyframes:W.array(J)})]),jt=W.object({type:W.enum([xt.linear,xt.radial]),p1:W.tuple([W.number(),W.number()]).optional(),p2:W.tuple([W.number(),W.number()]).optional(),c:W.tuple([W.number(),W.number()]).optional(),r:W.number().optional(),fp:W.tuple([W.number(),W.number()]).optional(),stops:St.optional(),gradientUnits:W.string().optional(),spreadMethod:W.string().optional(),gradientTransform:W.string().optional()}),Ot=jt,Mt=W.object({path:W.string(),pathOverflow:W.string().optional(),lengthAdjust:W.string().optional(),method:W.string().optional(),spacing:W.string().optional(),startOffset:dt.optional(),textLength:dt.optional()}),_t=W.object({useGlyphs:W.boolean().optional()}),It=W.object({transformation:pt.optional(),repeater:mt.optional(),maskedBy:yt.optional(),clipPath:gt.optional(),trimPath:vt.optional(),clone:At.optional(),isCombinedShape:W.boolean().optional(),fillGradient:jt.optional(),strokeGradient:Ot.optional(),textPath:Mt.optional(),text:_t.optional()});function zt(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!It.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]"))};return r(t,"root"),n}var Tt=W.openObject({type:W.string(),id:W.string().optional(),meta:W.any().optional(),effects:It.optional(),animate:ot.optional(),style:W.union([W.string(),W.record(W.union([W.string(),W.number()]))]).optional()},ft),Et=W.openObject(k(A({},Tt._shape),{children:W.lazy(()=>W.array(Et),[]).optional()}),ft),Nt=W.object({width:W.number().optional(),height:W.number().optional(),viewBox:W.string().optional(),animator:ut.optional()}),Ct=W.openObject(k(A(A({},Tt._shape),Nt._shape),{type:W.literal("svg"),children:W.array(Et).optional()}),ft),Ft=W.object({v:W.array(W.array(W.number())),i:W.array(W.array(W.number())).optional(),o:W.array(W.array(W.number())).optional(),c:W.boolean().optional()});function Lt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&("svg"===t.type||"svg"===t.tagName)}function Dt(t){const e=Ct.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Rt(t){var e,n;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)||(null==t?void 0:t.animation)||(null==(n=null==t?void 0:t.meta)?void 0:n.animation)}function Ut(t){var e;if(t)return null==(e=Rt(t))?void 0:e.definitions}function Vt(t){var e;if(!t)return;const n=null==(e=Rt(t))?void 0:e.animate;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Wt(t){return null==t?void 0:t.children}function Bt(t,e=!1){var n,r,o,a;const i=t.v,s=t.i,l=t.o,u=t.c;if(!i.length)return"";const c=[],f=i.length;c.push("M"+i[0][0]+","+i[0][1]);for(let t=1;t<f;t++){const o=i[t-1],a=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:i[t],f=i[t];!e&&a[0]===o[0]&&a[1]===o[1]&&u[0]===f[0]&&u[1]===f[1]?c.push("L"+f[0]+","+f[1]):c.push("C"+a[0]+","+a[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1])}if(u&&f>0){const t=i[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(a=null==s?void 0:s[0])?a:i[0],u=i[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function Gt(t,e,n){return t+(e-t)*n}function Kt(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=Gt(t[a]||0,e[a]||0,n);return r}function qt(t,e,n){return[Gt(t[0]||0,e[0]||0,n),Gt(t[1]||0,e[1]||0,n),Gt(t[2]||0,e[2]||0,n),Gt(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function Zt(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(Xt(t[a],e[a],n));return o}function Xt(t,e,n){var r,o,a,i,s,l,u,c,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),p=[],m=[],y=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(Kt(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,v=null!=(i=null==(a=e.i)?void 0:a[n])?i:h;m.push(Kt(g,v,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,A=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;y.push(Kt(b,A,d))}return{v:p,i:m.length?m:void 0,o:y.length?y:void 0,c:null!=(f=t.c)?f:e.c}}function Yt(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,a=1-r-o;function i(t){return((a*t+o)*t+r)*t}function s(t){return(3*a*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=i(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;u<c;){const t=i(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function Qt(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=Yt(e,r,t),((s*n+i)*n+a)*n;var n}}function Jt(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Ht(t,e){if(!t)return{left:void 0,right:void 0};if(e<=0)return{left:void 0,right:t};if(e>=1)return{left:t,right:void 0};const[n,r,o,a]=t,i=Yt(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=Jt(t,e,o),i=Jt(e,n,o),s=Jt(n,r,o),l=Jt(a,i,o),u=Jt(i,s,o),c=Jt(l,u,o);return{left:[t,a,l,c],right:[c,u,s,r]}}([0,0],s,l,[1,1],i),f=u[3][0],d=u[3][1];let h,p;f>1e-9&&Math.abs(d)>1e-9&&(h=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const m=1-f,y=1-d;return m>1e-9&&Math.abs(y)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/y,(c[2][0]-f)/m,(c[2][1]-d)/y]),{left:h,right:p}}function $t(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function te(t){const e=Math.round(255*t[0]),n=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+e+","+n+","+r+","+t[3]+")":"rgb("+e+","+n+","+r+")"}function ee(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const e=t.slice(1),n=e.length<=4,r=n?e[0]+e[0]:e.slice(0,2),o=n?e[1]+e[1]:e.slice(2,4),a=n?e[2]+e[2]:e.slice(4,6),i=4===e.length?e[3]+e[3]:8===e.length?e.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(a,16)/255];return null!==i&&s.push(parseInt(i,16)/255),s}(t):t.startsWith("rgb")?function(t){var e;const n=null==(e=t.match(/rgba?\((.*)\)/))?void 0:e[1];if(!n)throw new Error("Invalid rgb/rgba format");const r=n.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}var ne=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),re=new Set(["translate","rotate","scale","skew"]),oe=new Set(["offset-distance","offsetDistance"]);function ae(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],a=t.translate,i=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),i&&o.push("translate("+-i[0]+c+","+-i[1]+c+")"),o.join("")}var ie=new Set(["offset-distance","offsetDistance"]),se=1e3;function le(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function ue(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var ce=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function fe(t){return ce.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function de(t,e,n){return Math.max(e,Math.min(t,n))}function he(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const a=1-o,i=a*a,s=o*o,l=i*a,u=3*o*i,c=3*s*a,f=s*o;return[l*t[0]+u*e[0]+c*n[0]+f*r[0],l*t[1]+u*e[1]+c*n[1]+f*r[1]]}var pe=1e-4;function me(t,e,n,r,o){const a=ye(t,e,n,r,o);if(0===a[0]&&0===a[1]){return ye(t,e,n,r,o<.5?o+pe:o-pe)}return a}function ye(t,e,n,r,o){const a=1-o,i=3*a*a,s=6*o*a,l=3*o*o;return[i*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),i*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function ge(t,e,n,r,o=100){const a=o+1,i=new Float64Array(a),s=new Float64Array(a);let l=he(t,e,n,r,0);i[0]=0,s[0]=0;let u=0;for(let c=1;c<a;c++){const a=c/o,f=he(t,e,n,r,a),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),i[c]=a,s[c]=u,l=f}return{ts:i,ds:s}}function ve(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let a=1,i=o;for(;a<i;){const t=a+i>>>1;n[t]<e?a=t+1:i=t}const s=n[i-1],l=n[i]-s,u=l>0?(e-s)/l:0;return r[i-1]+u*(r[i]-r[i-1])}var be=0;function Ae(){return"_px_"+Date.now().toString(36)+(++be).toString(36)+Math.random().toString(36).substring(2,6)}function ke(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>ke(t));const e=t,n={};for(const t of Object.keys(e))n[t]=ke(e[t]);return n}function we(t){var e,n;const r=ke(t),o=new Map,a=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["baseId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Ae();o.set(t,n),e.id=n}else e.animate&&(e.id=Ae());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e){if(e&&"object"==typeof e)for(const[n,r]of Object.entries(e))if("children"!==n)if("string"==typeof r)if(a.has(n)&&r.startsWith("#")){const t=r.slice(1),a=o.get(t);a&&(e[n]="#"+a)}else if(i.has(n))e[n]=xe(r,o);else if(s.has(n)){const t=o.get(r);t&&(e[n]=t)}else r.includes("url(#")&&(e[n]=xe(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=xe(e,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const e of r)t(e)}(r);const l=null==(e=r.animator)?void 0:e.animate;if(l&&"object"==typeof l){const t={};for(const[e,r]of Object.entries(l)){t[null!=(n=o.get(e))?n:e]=r}r.animator=k(A({},r.animator),{animate:t})}return r}function xe(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Pe=new Set(["script","foreignobject"]),Se=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),je=new Set(["href","xlink:href","src"]),Oe=new Set(["mixBlendMode","isolation"]),Me=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,_e=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Ie=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,ze=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Te(t,e){const n=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(n)){if("fill"===n||"stroke"===n||"stopcolor"===n){const t=String(e);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+n+'" blocked: url() must be internal url(#id), got:',e):e}if(Se.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||je.has(n)&&(Me.test(t)||_e.test(t)||function(t){const e=Ie.exec(t);return!!e&&ze.some(t=>e[1].startsWith(t))}(t)))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or data:image/… URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function Ee(t){const e={};for(const n of Object.keys(t)){const r=le(n);if(Y.has(r))continue;if("style"===r)continue;let o=t[n];ne.has(r)&&Array.isArray(o)?e[r]=te(o):"transform"===r&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&o.value&&"object"==typeof o.value?e.transform=ae(o.value,{withUnits:!1}):re.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):null!=o&&(e[r]=String(o))}return e}function Ne(t){var e;const n=null!=(e=t.value)?e:t.v;if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const r=n.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function Ce(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Fe(t){var e;return null!=(e=t.easing)?e:t.e}function Le(t){var e,n,r;const o=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(n=t.tangentIn)?n:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var De=new WeakMap;function Re(t,e,n,r){var o,a;let i=De.get(t);const s=null==i?void 0:i.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(a=e.tangentIn)?a:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=ge(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return i||(i=new WeakMap,De.set(t,i)),i.set(e,h),h}function Ue(t,e,n,r,o,a){const i=Re(t,e,n,r),s=0===i.totalArc?o:function(t,e){const n=t.ds[t.ds.length-1],r=e*n,{ts:o,ds:a}=t,i=a.length-1;if(r<=0)return o[0];if(r>=a[i])return o[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;a[t]<r?s=t+1:l=t}const u=a[l-1],c=a[l]-u,f=c>0?(r-u)/c:0;return o[l-1]+f*(o[l]-o[l-1])}(i.lut,o),l=he(i.P0,i.P1,i.P2,i.P3,s);if(!a)return{translate:l};const u=me(i.P0,i.P1,i.P2,i.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var Ve=.5,We=5,Be=32;function Ge(t,e){var n,r,o,a;if(!Le(t))return t;const i=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(r=null==e?void 0:e.flatnessTolerance)?r:Ve,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:We,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:Be,f=[],d=Ne(i[0]);if(!d)return t;const h=s?function(t,e){const n=Ne(t),r=Ne(e);if(!n||!r)return 0;const o=Re(t,e,n,r),a=me(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(a[1],a[0])/Math.PI}(i[0],i[1]):void 0;f.push(qe(Ce(i[0]),Ye(Ze(i[0]),Ze(i[0]),0,d,h,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Ne(e),o=Ne(n);r&&o?(s&&t>0&&Je(f,e,n,r,o,u),$e(f,e,n,r,o,s,l,u,c)):f.push(qe(Ce(n),Ye(Ze(n),Ze(n),1,null!=o?o:[0,0],void 0,s)))}const p=Fe(i[i.length-1]);p&&(f[f.length-1].e=p),s&&Ke(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function Ke(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function qe(t,e){return{t:t,v:e}}function Ze(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Xe(t,e,n){if(void 0===t)return e;if(void 0===e)return t;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*n;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const a="number"==typeof t[o]?t[o]:0,i="number"==typeof e[o]?e[o]:0;r[o]=a+(i-a)*n}return r}return n<.5?t:e}function Ye(t,e,n,r,o,a){const i={translate:r},s=new Set;if(t)for(const e of Object.keys(t))s.add(e);if(e)for(const t of Object.keys(e))s.add(t);for(const r of s){if("translate"===r)continue;if("rotate"===r&&a)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(i[r]=Xe(o,s,n))}return void 0!==o&&(i.rotate=o+Qe(t,e,n)),i}function Qe(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const a=Xe(r,o,n);return"number"==typeof a?a:0}function Je(t,e,n,r,o,a){var i;const s=t[t.length-1],l=null!=(i=s.v)?i:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=Ze(e),f=u-Qe(c,c,0),d=Re(e,n,r,o),h=me(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(h[1],h[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(p,f);if(Math.abs(m)<=a)return;const y=Ce(e),g=Math.min(y+He,(y+Ce(n))/2),v=Ye(Ze(e),Ze(e),0,r,p,!0);t.push(qe(g,v))}var He=.05;function $e(t,e,n,r,o,a,i,s,l){const u=Re(e,n,r,o),c=Ce(e),f=Ce(n),d=Fe(e),h=(p=d)?Qt([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=Ze(e),y=Ze(n),g=function(t,e,n,r,o){const a=[];tn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),tn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],a),a.sort((t,e)=>t-e);const i=[0];for(const t of a)t>i[i.length-1]+1e-6&&t<.999999&&i.push(t);i.push(1);const s=[],l={remaining:o-i.length};for(let o=0;o<i.length-1;o++)en(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),v=[];for(const t of g){const e=ve(u.lut,t),n=de(u.totalArc>0?e/u.totalArc:t,0,1),r={u:de(h(n),0,1),p:n,pos:he(u.P0,u.P1,u.P2,u.P3,t)};if(a){const e=me(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}v.push(r)}let b=d,A=0;const k=t.length-1;for(let e=0;e<v.length;e++){const n=v[e],r=A<1?de((n.u-A)/(1-A),0,1):1,{left:o,right:i}=Ht(b,r),s=0===e?k:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=Ye(m,y,n.p,n.pos,n.rotateDeg,a);t.push(qe(l,u)),b=i,A=n.u}}function tn(t,e,n,r,o){const a=e-t,i=n-e,s=a-2*i+(r-n),l=2*(i-a),u=a;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function en(t,e,n,r,o,a,i,s){const l=(t+e)/2,u=he(r.P0,r.P1,r.P2,r.P3,t),c=he(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=he(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=he(r.P0,r.P1,r.P2,r.P3,l),p=he(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(nn(d,u,c),nn(h,u,c),nn(p,u,c));let y=!0;if(o){const n=me(r.P0,r.P1,r.P2,r.P3,t),o=me(r.P0,r.P1,r.P2,r.P3,e),a=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(a-s);l>180&&(l=360-l),l>i&&(y=!1)}m<=a&&y||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,en(t,l,n,r,o,a,i,s),en(l,e,n,r,o,a,i,s))}function nn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],a=r*r+o*o;if(a<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const i=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(i)/Math.sqrt(a)}function rn(t,e){const n=on(t,e);return null!=n?n:t}function on(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=on(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&Le(n)){const o=Ge(n,e);o!==n&&(r=k(A({},t),{transform:o}))}}if(!n&&!r)return null;const a=A({},t);return n&&(a.children=n),r&&(a.animate=r),a}function an(t){const e=[];let n;const r=function(t){const e=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),n=[];let r=null;for(const t of e)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},n.push(r);else if(r){const e=+t;r.values.push(Number.isNaN(e)?0:e)}return n}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;n={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},e.push(n);continue}if(n||(n={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},e.push(n)),"L"===r){const t=o[0]||0,e=o[1]||0;n.v.push([t,e]),n.i.push([t,e]),n.o.push([t,e])}else if("C"===r){const t=o[0]||0,e=o[1]||0,r=o[2]||0,a=o[3]||0,i=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([i,s]),n.i.push([r,a]),n.o.push([i,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function sn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function ln(t){return"string"==typeof t&&void 0!==sn(t)}function un(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=sn(t.path);return e?{paths:an(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&ln(e[0])){const t=[];for(const n of e){const e=sn(n);e&&t.push(...an(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&ln(t[0])){const e=[];for(const n of t){const t=sn(n);t&&e.push(...an(t))}return{paths:e}}return{paths:t}}if(ln(t)){return{paths:an(sn(t))}}return t}function cn(t,e){var n;if(t)return Array.isArray(t)?t:(null==(n=null==e?void 0:e.easings)?void 0:n[t])?e.easings[t]:void console.warn("Unknown easing name: "+t)}function fn(t,e){var n;if("string"==typeof t){const r=null==(n=null==e?void 0:e.animations)?void 0:n[t];return r||console.warn("Unknown animation name: "+t),r}return t}function dn(t,e,n,r){var o,a;if("d"===t){return{paths:Zt(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(a=null==n?void 0:n.paths)?a:Array.isArray(n)?n:[],r)}}return ne.has(t)?qt(e||[0,0,0,1],n||[0,0,0,1],r):"transform"!==t||"object"!=typeof e||null===e||Array.isArray(e)||"object"!=typeof n||null===n||Array.isArray(n)?"rotate"===t&&"number"==typeof e&&"number"==typeof n?Gt(e,n,r):re.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Kt(e||[],n||[],r):Gt(+(e||0),+(n||0),r):function(t,e,n){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=e?e:{})]),o={};for(const a of r){const r=null==t?void 0:t[a],i=null==e?void 0:e[a];if("rotate"===a||"skew"===a)o[a]=Gt(+(null!=r?r:0),+(null!=i?i:0),n);else if("translate"===a||"scale"===a||"origin"===a){const t="scale"===a?[1,1]:[0,0];o[a]=Kt(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function hn(t,e,n,r){var o,a,i,s,l;const u=e.length-1,c=de(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.before?e.slice(0,c+1):e.slice(u-c);const d=null!=(a=e[0].t)?a:0,h=null!=(i=e[e.length-1].t)?i:0;let p,m;n.before?(p=0,m=d):(p=h,m=r);const y=m-p;if(y<=0)return e;const g=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-g;if(v<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/v,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),A=Math.floor(y/v),k=y-A*v,w=k/v,x=[];function P(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?$t(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const a=void 0!==r?r:1;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT>a+1e-9){const i=o[n-1],s=r.relT-i.relT,l=(a-i.relT)/s,u=i.e?Qt(i.e)(l):l,c=dn(t,i.v,r.v,u),{left:f}=Ht(i.e,l);return x.length>0&&i.relT<=a&&(x[x.length-1].e=f),void x.push({t:e+a*v,v:c,e:void 0})}const i={t:e+r.relT*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(i.tangentIn=r.tangentIn),r.tangentOut&&(i.tangentOut=r.tangentOut),x.push(i)}}if(n.before){if(w>1e-9){!function(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?$t(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const a=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<a-1e-9)continue;const i=o[n-1];if(i&&i.relT<a-1e-9&&r.relT>a+1e-9){const n=r.relT-i.relT,o=(a-i.relT)/n,s=i.e?Qt(i.e)(o):o,l=dn(t,i.v,r.v,s),{right:u}=Ht(i.e,o);x.push({t:e,v:l,e:u})}const s={t:e+(r.relT-a)*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),x.push(s)}}(p,!!n.alternate&&A%2==0,w)}for(let t=0;t<A;t++){const e=A-1-t,r=!!n.alternate&&e%2==0;P(p+k+t*v,r)}}else{for(let t=0;t<A;t++){const e=!!n.alternate&&t%2==0;P(p+t*v,e)}if(w>1e-9){const t=!!n.alternate&&A%2==0;P(p+A*v,t,w)}}return n.before?[...x,...e]:[...e,...x]}function pn(t,e,n,r){var o,a,i,s,l,u,c;const f=e.keyframes||e.kfs||[],d=[];for(const e of f){const n=null!=(a=null!=(o=e.time)?o:e.t)?a:0;let f=null!=(i=e.value)?i:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=un(f));const p=ue(t)?fe(t):t;ne.has(p)&&(f=null!=(l=ee(f))?l:f);const m={t:n,v:f,e:cn(h,r)},y=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;y&&(m.tangentIn=y),g&&(m.tangentOut=g),d.push(m)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,p=!0===h?{}:h||void 0;return p&&d.length>=2?hn(t,d,p,n):d}function mn(t,e,n){var r;const o=e.loop;if(null==o||!1===o)return e;const a=!0===o?{}:o,i=null!=(r=e.keyframes)?r:e.kfs;if(!Array.isArray(i)||i.length<2)return e;const s=ue(t)?fe(t):t,l=ne.has(s),u=i.map(e=>{var n,r,o,a,i,s,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=un(d)),l&&(d=null!=(o=ee(d))?o:d);const h={t:f,v:d,e:null!=(a=e.e)?a:e.easing};return(null!=(i=e.tangentIn)?i:e.ti)&&(h.tangentIn=null!=(s=e.tangentIn)?s:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),c={kfs:hn(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function yn(t,e){const n=gn(t,e);return null!=n?n:t}function gn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=gn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const n of Object.keys(t)){const o=t[n],a=mn(n,o,e);a!==o&&(r||(r=A({},t)),r[n]=a)}}if(!n&&!r)return null;const a=A({},t);return n&&(a.children=n),r&&(a.animate=r),a}var vn=0;function bn(t,e=q.webapi){const n=Rt(t)||{},r=Ut(t),o=n.duration||1e3,a=[],i=(t,n)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=fn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=fn(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const i=function(t,e,n,r=q.webapi){const o={};for(const[a,i]of Object.entries(t)){const t=pn(a,i,e,n);if(t.length>0){const e={kfs:t};void 0!==i.autoOrient&&(e.autoOrient=i.autoOrient),void 0!==i.loop&&(e.loop=i.loop),o[a]=r===q.webapi&&"transform"===a?Ge(e):e}}return o}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),o,r,e);return 0===Object.keys(i).length?null:{id:t,animate:i}},s=Vt(t);if(s)for(const t of s){const e=i(t.id,t.animate);e&&a.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++vn;t.id=n;const r=i(n,e);r&&a.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e]);return a}function An(t,e,n){var r,o,a,i,s,l,u;const c=e.kfs||e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let a=t[0],i=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){a=t[s],i=t[s+1];break}e>u&&s===o-1&&(a=t[o>0?o-1:0],i=t[o])}return{prevKf:a,nextKf:i}}(c,n);let h=f===d?0:(p=n,m=null!=(r=f.t)?r:0,y=null!=(o=d.t)?o:0,g=0,v=1,y===m?g:g+(p-m)/(y-m)*(v-g));var p,m,y,g,v;h=de(h,0,1);const b=null!=(a=f.e)?a:f.easing;if(b&&Array.isArray(b))try{h=Qt(b)(h)}catch(t){}let A=ue(t)?fe(t):t,k=null;const w=null!=(i=null==f?void 0:f.v)?i:null==f?void 0:f.value,x=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===A){k=Zt(null!=(l=null==w?void 0:w.paths)?l:Array.isArray(w)?w:[],null!=(u=null==x?void 0:x.paths)?u:Array.isArray(x)?x:[],h).map(t=>Bt(t)).join("")}else if(ne.has(A))k=te(qt(w||[0,0,0,1],x||[0,0,0,1],h)),A=t;else if("stroke-dasharray"===A)k=Kt(w||[],x||[],h).join(" "),A=t;else if("transform"!==A||null===w||"object"!=typeof w||Array.isArray(w))if("translate"===A){k="translate("+Kt(w||[0,0],x||[0,0],h).join(",")+")",A="transform"}else if("rotate"===A){k="rotate("+Gt(+(w||0),+(x||0),h)+")",A="transform"}else if("scale"===A){k="scale("+Kt(w||[1,1],x||[1,1],h).join(",")+")",A="transform"}else{k=Gt(+(w||0),+(x||0),h)}else{const t=new Set([...w?Object.keys(w):[],...x?Object.keys(x):[]]),n={};for(const e of t){const t=null==w?void 0:w[e],r=null==x?void 0:x[e];if("rotate"===e||"skew"===e)n[e]=Gt(+(null!=t?t:0),+(null!=r?r:0),h);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],a=Kt(t||o,r||o,h);n[e]=a}}if(Le(e)){const t=w.translate,r=x.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Ue(f,d,[+t[0],+t[1]],[+r[0],+r[1]],h,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}k=ae(n,{withUnits:!1}),A="transform"}return oe.has(A)&&"number"==typeof k&&(k=100*k+"%"),{k:A,v:null===k?"":""+k}}function kn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=An(r,o,e);t&&(n[t.k]=t.v)}return n}function wn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(wn);const e={};for(const n of Object.keys(t))e[n]=wn(t[n]);return e}function xn(t,e){const n=new Map,r=t=>{var o;if("string"==typeof t.id){const r=e();n.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t}),a=t=>{var e;if("string"==typeof t.href&&t.href.startsWith("#")){const e=n.get(t.href.slice(1));e&&(t.href="#"+e)}for(const e of Object.keys(t)){if("children"===e||"effects"===e||"meta"===e||"animate"===e||"href"===e||"id"===e)continue;const n=t[e];"string"==typeof n&&-1!==n.indexOf("url(#")&&(t[e]=o(n))}null==(e=t.children)||e.forEach(a)};return a(t),n}function Pn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Sn(t){var e;const n=Pn(t.x),r=Pn(t.y);if(delete t.x,delete t.y,!n&&!r)return t;const o="translate("+n+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const n={type:"g",transform:o,children:null!=(e=t.children)?e:[]};t.children=[n]}else t.transform=o;return t}function jn(t){var e;const n=function(t){const e=new Map,n=t=>{var r;"string"==typeof t.id&&e.set(t.id,t),null==(r=t.children)||r.forEach(n)};return n(t),e}(t),r=function(t,e){const n=new WeakMap,r=new Set,o=(t,r)=>{const a=n.get(t);if(void 0!==a)return a;if(r.has(t))return!1;r.add(t);let i=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){i=!0;break}if(!i&&t.children)for(const e of t.children)if(o(e,r)){i=!0;break}if(!i&&"use"===t.type&&"string"==typeof t.href){const n=Mn(t.href),a=n?e.get(n):void 0;a&&(i=o(a,r))}return r.delete(t),n.set(t,i),i};for(const[t,n]of e)o(n,new Set)&&r.add(t);return r}(0,n);if(0===r.size)return t;let o=0;const a=function(t){const e=In(t.viewBox);if(e)return[e[2],e[3]];const n=On(t.width),r=On(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),i=[],s=zn(t,n,r,()=>"_lw_use_mat_"+ ++o,i,a);if(0===i.length)return s;const l={type:"defs",children:i},u=[...null!=(e=s.children)?e:[],l];return k(A({},s),{children:u})}function On(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Mn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function _n(t,e,n,r,o,a,i){var s,l,u,c;const f=wn(e);xn(f,o);const d="symbol"===f.type?In(f.viewBox):void 0,h=null!=(l=null!=(s=On(t.width))?s:null==d?void 0:d[2])?l:i[0],p=null!=(c=null!=(u=On(t.height))?u:null==d?void 0:d[3])?c:i[1],m="symbol"===f.type?function(t,e,n,r,o){const a=In(t.viewBox),i=k(A({},t),{type:"g"});if(delete i.viewBox,delete i.preserveAspectRatio,delete i.width,delete i.height,!a)return i;const[s,l,u,c]=a,f=u>0&&c>0?Math.min(r/u,o/c):1,d=(r-u*f)/2,h=(o-c*f)/2,p=[];0===d&&0===h||p.push("translate("+d+","+h+")");1!==f&&p.push("scale("+f+")");0===s&&0===l||p.push("translate("+-s+","+-l+")");p.length&&(i.transform=p.join(""));const m=e();return n.push({type:"clipPath",id:m,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),i.clipPath="url(#"+m+")",i}(f,o,a,h,p):f,y=zn(m,n,r,o,a,i),g=k(A({},t),{type:"g",children:[y]});return delete g.href,delete g.width,delete g.height,Sn(g)}function In(t){if("string"!=typeof t)return;const e=t.trim().split(/[\s,]+/).map(Number);return e.length<4||e.some(t=>!Number.isFinite(t))?void 0:[e[0],e[1],e[2],e[3]]}function zn(t,e,n,r,o,a){if("use"===t.type&&"string"==typeof t.href){const i=Mn(t.href);if(i&&n.has(i)){const s=e.get(i);if(s)return _n(t,s,e,n,r,o,a)}}if(!t.children)return t;let i=!1;const s=t.children.map(t=>{const s=zn(t,e,n,r,o,a);return s!==t&&(i=!0),s});return i?k(A({},t),{children:s}):t}function Tn(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function En(t){if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const e=t;if(e.keyframes)return{kind:"animated",keyframes:e.keyframes,autoOrient:e.autoOrient,loop:e.loop};if(void 0!==e.value)return{kind:"static",value:e.value}}return{kind:"static",value:t}}function Nn(t,e){const n={value:e};return void 0!==t.time&&(n.time=t.time),void 0!==t.easing&&(n.easing=t.easing),void 0!==t.tangentOut&&(n.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(n.tangentIn=t.tangentIn),n}function Cn(t,e,n){if(!e)return t;delete t.transform;let r=t;var o;return r=Ln(r,e.origin,!0),r=Fn(r,"scale",void 0===(o=e.scale)?void 0:Array.isArray(o)?[o[0]/100,o[1]/100]:o,n),r=Fn(r,"skew",e.skew,n),r=Fn(r,"rotate",e.rotate,n),r=Ln(r,e.origin,!1),!function(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}(e.translate)?r=Fn(r,"translate",e.translate,n):(r=Ln(r,e.origin,!0),r=Fn(r,"translate",e.translate,n),r=Ln(r,e.origin,!1)),r}function Fn(t,e,n,r){if(void 0===n)return t;const o=En(n);if("static"===o.kind)return{type:"g",transform:{value:Tn(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Nn(t,Tn(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),void 0!==o.loop&&(n.loop=o.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Ln(t,e,n){if(void 0===e)return t;const r=En(e),o=t=>n?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const e={keyframes:r.keyframes.map(t=>Nn(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Dn(t,e,n){var r,o,a;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=t.effects.clone.baseId;"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(a=t.children)||a.forEach(t=>Dn(t,e,n))}function Rn(t,e,n,r,o){const a=function(t,e){var n,r,o;const a={};let i=!1;const s=null==(n=t.animate)?void 0:n.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const e=s.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=Vn(s),r={keyframes:e.map(t=>{const e=t.value||{},r={};void 0!==e.translate&&(r.translate=e.translate),n&&void 0!==e.origin&&(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};s.autoOrient&&(r.autoOrient=!0);const o=s.loop;void 0!==o&&(r.loop=o),a.animate={transform:r};const l=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),u=e.map(t=>{const e=t.value||{},r={};void 0!==e.rotate&&(r.rotate=e.rotate),void 0!==e.scale&&(r.scale=e.scale),void 0===e.origin||n&&!l||(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(u.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:u};void 0!==o&&(e.loop=o),t.animate.transform=e}i=!0}}const l=void 0!==(null==e?void 0:e.translate),u=i||l,c=i&&Vn((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&Vn((null==(o=a.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const e=function(t){const e=[],n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);)e.push({name:r[1],full:r[0]});if(!e.length)return{rest:t||void 0};if(e.every(t=>"translate"===t.name))return{translate:e.map(t=>t.full).join("")};const o=e[0],a=e[e.length-1];if("translate"===a.name&&"translate"===o.name){const n=Un(a.full),r=Un(o.full),i=-n[0],s=-n[1],l=r[0]-i,u=r[1]-s;if(0===l&&0===u)return{rest:t};return{translate:"translate("+l+","+u+")",rest:"translate("+i+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===a.name)return{rest:t};const i=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)i.push(e[s].full),s++;if(!i.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:i.join(""),rest:l||void 0}}(t.transform);u?void 0!==e.translate?e.rest?t.transform=e.rest:delete t.transform:!function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,n=[];let r;for(;r=e.exec(t);)n.push({name:r[1],full:r[0]});if(1!==n.length)return!1;if("translate"===n[0].name)return!0;if("matrix"!==n[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(n[0].full);if(!o)return!1;const a=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return a.length>=4&&1===a[0]&&0===a[1]&&0===a[2]&&1===a[3]}(t.transform)?c&&function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let n,r=0,o=!1;for(;n=e.exec(t);)r++,"matrix"===n[1]&&(o=!0);return 1===r&&o}(t.transform)&&delete t.transform:delete t.transform:e.translate&&(a.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}return a}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:s}=function(t){if(!t)return{};const e=Vn(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};void 0!==t.translate&&(r.translate=t.translate);e&&void 0!==t.origin&&(r.origin=t.origin);void 0!==t.rotate&&(o.rotate=t.rotate);void 0!==t.scale&&(o.scale=t.scale);void 0!==t.skew&&(o.skew=t.skew);void 0===t.origin||e&&!n||(o.origin=t.origin);return{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let l=t;l=Cn(l,s,o);let u={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==a.transform&&(u.transform=a.transform),void 0!==a.animate&&(u.animate=a.animate),i&&(delete u.id,u=Cn(u,i,o),u.id=n),u}function Un(t){const e=/translate\(([^)]*)\)/.exec(t);if(!e)return[0,0];const n=e[1].split(/[\s,]+/).filter(Boolean).map(Number);return[n[0]||0,n[1]||0]}function Vn(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||!!Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}function Wn(t,e){return"_lw_"+e+"_"+t.nextId++}function Bn(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Gn(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Gn(t,e))}var Kn=wn;function qn(t,e,n,r){if(!e)return t;const o=Wn(n,"grad"),a=function(t,e){const n={type:t.type===xt.radial?"radialGradient":"linearGradient",id:e};t.type===xt.linear?(t.p1&&(n.x1=String(t.p1[0]),n.y1=String(t.p1[1])),t.p2&&(n.x2=String(t.p2[0]),n.y2=String(t.p2[1]))):(t.c&&(n.cx=String(t.c[0]),n.cy=String(t.c[1])),void 0!==t.r&&(n.r=String(t.r)),t.fp&&(n.fx=String(t.fp[0]),n.fy=String(t.fp[1])));t.gradientUnits&&(n.gradientUnits=t.gradientUnits);t.spreadMethod&&(n.spreadMethod=t.spreadMethod);t.gradientTransform&&(n.gradientTransform=t.gradientTransform);const r=t.animate;if(r){const t={};for(const e of Object.keys(r)){const n=Zn[e];n&&(t[n]=r[e])}Object.keys(t).length&&(n.animate=t)}return n.children=function(t){var e,n,r,o;if(!t)return[];if(Array.isArray(t))return t.map(Xn);if("object"==typeof t&&Array.isArray(t.value))return t.value.map(Xn);const a=t,i=a.keyframes;if(!Array.isArray(i)||!i.length)return[];const s=a.loop;let l=0;for(const t of i){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>l&&(l=n.length)}if(!l)return[];const u=null!=(n=i[0].value)?n:i[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:Yn(i,0,t))?o:{offset:t/Math.max(1,l-1),color:"#000000"};c.push({offset:e.offset,color:e.color})}return c.map((t,e)=>function(t,e,n,r,o){var a,i,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(i=null!=(a=r.time)?a:r.t)?i:0,h=null!=(s=r.value)?s:r.v,p=null!=(l=null==h?void 0:h[n])?l:Yn(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,y={time:o,value:p.color};void 0!==m&&(y.easing=m),c.push(y);const g={time:o,value:p.offset};void 0!==m&&(g.easing=m),f.push(g),p.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:Qn(t.offset),stopColor:t.color},p={};c.length&&(p.stopColor={keyframes:c},void 0!==o&&(p.stopColor.loop=o));d&&f.length&&(p.offset={keyframes:f},void 0!==o&&(p.offset.loop=o));Object.keys(p).length&&(h.animate=p);return h}(t,i,e,0,s))}(t.stops),n}(e,o);return n.defs.push(a),t[r]="url(#"+o+")",t}var Zn={gradientX1:"x1",gradientY1:"y1",gradientX2:"x2",gradientY2:"y2",gradientCx:"cx",gradientCy:"cy",gradientFx:"fx",gradientFy:"fy",gradientR:"r"};function Xn(t){return{type:"stop",offset:Qn(t.offset),stopColor:t.color}}function Yn(t,e,n){var r,o;for(let o=e;o>=0;o--){const e=null!=(r=t[o].value)?r:t[o].v;if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=null!=(o=t[r].value)?o:t[r].v;if(null==e?void 0:e[n])return e[n]}}function Qn(t){return Math.round(1e3*t)/10+"%"}function Jn(t,e,n,r){if(!e)return t;if(!e.href)return r.errors.push("maskedBy.href missing — cannot build mask"),t;const o=Wn(r,"mask");let a={type:"use",href:"#"+e.href};if(n)a=Hn(a,n,r);else if(nr(t))a=function(t,e){var n;const r=e.animate&&"object"==typeof e.animate&&!Array.isArray(e.animate)?e.animate:void 0,o=null==r?void 0:r.transform,a=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!a||!a.length)return t;const i=[],s=[],l=[];for(const t of a){const e=(null!=(n=t.value)?n:t.v)||{},r=Nn(t,void 0);if(Array.isArray(e.translate)&&i.push(k(A(A({},r),er(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(k(A({},r),{value:t}))}if(Array.isArray(e.scale)){const t={scale:[1/e.scale[0],1/e.scale[1]]};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),l.push(k(A({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let f=t;i.length&&(f={type:"g",animate:{transform:c(i)},children:[f]});s.length&&(f={type:"g",animate:{transform:c(s)},children:[f]});l.length&&(f={type:"g",animate:{transform:c(l)},children:[f]});return f}(a,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,a,i,s,l,u,c,f,d,h;const p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const y=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);y.push({name:m[1],args:t})}if(!y.length)return;const g=y[y.length-1];if("translate"===g.name)for(let t=y.length-2;t>=0;t--){const c=y[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,p=null!=(o=g.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.origin=[f,d];for(let e=0;e<t;e++)if("translate"===y[e].name){const t=null!=(a=y[e].args[0])?a:0,n=null!=(i=y[e].args[1])?i:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<y.length-1;e++){const t=y[e];if("rotate"===t.name)m.rotate=(null!=(s=m.rotate)?s:0)+(null!=(l=t.args[0])?l:0);else if("scale"===t.name){const e=null!=(u=t.args[0])?u:1,n=t.args.length>1?t.args[1]:e;m.scale=m.scale?[m.scale[0]*e,m.scale[1]*n]:[e,n]}}return m}let v,b,A;for(const t of y)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;v=v?[v[0]+e,v[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;A=A?[A[0]*e,A[1]*n]:[e,n]}const k={};v&&(k.translate=v);void 0!==b&&(k.rotate=b);A&&(k.scale=A);return Object.keys(k).length?k:void 0}(t.transform);if(!e)return;const n={};return e.translate&&(n.translate=e.translate),void 0!==e.rotate&&(n.rotate=e.rotate),e.scale&&(n.scale={value:e.scale}),e.origin&&(n.origin=e.origin),Object.keys(n).length?n:void 0}return}(t);e&&(a=Hn(a,e,r))}const i=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||nr(t))}(t);a=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?ir(e,r):void 0,l=s?[...i,s]:i,u=a&&r.maskAncestorChains.get(a)||[];if(!l.length&&!u.length)return t;const c=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);for(const t of u)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);if(!(c.size>0)){const e=rr(l),n=rr(u),r=n[0]-e[0],o=n[1]-e[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}const f=Array.from(c).sort((t,e)=>t-e);return{type:"g",animate:{transform:{keyframes:f.map(t=>{const e=or(l,t),n=or(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,e.href,r,i);const s={type:"mask",id:o,children:[a]};return e.maskType&&(s.maskType=e.maskType),e.maskUnits&&(s.maskUnits=e.maskUnits),e.maskContentUnits&&(s.maskContentUnits=e.maskContentUnits),r.defs.push(s),t.mask="url(#"+o+")",t}function Hn(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=En(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformation.origin: animated origin approximated by its first keyframe"),null==(n=r.keyframes[0])?void 0:n.value)}(e.origin,n);let o=t;return o=$n(o,"translate",e.translate,void 0,n),o=$n(o,"rotate",e.rotate,r,n),o=$n(o,"scale",e.scale,r,n),o}function $n(t,e,n,r,o){if(void 0===n)return t;const a=En("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===a.kind)return{type:"g",transform:{value:Tn(e,tr(e,a.value),r)},children:[t]};if("animated"===a.kind){const n={keyframes:a.keyframes.map(t=>{const n=Nn(t,Tn(e,tr(e,t.value),r));return"translate"===e?A(A({},n),er(t)):n})};return void 0!==a.loop&&(n.loop=a.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function tr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function er(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,a=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(a)&&(r.tangentIn=[-a[0],-a[1]]),r}function nr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function rr(t){let e=0,n=0;for(const r of t)r.translate&&(e+=r.translate[0],n+=r.translate[1]);return[e,n]}function or(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=ar(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function ar(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],a=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*a,r.value[1]+(o.value[1]-r.value[1])*a]}return t[t.length-1].value}function ir(t,e){var n,r,o;const a=t.transform,i=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===a&&!i)return;const s={};if("string"==typeof a){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,a=0,i=!1,s=!1;for(;null!==(r=n.exec(t));){const t=r[1],e=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=e[0]||0,a+=e[1]||0,i=!0):s=!0}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return i?[o,a]:void 0}(a,e);t&&(s.translate=t)}else if(a&&"object"==typeof a){const t=a.value;t&&"object"==typeof t&&Array.isArray(t.translate)&&(s.translate=[t.translate[0]||0,t.translate[1]||0]),!t||void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(i&&Array.isArray(i.keyframes)){const t=i.keyframes,a=[];for(const i of t){const t=null!=(n=i.value)?n:i.v,s=null!=(o=null!=(r=i.time)?r:i.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(a.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}a.length&&(s.translateKeyframes=a)}return s.translate||s.translateKeyframes?s:void 0}var sr="content";function lr(t,e,n){if(!e)return;const r=e.baseId;if(!r)return void(e.type===sr&&n.errors.push("clone: content ref missing baseId"));const o=e.type===sr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function ur(t,e){const n={};return void 0!==t.translate&&(n.translate=function(t,e){if(Array.isArray(t))return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return k(A({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?k(A({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return k(A({},n),{value:e(n.value)})}return t}(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=function(t,e){if("number"==typeof t)return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return k(A({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?k(A({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return k(A({},n),{value:e(n.value)})}return t}(t.rotate,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0]/100,e),Math.pow(t[1]/100,e)],r=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];if(Array.isArray(t))return{value:n(t)};if(t&&"object"==typeof t){const e=t;if(Array.isArray(e.keyframes))return k(A({},e),{keyframes:e.keyframes.map(t=>t&&void 0!==t.value?k(A({},t),{value:r(t.value)}):t)});if(void 0!==e.value)return k(A({},e),{value:n(e.value)})}return t}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}var cr=!1;function fr(t){var e,n;return t.timeCrop&&console.warn("retime: `timeCrop` is not supported yet and will be ignored"),{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}function dr(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function hr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function pr(t){var e;const n=null==(e=t.effects)?void 0:e.clone;n&&(delete n.retime,0===Object.keys(n).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function mr(t,e,n){const r=Bn(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=yr(r,e,n,new Set);if(o)if(cr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Sn(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function yr(t,e,n,r){if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const o=n.idMap.get(t);if(!o)return void n.warnings.push('retime: target "'+t+'" not found');const a=Kn(o);if(function(t,e){xn(t,()=>Wn(e,"retimed"))}(a,n),"use"===o.type?vr(a,e.start,e.stretch):gr(a,e.start,e.stretch),pr(a),"use"===o.type&&o.href){const i=Bn(o.href);if(i){const s=hr(o),l=s?dr(fr(s),e):e,u=new Set(r);u.add(t);const c=yr(i,l,n,u);c&&(a.href="#"+c)}}else!function(t,e,n,r,o){const a=t=>{var i;const s=hr(t);if("use"===t.type&&s&&t.href){const a=Bn(t.href);if(a){const i=dr(fr(s),e),l=new Set(r);l.add(o);const u=yr(a,i,n,l);u&&(t.href="#"+u)}pr(t)}null==(i=t.children)||i.forEach(a)};a(t)}(a,e,n,r,t);return n.defs.push(a),"string"==typeof a.id&&n.idMap.set(a.id,a),"string"==typeof a.id?a.id:void 0}function gr(t,e,n){var r;vr(t,e,n),null==(r=t.children)||r.forEach(t=>gr(t,e,n))}function vr(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var br=48,Ar=/[MmLlHhVvCcSsQqTtAaZz]/;function kr(t,e,n){return{P1:[t[0]+2/3*(e[0]-t[0]),t[1]+2/3*(e[1]-t[1])],P2:[n[0]+2/3*(e[0]-n[0]),n[1]+2/3*(e[1]-n[1])]}}function wr(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,a=0,i=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),p=(t,e,r)=>{const i=[o,a],s=ge(i,t,e,r,br);n.push({P0:i,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],a=r[1]},m=(t,e)=>{p([o+(t-o)/3,a+(e-a)/3],[o+2*(t-o)/3,a+2*(e-a)/3],[t,e])};for(;r<e.length;){let t=e[r];Ar.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",y=t.toUpperCase();if("Z"!==y){if("M"===y){const e=h()+(n?o:0),r=h()+(n?a:0);o=e,a=r,i=e,s=r,d=t;continue}if("L"===y)m(h()+(n?o:0),h()+(n?a:0));else if("H"===y)m(h()+(n?o:0),a);else if("V"===y)m(o,h()+(n?a:0));else if("C"===y){const t=[h()+(n?o:0),h()+(n?a:0)],e=[h()+(n?o:0),h()+(n?a:0)],r=[h()+(n?o:0),h()+(n?a:0)];l=e[0],u=e[1],p(t,e,r)}else if("S"===y){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*a-u]:[o,a],e=[h()+(n?o:0),h()+(n?a:0)],r=[h()+(n?o:0),h()+(n?a:0)];l=e[0],u=e[1],p(t,e,r)}else if("Q"===y){const t=[h()+(n?o:0),h()+(n?a:0)],e=[h()+(n?o:0),h()+(n?a:0)];c=t[0],f=t[1];const{P1:r,P2:i}=kr([o,a],t,e);p(r,i,e)}else if("T"===y){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*a-f]:[o,a],e=[h()+(n?o:0),h()+(n?a:0)];c=t[0],f=t[1];const{P1:r,P2:i}=kr([o,a],t,e);p(r,i,e)}else{if("A"!==y){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?a:0))}d=t}else m(i,s),o=i,a=s,d=t}return n.length?n:null}(t);if(!e)return null;const n=new Float64Array(e.length+1);for(let t=0;t<e.length;t++)n[t+1]=n[t]+e[t].len;const r=n[e.length],o=e[0].P0,a=e[e.length-1].P3,i=Math.hypot(a[0]-o[0],a[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],a=t-n[r],i=o.len>0?function(t,e){const{ts:n,ds:r}=t,o=r.length-1;if(e<=0)return n[0];if(e>=r[o])return n[o];let a=1,i=o;for(;a<i;){const t=a+i>>>1;r[t]<e?a=t+1:i=t}const s=r[i-1],l=r[i]-s,u=l>0?(e-s)/l:0;return n[i-1]+u*(n[i]-n[i-1])}(o.lut,a):0,[s,l]=he(o.P0,o.P1,o.P2,o.P3,i),[u,c]=me(o.P0,o.P1,o.P2,o.P3,i);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:i,sampleAtDistance(t){if(i&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!i&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var xr=.15;function Pr(t){if("number"==typeof t)return{min:t,max:t};if(t&&"object"==typeof t){const e=t;if("number"==typeof e.value)return{min:e.value,max:e.value};if(Array.isArray(e.keyframes)&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}}return{min:0,max:0}}function Sr(t){let e=0,n=16;const r=t=>{var o,a;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(n=Math.max(n,i));const s=null!=(a=t.text)?a:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var jr=t=>Math.round(1e3*t)/1e3;function Or(t,e){if(!e||null==t)return t;if("number"==typeof t)return t+e;const n=t;return"number"==typeof n.value?k(A({},n),{value:n.value+e}):Array.isArray(n.keyframes)?k(A({},n),{keyframes:n.keyframes.map(t=>k(A({},t),{value:(Number(t.value)||0)+e}))}):t}function Mr(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=wr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,a=xr*o,i=Pr(e.startOffset),s=Pr(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-i.min),u=Math.max(0,i.max+s-o),c=l>0?l+a:0,f=u>0?u+a:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let p=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+jr(e)+","+jr(n)+"L"+jr(d.x)+","+jr(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+jr(t)+","+jr(e)}return{d:p,startShift:c}}function _r(t,e,n){if(null!=n)if("number"!=typeof n){if("object"==typeof n&&null!==n){const r=n;if(Array.isArray(r.keyframes)){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,o=A({},n||{}),a={keyframes:r.keyframes};return void 0!==r.loop&&(a.loop=r.loop),o[e]=a,void(t.animate=o)}if("number"==typeof r.value)return void(t[e]=String(r.value))}}else t[e]=String(n)}var Ir=(t,e,n)=>{const r={type:t};for(const t in e)void 0!==e[t]&&(r[t]=e[t]);const o=Array.isArray(n)?n.filter(t=>null!=t):null!=n?[n]:[];return o.length&&(r.children=o),r};function zr(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Tr(t,e){let n="";for(let r=0;r<t.length;r++){const o=zr(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Er(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Nr=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Cr(t,e,n=2){const r=[];let o;for(Nr.lastIndex=0;null!==(o=Nr.exec(t));)r.push(o[0]);let a="",i=0;const s=()=>parseFloat(r[i++]);for(;i<r.length;){const t=r[i++];if("M"===t||"L"===t){const[r,o]=Er(e,s(),s());a+=t+Tr([r,o],n)}else if("C"===t){const[t,r]=Er(e,s(),s()),[o,i]=Er(e,s(),s()),[l,u]=Er(e,s(),s());a+="C"+Tr([t,r,o,i,l,u],n)}else if("Q"===t){const[t,r]=Er(e,s(),s()),[o,i]=Er(e,s(),s());a+="Q"+Tr([t,r,o,i],n)}else"Z"!==t&&"z"!==t||(a+="Z")}return a}var Fr=16,Lr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Z,X,"xml:space"];function Dr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Rr(t){return"string"==typeof t?t:void 0}function Ur(t,e){var n,r,o,a,i,s,l;return{fontFamily:null!=(n=Rr(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Dr(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(a=t.stroke)?a:e.stroke,strokeWidth:null!=(i=t.strokeWidth)?i:e.strokeWidth,letterSpacing:null!=(s=Dr(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Dr(t.wordSpacing))?l:e.wordSpacing}}function Vr(t){var e,n,r;return{fontFamily:Rr(t.fontFamily),fontSize:null!=(e=Dr(t.fontSize))?e:Fr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Dr(t.letterSpacing))?n:0,wordSpacing:null!=(r=Dr(t.wordSpacing))?r:0}}function Wr(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function Br(t,e,n,r){var o;const a=t.fontFamily?e[t.fontFamily]:n;return a||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),a}function Gr(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var Kr=.6;function qr(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,a=.92*-e,i=o-r,s=-a,l=Math.max(1,.12*Math.min(i,s)),u="M"+r+" 0L"+o+" 0L"+o+" "+a+"L"+r+" "+a+"Z";if(i<=2*l||s<=2*l)return u;const c=r+l,f=o-l,d=-l,h=a+l;return u+"M"+c+" "+d+"L"+c+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function Zr(t,e){var n,r,o,a;const{glyphs:i,create:s=Ir,warnings:l}=e,u=Gr(i),c={x:null!=(n=Dr(t.x))?n:0,y:null!=(r=Dr(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{var n;const r=Br(e,i,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,p=Wr(e);for(let n=0;n<t.length;n++){const i=t.charAt(n),l=null==r?void 0:r.glyphs[i];if(l&&l.d)f.push({glyphD:l.d,m:[a,0,0,a,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:a}),c.x+=l.width*a;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:Kr*o;f.push({glyphD:qr(t,s),m:[a,0,0,a,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:a}),c.x+=t*a}else c.x+=(l?l.width:0)*a;c.x+=e.letterSpacing+(" "===i?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,a;const i=Ur(t,e),s=Dr(t.x),l=Dr(t.y);void 0!==s&&(c.x=s,h=d.length,d.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(n=Dr(t.dx))?n:0,c.y+=null!=(r=Dr(t.dy))?r:0;const u=null!=(o=Rr(t[Z]))?o:Rr(t[X]);if(u&&!(null==(a=t.children)?void 0:a.length)&&p(u,i),t.children)for(const e of t.children)m(e,i)},y=Vr(t);if(t.children)for(const e of t.children)m(e,y);const g=null!=(o=Rr(t[Z]))?o:Rr(t[X]);g&&!(null==(a=t.children)?void 0:a.length)&&p(g,y);const v=Rr(t.textAnchor);if("middle"===v||"end"===v)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return oo(t,ro(f,s,l),s)}function Xr(t,e){var n,r,o,a,i,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:a,warnings:i,alongPath:s}=n,l=wr(e);if(!l)return null==i||i.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=Gr(a),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=Ur(t,e),l=null!=(n=Rr(t[Z]))?n:Rr(t[X]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=Br(s,a,u,i),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),a=null==t?void 0:t.glyphs[o],i=(a?a.width:0)*n,u=i+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:i,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,Vr(t));const h=f,p=En(null==s?void 0:s.textLength),m="animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0,y=m>0&&h>0?m/h:1,g=En(null==s?void 0:s.startOffset),{along:v,perp:b}=Qr(t),A=v+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),k=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=A+t.advStart*y,n=A+t.advEnd*y,r=k(l.sampleAtDistance(e)),o=k(l.sampleAtDistance(n)),a=l.sampleAtDistance(A+(t.advStart+t.glyphW/2)*y);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*a.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=Gr(l),f={x:null!=(r=Dr(t.x))?r:0,y:null!=(o=Dr(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let p=0;const m=(t,e)=>{var n;const r=Br(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,i=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*a;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*a+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:i,fontSize:e.fontSize,line:p}),f.x+=l,h[p].end=f.x}},y=(t,e)=>{var n,r,o,a;const i=Ur(t,e),s=Dr(t.x),l=Dr(t.y);void 0!==s&&(f.x=s,p=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=Dr(t.dx))?n:0,f.y+=null!=(r=Dr(t.dy))?r:0;const u=null!=(o=Rr(t[Z]))?o:Rr(t[X]);if(u&&!(null==(a=t.children)?void 0:a.length)&&m(u,i),t.children)for(const e of t.children)y(e,i)},g=Vr(t);if(t.children)for(const e of t.children){const t=d.length;if(y(e,g),d.length===t){const t=Ur(e,g),n=Br(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(a=null==n?void 0:n.ascent)?a:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:p})}}const v=null!=(i=Rr(t[Z]))?i:Rr(t[X]);v&&!(null==(s=t.children)?void 0:s.length)&&m(v,g);const b=Rr(t.textAnchor);if("middle"===b||"end"===b)for(const t of d){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return w(e,["line"])})}function Yr(t,e,n,r,o=0){const{x:a,y:i,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,a-n*l*c-o*u,i-n*u*c+o*l]}function Qr(t){var e,n,r;return{along:(null!=(e=Dr(t.x))?e:0)+(null!=(n=Dr(t.dx))?n:0),perp:null!=(r=Dr(t.dy))?r:0}}function Jr(t,e,n,r,o,a){const{glyphs:i,create:s=Ir,warnings:l}=r,u=e?wr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=Gr(i),{cells:f,width:d}=function(t,e,n,r){const o=[];let a=0;const i=(t,s)=>{var l,u,c;const f=Ur(t,s),d=null!=(l=Rr(t[Z]))?l:Rr(t[X]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=Br(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=Wr(f);for(let i=0;i<d.length;i++){const s=d.charAt(i),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:a+t/2}),a+=t}else if(/\S/.test(s)){const i=l&&l.width>0?l.width:Kr*t.unitsPerEm,s=i*e;o.push({glyphD:qr(i,n),widthEm:i,scale:e,paint:r,midBase:a+s/2}),a+=s}else a+=(l?l.width:0)*e;a+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)i(e,f)};return i(t,Vr(t)),{cells:o,width:a}}(t,i,c,l);if(!f.length)return oo(t,[],s);const{along:h,perp:p}=Qr(t),m=Hr(n),y=Hr(o),g=t=>t>0&&d>0?t/d:1,v="clip"===a&&!u.closed;if(m.animated||y.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(m.times,y.times),n=(t,e)=>h+m.at(e)+g(y.at(e))*t.midBase,r=m.animated?m.loop:y.loop;return oo(t,function(t,e,n,r,o,a,i,s=0){const l=Math.max(e.totalLength/$r,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=Cr(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:a}=e.sampleAtDistance(t),i=Math.cos(a),l=Math.sin(a);return{time:n,value:{translate:[eo(r-s*l,3),eo(o+s*i,3)],rotate:eo(180*a/Math.PI,3)}}},p=[],m=[],y=(t,e)=>{p.push(h(t,e)),i&&m.push({time:e,value:u(t)?1:0})};y(n(f,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],a=n(f,e),i=n(f,o),s=Math.min(to,Math.max(1,Math.ceil(Math.abs(i-a)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);y(n(f,r),r)}}Ke(p);const g={keyframes:p};void 0!==o&&(g.loop=o);const v={transform:g};if(i&&m.some(t=>0===t.value)){const t={keyframes:m};void 0!==o&&(t.loop=o),v.opacity=t}c.push(a("path",k(A({d:d},no(f.paint)),{animate:v}),[]))}return c}(f,u,n,e,r,s,v,p),s)}const b=g(y.at(0)),w=h+m.at(0);return oo(t,ro((v?f.filter(t=>{const e=w+t.midBase*b;return e>=0&&e<=u.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,m:Yr(u,w+t.midBase*b,t.scale,t.widthEm,p)})),s,l),s)}function Hr(t){var e;const n=En(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],a=o>0?(t-e[n-1])/o:1;return r[n-1]+a*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var $r=48,to=64;function eo(t,e){const n=v(10,e);return Math.round(t*n)/n}function no(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function ro(t,e,n){var r,o,a;if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const i=new Map;for(const e of t){const t=JSON.stringify([null!=(r=e.paint.fill)?r:null,null!=(o=e.paint.stroke)?o:null,null!=(a=e.paint.strokeWidth)?a:null]),n=Cr(e.glyphD,e.m),s=i.get(t);s?s.d+=n:i.set(t,{paint:e.paint,d:n})}const s=[];for(const{paint:t,d:n}of i.values())s.push(e("path",A({d:n},no(t)),[]));return s}function oo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Lr.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=A({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function ao(t,e){return e.alongPath?Jr(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):Zr(t,e)}function io(t,e,n,r){if(!e)return t;const o=!!e.trimAllAsOne,a=[],i=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)i(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o,a,i,s,l,u,c;if("rect"===t.type){const a=Number(null!=(e=t.x)?e:0),i=Number(null!=(n=t.y)?n:0),s=Number(null!=(r=t.width)?r:0),l=Number(null!=(o=t.height)?o:0);return"M"+(a+s)+","+i+"L"+(a+s)+","+(i+l)+"L"+a+","+(i+l)+"L"+a+","+i+"L"+(a+s)+","+i+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(a=t.cx)?a:0),n=Number(null!=(i=t.cy)?i:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*wo,d=o*wo,h=(t,e,n,r,o,a)=>"C"+t+","+e+" "+n+","+r+" "+o+","+a;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}return}(t);if(void 0===e)return;const n=an(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=Ao(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}a.push(r)};if(i(t),!a.length)return t;let s=0;const l=o?[...a].reverse():a;for(const t of l)for(const e of t.subpaths)o||(s=0),e.startOffsetPx=s,s+=e.lengthPx;const u=s;if(o&&u<.001)return t;const c=En(e.offset),f="absent"===c.kind?{kind:"static",value:0}:c,d=function(t){const e=En(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>{var e,n,r,o;return{time:null!=(n=null!=(e=t.time)?e:t.t)?n:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!n.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:n.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<n.length;t++){const e=n[t-1],o=n[t];if((e.value[1]-e.value[0])*(o.value[1]-o.value[0])<0){const t=vo(e,o);null!==t&&t>e.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,e)=>t-e),a=[];let i=0;for(const t of n){for(;i<o.length&&o[i]<t.time;){const t=o[i++],e=bo(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;a.push({time:t.time,value:e,easing:t.easing})}for(;i<o.length;){const t=o[i++],e=bo(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(e.range),h="absent"===d.kind?{kind:"static",value:[0,1]}:d,p=function(t){var e;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const r of t.keyframes){const t=null!=(e=r.value)?e:r.v;"number"==typeof t&&n.push(t)}return n}(f),m=[p.length?Math.min(...p):0,p.length?Math.max(...p):0];if(1===a.length&&a[0].leaf===t&&1===a[0].subpaths.length){const e=a[0],n=e.subpaths[0],r=o?u:n.lengthPx;if(r<.001)return t;const i=o?n.startOffsetPx/r:0;return function(t,e,n,r,o,a){const i=co(n,e,r),s=fo(e,r),l=A({},t);return delete l.effects,mo(l,"strokeDasharray",po(a,s)),mo(l,"strokeDashoffset",po(o,i)),mo(l,"strokeOpacity",go(a)),l}(e.leaf,r,i,m,f,h)}const y=new Map;for(const t of a){const e=[];for(const n of t.subpaths){const a=o?u:n.lengthPx;if(a<.001)continue;const i=o?n.startOffsetPx/a:0;e.push(...lo(t.leaf,n.subpath,a,i,m,f,h,r))}y.set(t.leaf,so(t.leaf,e))}const g=t=>{const e=y.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?k(A({},t),{children:t.children.map(g)}):t)};return g(t)}function so(t,e){const n=k(A({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function lo(t,e,n,r,o,a,i,s){const l=co(r,n,o),u=fo(n,o),c=po(a,l),f=po(i,u),d=go(i),h=function(t){return{type:"path",d:t}}(Bt(e));return mo(h,"strokeDasharray",f),mo(h,"strokeDashoffset",c),mo(h,"strokeOpacity",d),[h]}var uo=1;function co(t,e,n){const[r]=ho(n);return n=>e*(-n-r+t)+uo}function fo(t,e){const[n,r]=ho(e),o=r-n+1;return e=>{const n=de(e[0],0,1),r=de(e[1],0,1),a=Math.min(n,r),i=Math.max(n,r),s=[0];let l=uo;for(let e=0;e<o;e++)s.push(l+a*t),s.push((i-a)*t),l=(1-i)*t;return s.push(l+uo),s}}function ho(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function po(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var n,r,o,a;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(a=t.easing)?a:t.e}}),loop:t.loop}}function mo(t,e,n){var r,o;if(!n)return;if("static"===n.kind)return void(t[e]=n.value);const a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,i=A({},a||{}),s={keyframes:n.keyframes};void 0!==n.loop&&(s.loop=n.loop),i[e]=s,t.animate=i;const l=n.keyframes[0];l&&void 0!==(null!=(r=l.value)?r:l.v)&&(t[e]=null!=(o=l.value)?o:l.v)}var yo=10;function go(t){var e,n,r,o,a,i;const s=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return s(t.value)?{kind:"static",value:0}:void 0;const l=t.keyframes;let u=!1,c=!0;for(const t of l)s(null!=(e=t.value)?e:t.v)?u=!0:c=!1;if(!u)return;if(c)return{kind:"static",value:0};const f=[];for(let t=0;t<l.length;t++){const e=l[t],u=t>0?l[t-1]:void 0,c=t<l.length-1?l[t+1]:void 0,d=null!=(r=null!=(n=e.time)?n:e.t)?r:0,h=s(null!=(o=e.value)?o:e.v),p=u?h&&s(null!=(a=u.value)?a:u.v):h,m=c?h&&s(null!=(i=c.value)?i:c.v):h;p&&!m?(f.push({time:d,value:0}),f.push({time:d+yo,value:1})):!p&&m&&(f.push({time:d-yo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function vo(t,e){const n=n=>{const r=(n-t.time)/(e.time-t.time),o=t.value[0]+(e.value[0]-t.value[0])*r;return t.value[1]+(e.value[1]-t.value[1])*r-o};let r=t.time,o=e.time,a=n(r);if(0===a)return r;const i=n(o);if(0===i)return o;if(a*i>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,e=n(t);if(0===e||Math.abs(o-r)<1e-4)return t;a*e<0?o=t:(r=t,a=e)}return(r+o)/2}function bo(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],a=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*a,r.value[1]+(o.value[1]-r.value[1])*a]}return t[t.length-1].value}function Ao(t){const e=t.v;if(!e||e.length<2)return 0;let n=0;for(let r=0;r<e.length-1;r++)n+=ko(t,r,r+1);return t.c&&e.length>1&&(n+=ko(t,e.length-1,0)),n}function ko(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=ge(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(i=null==(a=t.i)?void 0:a[n])?i:u,u);return c.ds[c.ds.length-1]}var wo=.5522847498307936;function xo(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Rt(t))?void 0:e.mode)===K.frames?q.frames:q.webapi,glyphs:null==(n=Ut(t))?void 0:n.glyphs},o=Kn(t);Gn(o,r.idMap),Dn(o,r,()=>Wn(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,a;const i=null==(a=null==(o=t.effects)?void 0:o.maskedBy)?void 0:a.href;if("string"==typeof i){n.add(t);const r=e.idMap.get(i);r&&n.add(r)}if(Array.isArray(t.children))for(const e of t.children)r(e)};if(r(t),0===n.size)return;const o=(t,r)=>{if(n.has(t)&&e.maskAncestorChains.set(t,r),Array.isArray(t.children)){const n=ir(t,e),a=n?[...r,n]:r;for(const e of t.children)o(e,a)}};o(t,[])}(o,r);const a=function(t,e){return function(t,e){e.idMap.clear(),Gn(t,e.idMap);const n=[],r=t=>{var e;hr(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,a=o=>{var i;if(o){if(o!==t&&hr(o)&&n++,"use"===o.type&&o.href){const t=Bn(o.href);t&&!r.has(t)&&(r.add(t),a(e.idMap.get(t)))}null==(i=o.children)||i.forEach(a)}},i=Bn(t.href);i&&(r.add(i),a(e.idMap.get(i))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=hr(t);n&&(pr(t),mr(t,fr(n),e))}}(t,e),t}(Po(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(a,r.defs),{root:a,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Po(t,e){t.children&&(t.children=t.children.map(t=>Po(t,e)));const n=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?e.contentRefInnerIds.get(r):void 0;if(!n&&!o)return t;const{transformation:a,repeater:i,maskedBy:s,clipPath:l,trimPath:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:p}=null!=n?n:{};null==n||n.isCombinedShape;n&&delete t.effects;let m=t,y=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,a){return e.glyphs?Jr(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,a):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,y=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?Zr(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(m,p,e),y=!0;return y||(m=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=Wn(n,"tpath"),{d:a,startShift:i}=Mr(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Sr(t)});n.defs.push({type:"path",id:o,d:a});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),_r(s,"startOffset",Or(e.startOffset,i)),_r(s,"textLength",e.textLength),t.children=[s],t}(m,h,e)),m=function(t,e,n){return qn(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return qn(t,e,n,"stroke")}(m,d,e),m=io(m,u,0,e),m=function(t,e,n){var r,o;if(!e)return t;const a=null!=(r=e.copies)?r:1;if(a<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const i=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=Kn(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<a;t++){const r=Kn(l),o=ur(e,t),a=o?Cn(r,o,n):r;u.push(a)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(m,i,e),m=Jn(m,s,a,e),m=function(t,e,n){if(!e||!e.d&&!e.animate)return t;const r=Wn(n,"clip"),o={type:"path",d:e.d};return e.animate&&(o.animate={d:e.animate}),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(m,l,e),o?(lr(m,c,e),m=Rn(m,a,r,o,e)):m=function(t,e,n,r){return lr(t,e,r),Cn(t,n,r)}(m,c,a,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,m),m}function So(t,e,n){var r,o;let a=xo(t).root;return a=yn(a,null!=(o=null==(r=Rt(a))?void 0:r.duration)?o:se),e===q.webapi&&(a=rn(a,null==n?void 0:n.motionPath),a=jn(a),a=function(t){const e=t=>t.startsWith("#")?t.slice(1):t,n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let r=!0;for(;r;){r=!1;const o=new Set;n(t,t=>{"use"===t.type&&"string"==typeof t.href&&o.add(e(t.href))}),n(t,t=>{if(!t.children)return;let e=t.children;"defs"===t.type&&(e=e.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!o.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,r=!0)})}return t}(a)),a}function jo(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function Oo(t,e,n){var r;const o=Rt(t)||{},a=bn(t,q.frames),i=o.iterations;let s=1;"number"==typeof i&&(s=i||1),"infinite"===i&&(s=1/0),s<1&&(s=1);const l=+(o.duration||se),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let p=null,m=!1,y=-(o.delay||0),g=0,v=1,b=!1;const A=o.frameRate,k=A&&A>0?1e3/A:0;let w=0;const x=()=>{const t=g?(Date.now()-g)*v:0;return y+t},P=()=>{let t=x();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function S(t){let n=function(){const e=l>0?l:1;let n=0,r=0;if(l>0){t=de(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=de((t-r*e)/e,0,1)}else n=t;const o=c||"normal";let a=n;return"reverse"===o?a=1-n:"alternate"===o?r%2==1&&(a=1-n):"alternate-reverse"===o&&r%2==0&&(a=1-n),a}();for(const t of a||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=kn(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?S(P()):h&&S(0));const j=()=>!!m&&(!!e.isConnected()&&(v<0?x()>0:!(Number.isFinite(u)&&P()>=u))),O=t=>{null!==p&&(jo(p),p=null),(t||j())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=P(),a=x();if(a<0&&v>0)h&&S(0);else{if(v<0&&a<=0)return M(),S(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(v>0&&u&&Number.isFinite(u)&&o>=u)return M(),S(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(k>0){const t=Date.now();if(w&&t-w<k)return;w=t}S(o)}})(),O()}))},M=()=>{if(!m)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),y=t,g=0,m=!1,null!==p&&(jo(p),p=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!m){if(v>=0)Number.isFinite(u)&&y>=u&&(y=0);else if(y<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");y=u}b=!1,m=!0,g=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),y=0,g=0,m=!1,b=!1,S(y),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;y=Number.isFinite(u)?u:P(),g=0,m=!1,null!==p&&(jo(p),p=null),S(d?y:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=x();Number.isFinite(u)&&e>u&&(e=u),t<0!=v<0&&(b=!1),v=t,y=e,m&&(g=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),y=t,m&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),S(P())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var Mo=[1,0,0,1,0,0];function _o(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}var Io=(t,e)=>[1,0,0,1,t,e],zo=(t,e)=>[t,0,0,e,0,0];function To(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Eo=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],No=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Co(t){let e=Mo;t.translate&&(e=_o(e,Io(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=_o(e,Io(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=_o(e,To(t.rotate))),t.scale&&(e=_o(e,zo(t.scale[0],t.scale[1]))),n&&(e=_o(e,Io(-t.origin[0],-t.origin[1]))),e}function Fo(t,e,n){return t+(e-t)*n}function Lo(t,e){return null==t?Mo:"string"==typeof t?function(t){let e=Mo;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);){const t=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===t?e=_o(e,Io(n[0]||0,n[1]||0)):"scale"===t?e=_o(e,zo(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=_o(e,To(n[0])):"skewX"===t?e=_o(e,Eo(n[0])):"skewY"===t?e=_o(e,No(n[0])):"matrix"===t&&(e=_o(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Co(function(t,e){var n,r,o,a,i,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let u=0;for(;u<t.length-1&&(null!=(o=t[u+1].time)?o:0)<e;)u++;const c=t[u],f=t[u+1],d=(e-(null!=(a=c.time)?a:0))/((null!=(i=f.time)?i:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[Fo(h.translate[0],p.translate[0],d),Fo(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=Fo(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[Fo(h.scale[0],p.scale[0],d),Fo(h.scale[1],p.scale[1],d)]:m.scale=h.scale||p.scale,m.origin=h.origin||p.origin,m}(t.keyframes,e)):t.value?Co(t.value):Mo}var Do=new Set(["svg","g","symbol"]),Ro=new Set(["defs","mask","clipPath","title"]);function Uo(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Uo(t,e))}function Vo(t){return null==t?0:Number(t)}function Wo(t){return Math.round(100*t)/100+0}function Bo(t,e,n){var r,o,a,i,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(i=null!=(a=t["stroke-width"])?a:t.strokeWidth)?i:"",f=Wo(function(t,e,n,r){var o,a,i,s,l,u;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(a=e[e.length-1].time)?a:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(i=e[n+1].time)?i:0)<r;)n++;const c=e[n],f=e[n+1],d=(r-(null!=(s=c.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(u=c.time)?u:0)||1);return Fo(c.value,f.value,d)}return void 0!==e?Number(e):n}(null==(s=t.animate)?void 0:s.opacity,t.opacity,1,n)),d=t.mask?1:0,h=e.map(Wo).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Vo(t.width)+","+Vo(t.height)+","+Vo(t.x)+","+Vo(t.y);case"ellipse":return Vo(t.rx)+","+Vo(t.ry)+","+Vo(t.cx)+","+Vo(t.cy);case"circle":return Vo(t.r)+","+Vo(t.cx)+","+Vo(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Vo(c)||"")+"|o:"+f+"|m:"+d}function Go(t,e,n,r,o){var a;const i=t.type||"";if(Ro.has(i))return;const s=_o(e,function(t,e){return t.animate&&t.animate.transform?Lo(t.animate.transform,e):void 0!==t.transform?Lo(t.transform,e):Mo}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=_o(s,Io(Vo(t.x),Vo(t.y)));return void(a?Go(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Do.has(i)?null==(a=t.children)||a.forEach(t=>Go(t,s,n,r,o)):o.push(Bo(t,s,n))}function Ko(t,e){var n;e.add(0);(t=>{var n;if(t&&"object"==typeof t)for(const r of Object.keys(t)){const o=null==(n=t[r])?void 0:n.keyframes;Array.isArray(o)&&o.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)})}})(t.animate),t.transform&&"object"==typeof t.transform&&t.transform.keyframes&&t.transform.keyframes.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)}),null==(n=t.children)||n.forEach(t=>Ko(t,e))}function qo(t,e){const n=new Map;Uo(t,n);const r=[];return Go(t,Mo,e,n,r),r.sort()}function Zo(t,e){const n=new Set;Ko(t,n),Ko(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=qo(t,o),a=qo(e,o),i=Xo(n,a),s=Xo(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function Xo(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}var Yo="http://www.w3.org/2000/svg";function Qo(t,e){if(!t)return null;const n=t,{type:r,children:o,style:l}=n,u=((t,e)=>{var n={};for(var r in t)i.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&a)for(var r of a(t))e.indexOf(r)<0&&s.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),c=u.funcType;void 0!==c&&delete u.funcType;const f=Ut(t)||e,d=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(l,f);let h;if(o)for(const t of o){const e=Qo(t,f);e&&(h||(h=[]),h.push(e))}const p=function(t,e,n,r,o){if(Pe.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Yo,t);for(const t in e){const n=Te(t,e[t]);void 0!==n&&(Oe.has(t)?a.style[t]=String(n):a.setAttribute(fe(t),n))}if(n)for(const t in n)a.style[t]=String(n[t]);if(r)for(const t of r)a.appendChild(t);return o&&(a.textContent=o),a}(r||"g",Ee(u),d,h,u[Z]||u[X]);return p&&void 0!==c&&p.setAttribute("type",c),p}function Jo(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,a=t.getRootElement();if(!a)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let i=!1;const s=()=>{i&&(i=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":i=!0,t.setPlaybackRate(-1),t.play()}};switch(n){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{const t=()=>s(),e=()=>l();a.addEventListener("mouseenter",t),a.addEventListener("mouseleave",e);break}case"click":{const e=()=>{t.isPlaying()?l():s()};a.addEventListener("click",e);break}case"scrollIntoView":new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=o?s():l()})},{threshold:o}).observe(a);break}return t}function Ho(t){return"#"+t}function $o(t,e,n,r){const o=Rt(t)||{};if(!r)if(t.id){const e=Ho(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const a=Oo(t,e||function(t){const e=new Set,n={isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=fe(r);const a=Ho(n),i=(null==t?void 0:t.querySelectorAll(a))||document.querySelectorAll(a);0!==i.length||e.has(a)||(e.add(a),console.warn('setAttribute: No elements found for selector "'+a+'"'));for(let t=0;t<i.length;t++){const e=i[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),ie.has(r)&&(e.style[r]=o)}}};return n}(r),n),i=c(u({},a),{getRootElement:()=>r||null});return o.trigger&&Jo(i,o.trigger),i}function ta(t,e,n,r){var o,a;let i=null!=(o=t.v)?o:t.value;const s=null!=(a=t.e)?a:t.easing,l={offset:e,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let u,c=n;if(ne.has(n)&&Array.isArray(i))u=te(i);else if("transform"!==n||null===i||"object"!=typeof i||Array.isArray(i))if(re.has(n))Array.isArray(i)&&("translate"===n&&(i=i.map(t=>t+"px")),i=i.join(",")),"rotate"===n&&(i+="deg"),u=n+"("+i+")",c="transform";else if("d"===n){u='path("'+(i&&"object"==typeof i&&Array.isArray(i.paths)?i.paths:[]).map(t=>Bt(t,!0)).join("")+'")'}else u=""+i;else u=ae(i,{withUnits:!0}),c="transform";return CSS.supports(c,u)||r.add(c),c=le(c),l[c]=u,l}function ea(t,e,n){var r,o,a,i,s;const l=[];for(let f=0;f<e.length;f++){const d=e[f],h=null!=(r=d.t)?r:0;if(h<0){const n=e[f+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(a=n.t)?a:0)-h),r=d.e?Qt(d.e)(e):e,{right:o}=Ht(d.e,e);l.push({t:0,v:dn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[f-1];if(r&&(null!=(i=r.t)?i:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),a=r.e?Qt(r.e)(o):o,{left:i}=Ht(r.e,o);l.length>0&&(l[l.length-1]=c(u({},l[l.length-1]),{e:i})),l.push({t:n,v:dn(t,r.v,d.v,a),e:void 0})}break}l.push(d)}return l}function na(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=ea(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=ta(o,de((null!=(r=o.t)?r:0)/t,0,1),a,e);0===n&&(i.offset||0)>0&&l.push(c(u({},i),{offset:0})),l.push(i)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(c(u({},l[l.length-1]),{offset:1})),l.length>0&&o.set(a,l)}return o}function ra(t,e,n,r){var o;const a=Rt(t)||{};if(!n)if(t.id){const e=Ho(t.id);(n=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const i=bn(t,q.webapi),s=[],l=a.iterations;let u;"number"==typeof l&&(u=l),"infinite"===l&&(u=1/0);const c=new Set;let f=!1,d=!1;(null==i?void 0:i.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const i=Ho(t.id),l=(null==n?void 0:n.querySelectorAll(i))||document.querySelectorAll(i);0===l.length&&console.warn('createWebApiAnimator: No elements found for selector "'+i+'"');const h=na(r,c,a),p=a.delay&&a.delay>0?a.delay:void 0;let m;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;m=u===1/0?t%a.duration:Math.min(t,a.duration*(null!=u?u:1))}const y={duration:a.duration,delay:p,fill:null!=(o=a.fill)?o:"forwards",direction:a.direction,iterations:u};for(let t=0;t<l.length;t++){const n=l[t];for(const[,t]of h)if(t.length>0)try{const r=new KeyframeEffect(n,t,y),o=new Animation(r,document.timeline);(null==e?void 0:e.onFinish)&&(o.onfinish=()=>{var t;f||(f=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(o.onremove=()=>{var t;d||(d=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==m&&(o.currentTime=m),s.push(o)}catch(t){console.warn(t)}}}if(!r&&c.size)return console.warn("Unsupported CSS attrs: "+[...c].join(", ")),null;const h={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;f=!1,s.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;s.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;f=!1,s.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of s)try{(null==(t=e.effect)?void 0:t.getTiming().iterations)===1/0?(e.effect.updateTiming({iterations:1}),e.finish(),e.effect.updateTiming({iterations:1/0})):e.finish()}catch(t){e.cancel()}},setPlaybackRate:t=>(s.forEach(e=>e.playbackRate=t),h),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=s[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{f=!1,s.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;h.cancel(),s.splice(0,s.length),d||(d=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&Jo(h,a.trigger),h}function oa(t,e,n,r){const o=zt(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=So(t,(Rt(t)||{}).mode===K.frames?q.frames:q.webapi);let a=null;if(r){t=we(t);const e="string"==typeof r?document.querySelector(r):r;e&&(a=Qo(t),a&&e.replaceChildren(a))}return function(t,e,n,r){const o=Rt(t)||{};let a,i,s=n;return o.resetOnFinish&&(s=c(u({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==a||a.cancel()}})),i=o.mode===K.frames?$o(t,e,s,r):ra(t,s,r,o.mode===K.webapi)||$o(t,e,s,r),a=i,o.debugInstName&&(window[o.debugInstName]=i),i}(t,e,n,a)}var aa,ia="data";function sa(t){const{src:e,data:n,adapter:r,callbacks:o,container:a}=t;if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==n)return oa(n,r,o,a);let i=null,s=[],l=!1;const u=t=>{i?t(i):s&&s.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!l)if(Lt(t)){i=oa(t,r,o,a);const e=s;s=null,null==e||e.forEach(t=>t(i))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!i,getRootElement:()=>i?i.getRootElement():null,isPlaying:()=>(null==i?void 0:i.isPlaying())||!1,play:()=>{u(t=>t.play())},pause:()=>{u(t=>t.pause())},cancel:()=>{u(t=>t.cancel())},finish:()=>{u(t=>t.finish())},setPlaybackRate:t=>{u(e=>e.setPlaybackRate(t))},getCurrentTime:()=>i?i.getCurrentTime():null,setCurrentTime:t=>{u(e=>e.setCurrentTime(t))},destroy:()=>{l=!0,s=null,null==i||i.destroy()}}}function la(){const t=document.querySelectorAll("["+B+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[G]){const t=n.getAttribute(B);t&&(n[G]=sa({src:t,container:n}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=la,window.createAnimator=sa,window.setupAnimationTriggers=Jo),aa=f,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let l of o(r))i.call(e,l)||l===a||t(e,l,{get:()=>r[l],enumerable:!(s=n(r,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),aa)})();
|
|
1
|
+
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))l.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))s.call(n,e)&&c(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d={};function v(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(d,{PX_ANIMATOR_DATA_KEY:()=>jo,PX_ANIM_ATTR_NAME:()=>Z,PX_ANIM_SRC_ATTR_NAME:()=>E,PxAnimatorEngine:()=>W,PxAnimatorMode:()=>G,createAnimator:()=>So,createAnimatorImpl:()=>xo,generateNewIds:()=>hn,loadTagAnimators:()=>Oo,setupAnimationTriggers:()=>yo});var p=class{l(t){return this.h(t)}optional(){return new y(this)}},y=class extends p{constructor(t){super(),this.inner=t,this.A=void 0}M(t){if(null!=t)return this.inner.l(t)?this.inner.M(t):void 0}h(t,n,e){return null==t||this.inner.h(t,n,e)}l(t){return null==t||this.inner.l(t)}},m=class extends p{constructor(t=""){super(),this.A=t}M(t){return"string"==typeof t?t:this.A}h(t,n,e){return"string"==typeof t||(null==n||n.errors.push(v(null!=e?e:[])+": expected string, got "+typeof t),!1)}},h=class extends p{constructor(t=0){super(),this.A=t}M(t){return"number"==typeof t&&isFinite(t)?t:this.A}h(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(v(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},b=class extends p{constructor(t=!1){super(),this.A=t}M(t){return"boolean"==typeof t?t:this.A}h(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(v(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},g=class extends p{constructor(t){super(),this.value=t,this.A=t}M(t){return t===this.value?this.value:this.A}h(t,n,e){return t===this.value||(null==n||n.errors.push(v(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},A=class extends p{constructor(t,n){super(),this.values=t,this.A=null!=n?n:t[0]}M(t){return this.values.includes(t)?t:this.A}h(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(v(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},w=class extends p{constructor(t,n){super(),this.j=t,this.A=null!=n?n:t[0].A}M(t){for(const n of this.j)if(n.h(t))return n.M(t);return this.A}h(t,n,e){var r;const o=n&&{errors:[],warnings:[],S:n.S};return!!this.j.some(n=>n.h(t,o,e?[...e]:void 0))||(null==n||n.errors.push(v(null!=e?e:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}l(t){return this.j.some(n=>n.l(t))}},k=class extends p{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e].A;this.A=n}M(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape))e[t]=this._shape[t].M(n[t]);return e}h(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(v(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].h(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.S)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(v(o)+": unexpected extra key"),o.pop(),i=!1);return i}l(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=class extends p{constructor(t,n){super(),this._shape=t,this.O=n;const e={};for(const n of Object.keys(t))e[n]=t[n].A;this.A=e}M(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape))e[t]=this._shape[t].M(n[t]);if(this.O)for(const t of Object.keys(n))t in this._shape||(e[t]=this.O.M(n[t]));return e}h(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(v(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].h(r[t],n,o)||(i=!1),o.pop();if(this.O)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.O.h(r[t],n,o)||(i=!1),o.pop());return i}l(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},j=class extends p{constructor(t){super(),this.item=t,this.A=[]}M(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item.l(e)&&n.push(this.item.M(e));return n}h(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(v(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.h(t[e],n,r)||(o=!1),r.pop();return o}l(t){return Array.isArray(t)}},x=class extends p{constructor(t){super(),this.value=t,this.A={}}M(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value.l(r)&&(n[e]=this.value.M(r));return n}h(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(v(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.h(i,n,r)||(o=!1),r.pop();return o}l(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},S=class extends p{constructor(){super(...arguments),this.A=void 0}M(t){return t}h(t,n,e){return!0}l(t){return!0}},O=class extends p{constructor(t,n){super(),this.fn=t,this.A=n,this.N=null}get schema(){var t;return null!=(t=this.N)?t:this.N=this.fn()}M(t){return this.schema.M(t)}h(t,n,e){return this.schema.h(t,n,e)}l(t){return this.schema.l(t)}},N=class extends p{constructor(t){super(),this.j=t,this.A=t.map(t=>t.A)}M(t){return Array.isArray(t)&&t.length===this.j.length?this.j.map((n,e)=>n.M(t[e])):this.A}h(t,n,e){if(!Array.isArray(t)||t.length!==this.j.length)return null==n||n.errors.push(v(null!=e?e:[])+": expected tuple of length "+this.j.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.j.length;e++)r.push("["+e+"]"),this.j[e].h(t[e],n,r)||(o=!1),r.pop();return o}l(t){return Array.isArray(t)&&t.length===this.j.length}},z=(t="")=>new m(t),P=(t=0)=>new h(t),_=(t=!1)=>new b(t),C=t=>new g(t),I=(t,n)=>new A(t,n),L=(t,n)=>new w(t,n),T=t=>new k(t),V=(t,n)=>new M(t,n),U=t=>new j(t),D=t=>new x(t),B=()=>new S,F=t=>new N(t),R=(t,n)=>new O(t,n),E="data-px-animation-src",Z="_px_animator",G={auto:"auto",waapi:"waapi",frames:"frames"},W={waapi:G.waapi,frames:G.frames},Q={before:"before",after:"after"},X="userSpaceOnUse",J="objectBoundingBox",K={separate:"separate",combined:"combined"},q="text",Y="textContent",H=new Set(["type","children","animator","meta","animate","effects",q,Y]),$={linear:"linear",radial:"radial"};function tt(t){var n;return(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator)}function nt(t){var n;if(t)return null==(n=tt(t))?void 0:n.definitions}var et=L([z(),F([P(),P(),P(),P()])]),rt=L([z(),P(),U(P()),R(()=>st,{}),T({path:z()}),R(()=>T({paths:U(Vt)}),{paths:[]}),R(()=>U(St),[])]),ot=T({time:P().optional(),t:P().optional(),value:rt.optional(),v:rt.optional(),easing:et.optional(),e:et.optional(),tangentOut:F([P(),P()]).optional(),to:F([P(),P()]).optional(),tangentIn:F([P(),P()]).optional(),ti:F([P(),P()]).optional(),selected:_().optional()}),it=T({segmentCount:P().optional(),extend:I([Q.before,Q.after]).optional(),alternate:_().optional()}),lt=T({value:rt.optional(),keyframes:U(ot).optional(),kfs:U(ot).optional(),loop:L([it,_()]).optional(),autoOrient:_().optional()}),st=T({translate:F([P(),P()]).optional(),rotate:P().optional(),skew:P().optional(),scale:F([P(),P()]).optional(),origin:F([P(),P()]).optional()}),ut=(L([z(),st,T({value:st}),lt]),D(lt)),ct=L([z(),U(L([z(),ut])),ut]),at=T({startOn:I(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:I(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:P().optional()}),ft=T({width:P(),d:z()}),dt=T({fFamily:z(),style:z(),ascent:P(),unitsPerEm:P(),glyphs:D(ft)}),vt=T({easings:D(F([P(),P(),P(),P()])).optional(),animations:D(ut).optional(),styles:D(B()).optional(),glyphs:D(dt).optional()}),pt=T({mode:I([G.auto,G.waapi,G.frames]).optional(),duration:P().optional(),delay:P().optional(),iterations:L([P(),C("infinite")]).optional(),fill:I(["forwards","backwards","both","none"]).optional(),direction:I(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:P().optional(),trigger:at.optional(),resetOnFinish:_().optional(),definitions:vt.optional(),animateById:D(ct).optional(),timelineSource:z().optional(),debugInstName:z().optional()}),yt=(T({id:z(),animate:ct}),L([z(),P(),U(P()),T({value:new class extends p{constructor(){super(...arguments),this.A=void 0}M(t){return t}h(t,n,e){return void 0!==t||(null==n||n.errors.push(v(null!=e?e:[])+": required value is missing"),!1)}l(t){return void 0!==t}}}),st])),mt=L([P(),T({value:P()}),lt]),ht=L([F([P(),P()]),T({value:F([P(),P()])}),lt]),bt=L([z(),T({value:z()}),lt]),gt=T({translate:ht.optional(),rotate:mt.optional(),scale:ht.optional(),skew:mt.optional(),origin:ht.optional()}),At=T({copies:P().optional(),translate:ht.optional(),rotate:mt.optional(),skew:mt.optional(),scale:ht.optional(),origin:ht.optional()}),wt=T({sourceId:z().optional(),maskType:I(["luminance","alpha"]).optional(),maskUnits:I([X,J]).optional(),maskContentUnits:I([X,J]).optional(),x:P().optional(),y:P().optional(),width:P().optional(),height:P().optional()}),kt=T({d:bt.optional(),animate:lt.optional()}),Mt=T({offset:mt.optional(),range:ht.optional(),subPaths:I([K.separate,K.combined]).optional()}),jt=T({sourceId:z().optional(),start:P().optional(),stretch:P().optional(),timeCrop:F([P(),P()]).optional()}),xt=T({type:I(["content"]).optional(),sourceId:z().optional(),retime:jt.optional()}),St=T({offset:P(),color:z()}),Ot=L([U(St),T({value:U(St)}),lt]),Nt=T({type:I([$.linear,$.radial]),p1:ht.optional(),p2:ht.optional(),c:ht.optional(),r:mt.optional(),fp:ht.optional(),stops:Ot.optional(),gradientUnits:I(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:I(["pad","reflect","repeat"]).optional(),gradientTransform:z().optional()}),zt=Nt,Pt=T({path:z(),pathOverflow:I(["clip","extend"]).optional(),lengthAdjust:I(["spacing","spacingAndGlyphs"]).optional(),method:I(["align","stretch"]).optional(),spacing:I(["auto","exact"]).optional(),startOffset:mt.optional(),textLength:mt.optional()}),_t=T({useGlyphs:_().optional()}),Ct=T({transformBy:gt.optional(),repeater:At.optional(),maskedBy:wt.optional(),clipPath:kt.optional(),trimPath:Mt.optional(),clone:xt.optional(),fillGradient:Nt.optional(),strokeGradient:zt.optional(),textPath:Pt.optional(),text:_t.optional()}),It=V({type:z(),id:z().optional(),meta:B().optional(),effects:Ct.optional(),animate:ct.optional(),style:L([z(),D(L([z(),P()]))]).optional()},yt),Lt=V(f(a({},It._shape),{children:R(()=>U(Lt),[]).optional()}),yt),Tt=T({width:P().optional(),height:P().optional(),viewBox:z().optional(),animator:pt.optional()}),Vt=(V(f(a(a({},It._shape),Tt._shape),{type:C("svg"),children:U(Lt).optional()}),yt),T({v:U(U(P())),i:U(U(P())).optional(),o:U(U(P())).optional(),c:_().optional()}));function Ut(t,n=!1){var e,r,o,i;const l=t.v,s=t.i,u=t.o,c=t.c;if(!l.length)return"";const a=[],f=l.length;a.push("M"+l[0][0]+","+l[0][1]);for(let t=1;t<f;t++){const o=l[t-1],i=null!=(e=null==u?void 0:u[t-1])?e:o,c=null!=(r=null==s?void 0:s[t])?r:l[t],f=l[t];n||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(c&&f>0){const t=l[f-1],e=null!=(o=null==u?void 0:u[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:l[0],c=l[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),a.push("z")}return a.join("")}function Dt(t,n,e){return t+(n-t)*e}function Bt(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=Dt(t[i]||0,n[i]||0,e);return r}function Ft(t,n,e){return[Dt(t[0]||0,n[0]||0,e),Dt(t[1]||0,n[1]||0,e),Dt(t[2]||0,n[2]||0,e),Dt(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function Rt(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(Et(t[i],n[i],e));return o}function Et(t,n,e){var r,o,i,l,s,u,c,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),p=[],y=[],m=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];p.push(Bt(f,v,d));const h=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,b=null!=(l=null==(i=n.i)?void 0:i[e])?l:v;y.push(Bt(h,b,d));const g=null!=(u=null==(s=t.o)?void 0:s[e])?u:f,A=null!=(a=null==(c=n.o)?void 0:c[e])?a:v;m.push(Bt(g,A,d))}return{v:p,i:y.length?y:void 0,o:m.length?m:void 0,c:null!=(f=t.c)?f:n.c}}function Zt(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function l(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let u=e,c=0,a=1;for(let t=0;t<8;t++){const t=l(u)-e;if(Math.abs(t)<1e-6)return u;const n=s(u);if(Math.abs(n)<1e-6)break;u-=t/n}for(u=e;c<a;){const t=l(u);if(Math.abs(t-e)<1e-6)return u;e>t?c=u:a=u,u=(a+c)/2}return u}function Gt(t){const[n,e,r,o]=t,i=3*e,l=3*(o-e)-i,s=1-i-l;return function(t){return e=Zt(n,r,t),((s*e+l)*e+i)*e;var e}}function Wt(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function Qt(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,l=Zt(e,o,n),s=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=Wt(t,n,o),l=Wt(n,e,o),s=Wt(e,r,o),u=Wt(i,l,o),c=Wt(l,s,o),a=Wt(u,c,o);return{left:[t,i,u,a],right:[a,c,s,r]}}([0,0],s,u,[1,1],l),f=c[3][0],d=c[3][1];let v,p;f>1e-9&&Math.abs(d)>1e-9&&(v=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const y=1-f,m=1-d;return y>1e-9&&Math.abs(m)>1e-9&&(p=[(a[1][0]-f)/y,(a[1][1]-d)/m,(a[2][0]-f)/y,(a[2][1]-d)/m]),{left:v,right:p}}function Xt(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function Jt(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}function Kt(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),l=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==l&&s.push(parseInt(l,16)/255),s}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}var qt=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),Yt=new Set(["translate","rotate","scale","skew"]),Ht=new Set(["offset-distance","offsetDistance"]);function $t(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.P)||e,o=[],i=t.translate,l=t.origin,s=t.rotate,u=t.skew,c=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),l&&o.push("translate("+l[0]+a+","+l[1]+a+")"),null!=s&&o.push("rotate("+s+f+")"),null!=u&&o.push("skewX("+u+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),l&&o.push("translate("+-l[0]+a+","+-l[1]+a+")"),o.join("")}var tn=new Set(["offset-distance","offsetDistance"]),nn=1e3;function en(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function rn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var on=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function ln(t){return on.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function sn(t,n,e){return Math.max(n,Math.min(t,e))}function un(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,l=i*i,s=o*o,u=l*i,c=3*o*l,a=3*s*i,f=s*o;return[u*t[0]+c*n[0]+a*e[0]+f*r[0],u*t[1]+c*n[1]+a*e[1]+f*r[1]]}var cn=1e-4;function an(t,n,e,r,o){const i=fn(t,n,e,r,o);return 0===i[0]&&0===i[1]?fn(t,n,e,r,o<.5?o+cn:o-cn):i}function fn(t,n,e,r,o){const i=1-o,l=3*i*i,s=6*o*i,u=3*o*o;return[l*(n[0]-t[0])+s*(e[0]-n[0])+u*(r[0]-e[0]),l*(n[1]-t[1])+s*(e[1]-n[1])+u*(r[1]-e[1])]}function dn(t,n,e,r,o=100){const i=o+1,l=new Float64Array(i),s=new Float64Array(i);let u=un(t,n,e,r,0);l[0]=0,s[0]=0;let c=0;for(let a=1;a<i;a++){const i=a/o,f=un(t,n,e,r,i),d=f[0]-u[0],v=f[1]-u[1];c+=Math.sqrt(d*d+v*v),l[a]=i,s[a]=c,u=f}return{ts:l,ds:s}}function vn(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,l=o;for(;i<l;){const t=i+l>>>1;e[t]<n?i=t+1:l=t}const s=e[l-1],u=e[l]-s,c=u>0?(n-s)/u:0;return r[l-1]+c*(r[l]-r[l-1])}var pn=0;function yn(){return"_px_"+Date.now().toString(36)+(++pn).toString(36)+Math.random().toString(36).substring(2,6)}function mn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>mn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=mn(n[t]);return e}function hn(t){var n,e;const r=mn(t),o=new Map,i=new Set(["href","xlink:href"]),l=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["sourceId","targetId","boundElementId"]);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=yn();o.set(t,e),n.id=e}else n.animate&&(n.id=yn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(r),function t(n){if(n&&"object"==typeof n)for(const[e,r]of Object.entries(n))if("children"!==e)if("string"==typeof r)if(i.has(e)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(n[e]="#"+i)}else if(l.has(e))n[e]=bn(r,o);else if(s.has(e)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(n[e]=t?"#"+i:i)}else r.includes("url(#")&&(n[e]=bn(r,o));else if("style"===e&&"object"==typeof r&&null!==r)for(const[t,n]of Object.entries(r))"string"==typeof n&&(r[t]=bn(n,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const n of r)t(n)}(r);const u=null==(n=r.animator)?void 0:n.animateById;if(u&&"object"==typeof u){const t={};for(const[n,r]of Object.entries(u))t[null!=(e=o.get(n))?e:n]=r;r.animator=f(a({},r.animator),{animateById:t})}return r}function bn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var gn=new Set(["script","foreignobject"]),An=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),wn=new Set(["href","xlink:href","src"]),kn=new Set(["mixBlendMode","isolation"]),Mn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,jn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,xn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Sn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function On(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(An.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||wn.has(e)&&(Mn.test(t)||jn.test(t)||function(t){const n=xn.exec(t);return!!n&&Sn.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function Nn(t){var n;const e=null!=(n=t.value)?n:t.v;if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const r=e.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function zn(t){var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0}function Pn(t){var n;return null!=(n=t.easing)?n:t.e}function _n(t){var n,e,r;const o=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var Cn=new WeakMap;function In(t,n,e,r){var o,i;let l=Cn.get(t);const s=null==l?void 0:l.get(n);if(s)return s;const u=null!=(o=t.tangentOut)?o:t.to,c=null!=(i=n.tangentIn)?i:n.ti,a=[e[0]+(u?u[0]:0),e[1]+(u?u[1]:0)],f=[r[0]+(c?c[0]:0),r[1]+(c?c[1]:0)],d=dn(e,a,f,r),v={P0:e,P1:a,P2:f,P3:r,_:d,C:d.ds[d.ds.length-1]};return l||(l=new WeakMap,Cn.set(t,l)),l.set(n,v),v}var Ln=.5,Tn=5,Vn=32;function Un(t,n){var e,r,o,i;if(!_n(t))return t;const l=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(l)||l.length<2)return t;const s=!!t.autoOrient,u=null!=(r=null==n?void 0:n.I)?r:Ln,c=null!=(o=null==n?void 0:n.L)?o:Tn,a=null!=(i=null==n?void 0:n.T)?i:Vn,f=[],d=Nn(l[0]);if(!d)return t;const v=s?function(t,n){const e=Nn(t),r=Nn(n);if(!e||!r)return 0;const o=In(t,n,e,r),i=an(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(l[0],l[1]):void 0;f.push(Bn(zn(l[0]),En(Fn(l[0]),Fn(l[0]),0,d,v,s)));for(let t=0;t<l.length-1;t++){const n=l[t],e=l[t+1],r=Nn(n),o=Nn(e);r&&o?(s&&t>0&&Gn(f,n,e,r,o,c),Qn(f,n,e,r,o,s,u,c,a)):f.push(Bn(zn(e),En(Fn(e),Fn(e),1,null!=o?o:[0,0],void 0,s)))}const p=Pn(l[l.length-1]);p&&(f[f.length-1].e=p),s&&Dn(f);const y={kfs:f};return void 0!==t.loop&&(y.loop=t.loop),y}function Dn(t){var n;let e;for(const r of t){const t=null!=(n=r.v)?n:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let o=t.rotate;for(;o-e>180;)o-=360;for(;o-e<-180;)o+=360;t.rotate=o,e=o}}function Bn(t,n){return{t:t,v:n}}function Fn(t){var n;const e=null!=(n=t.value)?n:t.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function Rn(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,l="number"==typeof n[o]?n[o]:0;r[o]=i+(l-i)*e}return r}return e<.5?t:n}function En(t,n,e,r,o,i){const l={translate:r},s=new Set;if(t)for(const n of Object.keys(t))s.add(n);if(n)for(const t of Object.keys(n))s.add(t);for(const r of s){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],s=null==n?void 0:n[r];void 0===o&&void 0===s||(l[r]=Rn(o,s,e))}return void 0!==o&&(l.rotate=o+Zn(t,n,e)),l}function Zn(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Rn(r,o,e);return"number"==typeof i?i:0}function Gn(t,n,e,r,o,i){var l;const s=t[t.length-1],u=null!=(l=s.v)?l:s.value,c=null==u?void 0:u.rotate;if("number"!=typeof c)return;const a=Fn(n),f=c-Zn(a,a,0),d=In(n,e,r,o),v=an(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(v[1],v[0])/Math.PI,y=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(p,f);if(Math.abs(y)<=i)return;const m=zn(n),h=Math.min(m+Wn,(m+zn(e))/2),b=En(Fn(n),Fn(n),0,r,p,!0);t.push(Bn(h,b))}var Wn=.05;function Qn(t,n,e,r,o,i,l,s,u){const c=In(n,e,r,o),a=zn(n),f=zn(e),d=Pn(n),v=(p=d)?Gt([p[1],p[0],p[3],p[2]]):t=>t;var p;const y=Fn(n),m=Fn(e),h=function(t,n,e,r,o){const i=[];Xn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Xn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const l=[0];for(const t of i)t>l[l.length-1]+1e-6&&t<.999999&&l.push(t);l.push(1);const s=[],u={V:o-l.length};for(let o=0;o<l.length-1;o++)Jn(l[o],l[o+1],s,t,n,e,r,u);return s}(c,i,l,s,u),b=[];for(const t of h){const n=vn(c._,t),e=sn(c.C>0?n/c.C:t,0,1),r={u:sn(v(e),0,1),p:e,U:un(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=an(c.P0,c.P1,c.P2,c.P3,t);r.D=180*Math.atan2(n[1],n[0])/Math.PI}b.push(r)}let g=d,A=0;const w=t.length-1;for(let n=0;n<b.length;n++){const e=b[n],r=A<1?sn((e.u-A)/(1-A),0,1):1,{left:o,right:l}=Qt(g,r),s=0===n?w:t.length-1;o?t[s].e=o:delete t[s].e;const u=a+e.u*(f-a),c=En(y,m,e.p,e.U,e.D,i);t.push(Bn(u,c)),g=l,A=e.u}}function Xn(t,n,e,r,o){const i=n-t,l=e-n,s=i-2*l+(r-e),u=2*(l-i),c=i;if(Math.abs(s)<1e-10){if(Math.abs(u)>1e-10){const t=-c/u;t>1e-6&&t<.999999&&o.push(t)}return}const a=u*u-4*s*c;if(a<0)return;const f=Math.sqrt(a),d=(-u-f)/(2*s),v=(-u+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Jn(t,n,e,r,o,i,l,s){const u=(t+n)/2,c=un(r.P0,r.P1,r.P2,r.P3,t),a=un(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=un(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=un(r.P0,r.P1,r.P2,r.P3,u),p=un(r.P0,r.P1,r.P2,r.P3,t+.75*f),y=Math.max(Kn(d,c,a),Kn(v,c,a),Kn(p,c,a));let m=!0;if(o){const e=an(r.P0,r.P1,r.P2,r.P3,t),o=an(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let u=Math.abs(i-s);u>180&&(u=360-u),u>l&&(m=!1)}y<=i&&m||s.V<=0||f<1e-6?e.push(n):(s.V-=1,Jn(t,u,e,r,o,i,l,s),Jn(u,n,e,r,o,i,l,s))}function Kn(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const l=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(l)/Math.sqrt(i)}function qn(t,n){const e=Yn(t,n);return null!=e?e:t}function Yn(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Yn(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&_n(e)){const o=Un(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Hn=10;function $n(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>$n(t[e],n[e]))}function te(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,l=o[4]||0,s=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([l,s]),e.i.push([r,i]),e.o.push([l,s])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function ne(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function ee(t){return"string"==typeof t&&void 0!==ne(t)}function re(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=ne(t.path);return n?{paths:te(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&ee(n[0])){const t=[];for(const e of n){const n=ne(e);n&&t.push(...te(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&ee(t[0])){const n=[];for(const e of t){const t=ne(e);t&&n.push(...te(t))}return{paths:n}}return{paths:t}}return ee(t)?{paths:te(ne(t))}:t}function oe(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function ie(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function le(t,n,e,r){var o,i;return"d"===t?{paths:Rt(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:qt.has(t)?Ft(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?Dt(n,e,r):Yt.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Bt(n||[],e||[],r):Dt(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],l=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=Dt(+(null!=r?r:0),+(null!=l?l:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=Bt(r||t,l||t,e)}else o[i]=null!=l?l:r}return o}(n,e,r)}function se(t,n,e,r){var o,i,l,s,u;const c=n.length-1,a=sn(null!=(o=e.segmentCount)?o:c,1,c);let f;f=e.extend===Q.before?n.slice(0,a+1):n.slice(c-a);const d=null!=(i=n[0].t)?i:0,v=null!=(l=n[n.length-1].t)?l:0;let p,y;e.extend===Q.before?(p=0,y=d):(p=v,y=r);const m=y-p;if(m<=0)return n;const h=null!=(s=f[0].t)?s:0,b=(null!=(u=f[f.length-1].t)?u:0)-h;if(b<=0)return n;const g=f.map(t=>{var n,e;return{B:(t.t-h)/b,v:t.v,e:t.e,tangentIn:null!=(n=t.tangentIn)?n:t.ti,tangentOut:null!=(e=t.tangentOut)?e:t.to}}),A=Math.floor(m/b),w=m-A*b,k=w/b,M=[],j=e.extend!==Q.before,x=n[n.length-1];function S(n,e,r){var o;let i;if(e){i=[];for(let t=g.length-1;t>=0;t--)i.push({B:1-g[t].B,v:g[t].v,e:t>0?Xt(g[t-1].e):void 0,tangentIn:g[t].tangentOut,tangentOut:g[t].tangentIn})}else i=g;const l=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.B>l+1e-9){const o=i[e-1],s=r.B-o.B,u=(l-o.B)/s,c=o.e?Gt(o.e)(u):u,a=le(t,o.v,r.v,c),{left:f}=Qt(o.e,u);return M.length>0&&o.B<=l&&(M[M.length-1].e=f),void M.push({t:n+l*b,v:a,e:void 0})}const s=M.length>0?M[M.length-1]:x,u=j&&0===e&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(n+r.B*b))<1e-9;if(u){if($n(s.v,r.v))continue;M.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:n+r.B*b+(u?Hn:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),M.push(c)}}if(e.extend===Q.before){k>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=g.length-1;t>=0;t--)o.push({B:1-g[t].B,v:g[t].v,e:t>0?Xt(g[t-1].e):void 0,tangentIn:g[t].tangentOut,tangentOut:g[t].tangentIn})}else o=g;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.B<i-1e-9)continue;const l=o[e-1];if(l&&l.B<i-1e-9&&r.B>i+1e-9){const e=r.B-l.B,o=(i-l.B)/e,s=l.e?Gt(l.e)(o):o,u=le(t,l.v,r.v,s),{right:c}=Qt(l.e,o);M.push({t:n,v:u,e:c})}const s={t:n+(r.B-i)*b,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),M.push(s)}}(p,!!e.alternate&&A%2==0,k);for(let t=0;t<A;t++){const n=A-1-t,r=!!e.alternate&&n%2==0;S(p+w+t*b,r)}}else{for(let t=0;t<A;t++){const n=!!e.alternate&&t%2==0;S(p+t*b,n)}if(k>1e-9){const t=!!e.alternate&&A%2==0;S(p+A*b,t,k)}}return e.extend===Q.before?[...M,...n]:[...n,...M]}function ue(t,n,e,r){var o,i,l,s,u,c,a;const f=n.keyframes||n.kfs||[],d=[];for(const n of f){const e=null!=(i=null!=(o=n.time)?o:n.t)?i:0;let f=null!=(l=n.value)?l:n.v;const v=null!=(s=n.easing)?s:n.e;"d"===t&&(f=re(f));const p=rn(t)?ln(t):t;qt.has(p)&&(f=null!=(u=Kt(f))?u:f);const y={t:e,v:f,e:oe(v,r)},m=null!=(c=n.tangentIn)?c:n.ti,h=null!=(a=n.tangentOut)?a:n.to;m&&(y.tangentIn=m),h&&(y.tangentOut=h),d.push(y)}d.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const v=n.loop,p=!0===v?{}:v||void 0;return p&&d.length>=2?se(t,d,p,e):d}function ce(t,n,e){var r;const o=n.loop;if(null==o||!1===o)return n;const i=!0===o?{}:o,l=null!=(r=n.keyframes)?r:n.kfs;if(!Array.isArray(l)||l.length<2)return n;const s=rn(t)?ln(t):t,u=qt.has(s),c=l.map(n=>{var e,r,o,i,l,s,c,a;const f=null!=(e=n.t)?e:n.time;let d=null!=(r=n.v)?r:n.value;"d"===t&&(d=re(d)),u&&(d=null!=(o=Kt(d))?o:d);const v={t:f,v:d,e:null!=(i=n.e)?i:n.easing};return(null!=(l=n.tangentIn)?l:n.ti)&&(v.tangentIn=null!=(s=n.tangentIn)?s:n.ti),(null!=(c=n.tangentOut)?c:n.to)&&(v.tangentOut=null!=(a=n.tangentOut)?a:n.to),v}),a={kfs:se(t,c,i,e)};return void 0!==n.autoOrient&&(a.autoOrient=n.autoOrient),a}function ae(t,n){const e=fe(t,n);return null!=e?e:t}function fe(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=fe(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=ce(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var de=0;function ve(t,n=W.waapi){const e=tt(t)||{},r=nt(t),o=e.duration||1e3,i=[],l=(t,e)=>{if(!e)return null;const i=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=ie(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=ie(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===i.length)return null;const l=function(t,n,e,r=W.waapi){const o={};for(const[i,l]of Object.entries(t)){const t=ue(i,l,n,e);if(t.length>0){const n={kfs:t};void 0!==l.autoOrient&&(n.autoOrient=l.autoOrient),void 0!==l.loop&&(n.loop=l.loop),o[i]=r===W.waapi&&"transform"===i?Un(n):n}}return o}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},s=function(t){var n;if(!t)return;const e=null==(n=tt(t))?void 0:n.animateById;return e?Object.entries(e).map(([t,n])=>({id:t,animate:n})):void 0}(t);if(s)for(const t of s){const n=l(t.id,t.animate);n&&i.push(n)}const u=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++de;t.id=e;const r=l(e,n);r&&i.push(r)}if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n]);return i}function pe(t,n,e){var r,o,i,l,s,u,c;const a=n.kfs||n.keyframes||[];if(0===a.length)return null;const{F:f,R:d}=function(t,n){var e,r;const o=t.length-1;let i=t[0],l=t[o>0?1:0];for(let s=0;s<o;s++){const u=null!=(e=t[s].t)?e:0,c=null!=(r=t[s+1].t)?r:0;if(u<=n&&n<=c){i=t[s],l=t[s+1];break}n>c&&s===o-1&&(i=t[o>0?o-1:0],l=t[o])}return{F:i,R:l}}(a,e);let v=f===d?0:(p=e,y=null!=(r=f.t)?r:0,(m=null!=(o=d.t)?o:0)===y?0:0+(p-y)/(m-y)*1);var p,y,m;v=sn(v,0,1);const h=null!=(i=f.e)?i:f.easing;if(h&&Array.isArray(h))try{v=Gt(h)(v)}catch(t){}let b=rn(t)?ln(t):t,g=null;const A=null!=(l=null==f?void 0:f.v)?l:null==f?void 0:f.value,w=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===b)g=Rt(null!=(u=null==A?void 0:A.paths)?u:Array.isArray(A)?A:[],null!=(c=null==w?void 0:w.paths)?c:Array.isArray(w)?w:[],v).map(t=>Ut(t)).join("");else if(qt.has(b))g=Jt(Ft(A||[0,0,0,1],w||[0,0,0,1],v)),b=t;else if("stroke-dasharray"===b)g=Bt(A||[],w||[],v).join(" "),b=t;else if("transform"!==b||null===A||"object"!=typeof A||Array.isArray(A))"translate"===b?(g="translate("+Bt(A||[0,0],w||[0,0],v).join(",")+")",b="transform"):"rotate"===b?(g="rotate("+Dt(+(A||0),+(w||0),v)+")",b="transform"):"scale"===b?(g="scale("+Bt(A||[1,1],w||[1,1],v).join(",")+")",b="transform"):g=Dt(+(A||0),+(w||0),v);else{const t=new Set([...A?Object.keys(A):[],...w?Object.keys(w):[]]),e={};for(const n of t){const t=null==A?void 0:A[n],r=null==w?void 0:w[n];if("rotate"===n||"skew"===n)e[n]=Dt(+(null!=t?t:0),+(null!=r?r:0),v);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=Bt(t||o,r||o,v);e[n]=i}}if(_n(n)){const t=A.translate,r=w.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const l=In(t,n,e,r),s=0===l.C?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let l=1,s=i;for(;l<s;){const t=l+s>>>1;o[t]<e?l=t+1:s=t}const u=o[s-1],c=o[s]-u,a=c>0?(e-u)/c:0;return r[s-1]+a*(r[s]-r[s-1])}(l._,o),u=un(l.P0,l.P1,l.P2,l.P3,s);if(!i)return{translate:u};const c=an(l.P0,l.P1,l.P2,l.P3,s);return{translate:u,D:180*Math.atan2(c[1],c[0])/Math.PI}}(f,d,[+t[0],+t[1]],[+r[0],+r[1]],v,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.D&&(e.rotate=o.D)}}g=$t(e,{P:!1}),b="transform"}return Ht.has(b)&&"number"==typeof g&&(g=100*g+"%"),{k:b,v:null===g?"":""+g}}function ye(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=pe(r,o,n);t&&(e[t.k]=t.v)}return e}function me(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(me);const n={};for(const e of Object.keys(t))n[e]=me(t[e]);return n}function he(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function be(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function ge(t){var n;const e=be(t.x),r=be(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function Ae(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function we(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function ke(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function Me(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const l=we(t.href);if(l&&e.has(l)){const s=n.get(l);if(s)return function(t,n,e,r,o,i,l){var s,u,c,d;const v=me(n);he(v,o);const p="symbol"===v.type?ke(v.viewBox):void 0,y=null!=(u=null!=(s=Ae(t.width))?s:null==p?void 0:p[2])?u:l[0],m=null!=(d=null!=(c=Ae(t.height))?c:null==p?void 0:p[3])?d:l[1],h="symbol"===v.type?function(t,n,e,r,o){const i=ke(t.viewBox),l=f(a({},t),{type:"g"});if(delete l.viewBox,delete l.preserveAspectRatio,delete l.width,delete l.height,!i)return l;const[s,u,c,d]=i,v=c>0&&d>0?Math.min(r/c,o/d):1,p=(r-c*v)/2,y=(o-d*v)/2,m=[];0===p&&0===y||m.push("translate("+p+","+y+")"),1!==v&&m.push("scale("+v+")"),0===s&&0===u||m.push("translate("+-s+","+-u+")"),m.length&&(l.transform=m.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:s,y:u,width:c,height:d}]}),l.clipPath="url(#"+h+")",l}(v,o,i,y,m):v,b=Me(h,e,r,o,i,l),g=f(a({},t),{type:"g",children:[b]});return delete g.href,delete g.width,delete g.height,ge(g)}(t,s,n,e,r,o,i)}}if(!t.children)return t;let l=!1;const s=t.children.map(t=>{const s=Me(t,n,e,r,o,i);return s!==t&&(l=!0),s});return l?f(a({},t),{children:s}):t}function je(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function xe(t){var n,e,r;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const o=t,i=null!=(n=o.keyframes)?n:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(Oe),autoOrient:o.autoOrient,loop:o.loop},n=null!=(e=o.value)?e:o.v;return void 0!==n&&"animated"===t.kind&&(t.Z=n),t}const l=null!=(r=o.value)?r:o.v;if(void 0!==l)return{kind:"static",value:l}}return{kind:"static",value:t}}function Se(t,n,e,r){var o,i,l,s;const u=t=>(null==r?void 0:r.G)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=u(e.value));const c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},c||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(s=null!=(i=e.Z)?i:null==(o=e.keyframes[0])?void 0:o.value)?s:null==(l=e.keyframes[0])?void 0:l.v;void 0!==v&&(t[n]=u(v))}function Oe(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function Ne(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function ze(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=_e(r,n.origin,!0),r=Pe(r,"scale",n.scale),r=Pe(r,"skew",n.skew),r=Pe(r,"rotate",n.rotate),r=_e(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=_e(r,n.origin,!0),r=Pe(r,"translate",n.translate),r=_e(r,n.origin,!1)):r=Pe(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Pe(t,n,e,r){if(void 0===e)return t;const o=xe(e);if("static"===o.kind)return{type:"g",transform:{value:je(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>Ne(t,je(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function _e(t,n,e){if(void 0===n)return t;const r=xe(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>Ne(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Ce(t,n){return"_lw_"+n+"_"+t.W++}function Ie(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Le(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>Le(t,n))}var Te=me;function Ve(t,n,e){var r,o,i;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=Ie(t.effects.clone.sourceId);"string"==typeof r&&r&&!n.X.has(r)&&n.X.set(r,e(r))}null==(i=t.children)||i.forEach(t=>Ve(t,n,e))}function Ue(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function De(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function Be(t,n,e,r){if(!n)return t;const o=Ce(e,"grad"),i=function(t,n){const e={type:t.type===$.radial?"radialGradient":"linearGradient",id:n};return t.type===$.linear?(Fe(e,"x1","y1",t.p1),Fe(e,"x2","y2",t.p2)):(Fe(e,"cx","cy",t.c),function(t,n,e){const r=xe(e);"absent"!==r.kind&&Se(t,"r",r,{G:!0})}(e,0,t.r),Fe(e,"fx","fy",t.fp)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e,r,o;if(!t)return[];const i=xe(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(Re):[];const l=i.keyframes;if(!l.length)return[];const s=i.loop;let u=0;for(const t of l){const e=null!=(n=t.value)?n:t.v;Array.isArray(e)&&e.length>u&&(u=e.length)}if(!u)return[];const c=null!=(e=l[0].value)?e:l[0].v,a=[];for(let t=0;t<u;t++){const n=null!=(o=null!=(r=null==c?void 0:c[t])?r:Ee(l,0,t))?o:{offset:t/Math.max(1,u-1),color:"#000000"};a.push({offset:n.offset,color:n.color})}return a.map((t,n)=>function(t,n,e,r,o){var i,l,s,u,c;const a=[],f=[];let d=!1;for(const r of n){const o=null!=(l=null!=(i=r.time)?i:r.t)?l:0,v=null!=(s=r.value)?s:r.v,p=null!=(u=null==v?void 0:v[e])?u:Ee(n,n.indexOf(r),e);if(!p)continue;const y=null!=(c=r.easing)?c:r.e,m={time:o,value:p.color};void 0!==y&&(m.easing=y),a.push(m);const h={time:o,value:p.offset};void 0!==y&&(h.easing=y),f.push(h),p.offset!==t.offset&&(d=!0)}const v={type:"stop",offset:Ze(t.offset),stopColor:t.color},p={};return a.length&&(p.stopColor={keyframes:a},void 0!==o&&(p.stopColor.loop=o)),d&&f.length&&(p.offset={keyframes:f},void 0!==o&&(p.offset.loop=o)),Object.keys(p).length&&(v.animate=p),v}(t,l,n,0,s))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function Fe(t,n,e,r){var o,i,l;const s=xe(r);if("absent"===s.kind)return;if("static"===s.kind)return t[n]=String(s.value[0]),void(t[e]=String(s.value[1]));const u=t=>{const n={keyframes:s.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==s.loop&&(n.loop=s.loop),n},c=null!=(o=t.animate)?o:{};c[n]=u(0),c[e]=u(1),t.animate=c;const a=null!=(l=s.Z)?l:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Re(t){return{type:"stop",offset:Ze(t.offset),stopColor:t.color}}function Ee(t,n,e){var r,o;for(let o=n;o>=0;o--){const n=null!=(r=t[o].value)?r:t[o].v;if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=null!=(o=t[r].value)?o:t[r].v;if(null==n?void 0:n[e])return n[e]}}function Ze(t){return Math.round(1e3*t)/10+"%"}function Ge(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function We(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=xe(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=Qe(o,"translate",n.translate,void 0),o=Qe(o,"rotate",n.rotate,r),o=Qe(o,"scale",n.scale,r),o}function Qe(t,n,e,r,o){if(void 0===e)return t;const i=xe("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:je(n,Xe(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=Ne(t,je(n,Xe(n,t.value),r));return"translate"===n?a(a({},e),Je(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Xe(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Je(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Ke(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function qe(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function Ye(t,n){let e=0,r=0;for(const o of t)if(o.J&&o.J.length){const t=He(o.J,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function He(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function $e(t,n){var e,r,o;const i=t.transform,l=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!l)return;const s={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,l=!1,s=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,l=!0):s=!0}return s&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),l?[o,i]:void 0}(i,n);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(s.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(l&&Array.isArray(l.keyframes)){const t=l.keyframes,i=[];for(const l of t){const t=null!=(e=l.value)?e:l.v,s=null!=(o=null!=(r=l.time)?r:l.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.J=i)}return s.translate||s.J?s:void 0}var tr="content";function nr(t,n,e){if(!n)return;const r=Ie(n.sourceId);if(!r)return void(n.type===tr&&e.errors.push("clone: content ref missing sourceId"));const o=n.type===tr&&e.X.get(r)||r;t.href="#"+o}function er(t,n){const e={};return void 0!==t.translate&&(e.translate=rr(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=rr(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=rr(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return rr(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function rr(t,n,e=!1){const r=xe(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.Z&&(o.value=n(r.Z)),o}var or=!1;function ir(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var lr=1;function sr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-lr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+lr,value:0}],l=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[l],t.animate={opacity:{keyframes:i}}}function ur(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function cr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function ar(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function fr(t,n,e){const r=Ie(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=dr(r,n,e,new Set);if(o)if(or){const n=e.K.get(o);t.type="g",delete t.href,t.children=[n],ge(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function dr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.K.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=Te(o);if(function(t,n){he(t,()=>Ce(n,"retimed"))}(i,e),"use"===o.type?pr(i,n.start,n.stretch):vr(i,n.start,n.stretch),ar(i),"use"===o.type&&o.href){const l=Ie(o.href);if(l){const s=cr(o),u=s?ur(ir(s),n):n,c=new Set(r);c.add(t);const a=dr(l,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var l;const s=cr(t);if("use"===t.type&&s&&t.href){const i=Ie(t.href);if(i){const l=ur(ir(s),n),u=new Set(r);u.add(o);const c=dr(i,l,e,u);c&&(t.href="#"+c)}ar(t)}null==(l=t.children)||l.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.K.set(i.id,i),"string"==typeof i.id?i.id:void 0}function vr(t,n,e){var r;pr(t,n,e),null==(r=t.children)||r.forEach(t=>vr(t,n,e))}function pr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var yr=48,mr=/[MmLlHhVvCcSsQqTtAaZz]/;function hr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function br(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,l=0,s=0,u=0,c=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),p=(t,n,r)=>{const l=[o,i],s=dn(l,t,n,r,yr);e.push({P0:l,P1:t,P2:n,P3:r,_:s,q:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},y=(t,n)=>{p([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];mr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",m=t.toUpperCase();if("Z"!==m){if("M"===m){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,l=n,s=r,d=t;continue}if("L"===m)y(v()+(e?o:0),v()+(e?i:0));else if("H"===m)y(v()+(e?o:0),i);else if("V"===m)y(o,v()+(e?i:0));else if("C"===m){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],p(t,n,r)}else if("S"===m){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-u,2*i-c]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],p(t,n,r)}else if("Q"===m){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:l}=hr([o,i],t,n);p(r,l,n)}else if("T"===m){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:l}=hr([o,i],t,n);p(r,l,n)}else{if("A"!==m){r++;continue}r+=5,y(v()+(e?o:0),v()+(e?i:0))}d=t}else y(l,s),o=l,i=s,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].q;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,l=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],l=o.q>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,l=o;for(;i<l;){const t=i+l>>>1;r[t]<n?i=t+1:l=t}const s=r[l-1],u=r[l]-s,c=u>0?(n-s)/u:0;return e[l-1]+c*(e[l]-e[l-1])}(o._,i):0,[s,u]=un(o.P0,o.P1,o.P2,o.P3,l),[c,a]=an(o.P0,o.P1,o.P2,o.P3,l);return{x:s,y:u,angle:Math.atan2(a,c)}};return{Y:r,closed:l,H(t){if(l&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!l&&(t<0||t>r)){const n=t<0?0:r,e=s(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return s((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var gr=.15;function Ar(t){const n=xe(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function wr(t){let n=0,e=16;const r=t=>{var o,i;const l=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;l&&(e=Math.max(e,l));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var kr=t=>Math.round(1e3*t)/1e3;function Mr(t,n,e){null!=e&&Se(t,n,xe(e),{G:!0})}var jr=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function xr(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function Sr(t,n){let e="";for(let r=0;r<t.length;r++){const o=xr(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function Or(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var Nr=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function zr(t,n,e=2){const r=[];let o;for(Nr.lastIndex=0;null!==(o=Nr.exec(t));)r.push(o[0]);let i="",l=0;const s=()=>parseFloat(r[l++]);for(;l<r.length;){const t=r[l++];if("M"===t||"L"===t){const[r,o]=Or(n,s(),s());i+=t+Sr([r,o],e)}else if("C"===t){const[t,r]=Or(n,s(),s()),[o,l]=Or(n,s(),s()),[u,c]=Or(n,s(),s());i+="C"+Sr([t,r,o,l,u,c],e)}else if("Q"===t){const[t,r]=Or(n,s(),s()),[o,l]=Or(n,s(),s());i+="Q"+Sr([t,r,o,l],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var Pr=16,_r=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",q,Y,"xml:space"];function Cr(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function Ir(t){return"string"==typeof t?t:void 0}function Lr(t,n){var e,r,o,i,l,s,u;return{fontFamily:null!=(e=Ir(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=Cr(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(l=t.strokeWidth)?l:n.strokeWidth,letterSpacing:null!=(s=Cr(t.letterSpacing))?s:n.letterSpacing,wordSpacing:null!=(u=Cr(t.wordSpacing))?u:n.wordSpacing}}function Tr(t){var n,e,r;return{fontFamily:Ir(t.fontFamily),fontSize:null!=(n=Cr(t.fontSize))?n:Pr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=Cr(t.letterSpacing))?e:0,wordSpacing:null!=(r=Cr(t.wordSpacing))?r:0}}function Vr(t){const n={};return void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),n}function Ur(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Dr(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var Br=.6;function Fr(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,l=-o,s=Math.max(1,.12*Math.min(i,l)),u="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*s||l<=2*s)return u;const c=e+s,a=r-s,f=-s,d=o+s;return u+"M"+c+" "+f+"L"+c+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function Rr(t,n,e,r,o=0){const{x:i,y:l,angle:s}=t.H(n),u=Math.cos(s),c=Math.sin(s),a=r/2;return[e*u,e*c,-e*c,e*u,i-e*u*a-o*c,l-e*c*a+o*u]}function Er(t){var n;const e=xe(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,$:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,$:[],at:()=>r}}var Zr=48,Gr=64;function Wr(t,n){const e=u(10,n);return Math.round(t*e)/e}function Qr(t){const n={};return void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),n}function Xr(t,n,e){var r,o,i;if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const l=new Map;for(const n of t){const t=JSON.stringify([null!=(r=n.tt.fill)?r:null,null!=(o=n.tt.stroke)?o:null,null!=(i=n.tt.strokeWidth)?i:null]),e=zr(n.nt,n.m),s=l.get(t);s?s.d+=e:l.set(t,{tt:n.tt,d:e})}const s=[];for(const{tt:t,d:e}of l.values())s.push(n("path",a({d:e},Qr(t)),[]));return s}function Jr(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===_r.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function Kr(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function qr(t,n,e,r,o,i,l,s){const u=Hr(r,e,o),c=$r(e,o),a=no(i,u),f=no(l,c),d=oo(l),v={type:"path",d:Ut(n)};return eo(v,"strokeDasharray",f),eo(v,"strokeDashoffset",a),eo(v,"strokeOpacity",d),[v]}var Yr=1;function Hr(t,n,e){const[r]=to(e);return e=>n*(-e-r+t)+Yr}function $r(t,n){const[e,r]=to(n),o=r-e+1;return n=>{const e=sn(n[0],0,1),r=sn(n[1],0,1),i=Math.min(e,r),l=Math.max(e,r),s=[0];let u=Yr;for(let n=0;n<o;n++)s.push(u+i*t),s.push((l-i)*t),u=(1-l)*t;return s.push(u+Yr),s}}function to(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function no(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var e,r,o,i;return{time:null!=(r=null!=(e=t.time)?e:t.t)?r:0,value:n(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function eo(t,n,e){e&&Se(t,n,e)}var ro=10;function oo(t){var n,e,r,o,i,l;const s=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return s(t.value)?{kind:"static",value:0}:void 0;const u=t.keyframes;let c=!1,a=!0;for(const t of u)s(null!=(n=t.value)?n:t.v)?c=!0:a=!1;if(!c)return;if(a)return{kind:"static",value:0};const f=[];for(let t=0;t<u.length;t++){const n=u[t],c=t>0?u[t-1]:void 0,a=t<u.length-1?u[t+1]:void 0,d=null!=(r=null!=(e=n.time)?e:n.t)?r:0,v=s(null!=(o=n.value)?o:n.v),p=c?v&&s(null!=(i=c.value)?i:c.v):v,y=a?v&&s(null!=(l=a.value)?l:a.v):v;p&&!y?(f.push({time:d,value:0}),f.push({time:d+ro,value:1})):!p&&y&&(f.push({time:d-ro,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function io(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const l=e(o);if(0===l)return o;if(i*l>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function lo(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function so(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=uo(t,r,r+1);return t.c&&n.length>1&&(e+=uo(t,n.length-1,0)),e}function uo(t,n,e){var r,o,i,l;const s=t.v,u=s[n],c=s[e],a=dn(u,null!=(o=null==(r=t.o)?void 0:r[n])?o:u,null!=(l=null==(i=t.i)?void 0:i[e])?l:c,c);return a.ds[a.ds.length-1]}var co=.5522847498307936;function ao(t){var n,e;const r={defs:[],warnings:[],errors:[],K:new Map,W:0,X:new Map,et:new Map,rt:(null==(n=tt(t))?void 0:n.mode)===G.frames?W.frames:W.waapi,glyphs:null==(e=nt(t))?void 0:e.glyphs},o=Te(t);Le(o,r.K),Ve(o,r,()=>Ce(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const l=Ie(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof l){e.add(t);const r=n.K.get(l);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.et.set(t,r),Array.isArray(t.children)){const e=$e(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.K.clear(),Le(t,n.K);const e=[],r=t=>{var n;cr(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var l;if(o){if(o!==t&&cr(o)&&e++,"use"===o.type&&o.href){const t=Ie(o.href);t&&!r.has(t)&&(r.add(t),i(n.K.get(t)))}null==(l=o.children)||l.forEach(i)}},l=Ie(t.href);l&&(r.add(l),i(n.K.get(l))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=cr(t);if(!e)continue;const r=e.timeCrop;ar(t),fr(t,ir(e),n),r&&sr(t,r,n)}}(t,n),t}(fo(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function fo(t,n){t.children&&(t.children=t.children.map(t=>fo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.X.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:l,maskedBy:s,clipPath:u,trimPath:c,clone:d,fillGradient:v,strokeGradient:p,textPath:y,text:m}=null!=e?e:{};e&&delete t.effects;let h=t,b=!1;if(null==m?void 0:m.useGlyphs)if(y){const t="string"==typeof y.path?y.path:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:l,create:s=jr,warnings:u}=r,c=n?br(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=Dr(l),{cells:v,width:p}=function(t,n,e,r){const o=[];let i=0;const l=(t,s)=>{var u,c,a;const f=Lr(t,s),d=null!=(u=Ir(t[Y]))?u:Ir(t[q]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=Ur(f,n,e,r);if(t){const n=f.fontSize/t.unitsPerEm,e=null!=(a=t.ascent)?a:.9*t.unitsPerEm,r=Vr(f);for(let l=0;l<d.length;l++){const s=d.charAt(l),u=t.glyphs[s];if(u&&u.d){const t=u.width*n;o.push({nt:u.d,ot:u.width,scale:n,tt:r,it:i+t/2}),i+=t}else if(/\S/.test(s)){const l=u&&u.width>0?u.width:Br*t.unitsPerEm,s=l*n;o.push({nt:Fr(l,e),ot:l,scale:n,tt:r,it:i+s/2}),i+=s}else i+=(u?u.width:0)*n;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const n of t.children)l(n,f)};return l(t,Tr(t)),{cells:o,width:i}}(t,l,d,u);if(!v.length)return Jr(t,[],s);const{lt:y,st:m}=function(t){var n,e,r;return{lt:(null!=(n=Cr(t.x))?n:0)+(null!=(e=Cr(t.dx))?e:0),st:null!=(r=Cr(t.dy))?r:0}}(t),h=Er(e),b=Er(o),g=t=>t>0&&p>0?t/p:1,A="clip"===i&&!c.closed;if(h.animated||b.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.$,b.$),e=(t,n)=>y+h.at(n)+g(b.at(n))*t.it,r=h.animated?h.loop:b.loop;return Jr(t,function(t,n,e,r,o,i,l,s=0){const u=Math.max(n.Y/Zr,.5),c=t=>t>=0&&t<=n.Y,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.ot/2),0],p=zr(v.nt,t),y=(t,e)=>{const{x:r,y:o,angle:i}=n.H(t),l=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[Wr(r-s*u,3),Wr(o+s*l,3)],rotate:Wr(180*i/Math.PI,3)}}},m=[],h=[],b=(t,n)=>{m.push(y(t,n)),l&&h.push({time:n,value:c(t)?1:0})};b(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),l=e(v,o),s=Math.min(Gr,Math.max(1,Math.ceil(Math.abs(l-i)/u)));for(let t=1;t<=s;t++){const r=n+t/s*(o-n);b(e(v,r),r)}}Dn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const A={transform:g};if(l&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),A.opacity=t}d.push(i("path",f(a({d:p},Qr(v.tt)),{animate:A}),[]))}return d}(v,c,e,n,r,s,A,m),s)}const w=g(b.at(0)),k=y+h.at(0);return Jr(t,Xr((A?v.filter(t=>{const n=k+t.it*w;return n>=0&&n<=c.Y}):v).map(t=>({nt:t.nt,tt:t.tt,m:Rr(c,k+t.it*w,t.scale,t.ot,m)})),s,u),s)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.glyphs"),null)}(h,n,t,y.startOffset,y.textLength,y.pathOverflow);e&&(h=e,b=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o,i;const{glyphs:l,create:s=jr,warnings:u}=n,c=Dr(l),a={x:null!=(e=Cr(t.x))?e:0,y:null!=(r=Cr(t.y))?r:0},f=[],d=[{start:a.x,end:a.x}];let v=0;const p=(t,n)=>{var e;const r=Ur(n,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=n.fontSize/o,s=null!=(e=null==r?void 0:r.ascent)?e:.9*o,p=Vr(n);for(let e=0;e<t.length;e++){const l=t.charAt(e),u=null==r?void 0:r.glyphs[l];if(u&&u.d)f.push({nt:u.d,m:[i,0,0,i,a.x,a.y],tt:p,line:v,x:a.x,y:a.y,scale:i}),a.x+=u.width*i;else if(/\S/.test(l)){const t=u&&u.width>0?u.width:Br*o;f.push({nt:Fr(t,s),m:[i,0,0,i,a.x,a.y],tt:p,line:v,x:a.x,y:a.y,scale:i}),a.x+=t*i}else a.x+=(u?u.width:0)*i;a.x+=n.letterSpacing+(" "===l?n.wordSpacing:0),d[v].end=a.x}},y=(t,n)=>{var e,r,o,i;const l=Lr(t,n),s=Cr(t.x),u=Cr(t.y);void 0!==s&&(a.x=s,v=d.length,d.push({start:a.x,end:a.x})),void 0!==u&&(a.y=u),a.x+=null!=(e=Cr(t.dx))?e:0,a.y+=null!=(r=Cr(t.dy))?r:0;const c=null!=(o=Ir(t[Y]))?o:Ir(t[q]);if(c&&!(null==(i=t.children)?void 0:i.length)&&p(c,l),t.children)for(const n of t.children)y(n,l)},m=Tr(t);if(t.children)for(const n of t.children)y(n,m);const h=null!=(o=Ir(t[Y]))?o:Ir(t[q]);h&&!(null==(i=t.children)?void 0:i.length)&&p(h,m);const b=Ir(t.textAnchor);if("middle"===b||"end"===b)for(const t of f){const n=d[t.line].end-d[t.line].start,e="middle"===b?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return Jr(t,Xr(f,s,u),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(h,m,n),b=!0;return b||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.path||!n.path)return t;const o=Ce(e,"tpath"),{d:i,ut:l}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,ut:0};const r=br(t);if(!r||r.closed||r.Y<=0)return{d:t,ut:0};const o=r.Y,i=gr*o,l=Ar(n.startOffset),s=Ar(n.textLength).max||(null!=(e=n.advance)?e:0),u=Math.max(0,-l.min),c=Math.max(0,l.max+s-o),a=u>0?u+i:0,f=c>0?c+i:0;if(f<=0&&a<=0)return{d:t,ut:0};const d=r.H(0),v=r.H(o);let p=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+kr(n)+","+kr(e)+"L"+kr(d.x)+","+kr(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;p+="L"+kr(t)+","+kr(n)}return{d:p,ut:a}}(n.path,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:wr(t)});e.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(s.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(s.method=n.method),void 0!==n.spacing&&(s.spacing=n.spacing),Mr(s,"startOffset",function(t,n){if(!n||null==t)return t;const e=xe(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.Z&&(r.value=e.Z+n),r}(n.startOffset,l)),Mr(s,"textLength",n.textLength),t.children=[s],t}(h,y,n)),h=function(t,n,e){return Be(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return Be(t,n,e,"stroke")}(h,p,n),h=function(t,n){if(!n)return t;const e=n.subPaths===K.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,l,s,u,c,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),l=Number(null!=(e=t.y)?e:0),s=Number(null!=(r=t.width)?r:0),u=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+l+"L"+(i+s)+","+(l+u)+"L"+i+","+(l+u)+"L"+i+","+l+"L"+(i+s)+","+l+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(l=t.cy)?l:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(u=t.rx)?u:0),o="circle"===t.type?Number(null!=(c=t.r)?c:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*co,d=o*co,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=te(n);if(!e.length)return;const i={leaf:t,ct:[]};for(const t of e){const n=so(t);i.ct.push({ft:t,dt:n,vt:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const l=e?[...r].reverse():r;for(const t of l)for(const n of t.ct)e||(i=0),n.vt=i,i+=n.dt;const s=i;if(e&&s<.001)return t;const u=xe(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=xe(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>{var n,e,r,o;return{time:null!=(e=null!=(n=t.time)?n:t.t)?e:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=io(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let l=0;for(const t of e){for(;l<o.length&&o[l]<t.time;){const t=o[l++],n=lo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;l<o.length;){const t=o[l++],n=lo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,p=function(t){var n;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const r of t.keyframes){const t=null!=(n=r.value)?n:r.v;"number"==typeof t&&e.push(t)}return e}(c),y=[p.length?Math.min(...p):0,p.length?Math.max(...p):0];if(1===r.length&&r[0].leaf===t&&1===r[0].ct.length){const n=r[0],o=n.ct[0],i=e?s:o.dt;if(i<.001)return t;const l=e?o.vt/i:0;return function(t,n,e,r,o,i){const l=Hr(e,n,r),s=$r(n,r),u=a({},t);return delete u.effects,eo(u,"strokeDasharray",no(i,s)),eo(u,"strokeDashoffset",no(o,l)),eo(u,"strokeOpacity",oo(i)),u}(n.leaf,i,l,y,c,v)}const m=new Map;for(const t of r){const n=[];for(const r of t.ct){const o=e?s:r.dt;if(o<.001)continue;const i=e?r.vt/o:0;n.push(...qr(t.leaf,r.ft,o,i,y,c,v))}m.set(t.leaf,Kr(t.leaf,n))}const h=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,c),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const l=t.transform,s=null==(o=t.animate)?void 0:o.transform,u=Te(t);delete u.transform,u.animate&&(delete u.animate.transform,0===Object.keys(u.animate).length&&delete u.animate),delete u.id;const c=[u];for(let t=1;t<i;t++){const e=Te(u),r=er(n,t),o=r?ze(e,r):e;c.push(o)}const a={type:"g",children:c};return t.id&&(a.id=t.id),void 0!==l&&(a.transform=l),void 0!==s&&(a.animate={transform:s}),a}(h,l,n),h=function(t,n,e,r){if(!n)return t;const o=Ie(n.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=Ce(r,"mask");let l={type:"use",href:"#"+o};if(e)l=We(l,e,r);else if(Ke(t))l=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const l=[],s=[],u=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=Ne(t,void 0);if(Array.isArray(n.translate)&&l.push(f(a(a({},r),Je(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),s.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),u.push(f(a({},r),{value:t}))}}const c=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==c&&(n.loop=c),n};let v=t;return l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),u.length&&(v={type:"g",animate:{transform:d(u)},children:[v]}),v}(l,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,l,s,u,c,a,f,d,v;const p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let y;const m=[];for(;null!==(y=p.exec(t));){const t=y[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);m.push({name:y[1],yt:t})}if(!m.length)return;const h=m[m.length-1];if("translate"===h.name)for(let t=m.length-2;t>=0;t--){const a=m[t];if("translate"!==a.name)continue;const f=null!=(n=a.yt[0])?n:0,d=null!=(e=a.yt[1])?e:0,v=null!=(r=h.yt[0])?r:0,p=null!=(o=h.yt[1])?o:0;if(v!==-f||p!==-d)continue;const y={};y.origin=[f,d];for(let n=0;n<t;n++)if("translate"===m[n].name){const t=null!=(i=m[n].yt[0])?i:0,e=null!=(l=m[n].yt[1])?l:0;y.translate=y.translate?[y.translate[0]+t,y.translate[1]+e]:[t,e]}for(let n=t+1;n<m.length-1;n++){const t=m[n];if("rotate"===t.name)y.rotate=(null!=(s=y.rotate)?s:0)+(null!=(u=t.yt[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.yt[0])?c:1,e=t.yt.length>1?t.yt[1]:n;y.scale=y.scale?[y.scale[0]*n,y.scale[1]*e]:[n,e]}}return y}let b,g,A;for(const t of m)if("translate"===t.name){const n=null!=(a=t.yt[0])?a:0,e=null!=(f=t.yt[1])?f:0;b=b?[b[0]+n,b[1]+e]:[n,e]}else if("rotate"===t.name)g=(null!=g?g:0)+(null!=(d=t.yt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.yt[0])?v:1,e=t.yt.length>1?t.yt[1]:n;A=A?[A[0]*n,A[1]*e]:[n,e]}const w={};return b&&(w.translate=b),void 0!==g&&(w.rotate=g),A&&(w.scale=A),Object.keys(w).length?w:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes&&!t.transform.kfs){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(l=We(l,n,r))}const s=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Ke(t)}(t);l=function(t,n,e,r,o){const i=r.K.get(e),l=r.et.get(n)||[],s=o?$e(n,r):void 0,u=s?[...l,s]:l,c=i&&r.et.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.J)for(const n of t.J)a.add(n.time);for(const t of c)if(t.J)for(const n of t.J)a.add(n.time);if(!(a.size>0)){const n=qe(u),e=qe(c),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=Ye(u,t),e=Ye(c,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(l,t,o,r,s);const u={type:"mask",id:i,children:[l]};return n.maskType&&(u.maskType=n.maskType),n.maskUnits&&(u.maskUnits=n.maskUnits),n.maskContentUnits&&(u.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(u.x=String(n.x)),void 0!==n.y&&(u.y=String(n.y)),void 0!==n.width&&(u.width=String(n.width)),void 0!==n.height&&(u.height=String(n.height)),r.defs.push(u),t.mask="url(#"+i+")",t}(h,s,i,n),h=function(t,n,e){var r,o;if(!n||!n.d&&!n.animate)return t;const i=Ce(e,"clip"),l={type:"path"},s=xe(n.d);if("absent"!==s.kind&&("static"===s.kind?l.d=Ge(s.value):(Se(l,"d",s),void 0!==l.d&&(l.d=Ge(l.d)))),n.animate&&!(null==(r=l.animate)?void 0:r.d)){const t=null!=(o=l.animate)?o:{};t.d=n.animate,l.animate=t}return e.defs.push({type:"clipPath",id:i,children:[l]}),t.clipPath="url(#"+i+")",t}(h,u,n),o?(nr(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let l=!1;const s=null==(e=t.animate)?void 0:e.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const n=s.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=De(s),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};s.autoOrient&&(r.autoOrient=!0);const o=s.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const u=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),c=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!u||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const n={keyframes:c};void 0!==o&&(n.loop=o),t.animate.transform=n}l=!0}}const u=void 0!==(null==n?void 0:n.translate),c=l||u,f=l&&De((null==(r=t.animate)?void 0:r.transform)||void 0)||l&&De((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],ht:r[0]});if(!n.length)return{bt:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.ht).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=Ue(i.ht),r=Ue(o.ht),l=-e[0],s=-e[1],u=r[0]-l,c=r[1]-s;return 0===u&&0===c?{bt:t}:{translate:"translate("+u+","+c+")",bt:"translate("+l+","+s+")"+n.slice(1).map(t=>t.ht).join("")}}if("translate"===i.name)return{bt:t};const l=[];let s=0;for(;s<n.length&&"translate"===n[s].name;)l.push(n[s].ht),s++;if(!l.length)return{bt:t};const u=n.slice(s).map(t=>t.ht).join("");return{translate:l.join(""),bt:u||void 0}}(t.transform);c?void 0!==n.translate?n.bt?t.transform=n.bt:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],ht:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].ht);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.bt?t.transform=n.bt:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes&&!t.transform.kfs){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;c||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{gt:i,inner:l}=function(t){if(!t)return{};const n=De(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{gt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let s=t;s=ze(s,l);let u={type:"g",id:e,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(u.transform=o.transform),void 0!==o.animate&&(u.animate=o.animate),i&&(delete u.id,u=ze(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return nr(t,n,r),ze(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.K.set(r,h),h}function vo(t,n,e){var r,o;let i=ao(t).root;return i=ae(i,null!=(o=null==(r=tt(i))?void 0:r.duration)?o:nn),n===W.waapi&&(i=qn(i,null==e?void 0:e.At),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let l=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){l=!0;break}if(!l&&t.children)for(const n of t.children)if(o(n,r)){l=!0;break}if(!l&&"use"===t.type&&"string"==typeof t.href){const e=we(t.href),i=e?n.get(e):void 0;i&&(l=o(i,r))}return r.delete(t),e.set(t,l),l};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=ke(t.viewBox);if(n)return[n[2],n[3]];const e=Ae(t.width),r=Ae(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),l=[],s=Me(t,e,r,()=>"_lw_use_mat_"+ ++o,l,i);if(0===l.length)return s;const u={type:"defs",children:l},c=[...null!=(n=s.children)?n:[],u];return f(a({},s),{children:c})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}function po(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}function yo(t,n){const{startOn:e,outAction:r="continue",scrollIntoViewThreshold:o=0}=n,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let l=!1;const s=()=>{l&&(l=!1,t.setPlaybackRate(1)),t.play()},u=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":l=!0,t.setPlaybackRate(-1),t.play()}};switch(e){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const n=()=>{t=!0,s()},e=()=>{t&&u()};i.addEventListener("mouseenter",n),i.addEventListener("mouseleave",e);break}case"click":{const n=()=>{t.isPlaying()?u():s()};i.addEventListener("click",n);break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,l=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,s=Math.min(i,l),u=Math.min(r.height,Number.isFinite(s)?s:r.height);return u>0?o.height/u:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=o?(e=!0,s()):e&&(e=!1,u())})},{threshold:n}).observe(i);break}}return t}function mo(t){return"#"+t}function ho(t,n,e,r){const o=tt(t)||{};if(!r)if(t.id){const n=mo(t.id);(r=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const i=function(t,n,e){var r;const o=tt(t)||{},i=ve(t,W.frames),l=o.iterations;let s=1;"number"==typeof l&&(s=l||1),"infinite"===l&&(s=1/0),s<1&&(s=1);const u=+(o.duration||nn),c=u&&s?u*(s===1/0?1/0:s):u?(null!=s?s:1)*u:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let p=null,y=!1,m=-(o.delay||0),h=0,b=1,g=!1;const A=o.frameRate,w=A&&A>0?1e3/A:0;let k=0;const M=()=>{const t=h?(Date.now()-h)*b:0;return m+t},j=()=>{let t=M();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function x(t){let e=function(){const n=u>0?u:1;let e=0,r=0;u>0?(t=sn(t,0,s*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,s-1),e=sn((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=ye(r,e*u);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(j()):v&&x(0));const S=()=>!!y&&!!n.isConnected()&&(b<0?M()>0:!(Number.isFinite(c)&&j()>=c)),O=t=>{null!==p&&(po(p),p=null),(t||S())&&(p=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=j(),i=M();if(i<0&&b>0)v&&x(0);else{if(b<0&&i<=0)return N(),x(0),void(g||(g=!0,null==(t=null==e?void 0:e.wt)||t.call(e)));if(b>0&&c&&Number.isFinite(c)&&o>=c)return N(),x(d?c:0),void(g||(g=!0,null==(r=null==e?void 0:e.wt)||r.call(e)));if(w>0){const t=Date.now();if(k&&t-k<w)return;k=t}x(o)}})(),O()}))},N=()=>{if(!y)return;let t=M();Number.isFinite(c)&&t>c&&(t=c),m=t,h=0,y=!1,null!==p&&(po(p),p=null),t>=0?x(t):v&&x(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>S(),play:()=>{var t;(()=>{if(!y){if(b>=0)Number.isFinite(c)&&m>=c&&(m=0);else if(m<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");m=c}g=!1,y=!0,h=Date.now(),O(!0)}})(),null==(t=null==e?void 0:e.kt)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.Mt)||t.call(e)},cancel:()=>{var t;N(),m=0,h=0,y=!1,g=!1,x(m),null==(t=null==e?void 0:e.jt)||t.call(e)},finish:()=>{((t=!0)=>{var n;m=Number.isFinite(c)?c:j(),h=0,y=!1,null!==p&&(po(p),p=null),x(d?m:0),t&&!g&&(g=!0,null==(n=null==e?void 0:e.wt)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let n=M();Number.isFinite(c)&&n>c&&(n=c),t<0!=b<0&&(g=!1),b=t,m=n,y&&(h=Date.now())},getCurrentTime:()=>j(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(c)&&t>c&&(t=c),m=t,y&&(h=Date.now()),(!Number.isFinite(c)||t<c)&&(g=!1),x(j())},destroy:()=>{var t;z.cancel(),null==(t=null==e?void 0:e.xt)||t.call(e)}};return z}(t,n||function(t){const n=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(e,r,o)=>{r=ln(r);const i=mo(e),l=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==l.length||n.has(i)||(n.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===r&&"pattern"===n.tagName?"patternTransform":r;n.setAttribute(e,o),tn.has(r)&&(n.style[r]=o)}}}}(r),e),l=f(a({},i),{getRootElement:()=>r||null});return o.trigger&&yo(l,o.trigger),l}function bo(t,n,e,r){var o,i;let l=null!=(o=t.v)?o:t.value;const s=null!=(i=t.e)?i:t.easing,u={offset:n,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let c,a=e;return qt.has(e)&&Array.isArray(l)?c=Jt(l):"transform"!==e||null===l||"object"!=typeof l||Array.isArray(l)?Yt.has(e)?(Array.isArray(l)&&("translate"===e&&(l=l.map(t=>t+"px")),l=l.join(",")),"rotate"===e&&(l+="deg"),c=e+"("+l+")",a="transform"):c="d"===e?'path("'+(l&&"object"==typeof l&&Array.isArray(l.paths)?l.paths:[]).map(t=>Ut(t,!0)).join("")+'")':""+l:(c=$t(l,{P:!0}),a="transform"),CSS.supports(ln(a),c)||r.add(a),a=en(a),u[a]=c,u}function go(t,n,e){var r,o,i,l,s;const u=[];for(let c=0;c<n.length;c++){const d=n[c],v=null!=(r=d.t)?r:0;if(v<0){const e=n[c+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?Gt(d.e)(n):n,{right:o}=Qt(d.e,n);u.push({t:0,v:le(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[c-1];if(r&&(null!=(l=r.t)?l:0)<=e){const n=null!=(s=r.t)?s:0,o=(e-n)/(v-n),i=r.e?Gt(r.e)(o):o,{left:l}=Qt(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:l})),u.push({t:e,v:le(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function Ao(t,n,e){var r;const o=new Map;for(const[i,l]of Object.entries(t)){const t=e.duration||1,s=go(i,l.kfs||l.keyframes||[],t),u=[];for(let e=0;e<s.length;e++){const o=s[e],l=bo(o,sn((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(l.offset||0)>0&&u.push(f(a({},l),{offset:0})),u.push(l)}u.length>0&&(u[u.length-1].offset||0)<1&&u.push(f(a({},u[u.length-1]),{offset:1})),u.length>0&&o.set(i,u)}return o}var wo="http://www.w3.org/2000/svg";function ko(t,n){if(!t)return null;const e=t,{type:r,children:o,style:u}=e,c=((t,n)=>{var e={};for(var r in t)l.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&s.call(t,r)&&(e[r]=t[r]);return e})(e,["type","children","style"]),a=c.St;void 0!==a&&delete c.St;const f=nt(t)||n,d=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(u,f);let v;if(o)for(const t of o){const n=ko(t,f);n&&(v||(v=[]),v.push(n))}const p=function(t,n,e,r,o){if(gn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(wo,t);for(const t in n){const e=On(t,n[t]);void 0!==e&&(kn.has(t)?i.style[t]=String(e):i.setAttribute(ln(t),e))}if(e)for(const t in e)i.style[t]=String(e[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",function(t){const n={};for(const e of Object.keys(t)){const r=en(e);if(H.has(r))continue;if("style"===r)continue;let o=t[e];if(qt.has(r)&&Array.isArray(o))n[r]=Jt(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)Yt.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n.transform=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n.transform=$t(t,{P:!1})}}return n}(c),d,v,c[Y]||c[q]);return p&&void 0!==a&&p.setAttribute("type",a),p}var Mo,jo="data";function xo(t,n,e,r){const o=function(t){const n=[],e=(t,r)=>{if(t&&t.effects){const e={errors:[],warnings:[],S:!1};if(!Ct.h(t.effects,e,[r+".effects"]))for(const t of e.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>e(t,r+".children["+n+"]"))};return e(t,"root"),n}(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=vo(t,(tt(t)||{}).mode===G.frames?W.frames:W.waapi);let i=null;if(r){t=hn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(i=ko(t),i&&n.replaceChildren(i))}return function(t,n,e,r){return function(t,n,e,r){const o=tt(t)||{};return function(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{wt:()=>{var t;null==(t=null==n?void 0:n.wt)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}(o,e,e=>o.mode===G.frames?ho(t,n,e,r):function(t,n,e,r){var o;const i=tt(t)||{};if(!e)if(t.id){const n=mo(t.id);(e=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const l=ve(t,W.waapi),s=[],u=i.iterations;let c;"number"==typeof u&&(c=u),"infinite"===u&&(c=1/0);const a=new Set;let f=!1,d=!1;(null==l?void 0:l.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of l||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const l=mo(t.id),u=(null==e?void 0:e.querySelectorAll(l))||document.querySelectorAll(l);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+l+'"');const v=Ao(r,a,i),p=i.delay&&i.delay>0?i.delay:void 0;let y;if(i.delay&&i.delay<0&&i.duration){const t=-i.delay;y=c===1/0?t%i.duration:Math.min(t,i.duration*(null!=c?c:1))}const m={duration:i.duration,delay:p,fill:null!=(o=i.fill)?o:"forwards",direction:i.direction,iterations:c};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of v)if(t.length>0)try{const r=new KeyframeEffect(e,t,m),o=new Animation(r,document.timeline);(null==n?void 0:n.wt)&&(o.onfinish=()=>{var t;f||(f=!0,null==(t=n.wt)||t.call(n))}),(null==n?void 0:n.xt)&&(o.onremove=()=>{var t;d||(d=!0,null==(t=n.xt)||t.call(n))}),void 0!==y&&(o.currentTime=y),s.push(o)}catch(t){console.warn(t)}}}if(!r&&a.size)return console.warn("Unsupported CSS attrs: "+[...a].join(", ")),null;const v={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;f=!1,s.forEach(t=>t.play()),null==(t=null==n?void 0:n.kt)||t.call(n)},pause:()=>{var t;s.forEach(t=>t.pause()),null==(t=null==n?void 0:n.Mt)||t.call(n)},cancel:()=>{var t;f=!1,s.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.jt)||t.call(n)},finish:()=>{var t;for(const n of s)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>(s.forEach(n=>n.playbackRate=t),v),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=s[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{f=!1,s.forEach(n=>{n.currentTime=t})},destroy:()=>{var t;v.cancel(),s.splice(0,s.length),d||(d=!0,null==(t=null==n?void 0:n.xt)||t.call(n))}};return i.trigger&&yo(v,i.trigger),v}(t,e,r,o.mode===G.waapi)||ho(t,n,e,r))}(t,n,e,r)}(t,n,e,i)}function So(t){const{src:n,data:e,Ot:r,Nt:o,container:i}=t;if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==e)return xo(e,r,o,i);let l=null,s=[],u=!1;const c=t=>{l?t(l):s&&s.push(t)};return fetch(n).then(t=>t.json()).then(t=>{var e;if(!u)if((e=t)&&"object"==typeof e&&!Array.isArray(e)&&"svg"===e.type){l=xo(t,r,o,i);const n=s;s=null,null==n||n.forEach(t=>t(l))}else console.error('createAnimator: invalid animation document format at "'+n+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+n+'"',t)}),{isReady:()=>!!l,getRootElement:()=>l?l.getRootElement():null,isPlaying:()=>(null==l?void 0:l.isPlaying())||!1,play:()=>{c(t=>t.play())},pause:()=>{c(t=>t.pause())},cancel:()=>{c(t=>t.cancel())},finish:()=>{c(t=>t.finish())},setPlaybackRate:t=>{c(n=>n.setPlaybackRate(t))},getCurrentTime:()=>l?l.getCurrentTime():null,setCurrentTime:t=>{c(n=>n.setCurrentTime(t))},destroy:()=>{u=!0,s=null,null==l||l.destroy()}}}function Oo(){const t=document.querySelectorAll("["+E+"]");for(let n=0;n<t.length;n++){const e=t[n];if(!e[Z]){const t=e.getAttribute(E);t&&(e[Z]=So({src:t,container:e}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=Oo,window.createAnimator=So,window.setupAnimationTriggers=yo),Mo=d,((n,r,i,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))l.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(s=e(r,i))||s.enumerable});return n})(t({},"__esModule",{value:!0}),Mo)})();
|