@pixodesk/svg-animator-web 1.0.16 → 1.0.18
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 +27 -0
- package/dist/index.cjs +831 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +275 -64
- package/dist/index.d.ts +275 -64
- package/dist/index.js +825 -91
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.umd.js +825 -91
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
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={};function d(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function m(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};if(void 0!==e.value)return{kind:"static",value:e.value}}return{kind:"static",value:t}}function h(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 p(t,e,n){if(!e)return t;delete t.transform;let r=t;var o;return r=y(r,"skew",e.skew,n),r=v(r,e.origin,!0),r=y(r,"scale",void 0===(o=e.scale)?void 0:Array.isArray(o)?[o[0]/100,o[1]/100]:o,n),r=y(r,"rotate",e.rotate,n),r=v(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=y(r,"translate",e.translate,n):(r=v(r,e.origin,!0),r=y(r,"translate",e.translate,n),r=v(r,e.origin,!1)),r}function y(t,e,n,r){if(void 0===n)return t;if("skew"===e){const e=m(n);return"static"!==e.kind?(r.warnings.push("transformation.skew: only static skew is supported"),t):{type:"g",transform:"skewX("+e.value[0]+")skewY("+e.value[1]+")",children:[t]}}const o=m(n);if("static"===o.kind)return{type:"g",transform:{value:d(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>h(t,d(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),{type:"g",animate:{transform:n},children:[t]}}return t}function v(t,e,n){if(void 0===e)return t;const r=m(e),o=t=>n?[-t[0],-t[1]]:t;return"absent"===r.kind?t:"static"===r.kind?0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]}:"animated"===r.kind?{type:"g",animate:{transform:{keyframes:r.keyframes.map(t=>h(t,{translate:o(t.value)}))}},children:[t]}:t}function g(t,e,n){var r,o,a;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.ref)?void 0:o.type)){const r=t.effects.ref.baseId;"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(a=t.children)||a.forEach(t=>g(t,e,n))}function b(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=k(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),a.animate={transform:r};const o=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),l=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&&!o||(r.origin=e.origin);const a={value:r};return void 0!==t.time&&(a.time=t.time),void 0!==t.easing&&(a.easing=t.easing),a});l.every(t=>0===Object.keys(t.value).length)?(delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate):t.animate.transform={keyframes:l},i=!0}}const l=void 0!==(null==e?void 0:e.translate),u=i||l,c=i&&k((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&k((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=A(a.full),r=A(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=k(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=p(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=p(u,i,o),u.id=n),u}function A(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 k(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 w(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(f,{COLOUR_ATTR_NAMES:()=>Oe,PX_ANIMATOR_DATA_KEY:()=>gr,PX_ANIM_ATTR_NAME:()=>W,PX_ANIM_SRC_ATTR_NAME:()=>B,PX_TRANSFORM_PART_KEYS:()=>Q,PxAnimatedSvgDocumentSchema:()=>It,PxAnimationDefinitionSchema:()=>nt,PxAnimatorConfigSchema:()=>it,PxAnimatorEngine:()=>q,PxAnimatorMode:()=>K,PxAttrValueSchema:()=>lt,PxBezierPathSchema:()=>Et,PxBindingSchema:()=>st,PxDefsSchema:()=>at,PxEasingOrRefSchema:()=>Z,PxEffectsSchema:()=>xt,PxElementAnimationSchema:()=>rt,PxFillGradientEffectSchema:()=>wt,PxGradientSpreadMethod:()=>gt,PxGradientStopSchema:()=>At,PxGradientType:()=>bt,PxGradientUnits:()=>vt,PxKeyframeSchema:()=>J,PxLoopSchema:()=>$,PxMaskedByEffectSchema:()=>mt,PxNodeBase:()=>Ot,PxNodeSchema:()=>Mt,PxPropertyAnimationSchema:()=>H,PxRefEffectSchema:()=>yt,PxRepeaterEffectSchema:()=>dt,PxRetimeEffectSchema:()=>pt,PxStrokeGradientEffectSchema:()=>jt,PxSvgNodeExtra:()=>_t,PxTextAlongPathEffectSchema:()=>Pt,PxTransformPartsSchema:()=>tt,PxTransformValueSchema:()=>et,PxTransformationEffectSchema:()=>ft,PxTriggerSchema:()=>ot,PxTrimPathEffectSchema:()=>ht,STYLE_ATTR_NAMES:()=>Ee,TRANSFORM_FN_NAMES:()=>Me,applyPlayerEffects:()=>Wn,calcAnimationValues:()=>Mn,camelCaseToKebabWordIfNeeded:()=>Re,collectSampleTimes:()=>Fr,createAnimator:()=>br,createAnimatorImpl:()=>vr,createBasicFrameLoopAnimator:()=>ir,createFrameLoopAnimator:()=>sr,createWebApiAnimator:()=>fr,describeSchema:()=>L,diffInEffect:()=>Dr,evaluateMotionPathSegment:()=>Je,generateNewIds:()=>pr,getAnimatorConfig:()=>Nt,getBindings:()=>Rt,getChildren:()=>Ut,getDefs:()=>Ct,getNormalizedProps:()=>nr,isPxElementFileFormat:()=>zt,isPxElementFileFormatDeep:()=>Tt,loadTagAnimators:()=>Ar,materialiseAllInTree:()=>Zn,materialiseAnimatedUseInstances:()=>qn,materialiseInternalLoopsInPropAnim:()=>wn,materialiseInternalLoopsInTree:()=>jn,materialiseMotionPathInPropAnim:()=>tn,materialiseMotionPathsInTree:()=>fn,normalizeDocument:()=>Sn,propAnimIsMotionPath:()=>Xe,px:()=>D,renderNode:()=>rr,schemaKeys:()=>F,setupAnimationTriggers:()=>or,toRGBA:()=>xe,validateNodeEffects:()=>St,visualModelAt:()=>Lr});var j=class{_canSanitize(t){return this.isValid(t)}optional(){return new P(this)}},P=class extends j{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)}},x=class extends j{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(w(null!=n?n:[])+": expected string, got "+typeof t),!1)}},S=class extends j{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(w(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},O=class extends j{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(w(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},M=class extends j{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(w(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},_=class extends j{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(w(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},I=class extends j{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(w(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))}},E=class extends j{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(w(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)}},z=class extends j{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(w(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(w(o)+": unexpected extra key"),o.pop(),a=!1);return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},T=class extends j{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=u({},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(w(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)}},N=class extends j{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(w(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)}},C=class extends j{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(w(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)}},R=class extends j{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},U=class extends j{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)}},V=class extends j{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(w(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 F(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function L(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 D={string:(t="")=>new x(t),number:(t=0)=>new S(t),boolean:(t=!1)=>new O(t),literal:t=>new M(t),enum:(t,e)=>new _(t,e),union:(t,e)=>new I(t,e),discriminatedUnion:(t,e)=>new E(t,e),object:t=>new z(t),openObject:(t,e)=>new T(t,e),extendedObject:(t,e)=>new z(u(u({},t._shape),e)),array:t=>new N(t),record:t=>new C(t),any:()=>new R,tuple:t=>new V(t),lazy:(t,e)=>new U(t,e)},B="data-px-animation-src",W="_px_animator",K={auto:"auto",webapi:"webapi",frames:"frames"},q={webapi:K.webapi,frames:K.frames},G="text",X="textContent",Y=new Set(["type","children","animator","meta","animate",G,X]),Z=D.union([D.string(),D.tuple([D.number(),D.number(),D.number(),D.number()])]),J=(D.union([D.string(),D.number(),D.array(D.number()),D.lazy(()=>tt,{}),D.object({path:D.string()}),D.lazy(()=>D.object({paths:D.array(Et)}),{paths:[]})]),D.object({time:D.number().optional(),t:D.number().optional(),value:D.any().optional(),v:D.any().optional(),easing:Z.optional(),e:Z.optional(),tangentOut:D.tuple([D.number(),D.number()]).optional(),to:D.tuple([D.number(),D.number()]).optional(),tangentIn:D.tuple([D.number(),D.number()]).optional(),ti:D.tuple([D.number(),D.number()]).optional(),selected:D.boolean().optional()})),$=D.object({segmentCount:D.number().optional(),before:D.boolean().optional(),alternate:D.boolean().optional()}),H=D.object({keyframes:D.array(J).optional(),kfs:D.array(J).optional(),loop:D.union([$,D.boolean()]).optional(),autoOrient:D.boolean().optional()}),Q=["translate","rotate","scale","origin"],tt=D.object({translate:D.tuple([D.number(),D.number()]).optional(),rotate:D.number().optional(),scale:D.tuple([D.number(),D.number()]).optional(),origin:D.tuple([D.number(),D.number()]).optional()}),et=D.union([D.string(),D.object({value:tt}),H]),nt=D.record(H),rt=D.union([D.string(),D.array(D.union([D.string(),nt])),nt]),ot=D.object({startOn:D.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:D.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:D.number().optional()}),at=D.object({easings:D.record(D.tuple([D.number(),D.number(),D.number(),D.number()])).optional(),animations:D.record(nt).optional(),styles:D.record(D.any()).optional()}),it=D.object({mode:D.enum([K.auto,K.webapi,K.frames]).optional(),duration:D.number().optional(),delay:D.number().optional(),iterations:D.union([D.number(),D.literal("infinite")]).optional(),fill:D.enum(["forwards","backwards","both","none"]).optional(),direction:D.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:D.number().optional(),trigger:ot.optional(),definitions:at.optional(),animate:D.record(rt).optional(),debug:D.boolean().optional(),debugInstName:D.string().optional()}),st=D.object({id:D.string(),animate:rt}),lt=D.union([D.string(),D.number(),D.object({value:D.any()}),H]),ut=D.union([D.number(),D.object({value:D.number()}),D.object({keyframes:D.array(J),autoOrient:D.boolean().optional()})]),ct=D.union([D.tuple([D.number(),D.number()]),D.object({value:D.tuple([D.number(),D.number()])}),D.object({keyframes:D.array(J),autoOrient:D.boolean().optional()})]),ft=D.object({translate:ct.optional(),rotate:ut.optional(),scale:ct.optional(),skew:ct.optional(),origin:ct.optional()}),dt=D.object({copies:D.number().optional(),translate:ct.optional(),rotate:ut.optional(),scale:ct.optional(),origin:ct.optional()}),mt=D.object({href:D.string().optional(),maskType:D.string().optional(),maskUnits:D.string().optional(),maskContentUnits:D.string().optional()}),ht=D.object({offset:ut.optional(),range:ct.optional(),trimAllAsOne:D.boolean().optional()}),pt=D.object({baseId:D.string().optional(),start:D.number().optional(),stretch:D.number().optional(),timeCrop:D.tuple([D.number(),D.number()]).optional()}),yt=D.object({baseId:D.string().optional(),type:D.string().optional()}),vt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},gt={pad:"pad",reflect:"reflect",repeat:"repeat"},bt={linear:"linear",radial:"radial"},At=D.object({offset:D.number(),color:D.string()}),kt=D.union([D.array(At),D.object({value:D.array(At)}),D.object({keyframes:D.array(J)})]),wt=D.object({type:D.enum([bt.linear,bt.radial]),p1:D.tuple([D.number(),D.number()]).optional(),p2:D.tuple([D.number(),D.number()]).optional(),c:D.tuple([D.number(),D.number()]).optional(),r:D.number().optional(),fp:D.tuple([D.number(),D.number()]).optional(),stops:kt.optional(),gradientUnits:D.string().optional(),spreadMethod:D.string().optional(),gradientTransform:D.string().optional()}),jt=wt,Pt=D.object({href:D.string(),lengthAdjust:D.string().optional(),method:D.string().optional(),spacing:D.string().optional(),startOffset:ut.optional(),textLength:ut.optional()}),xt=D.object({transformation:ft.optional(),repeater:dt.optional(),maskedBy:mt.optional(),trimPath:ht.optional(),retime:pt.optional(),isCombinedShape:D.boolean().optional(),ref:yt.optional(),fillGradient:wt.optional(),strokeGradient:jt.optional(),textAlongPath:Pt.optional()});function St(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!xt.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 Ot=D.openObject({type:D.string(),id:D.string().optional(),meta:D.any().optional(),effects:xt.optional(),animate:rt.optional(),style:D.union([D.string(),D.record(D.union([D.string(),D.number()]))]).optional()},lt),Mt=D.openObject(c(u({},Ot._shape),{children:D.lazy(()=>D.array(Mt),[]).optional()}),lt),_t=D.object({width:D.number().optional(),height:D.number().optional(),viewBox:D.string().optional(),animator:it.optional()}),It=D.openObject(c(u(u({},Ot._shape),_t._shape),{type:D.literal("svg"),children:D.array(Mt).optional()}),lt),Et=D.object({v:D.array(D.array(D.number())),i:D.array(D.array(D.number())).optional(),o:D.array(D.array(D.number())).optional(),c:D.boolean().optional()});function zt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&("svg"===t.type||"svg"===t.tagName)}function Tt(t){const e=It.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Nt(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 Ct(t){var e;if(t)return null==(e=Nt(t))?void 0:e.definitions}function Rt(t){var e;if(!t)return;const n=null==(e=Nt(t))?void 0:e.animate;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Ut(t){return null==t?void 0:t.children}function Vt(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Vt);const e={};for(const n of Object.keys(t))e[n]=Vt(t[n]);return e}function Ft(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 Lt(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Dt(t){var e;const n=Lt(t.x),r=Lt(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 Bt(t,e){return"_lw_"+e+"_"+t.nextId++}function Wt(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Kt(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Kt(t,e))}var qt=Vt;function Gt(t,e,n,r){if(!e)return t;const o=Bt(n,"grad"),a=function(t,e){const n={type:t.type===bt.radial?"radialGradient":"linearGradient",id:e};t.type===bt.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);return n.children=function(t){var e,n,r,o;if(!t)return[];if(Array.isArray(t))return t.map(Xt);if("object"==typeof t&&Array.isArray(t.value))return t.value.map(Xt);const a=t.keyframes;if(!Array.isArray(a)||!a.length)return[];let i=0;for(const t of a){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>i&&(i=n.length)}if(!i)return[];const s=null!=(n=a[0].value)?n:a[0].v,l=[];for(let t=0;t<i;t++){const e=null!=(o=null!=(r=null==s?void 0:s[t])?r:Yt(a,0,t))?o:{offset:t/Math.max(1,i-1),color:"#000000"};l.push({offset:e.offset,color:e.color})}return l.map((t,e)=>function(t,e,n){var r,o,a,i,s;const l=[],u=[];let c=!1;for(const f of e){const d=null!=(o=null!=(r=f.time)?r:f.t)?o:0,m=null!=(a=f.value)?a:f.v,h=null!=(i=null==m?void 0:m[n])?i:Yt(e,e.indexOf(f),n);if(!h)continue;const p=null!=(s=f.easing)?s:f.e,y={time:d,value:h.color};void 0!==p&&(y.easing=p),l.push(y);const v={time:d,value:h.offset};void 0!==p&&(v.easing=p),u.push(v),h.offset!==t.offset&&(c=!0)}const f={type:"stop",offset:Zt(t.offset),stopColor:t.color},d={};l.length&&(d.stopColor={keyframes:l});c&&u.length&&(d.offset={keyframes:u});Object.keys(d).length&&(f.animate=d);return f}(t,a,e))}(t.stops),n}(e,o);return n.defs.push(a),t[r]="url(#"+o+")",t}function Xt(t){return{type:"stop",offset:Zt(t.offset),stopColor:t.color}}function Yt(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 Zt(t){return Math.round(1e3*t)/10+"%"}function Jt(t,e,n,r){if(!e)return t;if(!e.href)return r.errors.push("maskedBy.href missing — cannot build mask"),t;const o=Bt(r,"mask");let a={type:"use",href:"#"+e.href};if(n)a=$t(a,n,r);else if(te(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=h(t,void 0);if(Array.isArray(e.translate)&&i.push(c(u({},r),{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(c(u({},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(c(u({},r),{value:t}))}}let f=t;i.length&&(f={type:"g",animate:{transform:{keyframes:i}},children:[f]});s.length&&(f={type:"g",animate:{transform:{keyframes:s}},children:[f]});l.length&&(f={type:"g",animate:{transform:{keyframes: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,m;const h=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const y=[];for(;null!==(p=h.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);y.push({name:p[1],args:t})}if(!y.length)return;const v=y[y.length-1];if("translate"===v.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,m=null!=(r=v.args[0])?r:0,h=null!=(o=v.args[1])?o:0;if(m!==-f||h!==-d)continue;const p={};p.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;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+n]:[t,n]}for(let e=t+1;e<y.length-1;e++){const t=y[e];if("rotate"===t.name)p.rotate=(null!=(s=p.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;p.scale=p.scale?[p.scale[0]*e,p.scale[1]*n]:[e,n]}}return p}let g,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;g=g?[g[0]+e,g[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!=(m=t.args[0])?m:1,n=t.args.length>1?t.args[1]:e;A=A?[A[0]*e,A[1]*n]:[e,n]}const k={};g&&(k.translate=g);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=$t(a,e,r))}const i=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||te(t))}(t);a=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?oe(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=ee(l),n=ee(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=ne(l,t),n=ne(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 $t(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=m(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=Ht(o,"translate",e.translate,void 0,n),o=Ht(o,"rotate",e.rotate,r,n),o=Ht(o,"scale",e.scale,r,n),o}function Ht(t,e,n,r,o){if(void 0===n)return t;const a=m("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);return"static"===a.kind?{type:"g",transform:{value:d(e,Qt(e,a.value),r)},children:[t]}:"animated"===a.kind?{type:"g",animate:{transform:{keyframes:a.keyframes.map(t=>h(t,d(e,Qt(e,t.value),r)))}},children:[t]}:t}function Qt(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function te(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function ee(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 ne(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=re(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function re(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 oe(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 ae="content";function ie(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 c(u({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?c(u({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return c(u({},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 c(u({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?c(u({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return c(u({},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 c(u({},e),{keyframes:e.keyframes.map(t=>t&&void 0!==t.value?c(u({},t),{value:r(t.value)}):t)});if(void 0!==e.value)return c(u({},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 se=!1;function le(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}function ue(t,e,n){const r=Wt(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=ce(r,e,n,new Set);if(o)if(se){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Dt(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function ce(t,e,n,r){var o,a;if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const i=n.idMap.get(t);if(!i)return void n.warnings.push('retime: target "'+t+'" not found');const s=qt(i);if(function(t,e){Ft(t,()=>Bt(e,"retimed"))}(s,n),"use"===i.type?de(s,e.start,e.stretch):fe(s,e.start,e.stretch),(null==(o=s.effects)?void 0:o.retime)&&(delete s.effects.retime,0===Object.keys(s.effects).length&&delete s.effects),"use"===i.type&&i.href){const o=Wt(i.href);if(o){const c=null==(a=i.effects)?void 0:a.retime,f=c?(l=le(c),{start:(u=e).start+u.stretch*l.start,stretch:u.stretch*l.stretch}):e,d=new Set(r);d.add(t);const m=ce(o,f,n,d);m&&(s.href="#"+m)}}var l,u;return n.defs.push(s),"string"==typeof s.id&&n.idMap.set(s.id,s),"string"==typeof s.id?s.id:void 0}function fe(t,e,n){var r;de(t,e,n),null==(r=t.children)||r.forEach(t=>fe(t,e,n))}function de(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)}}function me(t,e,n){if(null!=n)if("number"!=typeof n){if("object"==typeof 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=u({},n||{});return o[e]={keyframes:r.keyframes},void(t.animate=o)}if("number"==typeof r.value)return void(t[e]=String(r.value))}}else t[e]=String(n)}function he(t){var e,n,r,o;const a=t.v,i=t.i,s=t.o,l=t.c;if(!a.length)return"";const u=[],c=a.length;u.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<c;t++){const r=a[t-1],o=null!=(e=null==s?void 0:s[t-1])?e:r,l=null!=(n=null==i?void 0:i[t])?n:a[t],c=a[t];o[0]===r[0]&&o[1]===r[1]&&l[0]===c[0]&&l[1]===c[1]?u.push("L"+c[0]+","+c[1]):u.push("C"+o[0]+","+o[1]+","+l[0]+","+l[1]+","+c[0]+","+c[1])}if(l&&c>0){const t=a[c-1],e=null!=(r=null==s?void 0:s[c-1])?r:t,n=null!=(o=null==i?void 0:i[0])?o:a[0],l=a[0];e[0]===t[0]&&e[1]===t[1]&&n[0]===l[0]&&n[1]===l[1]||u.push("C"+e[0]+","+e[1]+","+n[0]+","+n[1]+","+l[0]+","+l[1]),u.push("z")}return u.join("")}function pe(t,e,n){return t+(e-t)*n}function ye(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=pe(t[a]||0,e[a]||0,n);return r}function ve(t,e,n){return[pe(t[0]||0,e[0]||0,n),pe(t[1]||0,e[1]||0,n),pe(t[2]||0,e[2]||0,n),pe(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function ge(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(be(t[a],e[a],n));return o}function be(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),m=Math.min(t.v.length,e.v.length),h=[],p=[],y=[];for(let n=0;n<m;n++){const f=t.v[n],m=e.v[n];h.push(ye(f,m,d));const v=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,g=null!=(i=null==(a=e.i)?void 0:a[n])?i:m;p.push(ye(v,g,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:m;y.push(ye(b,A,d))}return{v:h,i:p.length?p:void 0,o:y.length?y:void 0,c:null!=(f=t.c)?f:e.c}}function Ae(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 ke(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=Ae(e,r,t),((s*n+i)*n+a)*n;var n}}function we(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function je(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=Ae(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=we(t,e,o),i=we(e,n,o),s=we(n,r,o),l=we(a,i,o),u=we(i,s,o),c=we(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 m,h;f>1e-9&&Math.abs(d)>1e-9&&(m=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,y=1-d;return p>1e-9&&Math.abs(y)>1e-9&&(h=[(c[1][0]-f)/p,(c[1][1]-d)/y,(c[2][0]-f)/p,(c[2][1]-d)/y]),{left:m,right:h}}function Pe(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function xe(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 Se(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 Oe=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),Me=new Set(["translate","rotate","scale","skew"]),_e=new Set(["offset-distance","offsetDistance"]);function Ie(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.scale,u=r?"px":"",c=r?"deg":"";return a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),null!=s&&o.push("rotate("+s+c+")"),l&&o.push("scale("+l[0]+","+l[1]+")"),i&&o.push("translate("+-i[0]+u+","+-i[1]+u+")"),o.join("")}var Ee=new Set(["offset-distance","offsetDistance"]),ze=1e3;function Te(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function Ne(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","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function Re(t){return Ce.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ue(t,e,n){return Math.max(e,Math.min(t,n))}function Ve(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 Fe=1e-4;function Le(t,e,n,r,o){const a=De(t,e,n,r,o);if(0===a[0]&&0===a[1]){return De(t,e,n,r,o<.5?o+Fe:o-Fe)}return a}function De(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 Be(t,e,n,r,o=100){const a=o+1,i=new Float64Array(a),s=new Float64Array(a);let l=Ve(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=Ve(t,e,n,r,a),d=f[0]-l[0],m=f[1]-l[1];u+=Math.sqrt(d*d+m*m),i[c]=a,s[c]=u,l=f}return{ts:i,ds:s}}function We(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])}function Ke(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 qe(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Ge(t){var e;return null!=(e=t.easing)?e:t.e}function Xe(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 Ye=new WeakMap;function Ze(t,e,n,r){var o,a;const i=Ye.get(t);if(i)return i;const s=null!=(o=t.tangentOut)?o:t.to,l=null!=(a=e.tangentIn)?a:e.ti,u=[n[0]+(s?s[0]:0),n[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],f=Be(n,u,c,r),d={P0:n,P1:u,P2:c,P3:r,lut:f,totalArc:f.ds[f.ds.length-1]};return Ye.set(t,d),d}function Je(t,e,n,r,o,a){const i=Ze(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=Ve(i.P0,i.P1,i.P2,i.P3,s);if(!a)return{translate:l};const u=Le(i.P0,i.P1,i.P2,i.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var $e=.5,He=5,Qe=32;function tn(t,e){var n,r,o,a;if(!Xe(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:$e,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:He,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:Qe,f=[],d=Ke(i[0]);if(!d)return t;const m=s?function(t,e){const n=Ke(t),r=Ke(e);if(!n||!r)return 0;const o=Ze(t,e,n,r),a=Le(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(en(qe(i[0]),on(nn(i[0]),nn(i[0]),0,d,m,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Ke(e),o=Ke(n);r&&o?(s&&t>0&&an(f,e,n,r,o,u),sn(f,e,n,r,o,s,l,u,c)):f.push(en(qe(n),on(nn(n),nn(n),1,null!=o?o:[0,0],void 0,s)))}const h=Ge(i[i.length-1]);h&&(f[f.length-1].e=h),s&&function(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}}(f);const p={kfs:f};return void 0!==t.loop&&(p.loop=t.loop),p}function en(t,e){return{t:t,v:e}}function nn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function rn(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 on(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]=rn(o,s,n))}return void 0!==o&&(i.rotate=o),i}function an(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,n,r,o),f=Le(c.P0,c.P1,c.P2,c.P3,0),d=180*Math.atan2(f[1],f[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(d,u);if(Math.abs(m)<=a)return;const h=on(nn(e),nn(e),0,r,d,!0);t.push(en(qe(e),h))}function sn(t,e,n,r,o,a,i,s,l){const u=Ze(e,n,r,o),c=qe(e),f=qe(n),d=Ge(e),m=(h=d)?ke([h[1],h[0],h[3],h[2]]):t=>t;var h;const p=nn(e),y=nn(n),v=function(t,e,n,r,o){const a=[];ln(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),ln(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++)un(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),g=[];for(const t of v){const e=We(u.lut,t),n=Ue(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Ue(m(n),0,1),p:n,pos:Ve(u.P0,u.P1,u.P2,u.P3,t)};if(a){const e=Le(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}g.push(r)}let b=d,A=0;const k=t.length-1;for(let e=0;e<g.length;e++){const n=g[e],r=A<1?Ue((n.u-A)/(1-A),0,1):1,{left:o,right:i}=je(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=on(p,y,n.p,n.pos,n.rotateDeg,a);t.push(en(l,u)),b=i,A=n.u}}function ln(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),m=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),m>1e-6&&m<.999999&&o.push(m)}function un(t,e,n,r,o,a,i,s){const l=(t+e)/2,u=Ve(r.P0,r.P1,r.P2,r.P3,t),c=Ve(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Ve(r.P0,r.P1,r.P2,r.P3,t+.25*f),m=Ve(r.P0,r.P1,r.P2,r.P3,l),h=Ve(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(cn(d,u,c),cn(m,u,c),cn(h,u,c));let y=!0;if(o){const n=Le(r.P0,r.P1,r.P2,r.P3,t),o=Le(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)}p<=a&&y||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,un(t,l,n,r,o,a,i,s),un(l,e,n,r,o,a,i,s))}function cn(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 fn(t,e){const n=dn(t,e);return null!=n?n:t}function dn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=dn(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&&Xe(n)){const o=tn(n,e);o!==n&&(r=c(u({},t),{transform:o}))}}if(!n&&!r)return null;const a=u({},t);return n&&(a.children=n),r&&(a.animate=r),a}function mn(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 hn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function pn(t){return"string"==typeof t&&void 0!==hn(t)}function yn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=hn(t.path);return e?{paths:mn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&pn(e[0])){const t=[];for(const n of e){const e=hn(n);e&&t.push(...mn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&pn(t[0])){const e=[];for(const n of t){const t=hn(n);t&&e.push(...mn(t))}return{paths:e}}return{paths:t}}if(pn(t)){return{paths:mn(hn(t))}}return t}function vn(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 gn(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 bn(t,e,n,r){var o,a;if("d"===t){return{paths:ge(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 Oe.has(t)?ve(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?pe(e,n,r):Me.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?ye(e||[],n||[],r):pe(+(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)o[a]=pe(+(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]=ye(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function An(t,e,n,r){var o,a,i,s,l;const u=e.length-1,c=Ue(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,m=null!=(i=e[e.length-1].t)?i:0;let h,p;n.before?(h=0,p=d):(h=m,p=r);const y=p-h;if(y<=0)return e;const v=null!=(s=f[0].t)?s:0,g=(null!=(l=f[f.length-1].t)?l:0)-v;if(g<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-v)/g,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/g),k=(y-A*g)/g,w=[];function j(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?Pe(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?ke(i.e)(l):l,c=bn(t,i.v,r.v,u),{left:f}=je(i.e,l);return w.length>0&&i.relT<=a&&(w[w.length-1].e=f),void w.push({t:e+a*g,v:c,e:void 0})}const i={t:e+r.relT*g,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(i.tangentIn=r.tangentIn),r.tangentOut&&(i.tangentOut=r.tangentOut),w.push(i)}}for(let t=0;t<A;t++){const e=n.before?A-1-t:t,r=!!n.alternate&&e%2==0;j(h+t*g,r)}if(k>1e-9){const t=!!n.alternate&&A%2==0;j(h+A*g,t,k)}return n.before?[...w,...e]:[...e,...w]}function kn(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 m=null!=(s=e.easing)?s:e.e;"d"===t&&(f=yn(f));const h=Ne(t)?Re(t):t;Oe.has(h)&&(f=null!=(l=Se(f))?l:f);const p={t:n,v:f,e:vn(m,r)},y=null!=(u=e.tangentIn)?u:e.ti,v=null!=(c=e.tangentOut)?c:e.to;y&&(p.tangentIn=y),v&&(p.tangentOut=v),d.push(p)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const m=e.loop,h=!0===m?{}:m||void 0;return h&&d.length>=2?An(t,d,h,n):d}function wn(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=Ne(t)?Re(t):t,l=Oe.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=yn(d)),l&&(d=null!=(o=Se(d))?o:d);const m={t:f,v:d,e:null!=(a=e.e)?a:e.easing};return(null!=(i=e.tangentIn)?i:e.ti)&&(m.tangentIn=null!=(s=e.tangentIn)?s:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(m.tangentOut=null!=(c=e.tangentOut)?c:e.to),m}),c={kfs:An(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function jn(t,e){const n=Pn(t,e);return null!=n?n:t}function Pn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Pn(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=wn(n,o,e);a!==o&&(r||(r=u({},t)),r[n]=a)}}if(!n&&!r)return null;const a=u({},t);return n&&(a.children=n),r&&(a.animate=r),a}var xn=0;function Sn(t,e=q.webapi){const n=Nt(t)||{},r=Ct(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=gn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=gn(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=kn(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?tn(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=Rt(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_"+ ++xn;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 On(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;let o=t[0],a=t[t.length-1];for(let i=0;i<t.length-1;i++){const s=null!=(n=t[i].t)?n:0,l=null!=(r=t[i+1].t)?r:0;if(s<=e&&e<=l){o=t[i],a=t[i+1];break}}return{prevKf:o,nextKf:a}}(c,n);let m=f===d?0:(h=n,p=null!=(r=f.t)?r:0,y=null!=(o=d.t)?o:0,v=0,g=1,y===p?v:v+(h-p)/(y-p)*(g-v));var h,p,y,v,g;m=Ue(m,0,1);const b=null!=(a=f.e)?a:f.easing;if(b&&Array.isArray(b))try{m=ke(b)(m)}catch(t){}let A=Ne(t)?Re(t):t,k=null;const w=null!=(i=null==f?void 0:f.v)?i:null==f?void 0:f.value,j=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===A){k=ge(null!=(l=null==w?void 0:w.paths)?l:Array.isArray(w)?w:[],null!=(u=null==j?void 0:j.paths)?u:Array.isArray(j)?j:[],m).map(t=>he(t)).join("")}else if(Oe.has(A))k=xe(ve(w||[0,0,0,1],j||[0,0,0,1],m)),A=t;else if("stroke-dasharray"===A)k=ye(w||[],j||[],m).join(" "),A=t;else if("transform"!==A||null===w||"object"!=typeof w||Array.isArray(w))if("translate"===A){k="translate("+ye(w||[0,0],j||[0,0],m).join(",")+")",A="transform"}else if("rotate"===A){k="rotate("+pe(+(w||0),+(j||0),m)+")",A="transform"}else if("scale"===A){k="scale("+ye(w||[1,1],j||[1,1],m).join(",")+")",A="transform"}else{k=pe(+(w||0),+(j||0),m)}else{const t=new Set([...w?Object.keys(w):[],...j?Object.keys(j):[]]),n={};for(const e of t){const t=null==w?void 0:w[e],r=null==j?void 0:j[e];if("rotate"===e)n.rotate=pe(+(null!=t?t:0),+(null!=r?r:0),m);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],a=ye(t||o,r||o,m);n[e]=a}}if(Xe(e)){const t=w.translate,r=j.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Je(f,d,[+t[0],+t[1]],[+r[0],+r[1]],m,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}k=Ie(n,{withUnits:!1}),A="transform"}return _e.has(A)&&"number"==typeof k&&(k=100*k+"%"),{k:A,v:null===k?"":""+k}}function Mn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=On(r,o,e);t&&(n[t.k]=t.v)}return n}function _n(t,e,n,r){if(!e)return t;const o=!!e.trimAllAsOne,a=[];let i=0;const s=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)s(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o;if("rect"!==t.type)return;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"}(t);if(void 0===e)return;const n=mn(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){o||(i=0);const e=Dn(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:i}),i+=e}a.push(r)};if(s(t),!a.length)return t;const l=i;if(o&&l<.001)return t;const f=m(e.offset),d="absent"===f.kind?{kind:"static",value:0}:f,h=function(t){const e=m(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=Fn(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=Ln(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=Ln(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(e.range),p="absent"===h.kind?{kind:"static",value:[0,1]}:h,y=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}(d),v=[y.length?Math.min(...y):0,y.length?Math.max(...y):0];if(1===a.length&&a[0].leaf===t&&1===a[0].subpaths.length){const e=a[0],n=e.subpaths[0],r=o?l:n.lengthPx;if(r<.001)return t;const i=o?n.startOffsetPx/r:0;return function(t,e,n,r,o,a){const i=Tn(n,e,r),s=Nn(e,r),l=u({},t);return delete l.effects,Un(l,"strokeDasharray",Rn(a,s)),Un(l,"strokeDashoffset",Rn(o,i)),Un(l,"strokeOpacity",Vn(a)),l}(e.leaf,r,i,v,d,p)}const g=new Map;for(const t of a){const e=[];for(const n of t.subpaths){const a=o?l:n.lengthPx;if(a<.001)continue;const i=o?n.startOffsetPx/a:0;e.push(...En(t.leaf,n.subpath,a,i,v,d,p,r))}g.set(t.leaf,In(t.leaf,e))}const b=t=>{const e=g.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?c(u({},t),{children:t.children.map(b)}):t)};return b(t)}function In(t,e){const n=c(u({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function En(t,e,n,r,o,a,i,s){const l=Tn(r,n,o),u=Nn(n,o),c=Rn(a,l),f=Rn(i,u),d=Vn(i),m=function(t){return{type:"path",d:t}}(he(e));return Un(m,"strokeDasharray",f),Un(m,"strokeDashoffset",c),Un(m,"strokeOpacity",d),[m]}var zn=1;function Tn(t,e,n){const[r]=Cn(n);return n=>e*(-n-r+t)+zn}function Nn(t,e){const[n,r]=Cn(e),o=r-n+1;return e=>{const n=Ue(e[0],0,1),r=Ue(e[1],0,1),a=Math.min(n,r),i=Math.max(n,r),s=[0];let l=zn;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+zn),s}}function Cn(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Rn(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}})}}function Un(t,e,n){if(!n)return;if("static"===n.kind)return void(t[e]=n.value);const r=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,o=u({},r||{});o[e]={keyframes:n.keyframes},t.animate=o}function Vn(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,m=s(null!=(o=e.value)?o:e.v),h=u?m&&s(null!=(a=u.value)?a:u.v):m,p=c?m&&s(null!=(i=c.value)?i:c.v):m;h&&!p?(f.push({time:d,value:0}),f.push({time:d+1,value:1})):!h&&p&&(f.push({time:d-1,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Fn(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 Ln(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 Dn(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+=Bn(t,r,r+1);return t.c&&e.length>1&&(n+=Bn(t,e.length-1,0)),n}function Bn(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=Be(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]}function Wn(t){const e={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map},n=qt(t);Kt(n,e.idMap),g(n,e,()=>Bt(e,"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=oe(t,e),a=n?[...r,n]:r;for(const e of t.children)o(e,a)}};o(t,[])}(n,e);const r=function(t,e){return function(t,e){var n;e.idMap.clear(),Kt(t,e.idMap);const r=[],o=t=>{var e,n;(null==(e=t.effects)?void 0:e.retime)&&r.push(t),null==(n=t.children)||n.forEach(o)};o(t);for(const t of r){const r=null==(n=t.effects)?void 0:n.retime;r&&(delete t.effects.retime,0===Object.keys(t.effects).length&&delete t.effects,ue(t,le(r),e))}}(t,e),t}(Kn(n,e),e);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(r,e.defs),{root:r,defs:e.defs,warnings:e.warnings,errors:e.errors}}function Kn(t,e){t.children&&(t.children=t.children.map(t=>Kn(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,trimPath:l,retime:u,ref:c,fillGradient:f,strokeGradient:d,textAlongPath:m}=null!=n?n:{};null==n||n.isCombinedShape;n&&delete t.effects;let h=t;return h=function(t,e){var n;if(!e)return t;const r={type:"textPath",href:"string"!=typeof e.href||e.href.startsWith("#")?e.href:"#"+e.href,children:null!=(n=t.children)?n:[]};return void 0!==e.lengthAdjust&&(r.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(r.method=e.method),void 0!==e.spacing&&(r.spacing=e.spacing),me(r,"startOffset",e.startOffset),me(r,"textLength",e.textLength),t.children=[r],t}(h,m),h=function(t,e,n){return Gt(t,e,n,"fill")}(h,f,e),h=function(t,e,n){return Gt(t,e,n,"stroke")}(h,d,e),h=_n(h,l,0,e),h=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=qt(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate);const u=[l];for(let t=1;t<a;t++){const r=qt(l),o=ie(e,t),a=o?p(r,o,n):r;u.push(a)}const c={type:"g",children:u};return void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(h,i,e),h=Jt(h,s,a,e),h=o?b(h,a,r,o,e):function(t,e,n,r){if(e){const n=e.baseId;if(n){const o=e.type===ae&&r.contentRefInnerIds.get(n)||n;t.href="#"+o}else r.errors.push("ref: missing baseId")}return p(t,n,r)}(h,c,a,e),u&&(t.effects={retime:u}),r&&e.idMap.set(r,h),h}function qn(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=Gn(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=[],i=Yn(t,n,r,()=>"_lw_use_mat_"+ ++o,a);if(0===a.length)return i;const s={type:"defs",children:a},l=[...null!=(e=i.children)?e:[],s];return c(u({},i),{children:l})}function Gn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Xn(t,e,n,r,o,a){const i=Vt(e);Ft(i,o);const s="symbol"===i.type?function(t,e,n){const r=function(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]]}(t.viewBox),o=c(u({},t),{type:"g"});if(delete o.viewBox,delete o.preserveAspectRatio,delete o.width,delete o.height,!r)return o;const[a,i,s,l]=r;0===a&&0===i||(o.transform="translate("+-a+","+-i+")");const f=e();return n.push({type:"clipPath",id:f,children:[{type:"rect",x:a,y:i,width:s,height:l}]}),o.clipPath="url(#"+f+")",o}(i,o,a):i,l=Yn(s,n,r,o,a),f=c(u({},t),{type:"g",children:[l]});return delete f.href,Dt(f)}function Yn(t,e,n,r,o){if("use"===t.type&&"string"==typeof t.href){const a=Gn(t.href);if(a&&n.has(a)){const i=e.get(a);if(i)return Xn(t,i,e,n,r,o)}}if(!t.children)return t;let a=!1;const i=t.children.map(t=>{const i=Yn(t,e,n,r,o);return i!==t&&(a=!0),i});return a?c(u({},t),{children:i}):t}function Zn(t,e,n){var r,o;let a=Wn(t).root;return a=jn(a,null!=(o=null==(r=Nt(a))?void 0:r.duration)?o:ze),e===q.webapi&&(a=fn(a,null==n?void 0:n.motionPath),a=qn(a)),a}var Jn="http://www.w3.org/2000/svg",$n=new Set(["script","foreignobject"]),Hn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Qn=new Set(["href","xlink:href","src"]),tr=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i;function er(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(Hn.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||Qn.has(n)&&tr.test(t))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or base64 raster data: URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function nr(t){const e={};for(const n of Object.keys(t)){const r=Te(n);if(Y.has(r))continue;if("style"===r)continue;let o=t[n];Oe.has(r)&&Array.isArray(o)?e[r]=xe(o):"transform"===r&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&o.value&&"object"==typeof o.value?e.transform=Ie(o.value,{withUnits:!1}):Me.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 rr(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=Ct(t)||e,f=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,c);let d;if(o)for(const t of o){const e=rr(t,c);e&&(d||(d=[]),d.push(e))}return function(t,e,n,r,o){if($n.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Jn,t);for(const t in e){const n=er(t,e[t]);void 0!==n&&a.setAttribute(Re(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",nr(u),f,d,u[G]||u[X])}function or(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=.5}=e,a=t.getRootElement();if(!a)return console.warn("setupAnimationTriggers: No root element found for animation."),t;const i=()=>{t.play()},s=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":t.play()}};switch(n){case"load":{const t=()=>i();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{const t=()=>i(),e=()=>s();a.addEventListener("mouseenter",t),a.addEventListener("mouseleave",e);break}case"click":{const e=()=>{t.isPlaying()?s():i()};a.addEventListener("click",e);break}case"scrollIntoView":new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=o?i():s()})},{threshold:o}).observe(a);break}return t}function ar(t){return"#"+t}function ir(t,e,n){const r=Nt(t)||{},o=Sn(t,q.frames),a=r.iterations;let i=1;"number"==typeof a&&(i=a||1),"infinite"===a&&(i=1/0),i<1&&(i=1);const s=+(r.duration||ze),l=s&&i?s*(i===1/0?1/0:i):s?(null!=i?i:1)*s:0,u=r.direction||"normal";let c=null,f=!1,d=r.delay||0,m=0,h=1,p=!1;const y=r.frameRate,v=y&&y>0?1e3/y:0;let g=0;const b=()=>{const t=m?(Date.now()-m)*h:0;let e=d+t;return Number.isFinite(l)&&e>l&&(e=l),e<0&&(e=0),e};function A(t){let n=function(){const e=s>0?s:1;let n=0,r=0;if(s>0){t=Ue(t,0,i*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,i-1);n=Ue((t-r*e)/e,0,1)}else n=t;const o=u||"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 o||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=Mn(r,n*s);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}r.delay&&A(b());const k=()=>!!f&&(!!e.isConnected()&&!(Number.isFinite(l)&&b()>=l)),w=t=>{null!==c&&(cancelAnimationFrame(c),c=null),(t||k())&&(c=requestAnimationFrame(()=>{c=null,(()=>{var t;if(!e.isConnected())return void j();const r=b();if(v>0){const t=Date.now();if(g&&t-g<v)return;g=t}if(l&&Number.isFinite(l)&&r>=l)return A(l),p||(p=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)),void j();A(r)})(),w()}))},j=()=>{f&&(d=b(),m=0,f=!1,null!==c&&(cancelAnimationFrame(c),c=null),A(d))},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>k(),play:()=>{var t;f||(Number.isFinite(l)&&d>=l&&(d=0,p=!1),f=!0,m=Date.now(),w(!0)),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;j(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;j(),d=0,m=0,f=!1,p=!1,A(d),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;d=Number.isFinite(l)?l:b(),m=0,f=!1,A(d),t&&!p&&(p=!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");const e=b();h=t,d=e,f&&(m=Date.now())},getCurrentTime:()=>b(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(l)&&t>l&&(t=l),d=t,f&&(m=Date.now()),A(b())},destroy:()=>{P.cancel()}};return P}function sr(t,e,n,r){const o=Nt(t)||{};if(!r)if(t.id){const e=ar(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");let a=ir(t,e||function(t){const e=new Set,n={isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=Re(r);const a=ar(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];e.setAttribute(r,o),Ee.has(r)&&(e.style[r]=o)}}};return n}(r),n);return a=c(u({},a),{getRootElement:()=>r||null}),o.trigger&&or(a,o.trigger),a}function lr(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;return Oe.has(n)&&Array.isArray(i)?u=xe(i):"transform"!==n||null===i||"object"!=typeof i||Array.isArray(i)?Me.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"):u=""+i:(u=Ie(i,{withUnits:!0}),c="transform"),CSS.supports(c,u)||r.add(c),c=Te(c),l[c]=u,l}function ur(t,e,n){var r,o,a,i,s;const l=[];for(let f=0;f<e.length;f++){const d=e[f],m=null!=(r=d.t)?r:0;if(m<0){const n=e[f+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-m)/((null!=(a=n.t)?a:0)-m),r=d.e?ke(d.e)(e):e,{right:o}=je(d.e,e);l.push({t:0,v:bn(t,d.v,n.v,r),e:o})}continue}if(m>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)/(m-e),a=r.e?ke(r.e)(o):o,{left:i}=je(r.e,o);l.length>0&&(l[l.length-1]=c(u({},l[l.length-1]),{e:i})),l.push({t:n,v:bn(t,r.v,d.v,a),e:void 0})}break}l.push(d)}return l}function cr(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=ur(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=lr(o,Ue((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 fr(t,e,n,r){var o;const a=Nt(t)||{};if(!n)if(t.id){const e=ar(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=Sn(t,q.webapi),s=[],l=a.iterations;let u;"number"==typeof l&&(u=l),"infinite"===l&&(u=1/0);const c=new Set;(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=ar(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 f=cr(r,c,a),d=a.delay&&a.delay>0?a.delay:void 0,m=a.delay&&a.delay<0&&a.duration?-a.delay%a.duration:void 0,h={duration:a.duration,delay:d,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 f)if(t.length>0)try{const r=new KeyframeEffect(n,t,h),o=new Animation(r,document.timeline);(null==e?void 0:e.onFinish)&&(o.onfinish=()=>{var t;return null==(t=e.onFinish)?void 0:t.call(e)}),(null==e?void 0:e.onRemove)&&(o.onremove=()=>{var t;return null==(t=e.onRemove)?void 0:t.call(e)}),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 f={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;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;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),f),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=>{s.forEach(e=>{e.currentTime=t})},destroy:()=>{f.cancel(),s.splice(0,s.length)}};return a.trigger&&or(f,a.trigger),f}var dr=0;function mr(){return"_px_"+Date.now().toString(36)+(++dr).toString(36)+Math.random().toString(36).substring(2,6)}function hr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>hr(t));const e=t,n={};for(const t of Object.keys(e))n[t]=hr(e[t]);return n}function pr(t){var e,n;const r=hr(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=mr();o.set(t,n),e.id=n}else e.animate&&(e.id=mr());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]=yr(r,o);else if(s.has(n)){const t=o.get(r);t&&(e[n]=t)}else r.includes("url(#")&&(e[n]=yr(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=yr(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=c(u({},r.animator),{animate:t})}return r}function yr(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function vr(t,e,n,r){const o=St(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);const a=Nt(t)||{};a.debug=!0;t=Zn(t,a.mode===K.frames?q.frames:q.webapi);let i=null;if(r&&t.children){t=pr(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=rr(t),i&&e.replaceChildren(i))}return function(t,e,n,r){const o=Nt(t)||{};let a;return a=o.mode===K.frames?sr(t,e,n,r):fr(t,n,r,o.mode===K.webapi)||sr(t,e,n,r),o.debugInstName&&(window[o.debugInstName]=a),a}(t,e,n,i)}var gr="data";function br(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 vr(n,r,o,a);let i=null;return fetch(e).then(t=>t.json()).then(t=>{zt(t)?i=vr(t,r,o,a):console.error("Invalid animation document format")}),{isReady:()=>!!i,getRootElement:()=>i?i.getRootElement():null,isPlaying:()=>(null==i?void 0:i.isPlaying())||!1,play:()=>{null==i||i.play()},pause:()=>{null==i||i.pause()},cancel:()=>{null==i||i.cancel()},finish:()=>{null==i||i.finish()},setPlaybackRate:t=>{null==i||i.setPlaybackRate(t)},getCurrentTime:()=>(null==i?void 0:i.getCurrentTime())||0,setCurrentTime:t=>{null==i||i.setCurrentTime(t)},destroy:()=>{null==i||i.destroy()}}}function Ar(){const t=document.querySelectorAll("["+B+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[W]){const t=n.getAttribute(B);t&&(n[W]=br({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=Ar,window.createAnimator=br,window.setupAnimationTriggers=or);var kr=[1,0,0,1,0,0];function wr(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 jr=(t,e)=>[1,0,0,1,t,e],Pr=(t,e)=>[t,0,0,e,0,0];function xr(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Sr=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],Or=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Mr(t){let e=kr;t.translate&&(e=wr(e,jr(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=wr(e,jr(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=wr(e,xr(t.rotate))),t.scale&&(e=wr(e,Pr(t.scale[0],t.scale[1]))),n&&(e=wr(e,jr(-t.origin[0],-t.origin[1]))),e}function _r(t,e,n){return t+(e-t)*n}function Ir(t,e){return null==t?kr:"string"==typeof t?function(t){let e=kr;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=wr(e,jr(n[0]||0,n[1]||0)):"scale"===t?e=wr(e,Pr(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=wr(e,xr(n[0])):"skewX"===t?e=wr(e,Sr(n[0])):"skewY"===t?e=wr(e,Or(n[0])):"matrix"===t&&(e=wr(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Mr(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),m=c.value||{},h=f.value||{},p={};return m.translate&&h.translate?p.translate=[_r(m.translate[0],h.translate[0],d),_r(m.translate[1],h.translate[1],d)]:p.translate=m.translate||h.translate,void 0!==m.rotate&&void 0!==h.rotate?p.rotate=_r(m.rotate,h.rotate,d):p.rotate=null!=(l=m.rotate)?l:h.rotate,m.scale&&h.scale?p.scale=[_r(m.scale[0],h.scale[0],d),_r(m.scale[1],h.scale[1],d)]:p.scale=m.scale||h.scale,p.origin=m.origin||h.origin,p}(t.keyframes,e)):t.value?Mr(t.value):kr}var Er,zr=new Set(["svg","g","symbol"]),Tr=new Set(["defs","mask","clipPath","title"]);function Nr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Nr(t,e))}function Cr(t){return null==t?0:Number(t)}function Rr(t){return Math.round(100*t)/100+0}function Ur(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=Rr(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 _r(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,m=e.map(Rr).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Cr(t.width)+","+Cr(t.height)+","+Cr(t.x)+","+Cr(t.y);case"ellipse":return Cr(t.rx)+","+Cr(t.ry)+","+Cr(t.cx)+","+Cr(t.cy);case"circle":return Cr(t.r)+","+Cr(t.cx)+","+Cr(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+m+"]|f:"+l+"|s:"+u+"|sw:"+(Cr(c)||"")+"|o:"+f+"|m:"+d}function Vr(t,e,n,r,o){var a;const i=t.type||"";if(Tr.has(i))return;const s=wr(e,function(t,e){return t.animate&&t.animate.transform?Ir(t.animate.transform,e):void 0!==t.transform?Ir(t.transform,e):kr}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=wr(s,jr(Cr(t.x),Cr(t.y)));return void(a?Vr(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}zr.has(i)?null==(a=t.children)||a.forEach(t=>Vr(t,s,n,r,o)):o.push(Ur(t,s,n))}function Fr(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=>Fr(t,e))}function Lr(t,e){const n=new Map;Nr(t,n);const r=[];return Vr(t,kr,e,n,r),r.sort()}function Dr(t,e){const n=new Set;Fr(t,n),Fr(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Lr(t,o),a=Lr(e,o),i=Br(n,a),s=Br(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function Br(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}return Er=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}),Er)})();
|
|
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=Math.pow,u=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,c=(t,e)=>{for(var n in e||(e={}))i.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))s.call(e,n)&&u(t,n,e[n]);return t},f=(t,n)=>e(t,r(n)),d={};function h(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function p(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 m(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 g(t,e,n){if(!e)return t;delete t.transform;let r=t;var o;return r=y(r,"skew",e.skew,n),r=v(r,e.origin,!0),r=y(r,"scale",void 0===(o=e.scale)?void 0:Array.isArray(o)?[o[0]/100,o[1]/100]:o,n),r=y(r,"rotate",e.rotate,n),r=v(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=y(r,"translate",e.translate,n):(r=v(r,e.origin,!0),r=y(r,"translate",e.translate,n),r=v(r,e.origin,!1)),r}function y(t,e,n,r){if(void 0===n)return t;if("skew"===e){const e=p(n);return"static"!==e.kind?(r.warnings.push("transformation.skew: only static skew is supported"),t):{type:"g",transform:"skewX("+e.value[0]+")skewY("+e.value[1]+")",children:[t]}}const o=p(n);if("static"===o.kind)return{type:"g",transform:{value:h(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>m(t,h(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 v(t,e,n){if(void 0===e)return t;const r=p(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=>m(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function b(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=>b(t,e,n))}function A(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=w(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&&w((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&w((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=k(a.full),r=k(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=w(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=g(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=g(u,i,o),u.id=n),u}function k(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 w(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 x(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(d,{COLOUR_ATTR_NAMES:()=>Ve,PX_ANIMATOR_DATA_KEY:()=>so,PX_ANIM_ATTR_NAME:()=>G,PX_ANIM_SRC_ATTR_NAME:()=>B,PX_TRANSFORM_PART_KEYS:()=>tt,PxAnimatedSvgDocumentSchema:()=>Nt,PxAnimationDefinitionSchema:()=>rt,PxAnimatorConfigSchema:()=>ut,PxAnimatorEngine:()=>q,PxAnimatorMode:()=>K,PxAttrValueSchema:()=>ft,PxBezierPathSchema:()=>Ct,PxBindingSchema:()=>ct,PxCloneEffectSchema:()=>bt,PxDefsSchema:()=>lt,PxEasingOrRefSchema:()=>Q,PxEffectsSchema:()=>_t,PxElementAnimationSchema:()=>ot,PxFillGradientEffectSchema:()=>jt,PxGradientSpreadMethod:()=>kt,PxGradientStopSchema:()=>xt,PxGradientType:()=>wt,PxGradientUnits:()=>At,PxKeyframeSchema:()=>J,PxLoopSchema:()=>H,PxMaskedByEffectSchema:()=>gt,PxNodeBase:()=>Tt,PxNodeSchema:()=>zt,PxPropertyAnimationSchema:()=>$,PxRepeaterEffectSchema:()=>mt,PxRetimeEffectSchema:()=>vt,PxStrokeGradientEffectSchema:()=>St,PxSvgNodeExtra:()=>Et,PxTextAlongPathEffectSchema:()=>Ot,PxTextEffectSchema:()=>Mt,PxTransformPartsSchema:()=>et,PxTransformValueSchema:()=>nt,PxTransformationEffectSchema:()=>pt,PxTriggerSchema:()=>at,PxTrimPathEffectSchema:()=>yt,STYLE_ATTR_NAMES:()=>Ke,TRANSFORM_FN_NAMES:()=>We,applyPlayerEffects:()=>Or,calcAnimationValues:()=>fr,camelCaseToKebabWordIfNeeded:()=>Qe,collectSampleTimes:()=>_o,createAnimator:()=>lo,createAnimatorImpl:()=>io,createBasicFrameLoopAnimator:()=>Yr,createFrameLoopAnimator:()=>Qr,createWebApiAnimator:()=>to,describeSchema:()=>V,diffInEffect:()=>To,evaluateMotionPathSegment:()=>Nn,generateNewIds:()=>oo,getAnimatorConfig:()=>Ut,getBindings:()=>Lt,getChildren:()=>Vt,getDefs:()=>Dt,getNormalizedProps:()=>Kr,isPxElementFileFormat:()=>Ft,isPxElementFileFormatDeep:()=>Rt,jsonElementFactory:()=>we,loadTagAnimators:()=>uo,materialiseAllInTree:()=>Cr,materialiseAnimatedUseInstances:()=>_r,materialiseGlyphText:()=>On,materialiseGlyphTextAlongPath:()=>An,materialiseGlyphTextHorizontal:()=>vn,materialiseInternalLoopsInPropAnim:()=>ar,materialiseInternalLoopsInTree:()=>ir,materialiseMotionPathInPropAnim:()=>Un,materialiseMotionPathsInTree:()=>Xn,normalizeDocument:()=>ur,propAnimIsMotionPath:()=>Tn,px:()=>W,renderNode:()=>qr,schemaKeys:()=>L,setupAnimationTriggers:()=>Zr,toRGBA:()=>De,validateNodeEffects:()=>It,visualModelAt:()=>Io});var P=class{_canSanitize(t){return this.isValid(t)}optional(){return new j(this)}},j=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)}},S=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)}},T=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))}},z=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=c({},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)}},R=class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},U=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)}},D=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 L(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 S(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 T(t,e),discriminatedUnion:(t,e)=>new z(t,e),object:t=>new E(t),openObject:(t,e)=>new N(t,e),extendedObject:(t,e)=>new E(c(c({},t._shape),e)),array:t=>new C(t),record:t=>new F(t),any:()=>new R,tuple:t=>new D(t),lazy:(t,e)=>new U(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(Ct)}),{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(),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(),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:ht.optional(),origin:ht.optional()}),mt=W.object({copies:W.number().optional(),translate:ht.optional(),rotate:dt.optional(),scale:ht.optional(),origin:ht.optional()}),gt=W.object({href:W.string().optional(),maskType:W.string().optional(),maskUnits:W.string().optional(),maskContentUnits:W.string().optional()}),yt=W.object({offset:dt.optional(),range:ht.optional(),trimAllAsOne:W.boolean().optional()}),vt=W.object({baseId:W.string().optional(),start:W.number().optional(),stretch:W.number().optional(),timeCrop:W.tuple([W.number(),W.number()]).optional()}),bt=W.object({type:W.string().optional(),baseId:W.string().optional(),retime:vt.optional()}),At={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},kt={pad:"pad",reflect:"reflect",repeat:"repeat"},wt={linear:"linear",radial:"radial"},xt=W.object({offset:W.number(),color:W.string()}),Pt=W.union([W.array(xt),W.object({value:W.array(xt)}),W.object({keyframes:W.array(J)})]),jt=W.object({type:W.enum([wt.linear,wt.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:Pt.optional(),gradientUnits:W.string().optional(),spreadMethod:W.string().optional(),gradientTransform:W.string().optional()}),St=jt,Ot=W.object({href:W.string(),lengthAdjust:W.string().optional(),method:W.string().optional(),spacing:W.string().optional(),startOffset:dt.optional(),textLength:dt.optional()}),Mt=W.object({useGlyphs:W.boolean().optional()}),_t=W.object({transformation:pt.optional(),repeater:mt.optional(),maskedBy:gt.optional(),trimPath:yt.optional(),clone:bt.optional(),isCombinedShape:W.boolean().optional(),fillGradient:jt.optional(),strokeGradient:St.optional(),textAlongPath:Ot.optional(),text:Mt.optional()});function It(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!_t.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:_t.optional(),animate:ot.optional(),style:W.union([W.string(),W.record(W.union([W.string(),W.number()]))]).optional()},ft),zt=W.openObject(f(c({},Tt._shape),{children:W.lazy(()=>W.array(zt),[]).optional()}),ft),Et=W.object({width:W.number().optional(),height:W.number().optional(),viewBox:W.string().optional(),animator:ut.optional()}),Nt=W.openObject(f(c(c({},Tt._shape),Et._shape),{type:W.literal("svg"),children:W.array(zt).optional()}),ft),Ct=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 Ft(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&("svg"===t.type||"svg"===t.tagName)}function Rt(t){const e=Nt.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Ut(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 Dt(t){var e;if(t)return null==(e=Ut(t))?void 0:e.definitions}function Lt(t){var e;if(!t)return;const n=null==(e=Ut(t))?void 0:e.animate;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Vt(t){return null==t?void 0:t.children}function Wt(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Wt);const e={};for(const n of Object.keys(t))e[n]=Wt(t[n]);return e}function Bt(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 Gt(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Kt(t){var e;const n=Gt(t.x),r=Gt(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 qt(t,e){return"_lw_"+e+"_"+t.nextId++}function Zt(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Xt(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Xt(t,e))}var Yt=Wt;function Qt(t,e,n,r){if(!e)return t;const o=qt(n,"grad"),a=function(t,e){const n={type:t.type===wt.radial?"radialGradient":"linearGradient",id:e};t.type===wt.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);return n.children=function(t){var e,n,r,o;if(!t)return[];if(Array.isArray(t))return t.map(Jt);if("object"==typeof t&&Array.isArray(t.value))return t.value.map(Jt);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:Ht(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:Ht(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,g={time:o,value:p.color};void 0!==m&&(g.easing=m),c.push(g);const y={time:o,value:p.offset};void 0!==m&&(y.easing=m),f.push(y),p.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:$t(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}function Jt(t){return{type:"stop",offset:$t(t.offset),stopColor:t.color}}function Ht(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 $t(t){return Math.round(1e3*t)/10+"%"}function te(t,e,n,r){if(!e)return t;if(!e.href)return r.errors.push("maskedBy.href missing — cannot build mask"),t;const o=qt(r,"mask");let a={type:"use",href:"#"+e.href};if(n)a=ee(a,n,r);else if(oe(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=m(t,void 0);if(Array.isArray(e.translate)&&i.push(f(c({},r),{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(f(c({},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(f(c({},r),{value:t}))}}const u=null==o?void 0:o.loop,d=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let h=t;i.length&&(h={type:"g",animate:{transform:d(i)},children:[h]});s.length&&(h={type:"g",animate:{transform:d(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:d(l)},children:[h]});return h}(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 g=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:m[1],args:t})}if(!g.length)return;const y=g[g.length-1];if("translate"===y.name)for(let t=g.length-2;t>=0;t--){const c=g[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=y.args[0])?r:0,p=null!=(o=y.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"===g[e].name){const t=null!=(a=g[e].args[0])?a:0,n=null!=(i=g[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<g.length-1;e++){const t=g[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 g)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=ee(a,e,r))}const i=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||oe(t))}(t);a=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?le(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=ae(l),n=ae(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=ie(l,t),n=ie(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 ee(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=p(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=ne(o,"translate",e.translate,void 0,n),o=ne(o,"rotate",e.rotate,r,n),o=ne(o,"scale",e.scale,r,n),o}function ne(t,e,n,r,o){if(void 0===n)return t;const a=p("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===a.kind)return{type:"g",transform:{value:h(e,re(e,a.value),r)},children:[t]};if("animated"===a.kind){const n={keyframes:a.keyframes.map(t=>m(t,h(e,re(e,t.value),r)))};return void 0!==a.loop&&(n.loop=a.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function re(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function oe(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function ae(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 ie(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=se(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function se(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 le(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 ue="content";function ce(t,e,n){if(!e)return;const r=e.baseId;if(!r)return void(e.type===ue&&n.errors.push("clone: content ref missing baseId"));const o=e.type===ue&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function fe(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 f(c({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?f(c({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return f(c({},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 f(c({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?f(c({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return f(c({},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 f(c({},e),{keyframes:e.keyframes.map(t=>t&&void 0!==t.value?f(c({},t),{value:r(t.value)}):t)});if(void 0!==e.value)return f(c({},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 de=!1;function he(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}function pe(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function me(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function ge(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 ye(t,e,n){const r=Zt(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=ve(r,e,n,new Set);if(o)if(de){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Kt(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function ve(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=Yt(o);if(function(t,e){Bt(t,()=>qt(e,"retimed"))}(a,n),"use"===o.type?Ae(a,e.start,e.stretch):be(a,e.start,e.stretch),ge(a),"use"===o.type&&o.href){const i=Zt(o.href);if(i){const s=me(o),l=s?pe(he(s),e):e,u=new Set(r);u.add(t);const c=ve(i,l,n,u);c&&(a.href="#"+c)}}else!function(t,e,n,r,o){const a=t=>{var i;const s=me(t);if("use"===t.type&&s&&t.href){const a=Zt(t.href);if(a){const i=pe(he(s),e),l=new Set(r);l.add(o);const u=ve(a,i,n,l);u&&(t.href="#"+u)}ge(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 be(t,e,n){var r;Ae(t,e,n),null==(r=t.children)||r.forEach(t=>be(t,e,n))}function Ae(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)}}function ke(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=c({},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 we=(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 xe(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Pe(t,e){let n="";for(let r=0;r<t.length;r++){const o=xe(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function je(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Se=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Oe(t,e,n=2){const r=[];let o;for(Se.lastIndex=0;null!==(o=Se.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]=je(e,s(),s());a+=t+Pe([r,o],n)}else if("C"===t){const[t,r]=je(e,s(),s()),[o,i]=je(e,s(),s()),[l,u]=je(e,s(),s());a+="C"+Pe([t,r,o,i,l,u],n)}else if("Q"===t){const[t,r]=je(e,s(),s()),[o,i]=je(e,s(),s());a+="Q"+Pe([t,r,o,i],n)}else"Z"!==t&&"z"!==t||(a+="Z")}return a}function Me(t){var e,n,r,o;const a=t.v,i=t.i,s=t.o,l=t.c;if(!a.length)return"";const u=[],c=a.length;u.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<c;t++){const r=a[t-1],o=null!=(e=null==s?void 0:s[t-1])?e:r,l=null!=(n=null==i?void 0:i[t])?n:a[t],c=a[t];o[0]===r[0]&&o[1]===r[1]&&l[0]===c[0]&&l[1]===c[1]?u.push("L"+c[0]+","+c[1]):u.push("C"+o[0]+","+o[1]+","+l[0]+","+l[1]+","+c[0]+","+c[1])}if(l&&c>0){const t=a[c-1],e=null!=(r=null==s?void 0:s[c-1])?r:t,n=null!=(o=null==i?void 0:i[0])?o:a[0],l=a[0];e[0]===t[0]&&e[1]===t[1]&&n[0]===l[0]&&n[1]===l[1]||u.push("C"+e[0]+","+e[1]+","+n[0]+","+n[1]+","+l[0]+","+l[1]),u.push("z")}return u.join("")}function _e(t,e,n){return t+(e-t)*n}function Ie(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=_e(t[a]||0,e[a]||0,n);return r}function Te(t,e,n){return[_e(t[0]||0,e[0]||0,n),_e(t[1]||0,e[1]||0,n),_e(t[2]||0,e[2]||0,n),_e(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function ze(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(Ee(t[a],e[a],n));return o}function Ee(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=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(Ie(f,h,d));const y=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(Ie(y,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;g.push(Ie(b,A,d))}return{v:p,i:m.length?m:void 0,o:g.length?g:void 0,c:null!=(f=t.c)?f:e.c}}function Ne(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 Ce(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=Ne(e,r,t),((s*n+i)*n+a)*n;var n}}function Fe(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Re(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=Ne(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=Fe(t,e,o),i=Fe(e,n,o),s=Fe(n,r,o),l=Fe(a,i,o),u=Fe(i,s,o),c=Fe(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,g=1-d;return m>1e-9&&Math.abs(g)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/g,(c[2][0]-f)/m,(c[2][1]-d)/g]),{left:h,right:p}}function Ue(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function De(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 Le(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 Ve=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),We=new Set(["translate","rotate","scale","skew"]),Be=new Set(["offset-distance","offsetDistance"]);function Ge(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.scale,u=r?"px":"",c=r?"deg":"";return a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),null!=s&&o.push("rotate("+s+c+")"),l&&o.push("scale("+l[0]+","+l[1]+")"),i&&o.push("translate("+-i[0]+u+","+-i[1]+u+")"),o.join("")}var Ke=new Set(["offset-distance","offsetDistance"]),qe=1e3;function Ze(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function Xe(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var Ye=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function Qe(t){return Ye.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Je(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 $e=1e-4;function tn(t,e,n,r,o){const a=en(t,e,n,r,o);if(0===a[0]&&0===a[1]){return en(t,e,n,r,o<.5?o+$e:o-$e)}return a}function en(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 nn(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 rn(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 on=48,an=/[MmLlHhVvCcSsQqTtAaZz]/;function sn(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 ln(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=nn(i,t,e,r,on);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];an.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",g=t.toUpperCase();if("Z"!==g){if("M"===g){const e=h()+(n?o:0),r=h()+(n?a:0);o=e,a=r,i=e,s=r,d=t;continue}if("L"===g)m(h()+(n?o:0),h()+(n?a:0));else if("H"===g)m(h()+(n?o:0),a);else if("V"===g)m(o,h()+(n?a:0));else if("C"===g){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"===g){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"===g){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}=sn([o,a],t,e);p(r,i,e)}else if("T"===g){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}=sn([o,a],t,e);p(r,i,e)}else{if("A"!==g){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]=tn(o.P0,o.P1,o.P2,o.P3,i);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,sampleAtDistance(t){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 un=16,cn=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Z,X,"xml:space"];function fn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function dn(t){return"string"==typeof t?t:void 0}function hn(t,e){var n,r,o,a,i,s,l;return{fontFamily:null!=(n=dn(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=fn(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=fn(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=fn(t.wordSpacing))?l:e.wordSpacing}}function pn(t){var e,n,r;return{fontFamily:dn(t.fontFamily),fontSize:null!=(e=fn(t.fontSize))?e:un,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=fn(t.letterSpacing))?n:0,wordSpacing:null!=(r=fn(t.wordSpacing))?r:0}}function mn(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 gn(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 yn(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}function vn(t,e){var n,r,o,a;const{glyphs:i,create:s=we,warnings:l}=e,u=yn(i),c={x:null!=(n=fn(t.x))?n:0,y:null!=(r=fn(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{const n=gn(e,i,u,l);if(!n)return;const r=e.fontSize/n.unitsPerEm,o=mn(e);for(let a=0;a<t.length;a++){const i=t.charAt(a),s=n.glyphs[i];s&&s.d&&f.push({glyphD:s.d,m:[r,0,0,r,c.x,c.y],paint:o,line:h,x:c.x,y:c.y,scale:r}),c.x+=(s?s.width:0)*r+e.letterSpacing+(" "===i?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,a;const i=hn(t,e),s=fn(t.x),l=fn(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=fn(t.dx))?n:0,c.y+=null!=(r=fn(t.dy))?r:0;const u=null!=(o=dn(t[Z]))?o:dn(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)},g=pn(t);if(t.children)for(const e of t.children)m(e,g);const y=null!=(o=dn(t[Z]))?o:dn(t[X]);y&&!(null==(a=t.children)?void 0:a.length)&&p(y,g);const v=dn(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 Sn(t,jn(f,s,l),s)}function bn(t,e,n,r){const{x:o,y:a,angle:i}=t.sampleAtDistance(e),s=Math.cos(i),l=Math.sin(i),u=r/2;return[n*s,n*l,-n*l,n*s,o-n*s*u,a-n*l*u]}function An(t,e,n,r,o){var a;const{glyphs:i,create:s=we,warnings:l}=r,u=e?ln(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const d=yn(i),{cells:h,width:m}=function(t,e,n,r){const o=[];let a=0;const i=(t,s)=>{var l,u;const c=hn(t,s),f=null!=(l=dn(t[Z]))?l:dn(t[X]);if(f&&!(null==(u=t.children)?void 0:u.length)){const t=gn(c,e,n,r);if(t){const e=c.fontSize/t.unitsPerEm,n=mn(c);for(let r=0;r<f.length;r++){const i=f.charAt(r),s=t.glyphs[i],l=(s?s.width:0)*e;s&&s.d&&o.push({glyphD:s.d,widthEm:s.width,scale:e,paint:n,midBase:a+l/2}),a+=l+c.letterSpacing+(" "===i?c.wordSpacing:0)}}}if(t.children)for(const e of t.children)i(e,c)};return i(t,pn(t)),{cells:o,width:a}}(t,i,d,l);if(!h.length)return Sn(t,[],s);if(o&&o>0&&m>0){const t=o/m;for(const e of h)e.midBase*=t}const g=p(n);if("animated"===g.kind&&g.keyframes.length>=2)return Sn(t,function(t,e,n,r,o){const a=Math.max(e.totalLength/kn,.5),i=t=>Number(t.time)||0,s=t=>Number(t.value)||0,l=[];for(const u of t){const t=[u.scale,0,0,u.scale,-u.scale*(u.widthEm/2),0],d=Oe(u.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:a}=e.sampleAtDistance(t);return{time:n,value:{translate:[xn(r,3),xn(o,3)],rotate:xn(180*a/Math.PI,3)}}},p=[h(s(n[0])+u.midBase,i(n[0]))];for(let t=1;t<n.length;t++){const e=i(n[t-1]),r=i(n[t]),o=s(n[t-1]),l=s(n[t]),c=Math.min(wn,Math.max(1,Math.ceil(Math.abs(l-o)/a)));for(let t=1;t<=c;t++){const n=t/c;p.push(h(o+n*(l-o)+u.midBase,e+n*(r-e)))}}const m={keyframes:p};void 0!==r&&(m.loop=r),l.push(o("path",f(c({d:d},Pn(u.paint)),{animate:{transform:m}}),[]))}return l}(h,u,g.keyframes,g.loop,s),s);const y="animated"===g.kind?Number(null==(a=g.keyframes[0])?void 0:a.value)||0:"static"===g.kind&&Number(g.value)||0;return Sn(t,jn(h.map(t=>({glyphD:t.glyphD,paint:t.paint,m:bn(u,y+t.midBase,t.scale,t.widthEm)})),s,l),s)}var kn=48,wn=64;function xn(t,e){const n=l(10,e);return Math.round(t*n)/n}function Pn(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 jn(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=Oe(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",c({d:n},Pn(t)),[]));return s}function Sn(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===cn.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=c({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function On(t,e){return e.alongPath?An(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength):vn(t,e)}function Mn(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 _n(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function In(t){var e;return null!=(e=t.easing)?e:t.e}function Tn(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 zn=new WeakMap;function En(t,e,n,r){var o,a;const i=zn.get(t);if(i)return i;const s=null!=(o=t.tangentOut)?o:t.to,l=null!=(a=e.tangentIn)?a:e.ti,u=[n[0]+(s?s[0]:0),n[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],f=nn(n,u,c,r),d={P0:n,P1:u,P2:c,P3:r,lut:f,totalArc:f.ds[f.ds.length-1]};return zn.set(t,d),d}function Nn(t,e,n,r,o,a){const i=En(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=tn(i.P0,i.P1,i.P2,i.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var Cn=.5,Fn=5,Rn=32;function Un(t,e){var n,r,o,a;if(!Tn(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:Cn,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:Fn,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:Rn,f=[],d=Mn(i[0]);if(!d)return t;const h=s?function(t,e){const n=Mn(t),r=Mn(e);if(!n||!r)return 0;const o=En(t,e,n,r),a=tn(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(Dn(_n(i[0]),Wn(Ln(i[0]),Ln(i[0]),0,d,h,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Mn(e),o=Mn(n);r&&o?(s&&t>0&&Bn(f,e,n,r,o,u),Gn(f,e,n,r,o,s,l,u,c)):f.push(Dn(_n(n),Wn(Ln(n),Ln(n),1,null!=o?o:[0,0],void 0,s)))}const p=In(i[i.length-1]);p&&(f[f.length-1].e=p),s&&function(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}}(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function Dn(t,e){return{t:t,v:e}}function Ln(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Vn(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 Wn(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]=Vn(o,s,n))}return void 0!==o&&(i.rotate=o),i}function Bn(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=En(e,n,r,o),f=tn(c.P0,c.P1,c.P2,c.P3,0),d=180*Math.atan2(f[1],f[0])/Math.PI,h=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(d,u);if(Math.abs(h)<=a)return;const p=Wn(Ln(e),Ln(e),0,r,d,!0);t.push(Dn(_n(e),p))}function Gn(t,e,n,r,o,a,i,s,l){const u=En(e,n,r,o),c=_n(e),f=_n(n),d=In(e),h=(p=d)?Ce([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=Ln(e),g=Ln(n),y=function(t,e,n,r,o){const a=[];Kn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),Kn(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++)qn(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),v=[];for(const t of y){const e=rn(u.lut,t),n=Je(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Je(h(n),0,1),p:n,pos:He(u.P0,u.P1,u.P2,u.P3,t)};if(a){const e=tn(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?Je((n.u-A)/(1-A),0,1):1,{left:o,right:i}=Re(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=Wn(m,g,n.p,n.pos,n.rotateDeg,a);t.push(Dn(l,u)),b=i,A=n.u}}function Kn(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 qn(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(Zn(d,u,c),Zn(h,u,c),Zn(p,u,c));let g=!0;if(o){const n=tn(r.P0,r.P1,r.P2,r.P3,t),o=tn(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&&(g=!1)}m<=a&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,qn(t,l,n,r,o,a,i,s),qn(l,e,n,r,o,a,i,s))}function Zn(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 Xn(t,e){const n=Yn(t,e);return null!=n?n:t}function Yn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Yn(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&&Tn(n)){const o=Un(n,e);o!==n&&(r=f(c({},t),{transform:o}))}}if(!n&&!r)return null;const a=c({},t);return n&&(a.children=n),r&&(a.animate=r),a}function Qn(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 Jn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Hn(t){return"string"==typeof t&&void 0!==Jn(t)}function $n(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=Jn(t.path);return e?{paths:Qn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Hn(e[0])){const t=[];for(const n of e){const e=Jn(n);e&&t.push(...Qn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Hn(t[0])){const e=[];for(const n of t){const t=Jn(n);t&&e.push(...Qn(t))}return{paths:e}}return{paths:t}}if(Hn(t)){return{paths:Qn(Jn(t))}}return t}function tr(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 er(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 nr(t,e,n,r){var o,a;if("d"===t){return{paths:ze(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 Ve.has(t)?Te(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?_e(e,n,r):We.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Ie(e||[],n||[],r):_e(+(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)o[a]=_e(+(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]=Ie(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function rr(t,e,n,r){var o,a,i,s,l;const u=e.length-1,c=Je(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 g=m-p;if(g<=0)return e;const y=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-y;if(v<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-y)/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(g/v),k=g-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?Ue(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?Ce(i.e)(l):l,c=nr(t,i.v,r.v,u),{left:f}=Re(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?Ue(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?Ce(i.e)(o):o,l=nr(t,i.v,r.v,s),{right:u}=Re(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 or(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=$n(f));const p=Xe(t)?Qe(t):t;Ve.has(p)&&(f=null!=(l=Le(f))?l:f);const m={t:n,v:f,e:tr(h,r)},g=null!=(u=e.tangentIn)?u:e.ti,y=null!=(c=e.tangentOut)?c:e.to;g&&(m.tangentIn=g),y&&(m.tangentOut=y),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?rr(t,d,p,n):d}function ar(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=Xe(t)?Qe(t):t,l=Ve.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=$n(d)),l&&(d=null!=(o=Le(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:rr(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function ir(t,e){const n=sr(t,e);return null!=n?n:t}function sr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=sr(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=ar(n,o,e);a!==o&&(r||(r=c({},t)),r[n]=a)}}if(!n&&!r)return null;const a=c({},t);return n&&(a.children=n),r&&(a.animate=r),a}var lr=0;function ur(t,e=q.webapi){const n=Ut(t)||{},r=Dt(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=er(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=er(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=or(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?Un(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=Lt(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_"+ ++lr;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 cr(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;let o=t[0],a=t[t.length-1];for(let i=0;i<t.length-1;i++){const s=null!=(n=t[i].t)?n:0,l=null!=(r=t[i+1].t)?r:0;if(s<=e&&e<=l){o=t[i],a=t[i+1];break}}return{prevKf:o,nextKf:a}}(c,n);let h=f===d?0:(p=n,m=null!=(r=f.t)?r:0,g=null!=(o=d.t)?o:0,y=0,v=1,g===m?y:y+(p-m)/(g-m)*(v-y));var p,m,g,y,v;h=Je(h,0,1);const b=null!=(a=f.e)?a:f.easing;if(b&&Array.isArray(b))try{h=Ce(b)(h)}catch(t){}let A=Xe(t)?Qe(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=ze(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=>Me(t)).join("")}else if(Ve.has(A))k=De(Te(w||[0,0,0,1],x||[0,0,0,1],h)),A=t;else if("stroke-dasharray"===A)k=Ie(w||[],x||[],h).join(" "),A=t;else if("transform"!==A||null===w||"object"!=typeof w||Array.isArray(w))if("translate"===A){k="translate("+Ie(w||[0,0],x||[0,0],h).join(",")+")",A="transform"}else if("rotate"===A){k="rotate("+_e(+(w||0),+(x||0),h)+")",A="transform"}else if("scale"===A){k="scale("+Ie(w||[1,1],x||[1,1],h).join(",")+")",A="transform"}else{k=_e(+(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)n.rotate=_e(+(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=Ie(t||o,r||o,h);n[e]=a}}if(Tn(e)){const t=w.translate,r=x.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Nn(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=Ge(n,{withUnits:!1}),A="transform"}return Be.has(A)&&"number"==typeof k&&(k=100*k+"%"),{k:A,v:null===k?"":""+k}}function fr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=cr(r,o,e);t&&(n[t.k]=t.v)}return n}function dr(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;if("rect"!==t.type)return;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"}(t);if(void 0===e)return;const n=Qn(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=jr(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 d=p(e.offset),h="absent"===d.kind?{kind:"static",value:0}:d,m=function(t){const e=p(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=xr(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=Pr(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=Pr(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(e.range),g="absent"===m.kind?{kind:"static",value:[0,1]}:m,y=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}(h),v=[y.length?Math.min(...y):0,y.length?Math.max(...y):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=gr(n,e,r),s=yr(e,r),l=c({},t);return delete l.effects,Ar(l,"strokeDasharray",br(a,s)),Ar(l,"strokeDashoffset",br(o,i)),Ar(l,"strokeOpacity",wr(a)),l}(e.leaf,r,i,v,h,g)}const b=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(...pr(t.leaf,n.subpath,a,i,v,h,g,r))}b.set(t.leaf,hr(t.leaf,e))}const A=t=>{const e=b.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?f(c({},t),{children:t.children.map(A)}):t)};return A(t)}function hr(t,e){const n=f(c({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function pr(t,e,n,r,o,a,i,s){const l=gr(r,n,o),u=yr(n,o),c=br(a,l),f=br(i,u),d=wr(i),h=function(t){return{type:"path",d:t}}(Me(e));return Ar(h,"strokeDasharray",f),Ar(h,"strokeDashoffset",c),Ar(h,"strokeOpacity",d),[h]}var mr=1;function gr(t,e,n){const[r]=vr(n);return n=>e*(-n-r+t)+mr}function yr(t,e){const[n,r]=vr(e),o=r-n+1;return e=>{const n=Je(e[0],0,1),r=Je(e[1],0,1),a=Math.min(n,r),i=Math.max(n,r),s=[0];let l=mr;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+mr),s}}function vr(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function br(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 Ar(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=c({},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 kr=10;function wr(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+kr,value:1})):!p&&m&&(f.push({time:d-kr,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function xr(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 Pr(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 jr(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+=Sr(t,r,r+1);return t.c&&e.length>1&&(n+=Sr(t,e.length-1,0)),n}function Sr(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=nn(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]}function Or(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Ut(t))?void 0:e.mode)===K.frames?q.frames:q.webapi,glyphs:null==(n=Dt(t))?void 0:n.glyphs},o=Yt(t);Xt(o,r.idMap),b(o,r,()=>qt(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=le(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(),Xt(t,e.idMap);const n=[],r=t=>{var e;me(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);for(const t of n){const n=me(t);n&&(ge(t),ye(t,he(n),e))}}(t,e),t}(Mr(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 Mr(t,e){var n;t.children&&(t.children=t.children.map(t=>Mr(t,e)));const r=t.effects,o="string"==typeof t.id?t.id:void 0,a=o?e.contentRefInnerIds.get(o):void 0;if(!r&&!a)return t;const{transformation:i,repeater:s,maskedBy:l,trimPath:u,clone:c,fillGradient:f,strokeGradient:d,textAlongPath:h,text:p}=null!=r?r:{};null==r||r.isCombinedShape;r&&delete t.effects;let m=t,y=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.href?e.idMap.get(h.href):void 0,r=t&&"string"==typeof t.d?t.d:void 0,o=h.textLength,a="number"==typeof o?o:o&&"object"==typeof o?"number"==typeof o.value?o.value:Array.isArray(o.keyframes)&&o.keyframes.length?Number(null==(n=o.keyframes[0])?void 0:n.value):void 0:void 0,i=function(t,e,n,r,o){return e.glyphs?An(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,r,h.startOffset,a);i&&(m=i,y=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?vn(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){var n;if(!e)return t;const r={type:"textPath",href:"string"!=typeof e.href||e.href.startsWith("#")?e.href:"#"+e.href,children:null!=(n=t.children)?n:[]};return void 0!==e.lengthAdjust&&(r.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(r.method=e.method),void 0!==e.spacing&&(r.spacing=e.spacing),ke(r,"startOffset",e.startOffset),ke(r,"textLength",e.textLength),t.children=[r],t}(m,h)),m=function(t,e,n){return Qt(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return Qt(t,e,n,"stroke")}(m,d,e),m=dr(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=Yt(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate);const u=[l];for(let t=1;t<a;t++){const r=Yt(l),o=fe(e,t),a=o?g(r,o,n):r;u.push(a)}const c={type:"g",children:u};return void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(m,s,e),m=te(m,l,i,e),a?(ce(m,c,e),m=A(m,i,o,a,e)):m=function(t,e,n,r){return ce(t,e,r),g(t,n,r)}(m,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),o&&e.idMap.set(o,m),m}function _r(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=Tr(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=Er(t.viewBox);if(e)return[e[2],e[3]];const n=Ir(t.width),r=Ir(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),i=[],s=Nr(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 f(c({},s),{children:u})}function Ir(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Tr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function zr(t,e,n,r,o,a,i){var s,l,u,d;const h=Wt(e);Bt(h,o);const p="symbol"===h.type?Er(h.viewBox):void 0,m=null!=(l=null!=(s=Ir(t.width))?s:null==p?void 0:p[2])?l:i[0],g=null!=(d=null!=(u=Ir(t.height))?u:null==p?void 0:p[3])?d:i[1],y="symbol"===h.type?function(t,e,n,r,o){const a=Er(t.viewBox),i=f(c({},t),{type:"g"});if(delete i.viewBox,delete i.preserveAspectRatio,delete i.width,delete i.height,!a)return i;const[s,l,u,d]=a,h=u>0&&d>0?Math.min(r/u,o/d):1,p=(r-u*h)/2,m=(o-d*h)/2,g=[];0===p&&0===m||g.push("translate("+p+","+m+")");1!==h&&g.push("scale("+h+")");0===s&&0===l||g.push("translate("+-s+","+-l+")");g.length&&(i.transform=g.join(""));const y=e();return n.push({type:"clipPath",id:y,children:[{type:"rect",x:s,y:l,width:u,height:d}]}),i.clipPath="url(#"+y+")",i}(h,o,a,m,g):h,v=Nr(y,n,r,o,a,i),b=f(c({},t),{type:"g",children:[v]});return delete b.href,delete b.width,delete b.height,Kt(b)}function Er(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 Nr(t,e,n,r,o,a){if("use"===t.type&&"string"==typeof t.href){const i=Tr(t.href);if(i&&n.has(i)){const s=e.get(i);if(s)return zr(t,s,e,n,r,o,a)}}if(!t.children)return t;let i=!1;const s=t.children.map(t=>{const s=Nr(t,e,n,r,o,a);return s!==t&&(i=!0),s});return i?f(c({},t),{children:s}):t}function Cr(t,e,n){var r,o;let a=Or(t).root;return a=ir(a,null!=(o=null==(r=Ut(a))?void 0:r.duration)?o:qe),e===q.webapi&&(a=Xn(a,null==n?void 0:n.motionPath),a=_r(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}var Fr="http://www.w3.org/2000/svg",Rr=new Set(["script","foreignobject"]),Ur=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Dr=new Set(["href","xlink:href","src"]),Lr=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Vr=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Wr=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Br=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Gr(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(Ur.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||Dr.has(n)&&(Lr.test(t)||Vr.test(t)||function(t){const e=Wr.exec(t);return!!e&&Br.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 Kr(t){const e={};for(const n of Object.keys(t)){const r=Ze(n);if(Y.has(r))continue;if("style"===r)continue;let o=t[n];Ve.has(r)&&Array.isArray(o)?e[r]=De(o):"transform"===r&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&o.value&&"object"==typeof o.value?e.transform=Ge(o.value,{withUnits:!1}):We.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 qr(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=Dt(t)||e,f=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,c);let d;if(o)for(const t of o){const e=qr(t,c);e&&(d||(d=[]),d.push(e))}return function(t,e,n,r,o){if(Rr.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Fr,t);for(const t in e){const n=Gr(t,e[t]);void 0!==n&&a.setAttribute(Qe(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",Kr(u),f,d,u[Z]||u[X])}function Zr(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=.5}=e,a=t.getRootElement();if(!a)return console.warn("setupAnimationTriggers: No root element found for animation."),t;const i=()=>{t.play()},s=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":t.play()}};switch(n){case"load":{const t=()=>i();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{const t=()=>i(),e=()=>s();a.addEventListener("mouseenter",t),a.addEventListener("mouseleave",e);break}case"click":{const e=()=>{t.isPlaying()?s():i()};a.addEventListener("click",e);break}case"scrollIntoView":new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=o?i():s()})},{threshold:o}).observe(a);break}return t}function Xr(t){return"#"+t}function Yr(t,e,n){const r=Ut(t)||{},o=ur(t,q.frames),a=r.iterations;let i=1;"number"==typeof a&&(i=a||1),"infinite"===a&&(i=1/0),i<1&&(i=1);const s=+(r.duration||qe),l=s&&i?s*(i===1/0?1/0:i):s?(null!=i?i:1)*s:0,u=r.direction||"normal";let c=null,f=!1,d=r.delay||0,h=0,p=1,m=!1;const g=r.frameRate,y=g&&g>0?1e3/g:0;let v=0;const b=()=>{const t=h?(Date.now()-h)*p:0;let e=d+t;return Number.isFinite(l)&&e>l&&(e=l),e<0&&(e=0),e};function A(t){let n=function(){const e=s>0?s:1;let n=0,r=0;if(s>0){t=Je(t,0,i*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,i-1);n=Je((t-r*e)/e,0,1)}else n=t;const o=u||"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 o||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=fr(r,n*s);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}r.delay&&A(b());const k=()=>!!f&&(!!e.isConnected()&&!(Number.isFinite(l)&&b()>=l)),w=t=>{null!==c&&(cancelAnimationFrame(c),c=null),(t||k())&&(c=requestAnimationFrame(()=>{c=null,(()=>{var t;if(!e.isConnected())return void x();const r=b();if(y>0){const t=Date.now();if(v&&t-v<y)return;v=t}if(l&&Number.isFinite(l)&&r>=l)return A(l),m||(m=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)),void x();A(r)})(),w()}))},x=()=>{f&&(d=b(),h=0,f=!1,null!==c&&(cancelAnimationFrame(c),c=null),A(d))},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>k(),play:()=>{var t;f||(Number.isFinite(l)&&d>=l&&(d=0,m=!1),f=!0,h=Date.now(),w(!0)),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;x(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;x(),d=0,h=0,f=!1,m=!1,A(d),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;d=Number.isFinite(l)?l:b(),h=0,f=!1,A(d),t&&!m&&(m=!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");const e=b();p=t,d=e,f&&(h=Date.now())},getCurrentTime:()=>b(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(l)&&t>l&&(t=l),d=t,f&&(h=Date.now()),A(b())},destroy:()=>{P.cancel()}};return P}function Qr(t,e,n,r){const o=Ut(t)||{};if(!r)if(t.id){const e=Xr(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");let a=Yr(t,e||function(t){const e=new Set,n={isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=Qe(r);const a=Xr(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];e.setAttribute(r,o),Ke.has(r)&&(e.style[r]=o)}}};return n}(r),n);return a=f(c({},a),{getRootElement:()=>r||null}),o.trigger&&Zr(a,o.trigger),a}function Jr(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;return Ve.has(n)&&Array.isArray(i)?u=De(i):"transform"!==n||null===i||"object"!=typeof i||Array.isArray(i)?We.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"):u=""+i:(u=Ge(i,{withUnits:!0}),c="transform"),CSS.supports(c,u)||r.add(c),c=Ze(c),l[c]=u,l}function Hr(t,e,n){var r,o,a,i,s;const l=[];for(let u=0;u<e.length;u++){const d=e[u],h=null!=(r=d.t)?r:0;if(h<0){const n=e[u+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(a=n.t)?a:0)-h),r=d.e?Ce(d.e)(e):e,{right:o}=Re(d.e,e);l.push({t:0,v:nr(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[u-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?Ce(r.e)(o):o,{left:i}=Re(r.e,o);l.length>0&&(l[l.length-1]=f(c({},l[l.length-1]),{e:i})),l.push({t:n,v:nr(t,r.v,d.v,a),e:void 0})}break}l.push(d)}return l}function $r(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=Hr(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=Jr(o,Je((null!=(r=o.t)?r:0)/t,0,1),a,e);0===n&&(i.offset||0)>0&&l.push(f(c({},i),{offset:0})),l.push(i)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(c({},l[l.length-1]),{offset:1})),l.length>0&&o.set(a,l)}return o}function to(t,e,n,r){var o;const a=Ut(t)||{};if(!n)if(t.id){const e=Xr(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=ur(t,q.webapi),s=[],l=a.iterations;let u;"number"==typeof l&&(u=l),"infinite"===l&&(u=1/0);const c=new Set;(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=Xr(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 f=$r(r,c,a),d=a.delay&&a.delay>0?a.delay:void 0,h=a.delay&&a.delay<0&&a.duration?-a.delay%a.duration:void 0,p={duration:a.duration,delay:d,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 f)if(t.length>0)try{const r=new KeyframeEffect(n,t,p),o=new Animation(r,document.timeline);(null==e?void 0:e.onFinish)&&(o.onfinish=()=>{var t;return null==(t=e.onFinish)?void 0:t.call(e)}),(null==e?void 0:e.onRemove)&&(o.onremove=()=>{var t;return null==(t=e.onRemove)?void 0:t.call(e)}),h&&(o.currentTime=h),s.push(o)}catch(t){console.warn(t)}}}if(!r&&c.size)return console.warn("Unsupported CSS attrs: "+[...c].join(", ")),null;const f={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;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;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),f),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=>{s.forEach(e=>{e.currentTime=t})},destroy:()=>{f.cancel(),s.splice(0,s.length)}};return a.trigger&&Zr(f,a.trigger),f}var eo=0;function no(){return"_px_"+Date.now().toString(36)+(++eo).toString(36)+Math.random().toString(36).substring(2,6)}function ro(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>ro(t));const e=t,n={};for(const t of Object.keys(e))n[t]=ro(e[t]);return n}function oo(t){var e,n;const r=ro(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=no();o.set(t,n),e.id=n}else e.animate&&(e.id=no());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]=ao(r,o);else if(s.has(n)){const t=o.get(r);t&&(e[n]=t)}else r.includes("url(#")&&(e[n]=ao(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=ao(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=f(c({},r.animator),{animate:t})}return r}function ao(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function io(t,e,n,r){const o=It(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);const a=Ut(t)||{};a.debug=!0;t=Cr(t,a.mode===K.frames?q.frames:q.webapi);let i=null;if(r&&t.children){t=oo(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=qr(t),i&&e.replaceChildren(i))}return function(t,e,n,r){const o=Ut(t)||{};let a;return a=o.mode===K.frames?Qr(t,e,n,r):to(t,n,r,o.mode===K.webapi)||Qr(t,e,n,r),o.debugInstName&&(window[o.debugInstName]=a),a}(t,e,n,i)}var so="data";function lo(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 io(n,r,o,a);let i=null;return fetch(e).then(t=>t.json()).then(t=>{Ft(t)?i=io(t,r,o,a):console.error("Invalid animation document format")}),{isReady:()=>!!i,getRootElement:()=>i?i.getRootElement():null,isPlaying:()=>(null==i?void 0:i.isPlaying())||!1,play:()=>{null==i||i.play()},pause:()=>{null==i||i.pause()},cancel:()=>{null==i||i.cancel()},finish:()=>{null==i||i.finish()},setPlaybackRate:t=>{null==i||i.setPlaybackRate(t)},getCurrentTime:()=>(null==i?void 0:i.getCurrentTime())||0,setCurrentTime:t=>{null==i||i.setCurrentTime(t)},destroy:()=>{null==i||i.destroy()}}}function uo(){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]=lo({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=uo,window.createAnimator=lo,window.setupAnimationTriggers=Zr);var co=[1,0,0,1,0,0];function fo(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 ho=(t,e)=>[1,0,0,1,t,e],po=(t,e)=>[t,0,0,e,0,0];function mo(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var go=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],yo=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function vo(t){let e=co;t.translate&&(e=fo(e,ho(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=fo(e,ho(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=fo(e,mo(t.rotate))),t.scale&&(e=fo(e,po(t.scale[0],t.scale[1]))),n&&(e=fo(e,ho(-t.origin[0],-t.origin[1]))),e}function bo(t,e,n){return t+(e-t)*n}function Ao(t,e){return null==t?co:"string"==typeof t?function(t){let e=co;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=fo(e,ho(n[0]||0,n[1]||0)):"scale"===t?e=fo(e,po(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=fo(e,mo(n[0])):"skewX"===t?e=fo(e,go(n[0])):"skewY"===t?e=fo(e,yo(n[0])):"matrix"===t&&(e=fo(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?vo(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=[bo(h.translate[0],p.translate[0],d),bo(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=bo(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[bo(h.scale[0],p.scale[0],d),bo(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?vo(t.value):co}var ko,wo=new Set(["svg","g","symbol"]),xo=new Set(["defs","mask","clipPath","title"]);function Po(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Po(t,e))}function jo(t){return null==t?0:Number(t)}function So(t){return Math.round(100*t)/100+0}function Oo(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=So(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 bo(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(So).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return jo(t.width)+","+jo(t.height)+","+jo(t.x)+","+jo(t.y);case"ellipse":return jo(t.rx)+","+jo(t.ry)+","+jo(t.cx)+","+jo(t.cy);case"circle":return jo(t.r)+","+jo(t.cx)+","+jo(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(jo(c)||"")+"|o:"+f+"|m:"+d}function Mo(t,e,n,r,o){var a;const i=t.type||"";if(xo.has(i))return;const s=fo(e,function(t,e){return t.animate&&t.animate.transform?Ao(t.animate.transform,e):void 0!==t.transform?Ao(t.transform,e):co}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=fo(s,ho(jo(t.x),jo(t.y)));return void(a?Mo(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}wo.has(i)?null==(a=t.children)||a.forEach(t=>Mo(t,s,n,r,o)):o.push(Oo(t,s,n))}function _o(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=>_o(t,e))}function Io(t,e){const n=new Map;Po(t,n);const r=[];return Mo(t,co,e,n,r),r.sort()}function To(t,e){const n=new Set;_o(t,n),_o(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Io(t,o),a=Io(e,o),i=zo(n,a),s=zo(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function zo(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}return ko=d,((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}),ko)})();
|