@pixodesk/svg-animator-core 1.0.30 → 1.0.34

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.
@@ -1 +1 @@
1
- "use strict";var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h={};function p(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];!e&&i[0]===o[0]&&i[1]===o[1]&&u[0]===f[0]&&u[1]===f[1]?c.push("L"+f[0]+","+f[1]):c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function m(t,e,n){return t+(e-t)*n}function v(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=m(t[i]||0,e[i]||0,n);return r}function g(t,e,n){return[m(t[0]||0,e[0]||0,n),m(t[1]||0,e[1]||0,n),m(t[2]||0,e[2]||0,n),m(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function y(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(b(t[i],e[i],n));return o}function b(t,e,n){var r,o,i,a,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(v(f,h,d));const y=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,b=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;m.push(v(y,b,d));const k=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(v(k,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 k(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(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=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function A(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=k(e,r,t),((s*n+a)*n+i)*n;var n}}function x(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function w(t,e,n,r,o){const i=x(t,e,o),a=x(e,n,o),s=x(n,r,o),l=x(i,a,o),u=x(a,s,o),c=x(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}function S(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,i]=t,a=k(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=w([0,0],s,l,[1,1],a),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,v=1-d;return m>1e-9&&Math.abs(v)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/v,(c[2][0]-f)/m,(c[2][1]-d)/v]),{left:h,right:p}}function P(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function O(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 j(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),i=n?e[2]+e[2]:e.slice(4,6),a=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(i,16)/255];return null!==a&&s.push(parseInt(a,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)}}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(h,{COLOUR_ATTR_NAMES:()=>M,CSS_ONLY_STYLE_PROPS:()=>Xe,DEFAULT_DURATION_MS:()=>N,DISALLOWED_SVG_TAGS_LOWER:()=>Ge,INTERNAL_ATTRS:()=>Ut,LOOP_JUMP_SHIFT_MS:()=>jn,MISSING_GLYPH_CLASS_NAME:()=>Po,PCT_BASED_ATTR_NAMES:()=>I,PX_ANIM_ATTR_NAME:()=>At,PX_ANIM_SRC_ATTR_NAME:()=>kt,PX_TRANSFORM_PART_KEYS:()=>Rt,PxAnimatedSvgDocumentSchema:()=>De,PxAnimationDefinitionSchema:()=>re,PxAnimatorConfigSchema:()=>de,PxAnimatorEngine:()=>wt,PxAnimatorMode:()=>xt,PxAttrValueSchema:()=>pe,PxBezierPathSchema:()=>Le,PxBindingSchema:()=>he,PxCloneEffectSchema:()=>Se,PxDefsSchema:()=>le,PxEasingOrRefSchema:()=>Jt,PxEffectsSchema:()=>Te,PxElementAnimationSchema:()=>oe,PxFillGradientEffectSchema:()=>je,PxGradientSpreadMethod:()=>Wt,PxGradientStopSchema:()=>Pe,PxGradientType:()=>Gt,PxGradientUnits:()=>Vt,PxKeyframeSchema:()=>Ht,PxKeyframeValueSchema:()=>Qt,PxLoopExtend:()=>St,PxLoopSchema:()=>$t,PxMaskedByEffectSchema:()=>ke,PxNodeBase:()=>Ne,PxNodeSchema:()=>Ee,PxPropertyAnimationSchema:()=>te,PxRepeaterEffectSchema:()=>be,PxRetimeEffectSchema:()=>we,PxScrollRangePointSchema:()=>ue,PxScrollRangeSchema:()=>ce,PxScrollSchema:()=>fe,PxStrokeGradientEffectSchema:()=>Me,PxStrokeTrimEffectSchema:()=>xe,PxStrokeTrimSubPaths:()=>Lt,PxSvgNodeExtra:()=>Ce,PxTextEffectSchema:()=>Ie,PxTextPathEffectSchema:()=>_e,PxTransformByEffectSchema:()=>ye,PxTransformPartsSchema:()=>ee,PxTransformValueSchema:()=>ne,PxTriggerSchema:()=>ie,STYLE_ATTR_NAMES:()=>z,TEXT_ATTR:()=>Ft,TEXT_CONTENT_ATTR:()=>Bt,TRANSFORM_FN_NAMES:()=>_,applyPlayerEffects:()=>ri,bezierToSvgPath:()=>p,calcAnimationValues:()=>Gn,camelCaseToKebabWordIfNeeded:()=>L,clamp:()=>F,collectSampleTimes:()=>Ei,composeTransformParts:()=>T,createBasicFrameLoopAnimator:()=>vi,createPathSampler:()=>Qr,cubicBezier:()=>A,deepClone:()=>Re,describeSchema:()=>yt,diffInEffect:()=>Di,evaluateMotionPathSegment:()=>ln,extendedPathForBrowser:()=>ro,generateNewIds:()=>Ve,generateUniqueId:()=>Ue,getAnimatorConfig:()=>Zt,getBindings:()=>Yt,getChildren:()=>qt,getDefs:()=>Xt,getNormalisedBindings:()=>Vn,getNormalizedProps:()=>tn,interpolateBeziers:()=>y,interpolateValue:()=>Cn,isPxElementFileFormat:()=>Kt,isPxElementFileFormatDeep:()=>Fe,isScrollTimeline:()=>K,jsonElementFactory:()=>io,kebabToCamelCaseWord:()=>E,layoutGlyphTextChars:()=>Mo,materialiseAllInTree:()=>pi,materialiseAnimatedUseInstances:()=>qn,materialiseGlyphText:()=>Uo,materialiseGlyphTextAlongPath:()=>To,materialiseGlyphTextHorizontal:()=>jo,materialiseInternalLoopsInPropAnim:()=>Fn,materialiseInternalLoopsInTree:()=>Bn,materialiseMotionPathInPropAnim:()=>dn,materialiseMotionPathsInTree:()=>Pn,propAnimIsMotionPath:()=>on,px:()=>bt,resolveStyle:()=>$e,reverseEasing:()=>P,sanitiseAttributeValue:()=>He,schemaKeys:()=>gt,scrollOffsetProgress:()=>Q,scrollPhaseInterval:()=>X,scrollResolveAxis:()=>H,scrollTotalDurationMs:()=>Z,scrollViewProgress:()=>J,shiftAnimatable:()=>no,splitEasing:()=>S,subdivideCubicBezier:()=>w,toRGBA:()=>O,validateNodeEffects:()=>ze,visualModelAt:()=>Ci}),module.exports=(t=h,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of i(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(a=r(n,l))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var M=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),_=new Set(["translate","rotate","scale","skew"]),I=new Set(["offset-distance","offsetDistance"]);function T(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}var z=new Set(["offset-distance","offsetDistance"]),N=1e3;function E(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function C(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var D=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function L(t){return D.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function F(t,e,n){return Math.max(e,Math.min(t,n))}function B(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,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 U=1e-4;function R(t,e,n,r,o){const i=V(t,e,n,r,o);if(0===i[0]&&0===i[1]){return V(t,e,n,r,o<.5?o+U:o-U)}return i}function V(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function W(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=B(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=B(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function G(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 i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function K(t){return"scroll"===(null==t?void 0:t.timelineSource)}function Z(t){return("number"==typeof(null==t?void 0:t.duration)&&t.duration>0?t.duration:N)*("number"==typeof(null==t?void 0:t.iterations)&&t.iterations>0?t.iterations:1)}function X(t,e,n){const r=e,o=n;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}var Y="cover";function q(t,e,n,r){var o;const[i,a]=X(null!=(o=null==t?void 0:t.phase)?o:Y,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function J(t,e,n,r){const o=n-t,i=q(null==r?void 0:r.start,0,e,n),a=q(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:F((o-i)/(a-i),0,1)}function Q(t,e,n){var r,o;const i=e>0?F(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:F((i-a)/(s-a),0,1)}function H(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}function $(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var tt=class{_canSanitize(t){return this.isValid(t)}optional(){return new et(this)}},et=class extends tt{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)}},nt=class extends tt{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($(null!=n?n:[])+": expected string, got "+typeof t),!1)}},rt=class extends tt{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($(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},ot=class extends tt{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($(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},it=class extends tt{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($(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},at=class extends tt{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($(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},st=class extends tt{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;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push($(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},lt=class extends tt{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($(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)}},ut=class extends tt{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($(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push($(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ct=class extends tt{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=f({},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($(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!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)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ft=class extends tt{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($(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)}},dt=class extends tt{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($(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,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ht=class extends tt{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},pt=class extends tt{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push($(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},mt=class extends tt{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)}},vt=class extends tt{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($(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 gt(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function yt(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 bt={string:(t="")=>new nt(t),number:(t=0)=>new rt(t),boolean:(t=!1)=>new ot(t),literal:t=>new it(t),enum:(t,e)=>new at(t,e),union:(t,e)=>new st(t,e),discriminatedUnion:(t,e)=>new lt(t,e),object:t=>new ut(t),openObject:(t,e)=>new ct(t,e),extendedObject:(t,e)=>new ut(f(f({},t._shape),e)),array:t=>new ft(t),record:t=>new dt(t),any:()=>new ht,defined:()=>new pt,tuple:t=>new vt(t),lazy:(t,e)=>new mt(t,e)},kt="data-px-animation-src",At="_px_animator",xt={auto:"auto",waapi:"waapi",frames:"frames"},wt={waapi:xt.waapi,frames:xt.frames},St={before:"before",after:"after"},Pt="luminance",Ot="alpha",jt="userSpaceOnUse",Mt="objectBoundingBox",_t="clip",It="extend",Tt="spacing",zt="spacingAndGlyphs",Nt="align",Et="stretch",Ct="auto",Dt="exact",Lt={separate:"separate",combined:"combined"},Ft="text",Bt="textContent",Ut=new Set(["type","children","animator","meta","animate","effects",Ft,Bt]),Rt=["translate","rotate","scale","origin"],Vt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Wt={pad:"pad",reflect:"reflect",repeat:"repeat"},Gt={linear:"linear",radial:"radial"};function Kt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Zt(t){var e;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)}function Xt(t){var e;if(t)return null==(e=Zt(t))?void 0:e.definitions}function Yt(t){var e;if(!t)return;const n=null==(e=Zt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function qt(t){return null==t?void 0:t.children}var Jt=bt.union([bt.string(),bt.tuple([bt.number(),bt.number(),bt.number(),bt.number()])]),Qt=bt.union([bt.string(),bt.number(),bt.array(bt.number()),bt.lazy(()=>ee,{}),bt.object({path:bt.string()}),bt.lazy(()=>bt.object({paths:bt.array(Le)}),{paths:[]}),bt.lazy(()=>bt.array(Pe),[])]),Ht=bt.object({time:bt.number().optional(),t:bt.number().optional(),value:Qt.optional(),v:Qt.optional(),easing:Jt.optional(),e:Jt.optional(),tangentOut:bt.tuple([bt.number(),bt.number()]).optional(),to:bt.tuple([bt.number(),bt.number()]).optional(),tangentIn:bt.tuple([bt.number(),bt.number()]).optional(),ti:bt.tuple([bt.number(),bt.number()]).optional(),selected:bt.boolean().optional()}),$t=bt.object({segmentCount:bt.number().optional(),extend:bt.enum([St.before,St.after]).optional(),alternate:bt.boolean().optional()}),te=bt.object({value:Qt.optional(),keyframes:bt.array(Ht).optional(),kfs:bt.array(Ht).optional(),loop:bt.union([$t,bt.boolean()]).optional(),autoOrient:bt.boolean().optional()}),ee=bt.object({translate:bt.tuple([bt.number(),bt.number()]).optional(),rotate:bt.number().optional(),skew:bt.number().optional(),scale:bt.tuple([bt.number(),bt.number()]).optional(),origin:bt.tuple([bt.number(),bt.number()]).optional()}),ne=bt.union([bt.string(),ee,bt.object({value:ee}),te]),re=bt.record(te),oe=bt.union([bt.string(),bt.array(bt.union([bt.string(),re])),re]),ie=bt.object({startOn:bt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:bt.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:bt.number().optional()}),ae=bt.object({width:bt.number(),d:bt.string()}),se=bt.object({fFamily:bt.string(),style:bt.string(),ascent:bt.number(),unitsPerEm:bt.number(),glyphs:bt.record(ae)}),le=bt.object({easings:bt.record(bt.tuple([bt.number(),bt.number(),bt.number(),bt.number()])).optional(),animations:bt.record(re).optional(),styles:bt.record(bt.any()).optional(),glyphs:bt.record(se).optional()}),ue=bt.object({phase:bt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:bt.number().optional()}),ce=bt.object({start:ue.optional(),end:ue.optional()}),fe=bt.object({driver:bt.enum(["custom","native"]).optional(),kind:bt.enum(["view","scroll"]).optional(),axis:bt.enum(["block","inline","x","y"]).optional(),source:bt.enum(["nearest","root"]).optional(),subject:bt.string().optional(),smoothing:bt.number().optional(),pin:bt.boolean().optional(),pinAlign:bt.enum(["top","center","bottom"]).optional(),pinTop:bt.number().optional(),pinDistance:bt.number().optional(),range:ce.optional()}),de=bt.object({mode:bt.enum([xt.auto,xt.waapi,xt.frames]).optional(),duration:bt.number().optional(),delay:bt.number().optional(),iterations:bt.union([bt.number(),bt.literal("infinite")]).optional(),fill:bt.enum(["forwards","backwards","both","none"]).optional(),direction:bt.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:bt.number().optional(),trigger:ie.optional(),resetOnFinish:bt.boolean().optional(),definitions:le.optional(),animateById:bt.record(oe).optional(),timelineSource:bt.string().optional(),scroll:fe.optional(),debugInstName:bt.string().optional()}),he=bt.object({id:bt.string(),animate:oe}),pe=bt.union([bt.string(),bt.number(),bt.array(bt.number()),bt.object({value:bt.defined()}),ee]),me=bt.union([bt.number(),bt.object({value:bt.number()}),te]),ve=bt.union([bt.tuple([bt.number(),bt.number()]),bt.object({value:bt.tuple([bt.number(),bt.number()])}),te]),ge=bt.union([bt.string(),bt.object({value:bt.string()}),te]),ye=bt.object({translate:ve.optional(),rotate:me.optional(),scale:ve.optional(),skew:me.optional(),origin:ve.optional()}),be=bt.object({copies:bt.number().optional(),translate:ve.optional(),rotate:me.optional(),skew:me.optional(),scale:ve.optional(),origin:ve.optional()}),ke=bt.object({sourceId:bt.string().optional(),maskType:bt.enum([Pt,Ot]).optional(),maskUnits:bt.enum([jt,Mt]).optional(),maskContentUnits:bt.enum([jt,Mt]).optional(),x:bt.number().optional(),y:bt.number().optional(),width:bt.number().optional(),height:bt.number().optional()}),Ae=bt.object({d:ge.optional(),animate:te.optional()}),xe=bt.object({offset:me.optional(),range:ve.optional(),subPaths:bt.enum([Lt.separate,Lt.combined]).optional()}),we=bt.object({sourceId:bt.string().optional(),start:bt.number().optional(),stretch:bt.number().optional(),timeCrop:bt.tuple([bt.number(),bt.number()]).optional()}),Se=bt.object({type:bt.enum(["content"]).optional(),sourceId:bt.string().optional(),retime:we.optional()}),Pe=bt.object({offset:bt.number(),color:bt.string()}),Oe=bt.union([bt.array(Pe),bt.object({value:bt.array(Pe)}),te]),je=bt.object({type:bt.enum([Gt.linear,Gt.radial]),p1:ve.optional(),p2:ve.optional(),c:ve.optional(),r:me.optional(),fp:ve.optional(),stops:Oe.optional(),gradientUnits:bt.enum([Vt.userSpaceOnUse,Vt.objectBoundingBox]).optional(),spreadMethod:bt.enum([Wt.pad,Wt.reflect,Wt.repeat]).optional(),gradientTransform:bt.string().optional()}),Me=je,_e=bt.object({path:bt.string(),pathOverflow:bt.enum([_t,It]).optional(),lengthAdjust:bt.enum([Tt,zt]).optional(),method:bt.enum([Nt,Et]).optional(),spacing:bt.enum([Ct,Dt]).optional(),startOffset:me.optional(),textLength:me.optional()}),Ie=bt.object({useGlyphs:bt.boolean().optional()}),Te=bt.object({transformBy:ye.optional(),repeater:be.optional(),maskedBy:ke.optional(),clipPath:Ae.optional(),strokeTrim:xe.optional(),clone:Se.optional(),fillGradient:je.optional(),strokeGradient:Me.optional(),textPath:_e.optional(),text:Ie.optional()});function ze(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Te.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 Ne=bt.openObject({type:bt.string(),id:bt.string().optional(),meta:bt.any().optional(),effects:Te.optional(),animate:oe.optional(),style:bt.union([bt.string(),bt.record(bt.union([bt.string(),bt.number()]))]).optional()},pe),Ee=bt.openObject(d(f({},Ne._shape),{children:bt.lazy(()=>bt.array(Ee),[]).optional()}),pe),Ce=bt.object({width:bt.union([bt.number(),bt.string()]).optional(),height:bt.union([bt.number(),bt.string()]).optional(),viewBox:bt.string().optional(),animator:de.optional()}),De=bt.openObject(d(f(f({},Ne._shape),Ce._shape),{type:bt.literal("svg"),children:bt.array(Ee).optional()}),pe),Le=bt.object({v:bt.array(bt.array(bt.number())),i:bt.array(bt.array(bt.number())).optional(),o:bt.array(bt.array(bt.number())).optional(),c:bt.boolean().optional()});function Fe(t){const e=De.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var Be=0;function Ue(){return"_px_"+Date.now().toString(36)+(++Be).toString(36)+Math.random().toString(36).substring(2,6)}function Re(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Re(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Re(e[t]);return n}function Ve(t){var e,n;const r=Re(t),o=new Map,i=new Set(["href","xlink:href"]),a=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["sourceId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Ue();o.set(t,n),e.id=n}else e.animate&&(e.id=Ue());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(i.has(n)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(e[n]="#"+i)}else if(a.has(n))e[n]=We(r,o);else if(s.has(n)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(e[n]=t?"#"+i:i)}else r.includes("url(#")&&(e[n]=We(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=We(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.animateById;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=d(f({},r.animator),{animateById:t})}return r}function We(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Ge=new Set(["script","foreignobject"]),Ke=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Ze=new Set(["href","xlink:href","src"]),Xe=new Set(["mixBlendMode","isolation"]),Ye=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,qe=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Je=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Qe=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function He(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(Ke.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||Ze.has(n)&&(Ye.test(t)||qe.test(t)||function(t){const e=Je.exec(t);return!!e&&Qe.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 $e(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}function tn(t){const e={};for(const n of Object.keys(t)){const r=E(n);if(Ut.has(r))continue;if("style"===r)continue;let o=t[n];if(M.has(r)&&Array.isArray(o))e[r]=O(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)_.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e.transform=T(t,{withUnits:!1})}}return e}function en(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 nn(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function rn(t){var e;return null!=(e=t.easing)?e:t.e}function on(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 an=new WeakMap;function sn(t,e,n,r){var o,i;let a=an.get(t);const s=null==a?void 0:a.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=W(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return a||(a=new WeakMap,an.set(t,a)),a.set(e,h),h}function ln(t,e,n,r,o,i){const a=sn(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=t.ds[t.ds.length-1],r=e*n,{ts:o,ds:i}=t,a=i.length-1;if(r<=0)return o[0];if(r>=i[a])return o[a];let s=1,l=a;for(;s<l;){const t=s+l>>>1;i[t]<r?s=t+1:l=t}const u=i[l-1],c=i[l]-u,f=c>0?(r-u)/c:0;return o[l-1]+f*(o[l]-o[l-1])}(a.lut,o),l=B(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const u=R(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var un=.5,cn=5,fn=32;function dn(t,e){var n,r,o,i;if(!on(t))return t;const a=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(a)||a.length<2)return t;const s=!!t.autoOrient,l=null!=(r=null==e?void 0:e.flatnessTolerance)?r:un,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:cn,c=null!=(i=null==e?void 0:e.maxSamplesPerSegment)?i:fn,f=[],d=en(a[0]);if(!d)return t;const h=s?function(t,e){const n=en(t),r=en(e);if(!n||!r)return 0;const o=sn(t,e,n,r),i=R(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(a[0],a[1]):void 0;f.push(pn(nn(a[0]),gn(mn(a[0]),mn(a[0]),0,d,h,s)));for(let t=0;t<a.length-1;t++){const e=a[t],n=a[t+1],r=en(e),o=en(n);r&&o?(s&&t>0&&bn(f,e,n,r,o,u),An(f,e,n,r,o,s,l,u,c)):f.push(pn(nn(n),gn(mn(n),mn(n),1,null!=o?o:[0,0],void 0,s)))}const p=rn(a[a.length-1]);p&&(f[f.length-1].e=p),s&&hn(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function hn(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function pn(t,e){return{t:t,v:e}}function mn(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 i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function gn(t,e,n,r,o,i){const a={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&&i)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=vn(o,s,n))}return void 0!==o&&(a.rotate=o+yn(t,e,n)),a}function yn(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=vn(r,o,n);return"number"==typeof i?i:0}function bn(t,e,n,r,o,i){var a;const s=t[t.length-1],l=null!=(a=s.v)?a:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=mn(e),f=u-yn(c,c,0),d=sn(e,n,r,o),h=R(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(h[1],h[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(p,f);if(Math.abs(m)<=i)return;const v=nn(e),g=Math.min(v+kn,(v+nn(n))/2),y=gn(mn(e),mn(e),0,r,p,!0);t.push(pn(g,y))}var kn=.05;function An(t,e,n,r,o,i,a,s,l){const u=sn(e,n,r,o),c=nn(e),f=nn(n),d=rn(e),h=(p=d)?A([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=mn(e),v=mn(n),g=function(t,e,n,r,o){const i=[];xn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),xn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)wn(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=G(u.lut,t),n=F(u.totalArc>0?e/u.totalArc:t,0,1),r={u:F(h(n),0,1),p:n,pos:B(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=R(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const x=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?F((n.u-k)/(1-k),0,1):1,{left:o,right:a}=S(b,r),s=0===e?x:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=gn(m,v,n.p,n.pos,n.rotateDeg,i);t.push(pn(l,u)),b=a,k=n.u}}function xn(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;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 wn(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=B(r.P0,r.P1,r.P2,r.P3,t),c=B(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=B(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=B(r.P0,r.P1,r.P2,r.P3,l),p=B(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(Sn(d,u,c),Sn(h,u,c),Sn(p,u,c));let v=!0;if(o){const n=R(r.P0,r.P1,r.P2,r.P3,t),o=R(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}m<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,wn(t,l,n,r,o,i,a,s),wn(l,e,n,r,o,i,a,s))}function Sn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function Pn(t,e){const n=On(t,e);return null!=n?n:t}function On(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=On(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&on(n)){const o=dn(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var jn=1;function Mn(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>Mn(t[n],e[n]))}function _n(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,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function In(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Tn(t){return"string"==typeof t&&void 0!==In(t)}function zn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=In(t.path);return e?{paths:_n(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Tn(e[0])){const t=[];for(const n of e){const e=In(n);e&&t.push(..._n(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Tn(t[0])){const e=[];for(const n of t){const t=In(n);t&&e.push(..._n(t))}return{paths:e}}return{paths:t}}if(Tn(t)){return{paths:_n(In(t))}}return t}function Nn(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 En(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 Cn(t,e,n,r){var o,i;if("d"===t){return{paths:y(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}}return M.has(t)?g(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?m(e,n,r):_.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?v(e||[],n||[],r):m(+(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 i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=m(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=v(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function Dn(t,e,n,r){var o,i,a,s,l;const u=e.length-1,c=F(null!=(o=n.segmentCount)?o:u,1,u);let h;h=n.extend===St.before?e.slice(0,c+1):e.slice(u-c);const p=null!=(i=e[0].t)?i:0,m=null!=(a=e[e.length-1].t)?a:0;let v,g;n.extend===St.before?(v=0,g=p):(v=m,g=r);const y=g-v;if(y<=0)return e;const b=null!=(s=h[0].t)?s:0,k=(null!=(l=h[h.length-1].t)?l:0)-b;if(k<=0)return e;const x=h.map(t=>{var e,n;return{relT:(t.t-b)/k,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),w=Math.floor(y/k),O=y-w*k,j=O/k,M=[],_=n.extend!==St.before,I=e[e.length-1];let T,z=!1;function N(e,n,r){var o;let i;if(n){i=[];for(let t=x.length-1;t>=0;t--)i.push({relT:1-x[t].relT,v:x[t].v,e:t>0?P(x[t-1].e):void 0,tangentIn:x[t].tangentOut,tangentOut:x[t].tangentIn})}else i=x;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,u=o.e?A(o.e)(l):l,c=Cn(t,o.v,r.v,u),{left:f}=S(o.e,l);return M.length>0&&o.relT<=a&&(M[M.length-1].e=f),void M.push({t:e+a*k,v:c,e:void 0})}const s=M.length>0?M[M.length-1]:I,l=_&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*k))<1e-9;if(l){if(Mn(s.v,r.v)){M.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(T=r.e,z=!0);continue}M.length>0&&(delete s.tangentIn,delete s.tangentOut)}const u={t:e+r.relT*k+(l?jn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),M.push(u)}}if(n.extend===St.before){if(j>1e-9){!function(e,n,r){let o;if(n){o=[];for(let t=x.length-1;t>=0;t--)o.push({relT:1-x[t].relT,v:x[t].v,e:t>0?P(x[t-1].e):void 0,tangentIn:x[t].tangentOut,tangentOut:x[t].tangentIn})}else o=x;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?A(a.e)(o):o,l=Cn(t,a.v,r.v,s),{right:u}=S(a.e,o);M.push({t:e,v:l,e:u})}const s={t:e+(r.relT-i)*k,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),M.push(s)}}(v,!!n.alternate&&w%2==0,j)}for(let t=0;t<w;t++){const e=w-1-t,r=!!n.alternate&&e%2==0;N(v+O+t*k,r)}}else{for(let t=0;t<w;t++){const e=!!n.alternate&&t%2==0;N(v+t*k,e)}if(j>1e-9){const t=!!n.alternate&&w%2==0;N(v+w*k,t,j)}}if(n.extend===St.before)return[...M,...e];if(z&&e.length>0){return[...e.slice(0,-1),d(f({},e[e.length-1]),{e:T}),...M]}return[...e,...M]}function Ln(t,e,n,r){var o,i,a,s,l,u,c;const f=e.keyframes||e.kfs||[],d=[];for(const e of f){const n=null!=(i=null!=(o=e.time)?o:e.t)?i:0;let f=null!=(a=e.value)?a:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=zn(f));const p=C(t)?L(t):t;M.has(p)&&(f=null!=(l=j(f))?l:f);const m={t:n,v:f,e:Nn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(m.tangentIn=v),g&&(m.tangentOut=g),d.push(m)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,p=!0===h?{}:h||void 0;return p&&d.length>=2?Dn(t,d,p,n):d}function Fn(t,e,n){var r;const o=e.loop;if(null==o||!1===o)return e;const i=!0===o?{}:o,a=null!=(r=e.keyframes)?r:e.kfs;if(!Array.isArray(a)||a.length<2)return e;const s=C(t)?L(t):t,l=M.has(s),u=a.map(e=>{var n,r,o,i,a,s,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=zn(d)),l&&(d=null!=(o=j(d))?o:d);const h={t:f,v:d,e:null!=(i=e.e)?i:e.easing};return(null!=(a=e.tangentIn)?a: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:Dn(t,u,i,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function Bn(t,e){const n=Un(t,e);return null!=n?n:t}function Un(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Un(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],i=Fn(n,o,e);i!==o&&(r||(r=f({},t)),r[n]=i)}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Rn=0;function Vn(t,e=wt.waapi){const n=Zt(t)||{},r=Xt(t),o=n.duration||1e3,i=[],a=(t,n)=>{if(!n)return null;const i=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=En(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=En(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===i.length)return null;const a=function(t,e,n,r=wt.waapi){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Ln(i,a,e,n);if(s.length>0){const t={kfs:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===wt.waapi&&"transform"===i?dn(t):t}}return o}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(i),o,r,e);return 0===Object.keys(a).length?null:{id:t,animate:a}},s=Yt(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Rn;t.id=n;const r=a(n,e);r&&i.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 i}function Wn(t,e,n){var r,o,i,a,s,l,u;const c=e.kfs||e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){i=t[s],a=t[s+1];break}e>u&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(c,n);let h=f===d?0:(b=n,k=null!=(r=f.t)?r:0,x=null!=(o=d.t)?o:0,w=0,S=1,x===k?w:w+(b-k)/(x-k)*(S-w));var b,k,x,w,S;h=F(h,0,1);const P=null!=(i=f.e)?i:f.easing;if(P&&Array.isArray(P))try{h=A(P)(h)}catch(t){}let j=C(t)?L(t):t,_=null;const z=null!=(a=null==f?void 0:f.v)?a:null==f?void 0:f.value,N=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===j){_=y(null!=(l=null==z?void 0:z.paths)?l:Array.isArray(z)?z:[],null!=(u=null==N?void 0:N.paths)?u:Array.isArray(N)?N:[],h).map(t=>p(t)).join("")}else if(M.has(j))_=O(g(z||[0,0,0,1],N||[0,0,0,1],h)),j=t;else if("stroke-dasharray"===j)_=v(z||[],N||[],h).join(" "),j=t;else if("transform"!==j||null===z||"object"!=typeof z||Array.isArray(z))if("translate"===j){_="translate("+v(z||[0,0],N||[0,0],h).join(",")+")",j="transform"}else if("rotate"===j){_="rotate("+m(+(z||0),+(N||0),h)+")",j="transform"}else if("scale"===j){_="scale("+v(z||[1,1],N||[1,1],h).join(",")+")",j="transform"}else{_=m(+(z||0),+(N||0),h)}else{const t=new Set([...z?Object.keys(z):[],...N?Object.keys(N):[]]),n={};for(const e of t){const t=null==z?void 0:z[e],r=null==N?void 0:N[e];if("rotate"===e||"skew"===e)n[e]=m(+(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],i=v(t||o,r||o,h);n[e]=i}}if(on(e)){const t=z.translate,r=N.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=ln(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)}}_=T(n,{withUnits:!1}),j="transform"}return I.has(j)&&"number"==typeof _&&(_=100*_+"%"),{k:j,v:null===_?"":""+_}}function Gn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Wn(r,o,e);t&&(n[t.k]=t.v)}return n}function Kn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Kn);const e={};for(const n of Object.keys(t))e[n]=Kn(t[n]);return e}function Zn(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}),i=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(i)};return i(t),n}function Xn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Yn(t){var e;const n=Xn(t.x),r=Xn(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 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 i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=Qn(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};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 i=function(t){const e=$n(t.viewBox);if(e)return[e[2],e[3]];const n=Jn(t.width),r=Jn(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=tr(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},u=[...null!=(e=s.children)?e:[],l];return d(f({},s),{children:u})}function Jn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Qn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Hn(t,e,n,r,o,i,a){var s,l,u,c;const h=Kn(e);Zn(h,o);const p="symbol"===h.type?$n(h.viewBox):void 0,m=null!=(l=null!=(s=Jn(t.width))?s:null==p?void 0:p[2])?l:a[0],v=null!=(c=null!=(u=Jn(t.height))?u:null==p?void 0:p[3])?c:a[1],g="symbol"===h.type?function(t,e,n,r,o){const i=$n(t.viewBox),a=d(f({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,u,c]=i,h=u>0&&c>0?Math.min(r/u,o/c):1,p=(r-u*h)/2,m=(o-c*h)/2,v=[];0===p&&0===m||v.push("translate("+p+","+m+")");1!==h&&v.push("scale("+h+")");0===s&&0===l||v.push("translate("+-s+","+-l+")");v.length&&(a.transform=v.join(""));const g=e();return n.push({type:"clipPath",id:g,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),a.clipPath="url(#"+g+")",a}(h,o,i,m,v):h,y=tr(g,n,r,o,i,a),b=d(f({},t),{type:"g",children:[y]});return delete b.href,delete b.width,delete b.height,Yn(b)}function $n(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 tr(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Qn(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return Hn(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=tr(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?d(f({},t),{children:s}):t}function er(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function nr(t){var e,n,r;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const o=t,i=null!=(e=o.keyframes)?e:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(or),autoOrient:o.autoOrient,loop:o.loop},e=null!=(n=o.value)?n:o.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const a=null!=(r=o.value)?r:o.v;if(void 0!==a)return{kind:"static",value:a}}return{kind:"static",value:t}}function rr(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,c=f({},u||{}),d={keyframes:n.keyframes};void 0!==n.loop&&(d.loop=n.loop),void 0!==n.autoOrient&&(d.autoOrient=n.autoOrient),c[e]=d,t.animate=c;const h=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==h&&(t[e]=l(h))}function or(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=f({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function ir(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 ar(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=lr(r,e.origin,!0),r=sr(r,"scale",e.scale,n),r=sr(r,"skew",e.skew,n),r=sr(r,"rotate",e.rotate,n),r=lr(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=sr(r,"translate",e.translate,n):(r=lr(r,e.origin,!0),r=sr(r,"translate",e.translate,n),r=lr(r,e.origin,!1)),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function sr(t,e,n,r){if(void 0===n)return t;const o=nr(n);if("static"===o.kind)return{type:"g",transform:{value:er(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>ir(t,er(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 lr(t,e,n){if(void 0===e)return t;const r=nr(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=>ir(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function ur(t,e){return"_lw_"+e+"_"+t.nextId++}function cr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function fr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>fr(t,e))}var dr=Kn;function hr(t,e,n){var r,o,i;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=cr(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>hr(t,e,n))}function pr(t,e,n,r,o){const i=function(t,e){var n,r,o;const i={};let a=!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=vr(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),i.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}a=!0}}const l=void 0!==(null==e?void 0:e.translate),u=a||l,c=a&&vr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&vr((null==(o=i.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],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=mr(i.full),r=mr(o.full),a=-n[0],s=-n[1],l=r[0]-a,u=r[1]-s;if(0===l&&0===u)return{rest:t};return{translate:"translate("+l+","+u+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.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 i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)?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&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes&&!t.transform.kfs){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=f({},r);delete e.translate;const n=Object.keys(e).length>0;u||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:a,inner:s}=function(t){if(!t)return{};const e=vr(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=ar(l,s,o);let u={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==i.transform&&(u.transform=i.transform),void 0!==i.animate&&(u.animate=i.animate),a&&(delete u.id,u=ar(u,a,o),u.id=n),u}function mr(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 vr(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 gr(t,e,n,r){if(!e)return t;const o=ur(n,"grad"),i=function(t,e){const n={type:t.type===Gt.radial?"radialGradient":"linearGradient",id:e};t.type===Gt.linear?(yr(n,"x1","y1",t.p1),yr(n,"x2","y2",t.p2)):(yr(n,"cx","cy",t.c),function(t,e,n){const r=nr(n);if("absent"===r.kind)return;rr(t,e,r,{asString:!0})}(n,"r",t.r),yr(n,"fx","fy",t.fp));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[];const i=nr(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(br):[];const a=i.keyframes;if(!a.length)return[];const s=i.loop;let l=0;for(const t of a){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=a[0].value)?n:a[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:kr(a,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 i,a,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(a=null!=(i=r.time)?i:r.t)?a:0,h=null!=(s=r.value)?s:r.v,p=null!=(l=null==h?void 0:h[n])?l:kr(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,v={time:o,value:p.color};void 0!==m&&(v.easing=m),c.push(v);const g={time:o,value:p.offset};void 0!==m&&(g.easing=m),f.push(g),p.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:Ar(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,a,e,0,s))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function yr(t,e,n,r){var o,i,a;const s=nr(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},u=null!=(o=t.animate)?o:{};u[e]=l(0),u[n]=l(1),t.animate=u;const c=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function br(t){return{type:"stop",offset:Ar(t.offset),stopColor:t.color}}function kr(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 Ar(t){return Math.round(1e3*t)/10+"%"}function xr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function wr(t,e,n,r){if(!e)return t;const o=cr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=ur(r,"mask");let a={type:"use",href:"#"+o};if(n)a=Sr(a,n,r);else if(Mr(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,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=ir(t,void 0);if(Array.isArray(e.translate)&&a.push(d(f(f({},r),jr(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(d(f({},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(d(f({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let h=t;a.length&&(h={type:"g",animate:{transform:c(a)},children:[h]});s.length&&(h={type:"g",animate:{transform:c(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:c(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,i,a,s,l,u,c,f,d,h;const p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const v=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:m[1],args:t})}if(!v.length)return;const g=v[v.length-1];if("translate"===g.name)for(let t=v.length-2;t>=0;t--){const c=v[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,p=null!=(o=g.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(i=v[e].args[0])?i:0,n=null!=(a=v[e].args[1])?a:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[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 y,b,k;for(const t of v)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;y=y?[y[0]+e,y[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;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};y&&(A.translate=y);void 0!==b&&(A.rotate=b);k&&(A.scale=k);return Object.keys(A).length?A: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}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes&&!t.transform.kfs){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}return}(t);e&&(a=Sr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||Mr(t))}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?zr(e,r):void 0,l=s?[...a,s]:a,u=i&&r.maskAncestorChains.get(i)||[];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=_r(l),n=_r(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=Ir(l,t),n=Ir(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}function Sr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=nr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.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=Pr(o,"translate",e.translate,void 0,n),o=Pr(o,"rotate",e.rotate,r,n),o=Pr(o,"scale",e.scale,r,n),o}function Pr(t,e,n,r,o){if(void 0===n)return t;const i=nr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:er(e,Or(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=ir(t,er(e,Or(e,t.value),r));return"translate"===e?f(f({},n),jr(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Or(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function jr(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Mr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function _r(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 Ir(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Tr(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Tr(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],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function zr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!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,i+=e[1]||0,a=!0):s=!0}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}var Nr="content";function Er(t,e,n){if(!e)return;const r=cr(e.sourceId);if(!r)return void(e.type===Nr&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===Nr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Cr(t,e){const n={};return void 0!==t.translate&&(n.translate=Dr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=Dr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=Dr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];return Dr(t,n,!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function Dr(t,e,n=!1){const r=nr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return("number"==typeof t||Array.isArray(t))&&!n?o:{value:o}}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var Lr=!1;function Fr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Br=1;function Ur(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Br),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Br,value:0}],a=f({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function Rr(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Vr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Wr(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 Gr(t,e,n){const r=cr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Kr(r,e,n,new Set);if(o)if(Lr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Yn(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Kr(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 i=dr(o);if(function(t,e){Zn(t,()=>ur(e,"retimed"))}(i,n),"use"===o.type?Xr(i,e.start,e.stretch):Zr(i,e.start,e.stretch),Wr(i),"use"===o.type&&o.href){const a=cr(o.href);if(a){const s=Vr(o),l=s?Rr(Fr(s),e):e,u=new Set(r);u.add(t);const c=Kr(a,l,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Vr(t);if("use"===t.type&&s&&t.href){const i=cr(t.href);if(i){const a=Rr(Fr(s),e),l=new Set(r);l.add(o);const u=Kr(i,a,n,l);u&&(t.href="#"+u)}Wr(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Zr(t,e,n){var r;Xr(t,e,n),null==(r=t.children)||r.forEach(t=>Zr(t,e,n))}function Xr(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var Yr=48,qr=/[MmLlHhVvCcSsQqTtAaZz]/;function Jr(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 Qr(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,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),p=(t,e,r)=>{const a=[o,i],s=W(a,t,e,r,Yr);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},m=(t,e)=>{p([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];qr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)m(h()+(n?o:0),h()+(n?i:0));else if("H"===v)m(h()+(n?o:0),i);else if("V"===v)m(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Jr([o,i],t,e);p(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Jr([o,i],t,e);p(r,a,e)}else{if("A"!==v){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?i:0))}d=t}else m(a,s),o=a,i=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,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=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 i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=B(o.P0,o.P1,o.P2,o.P3,a),[u,c]=R(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(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 Hr=.15;function $r(t){const e=nr(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function to(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var eo=t=>Math.round(1e3*t)/1e3;function no(t,e){if(!e||null==t)return t;const n=nr(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>d(f({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function ro(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Qr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Hr*o,a=$r(e.startOffset),s=$r(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let p=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+eo(e)+","+eo(n)+"L"+eo(d.x)+","+eo(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+eo(t)+","+eo(e)}return{d:p,startShift:c}}function oo(t,e,n){null!=n&&rr(t,e,nr(n),{asString:!0})}var io=(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 ao(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function so(t,e){let n="";for(let r=0;r<t.length;r++){const o=ao(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function lo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var uo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function co(t,e,n=2){const r=[];let o;for(uo.lastIndex=0;null!==(o=uo.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=lo(e,s(),s());i+=t+so([r,o],n)}else if("C"===t){const[t,r]=lo(e,s(),s()),[o,a]=lo(e,s(),s()),[l,u]=lo(e,s(),s());i+="C"+so([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=lo(e,s(),s()),[o,a]=lo(e,s(),s());i+="Q"+so([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var fo=16,ho=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Ft,Bt,"xml:space"],po=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],mo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function vo(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function go(t){return"string"==typeof t?t:void 0}function yo(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of mo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function bo(t,e){var n,r,o,i,a,s,l,u,c,f;const d="text"===t.type,h=t.style,p=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},m={fontFamily:null!=(n=go(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=vo(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=vo(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=vo(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=vo(p("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:yo(t))?c:e.animate};for(const t of po){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function ko(t){var e,n,r;return{fontFamily:go(t.fontFamily),fontSize:null!=(e=vo(t.fontSize))?e:fo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=vo(t.letterSpacing))?n:0,wordSpacing:null!=(r=vo(t.wordSpacing))?r:0}}function Ao(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of po)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function xo(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function wo(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var So=.6,Po="px-missing-glyph";function Oo(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,i=.92*-e,a=o-r,s=-i,l=Math.max(1,.12*Math.min(a,s)),u="M"+r+" 0L"+o+" 0L"+o+" "+i+"L"+r+" "+i+"Z";if(a<=2*l||s<=2*l)return u;const c=r+l,f=o-l,d=-l,h=i+l;return u+"M"+c+" "+d+"L"+c+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function jo(t,e){var n,r,o,i;const{glyphs:a,create:s=io,warnings:l}=e,u=wo(a),c={x:null!=(n=vo(t.x))?n:0,y:null!=(r=vo(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{var n;const r=xo(e,a,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,p=Ao(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:i}),c.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:So*o;f.push({glyphD:Oo(t,s),m:[i,0,0,i,c.x,c.y],paint:p,isMissing:!0,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(l?l.width:0)*i;c.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,i;const a=bo(t,e),s=vo(t.x),l=vo(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=vo(t.dx))?n:0,c.y+=null!=(r=vo(t.dy))?r:0;const u=null!=(o=go(t[Bt]))?o:go(t[Ft]);if(u&&!(null==(i=t.children)?void 0:i.length)&&p(u,a),t.children)for(const e of t.children)m(e,a)},v=ko(t);if(t.children)for(const e of t.children)m(e,v);const g=null!=(o=go(t[Bt]))?o:go(t[Ft]);g&&!(null==(i=t.children)?void 0:i.length)&&p(g,v);const y=go(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===y?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Bo(t,Fo(f,s,l),s)}function Mo(t,e){var n,r,o,i,u,c;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=Qr(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=wo(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=bo(t,e),l=null!=(n=go(t[Bt]))?n:go(t[Ft]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=xo(s,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,ko(t));const h=f,p=nr(null==s?void 0:s.textLength),m="animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0,v=m>0&&h>0?m/h:1,g=nr(null==s?void 0:s.startOffset),{along:y,perp:b}=Io(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:f,warnings:d}=e,h=wo(f),p={x:null!=(r=vo(t.x))?r:0,y:null!=(o=vo(t.y))?o:0},m=[],v=[{start:p.x,end:p.x}];let g=0;const y=(t,e)=>{var n;const r=xo(e,f,h,d),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);m.push({x:p.x,y:p.y,width:l,ascent:a,fontSize:e.fontSize,line:g}),p.x+=l,v[g].end=p.x}},b=(t,e)=>{var n,r,o,i;const a=bo(t,e),s=vo(t.x),l=vo(t.y);void 0!==s&&(p.x=s,g=v.length,v.push({start:p.x,end:p.x})),void 0!==l&&(p.y=l),p.x+=null!=(n=vo(t.dx))?n:0,p.y+=null!=(r=vo(t.dy))?r:0;const u=null!=(o=go(t[Bt]))?o:go(t[Ft]);if(u&&!(null==(i=t.children)?void 0:i.length)&&y(u,a),t.children)for(const e of t.children)b(e,a)},k=ko(t);if(t.children)for(const e of t.children){const t=m.length;if(b(e,k),m.length===t){const t=bo(e,k),n=xo(t,f,h),r=(null==n?void 0:n.unitsPerEm)||1e3;m.push({x:p.x,y:p.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:g})}}const A=null!=(u=go(t[Bt]))?u:go(t[Ft]);A&&!(null==(c=t.children)?void 0:c.length)&&y(A,k);const x=go(t.textAnchor);if("middle"===x||"end"===x)for(const t of m){const e=v[t.line].end-v[t.line].start;t.x+="middle"===x?-e/2:-e}return m.map(t=>{var e=t,{line:n}=e;return((t,e)=>{var n={};for(var r in t)s.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&&l.call(t,r)&&(n[r]=t[r]);return n})(e,["line"])})}function _o(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function Io(t){var e,n,r;return{along:(null!=(e=vo(t.x))?e:0)+(null!=(n=vo(t.dx))?n:0),perp:null!=(r=vo(t.dy))?r:0}}function To(t,e,n,r,o,i){const{glyphs:a,create:s=io,warnings:l}=r,u=e?Qr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=wo(a),{cells:h,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u,c;const f=bo(t,s),d=null!=(l=go(t[Bt]))?l:go(t[Ft]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=xo(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=Ao(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:So*t.unitsPerEm,s=a*e;o.push({glyphD:Oo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,ko(t)),{cells:o,width:i}}(t,a,c,l);if(!h.length)return Bo(t,[],s);const{along:m,perp:v}=Io(t),g=zo(n),y=zo(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!u.closed;if(g.animated||y.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(g.times,y.times),n=(t,e)=>m+g.at(e)+b(y.at(e))*t.midBase,r=g.animated?g.loop:y.loop;return Bo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/No,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=co(h.glyphD,t),m=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Co(r-s*l,3),Co(o+s*a,3)],rotate:Co(180*i/Math.PI,3)}}},v=[],g=[],y=(t,e)=>{v.push(m(t,e)),a&&g.push({time:e,value:u(t)?1:0})};y(n(h,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(h,e),a=n(h,o),s=Math.min(Eo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);y(n(h,r),r)}}hn(v);const b={keyframes:v};void 0!==o&&(b.loop=o);const k={transform:b};if(h.paint.animate&&Object.assign(k,h.paint.animate),a&&g.some(t=>0===t.value)){const t={keyframes:g};void 0!==o&&(t.loop=o),k.opacity=t}c.push(i("path",d(f(f({d:p},Do(h.paint)),Lo(h.isMissing)),{animate:k}),[]))}return c}(h,u,n,e,r,s,k,v),s)}const A=b(y.at(0)),x=m+g.at(0);return Bo(t,Fo((k?h.filter(t=>{const e=x+t.midBase*A;return e>=0&&e<=u.totalLength}):h).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:_o(u,x+t.midBase*A,t.scale,t.widthEm,v)})),s,l),s)}function zo(t){var e;const n=nr(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var No=48,Eo=64;function Co(t,e){const n=u(10,e);return Math.round(t*n)/n}function Do(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of po)void 0!==t[n]&&(e[n]=t[n]);return e}function Lo(t){return t?{class:Po}:{}}function Fo(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=co(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",f(f(f({d:n},Do(t)),Lo(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function Bo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===ho.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Uo(t,e){return e.alongPath?To(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):jo(t,e)}function Ro(t,e,n){if(!e)return t;const r=e.subPaths===Lt.combined,o=[],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,i,a,s,l,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=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"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*ni,d=o*ni,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}return}(t);if(void 0===e)return;const n=_n(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=ti(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}o.push(r)};if(i(t),!o.length)return t;let a=0;const s=r?[...o].reverse():o;for(const t of s)for(const e of t.subpaths)r||(a=0),e.startOffsetPx=a,a+=e.lengthPx;const l=a;if(r&&l<.001)return t;const u=nr(e.offset),c="absent"===u.kind?{kind:"static",value:0}:u,h=function(t){const e=nr(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=Ho(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),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=$o(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=$o(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),p="absent"===h.kind?{kind:"static",value:[0,1]}:h,m=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}(c),v=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===o.length&&o[0].leaf===t&&1===o[0].subpaths.length){const e=o[0],n=e.subpaths[0],i=r?l:n.lengthPx;if(i<.001)return t;const a=r?n.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=Ko(n,e,r),s=Zo(e,r),l=f({},t);return delete l.effects,qo(l,"strokeDasharray",Yo(i,s)),qo(l,"strokeDashoffset",Yo(o,a)),qo(l,"strokeOpacity",Qo(i)),l}(e.leaf,i,a,v,c,p)}const g=new Map;for(const t of o){const e=[];for(const o of t.subpaths){const i=r?l:o.lengthPx;if(i<.001)continue;const a=r?o.startOffsetPx/i:0;e.push(...Wo(t.leaf,o.subpath,i,a,v,c,p,n))}g.set(t.leaf,Vo(t.leaf,e))}const y=t=>{const e=g.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(y)}):t)};return y(t)}function Vo(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Wo(t,e,n,r,o,i,a,s){const l=Ko(r,n,o),u=Zo(n,o),c=Yo(i,l),f=Yo(a,u),d=Qo(a),h=function(t){return{type:"path",d:t}}(p(e));return qo(h,"strokeDasharray",f),qo(h,"strokeDashoffset",c),qo(h,"strokeOpacity",d),[h]}var Go=1;function Ko(t,e,n){const[r]=Xo(n);return n=>e*(-n-r+t)+Go}function Zo(t,e){const[n,r]=Xo(e),o=r-n+1;return e=>{const n=F(e[0],0,1),r=F(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=Go;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+Go),s}}function Xo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Yo(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,i;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function qo(t,e,n){n&&rr(t,e,n)}var Jo=10;function Qo(t){var e,n,r,o,i,a;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!=(i=u.value)?i:u.v):h,m=c?h&&s(null!=(a=c.value)?a:c.v):h;p&&!m?(f.push({time:d,value:0}),f.push({time:d+Jo,value:1})):!p&&m&&(f.push({time:d-Jo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Ho(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,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>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;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function $o(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],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function ti(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+=ei(t,r,r+1);return t.c&&e.length>1&&(n+=ei(t,e.length-1,0)),n}function ei(t,e,n){var r,o,i,a;const s=t.v,l=s[e],u=s[n],c=W(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var ni=.5522847498307936;function ri(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Zt(t))?void 0:e.mode)===xt.frames?wt.frames:wt.waapi,glyphs:null==(n=Xt(t))?void 0:n.glyphs},o=dr(t);fr(o,r.idMap),hr(o,r,()=>ur(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=cr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);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=zr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),fr(t,e.idMap);const n=[],r=t=>{var e;Vr(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&Vr(o)&&n++,"use"===o.type&&o.href){const t=cr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=cr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=Vr(t);if(!n)continue;const r=n.timeCrop;Wr(t),Gr(t,Fr(n),e),r&&Ur(t,r,e)}}(t,e),t}(oi(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function oi(t,e){t.children&&(t.children=t.children.map(t=>oi(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{transformBy:i,repeater:a,maskedBy:s,clipPath:l,strokeTrim:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:p}=null!=n?n:{};n&&delete t.effects;let m=t,v=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,i){return e.glyphs?To(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,v=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?jo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(m,p,e),v=!0;return v||(m=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=ur(n,"tpath"),{d:i,startShift:a}=ro(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:to(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),oo(s,"startOffset",no(e.startOffset,a)),oo(s,"textLength",e.textLength),t.children=[s],t}(m,h,e)),m=function(t,e,n){return gr(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return gr(t,e,n,"stroke")}(m,d,e),m=Ro(m,u,e),m=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=dr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<i;t++){const r=dr(l),o=Cr(e,t),i=o?ar(r,o,n):r;u.push(i)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==a&&(c.transform=a),void 0!==s&&(c.animate={transform:s}),c}(m,a,e),m=wr(m,s,i,e),m=function(t,e,n){var r,o;if(!e||!e.d&&!e.animate)return t;const i=ur(n,"clip"),a={type:"path"},s=nr(e.d);if("absent"!==s.kind&&("static"===s.kind?a.d=xr(s.value):(rr(a,"d",s),void 0!==a.d&&(a.d=xr(a.d)))),e.animate&&!(null==(r=a.animate)?void 0:r.d)){const t=null!=(o=a.animate)?o:{};t.d=e.animate,a.animate=t}return n.defs.push({type:"clipPath",id:i,children:[a]}),t.clipPath="url(#"+i+")",t}(m,l,e),o?(Er(m,c,e),m=pr(m,i,r,o,e)):m=function(t,e,n,r){return Er(t,e,r),ar(t,n,r)}(m,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,m),m}var ii=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},ai=t=>{var e;return null!=(e=t.v)?e:t.value},si=t=>{var e;return null!=(e=t.e)?e:t.easing},li=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},ui=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function ci(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,u=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+u*r[0],a*t[1]+s*e[1]+l*n[1]+u*r[1]]}function fi(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=ci(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var di=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function hi(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r,o;if("offsetPath"!==t.alongPathMode)return;const i=null!=(e=t.keyframes)?e:t.kfs;if(!i||i.length<2)return;const a=ai(i[0]),s=(null==a?void 0:a.origin)&&a.origin.length>=2?[a.origin[0],a.origin[1]]:[0,0],l=[];for(const t of i){const e=ai(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!i.some(t=>li(t)||ui(t)))return;let u="M"+di(l[0][0])+","+di(l[0][1]);const c=[];for(let t=0;t<l.length-1;t++){const e=l[t],n=l[t+1],a=null!=(r=ui(i[t]))?r:[0,0],s=null!=(o=li(i[t+1]))?o:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[n[0]+s[0],n[1]+s[1]];u+="C"+di(f[0])+","+di(f[1])+","+di(d[0])+","+di(d[1])+","+di(n[0])+","+di(n[1]),c.push(fi(e,f,d,n))}const f=c.reduce((t,e)=>t+e,0);if(!(f>0))return;const d=[];let h=0;for(let t=0;t<i.length;t++){t>0&&(h+=c[t-1]);const e={t:ii(i[t]),v:h/f},n=si(i[t]);void 0!==n&&(e.e=n),d.push(e)}return{pathStr:u,distanceKfs:d,autoOrient:!!t.autoOrient,anchor:s}}(i);if(e){const n=f({},o);delete n.transform;const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n.offsetDistance=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=f({},s);delete t.translate,delete t.origin,l=Object.keys(t).length?t:void 0}r=d(f({},t),{animate:n,style:d(f({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:di(e.anchor[0])+"px "+di(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=d(f({},r),{children:t}))}return r};return e(t)}function pi(t,e,n){var r,o;let i=ri(t).root;i=hi(i);return i=Bn(i,null!=(o=null==(r=Zt(i))?void 0:r.duration)?o:N),e===wt.waapi&&(i=Pn(i,null==n?void 0:n.motionPath),i=qn(i),i=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}(i)),i}function mi(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function vi(t,e,n){var r;const o=Zt(t)||{},i=Vn(t,wt.frames),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||N),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let p=null,m=!1,v=-(o.delay||0),g=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let x=0;const w=()=>{const t=g?(Date.now()-g)*y:0;return v+t},S=()=>{let t=w();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function P(t){let n=function(){const e=l>0?l:1;let n=0,r=0;if(l>0){t=F(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=F((t-r*e)/e,0,1)}else n=t;const o=c||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=Gn(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?P(S()):h&&P(0));const O=()=>!!m&&(!!e.isConnected()&&(y<0?w()>0:!(Number.isFinite(u)&&S()>=u))),j=t=>{null!==p&&(mi(p),p=null),(t||O())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=S(),i=w();if(i<0&&y>0)h&&P(0);else{if(y<0&&i<=0)return M(),P(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&u&&Number.isFinite(u)&&o>=u)return M(),P(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(x&&t-x<A)return;x=t}P(o)}})(),j()}))},M=()=>{if(!m)return;let t=w();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,m=!1,null!==p&&(mi(p),p=null),t>=0?P(t):h&&P(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){if(y>=0)Number.isFinite(u)&&v>=u&&(v=0);else if(v<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");v=u}b=!1,m=!0,g=Date.now(),j(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),v=0,g=0,m=!1,b=!1,P(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:S(),g=0,m=!1,null!==p&&(mi(p),p=null),P(d?v:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=w();Number.isFinite(u)&&e>u&&(e=u),t<0!=y<0&&(b=!1),y=t,v=e,m&&(g=Date.now())},getCurrentTime:()=>S(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,m&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),P(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var gi=[1,0,0,1,0,0];function yi(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 bi=(t,e)=>[1,0,0,1,t,e],ki=(t,e)=>[t,0,0,e,0,0];function Ai(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var xi=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],wi=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Si(t){let e=gi;t.translate&&(e=yi(e,bi(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=yi(e,bi(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=yi(e,Ai(t.rotate))),t.scale&&(e=yi(e,ki(t.scale[0],t.scale[1]))),n&&(e=yi(e,bi(-t.origin[0],-t.origin[1]))),e}function Pi(t,e,n){return t+(e-t)*n}function Oi(t,e){return null==t?gi:"string"==typeof t?function(t){let e=gi;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=yi(e,bi(n[0]||0,n[1]||0)):"scale"===t?e=yi(e,ki(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=yi(e,Ai(n[0])):"skewX"===t?e=yi(e,xi(n[0])):"skewY"===t?e=yi(e,wi(n[0])):"matrix"===t&&(e=yi(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Si(function(t,e){var n,r,o,i,a,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!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[Pi(h.translate[0],p.translate[0],d),Pi(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=Pi(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[Pi(h.scale[0],p.scale[0],d),Pi(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?Si(t.value):"object"!=typeof t||Array.isArray(t)?gi:Si(t)}var ji=new Set(["svg","g","symbol"]),Mi=new Set(["defs","mask","clipPath","title"]);function _i(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>_i(t,e))}function Ii(t){return null==t?0:Number(t)}function Ti(t){return Math.round(100*t)/100+0}function zi(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=Ti(function(t,e,n,r){var o,i,a,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!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a: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 Pi(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(Ti).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Ii(t.width)+","+Ii(t.height)+","+Ii(t.x)+","+Ii(t.y);case"ellipse":return Ii(t.rx)+","+Ii(t.ry)+","+Ii(t.cx)+","+Ii(t.cy);case"circle":return Ii(t.r)+","+Ii(t.cx)+","+Ii(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Ii(c)||"")+"|o:"+f+"|m:"+d}function Ni(t,e,n,r,o){var i;const a=t.type||"";if(Mi.has(a))return;const s=yi(e,function(t,e){return t.animate&&t.animate.transform?Oi(t.animate.transform,e):void 0!==t.transform?Oi(t.transform,e):gi}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=yi(s,bi(Ii(t.x),Ii(t.y)));return void(i?Ni(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}ji.has(a)?null==(i=t.children)||i.forEach(t=>Ni(t,s,n,r,o)):o.push(zi(t,s,n))}function Ei(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=>Ei(t,e))}function Ci(t,e){const n=new Map;_i(t,n);const r=[];return Ni(t,gi,e,n,r),r.sort()}function Di(t,e){const n=new Set;Ei(t,n),Ei(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Ci(t,o),i=Ci(e,o),a=Li(n,i),s=Li(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Li(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}
1
+ "use strict";var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h=(t,e)=>{var n={};for(var r in t)s.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&&l.call(t,r)&&(n[r]=t[r]);return n},p={};function m(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];!e&&i[0]===o[0]&&i[1]===o[1]&&u[0]===f[0]&&u[1]===f[1]?c.push("L"+f[0]+","+f[1]):c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function v(t,e,n){return t+(e-t)*n}function g(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=v(t[i]||0,e[i]||0,n);return r}function y(t,e,n){return[v(t[0]||0,e[0]||0,n),v(t[1]||0,e[1]||0,n),v(t[2]||0,e[2]||0,n),v(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function b(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(k(t[i],e[i],n));return o}function k(t,e,n){var r,o,i,a,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=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(g(f,h,d));const y=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,b=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;m.push(g(y,b,d));const k=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;v.push(g(k,A,d))}return{v:p,i:m.length?m:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function A(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(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=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function x(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=A(e,r,t),((s*n+a)*n+i)*n;var n}}function w(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function S(t,e,n,r,o){const i=w(t,e,o),a=w(e,n,o),s=w(n,r,o),l=w(i,a,o),u=w(a,s,o),c=w(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}function P(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,i]=t,a=A(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=S([0,0],s,l,[1,1],a),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,v=1-d;return m>1e-9&&Math.abs(v)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/v,(c[2][0]-f)/m,(c[2][1]-d)/v]),{left:h,right:p}}function j(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function O(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 M(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),i=n?e[2]+e[2]:e.slice(4,6),a=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(i,16)/255];return null!==a&&s.push(parseInt(a,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)}}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(p,{COLOUR_ATTR_NAMES:()=>_,CSS_ONLY_STYLE_PROPS:()=>on,DEFAULT_DURATION_MS:()=>D,DISALLOWED_SVG_TAGS_LOWER:()=>en,INTERNAL_ATTRS:()=>Rt,LOOP_JUMP_SHIFT_MS:()=>Ln,MISSING_GLYPH_CLASS_NAME:()=>Fo,PCT_BASED_ATTR_NAMES:()=>I,PX_ANIM_ATTR_NAME:()=>wt,PX_ANIM_SRC_ATTR_NAME:()=>xt,PX_TRANSFORM_PART_KEYS:()=>Wt,PxAnimatedSvgDocumentSchema:()=>Xe,PxAnimationDefinitionSchema:()=>le,PxAnimatorConfigSchema:()=>we,PxAnimatorEngine:()=>Pt,PxAnimatorMode:()=>St,PxAttrValueSchema:()=>Pe,PxBezierPathSchema:()=>Ye,PxBindingSchema:()=>Se,PxCloneEffectSchema:()=>De,PxDefsSchema:()=>he,PxEasingOrRefSchema:()=>ee,PxEffectsSchema:()=>Re,PxElementAnimationSchema:()=>ue,PxFillGradientEffectSchema:()=>Le,PxGradientSpreadMethod:()=>Kt,PxGradientStopSchema:()=>Ce,PxGradientType:()=>Zt,PxGradientUnits:()=>Gt,PxKeyframeSchema:()=>re,PxKeyframeValueSchema:()=>ne,PxLoopExtend:()=>jt,PxLoopSchema:()=>oe,PxMaskedByEffectSchema:()=>Ie,PxNodeBase:()=>Ge,PxNodeSchema:()=>Ke,PxPropertyAnimationSchema:()=>ie,PxRepeaterEffectSchema:()=>Te,PxRetimeEffectSchema:()=>Ee,PxScrollRangePointSchema:()=>pe,PxScrollRangeSchema:()=>me,PxScrollSchema:()=>ve,PxStrokeGradientEffectSchema:()=>Be,PxStrokeTrimEffectSchema:()=>Ne,PxStrokeTrimSubPaths:()=>Bt,PxSvgNodeExtra:()=>Ze,PxTextEffectSchema:()=>Ve,PxTextPathEffectSchema:()=>Ue,PxTimelinePinSchema:()=>ge,PxTimelineSchema:()=>xe,PxTransformByEffectSchema:()=>_e,PxTransformPartsSchema:()=>ae,PxTransformValueSchema:()=>se,PxTriggerSchema:()=>ce,STYLE_ATTR_NAMES:()=>E,TEXT_ATTR:()=>Ut,TEXT_CONTENT_ATTR:()=>Vt,TRANSFORM_FN_NAMES:()=>T,applyPlayerEffects:()=>mi,bezierToSvgPath:()=>m,calcAnimationValues:()=>nr,camelCaseToKebabWordIfNeeded:()=>B,clamp:()=>U,collectSampleTimes:()=>Zi,composeTransformParts:()=>z,createBasicFrameLoopAnimator:()=>Mi,createPathSampler:()=>uo,cubicBezier:()=>x,deepClone:()=>He,describeSchema:()=>kt,diffInEffect:()=>Yi,evaluateMotionPathSegment:()=>bn,extendedPathForBrowser:()=>vo,flattenAnimatorTimeline:()=>Jt,generateNewIds:()=>$e,generateUniqueId:()=>Qe,getAnimatorConfig:()=>Yt,getBindings:()=>$t,getChildren:()=>te,getDefs:()=>Ht,getNormalisedBindings:()=>tr,getNormalizedProps:()=>dn,interpolateBeziers:()=>b,interpolateValue:()=>Zn,isPxElementFileFormat:()=>Xt,isPxElementFileFormatDeep:()=>qe,isScrollTimeline:()=>X,jsonElementFactory:()=>yo,kebabToCamelCaseWord:()=>C,layoutGlyphTextChars:()=>Uo,materialiseAllInTree:()=>ji,materialiseAnimatedUseInstances:()=>sr,materialiseGlyphText:()=>Ho,materialiseGlyphTextAlongPath:()=>Wo,materialiseGlyphTextHorizontal:()=>Bo,materialiseInternalLoopsInPropAnim:()=>qn,materialiseInternalLoopsInTree:()=>Jn,materialiseMotionPathInPropAnim:()=>wn,materialiseMotionPathsInTree:()=>Cn,mergeStaticTransformIntoAnimDef:()=>$n,nestAnimatorTimeline:()=>Qt,parseTransformParts:()=>N,propAnimIsMotionPath:()=>vn,px:()=>At,resolveStyle:()=>fn,reverseEasing:()=>j,sanitiseAttributeValue:()=>cn,schemaKeys:()=>bt,scrollOffsetProgress:()=>$,scrollPhaseInterval:()=>q,scrollResolveAxis:()=>tt,scrollTotalDurationMs:()=>Y,scrollViewProgress:()=>H,shiftAnimatable:()=>mo,splitEasing:()=>P,subdivideCubicBezier:()=>S,toRGBA:()=>O,validateNodeEffects:()=>We,visualModelAt:()=>Xi}),module.exports=(t=p,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of i(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(a=r(n,l))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var _=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),T=new Set(["translate","rotate","scale","skew"]),I=new Set(["offset-distance","offsetDistance"]);function z(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}function N(t){var e,n;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let a,s=-1;for(;null!==(a=o.exec(t));){const t=a[1],o=i.indexOf(t);if(o<0||o<=s)return;s=o;const l=a[2].split(/[\s,]+/).filter(Boolean).map(Number);if(l.some(t=>Number.isNaN(t)))return;if("translate"===t){if(l.length<1||l.length>2)return;r.translate=[l[0],null!=(e=l[1])?e:0]}else if("rotate"===t){if(1!==l.length)return;r.rotate=l[0]}else if("skewX"===t){if(1!==l.length)return;r.skew=l[0]}else{if(l.length<1||l.length>2)return;r.scale=[l[0],null!=(n=l[1])?n:l[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}var E=new Set(["offset-distance","offsetDistance"]),D=1e3;function C(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function F(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var L=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function B(t){return L.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function U(t,e,n){return Math.max(e,Math.min(t,n))}function V(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,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 R=1e-4;function W(t,e,n,r,o){const i=G(t,e,n,r,o);if(0===i[0]&&0===i[1]){return G(t,e,n,r,o<.5?o+R:o-R)}return i}function G(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function K(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=V(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=V(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function Z(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 i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function X(t){return"scroll"===(null==t?void 0:t.timelineSource)}function Y(t){return("number"==typeof(null==t?void 0:t.duration)&&t.duration>0?t.duration:D)*("number"==typeof(null==t?void 0:t.iterations)&&t.iterations>0?t.iterations:1)}function q(t,e,n){const r=e,o=n;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}var J="cover";function Q(t,e,n,r){var o;const[i,a]=q(null!=(o=null==t?void 0:t.phase)?o:J,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function H(t,e,n,r){const o=n-t,i=Q(null==r?void 0:r.start,0,e,n),a=Q(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:U((o-i)/(a-i),0,1)}function $(t,e,n){var r,o;const i=e>0?U(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:U((i-a)/(s-a),0,1)}function tt(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}function et(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var nt=class{_canSanitize(t){return this.isValid(t)}optional(){return new rt(this)}},rt=class extends nt{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)}},ot=class extends nt{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(et(null!=n?n:[])+": expected string, got "+typeof t),!1)}},it=class extends nt{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(et(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},at=class extends nt{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(et(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},st=class extends nt{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(et(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},lt=class extends nt{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(et(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},ut=class extends nt{constructor(t,e){super(),this.schemas=t,this._kind="union",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;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push(et(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},ct=class extends nt{constructor(t,e,n){super(),this._key=t,this._schemas=e,this._kind="discriminatedUnion",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(et(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)}},ft=class extends nt{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(et(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push(et(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},dt=class extends nt{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=f({},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(et(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!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)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ht=class extends nt{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(et(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)}},pt=class extends nt{constructor(t){super(),this.value=t,this._kind="record",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(et(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,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},mt=class extends nt{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},vt=class extends nt{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(et(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},gt=class extends nt{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)}},yt=class extends nt{constructor(t){super(),this.schemas=t,this._kind="tuple",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(et(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 bt(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function kt(t){var e;const n=t;switch(n._kind){case"union":return{kind:"union",members:n.schemas};case"discriminatedUnion":return{kind:"discriminatedUnion",key:n._key,members:n._schemas};case"record":return{kind:"record",value:n.value};case"tuple":return{kind:"tuple",items:n.schemas}}return"_shape"in n?{kind:"shape",shape:n._shape,openValue:n._openSchema}:"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.resolved=n.fn()}:{kind:"leaf"}}var At={string:(t="")=>new ot(t),number:(t=0)=>new it(t),boolean:(t=!1)=>new at(t),literal:t=>new st(t),enum:(t,e)=>new lt(t,e),union:(t,e)=>new ut(t,e),discriminatedUnion:(t,e)=>new ct(t,e),object:t=>new ft(t),openObject:(t,e)=>new dt(t,e),extendedObject:(t,e)=>new ft(f(f({},t._shape),e)),array:t=>new ht(t),record:t=>new pt(t),any:()=>new mt,defined:()=>new vt,tuple:t=>new yt(t),lazy:(t,e)=>new gt(t,e)},xt="data-px-animation-src",wt="_px_animator",St={auto:"auto",waapi:"waapi",frames:"frames"},Pt={waapi:St.waapi,frames:St.frames},jt={before:"before",after:"after"},Ot="luminance",Mt="alpha",_t="userSpaceOnUse",Tt="objectBoundingBox",It="clip",zt="extend",Nt="spacing",Et="spacingAndGlyphs",Dt="align",Ct="stretch",Ft="auto",Lt="exact",Bt={separate:"separate",combined:"combined"},Ut="text",Vt="textContent",Rt=new Set(["type","children","animator","meta","animate","effects",Ut,Vt]),Wt=["translate","rotate","scale","origin"],Gt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Kt={pad:"pad",reflect:"reflect",repeat:"repeat"},Zt={linear:"linear",radial:"radial"};function Xt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Yt(t){var e;const n=(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator);return n?Jt(n):void 0}var qt=new WeakMap;function Jt(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=qt.get(t);if(n)return n;const r=t,{timeline:o}=r,i=h(r,["timeline"]);if("scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=f({},i.scroll||{});t.kind=e.type,void 0!==e.engine&&(t.driver=e.engine),void 0!==e.axis&&(t.axis=e.axis),void 0!==e.source&&(t.source=e.source),void 0!==e.subject&&(t.subject=e.subject),void 0!==e.smoothing&&(t.smoothing=e.smoothing),void 0!==e.range&&(t.range=e.range);const n=e.pin;"boolean"==typeof n?t.pin=n:n&&"object"==typeof n&&(t.pin=!0,void 0!==n.align&&(t.pinAlign=n.align),void 0!==n.top&&(t.pinTop=n.top),void 0!==n.distance&&(t.pinDistance=n.distance)),i.scroll=t}else{if(void 0!==e.duration&&(i.duration=e.duration),void 0!==e.trigger){const t=e.trigger,{onFinish:n}=t,r=h(t,["onFinish"]);Object.keys(r).length&&(i.trigger=r),void 0!==n&&(i.resetOnFinish="reset"===n)}void 0!==e.delay&&(i.delay=e.delay),void 0!==e.iterations&&(i.iterations=e.iterations),void 0!==e.direction&&(i.direction=e.direction),void 0!==e.fill&&(i.fill=e.fill)}return qt.set(t,i),i}function Qt(t){if(!t||void 0!==t.timeline)return t;const e=t,{timelineSource:n,scroll:r,trigger:o,delay:i,iterations:a,direction:s,fill:l,resetOnFinish:u,duration:c}=e,p=h(e,["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration"]);if("scroll"===n){const t={type:"view"===(null==r?void 0:r.kind)?"view":"scroll"};if(void 0!==c&&(t.duration=c),"number"==typeof a&&(t.iterations=a),r){void 0!==r.driver&&(t.engine=r.driver),void 0!==r.axis&&(t.axis=r.axis),void 0!==r.source&&(t.source=r.source),void 0!==r.subject&&(t.subject=r.subject),void 0!==r.smoothing&&(t.smoothing=r.smoothing),void 0!==r.range&&(t.range=r.range);void 0!==r.pinAlign||void 0!==r.pinTop||void 0!==r.pinDistance?t.pin=f(f(f({},void 0!==r.pinAlign?{align:r.pinAlign}:{}),void 0!==r.pinTop?{top:r.pinTop}:{}),void 0!==r.pinDistance?{distance:r.pinDistance}:{}):void 0!==r.pin&&(t.pin=r.pin)}return d(f({},p),{timeline:t})}const m={type:"clock"};if(void 0!==c&&(m.duration=c),void 0!==o||u){const t=f({},o||{});u&&(t.onFinish="reset"),m.trigger=t}return void 0!==i&&(m.delay=i),void 0!==a&&(m.iterations=a),void 0!==s&&(m.direction=s),void 0!==l&&(m.fill=l),Object.keys(m).length>1?d(f({},p),{timeline:m}):p}function Ht(t){var e;if(t)return null==(e=Yt(t))?void 0:e.definitions}function $t(t){var e;if(!t)return;const n=null==(e=Yt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t.startsWith("#")?t.slice(1):t,animate:e})):void 0}function te(t){return null==t?void 0:t.children}var ee=At.union([At.string(),At.tuple([At.number(),At.number(),At.number(),At.number()])]),ne=At.union([At.string(),At.number(),At.array(At.number()),At.object({path:At.string()}),At.lazy(()=>At.object({paths:At.array(Ye)}),{paths:[]}),At.lazy(()=>At.array(Ce),[]),At.lazy(()=>ae,{})]),re=At.object({time:At.number().optional(),value:ne.optional(),easing:ee.optional(),tangentOut:At.tuple([At.number(),At.number()]).optional(),tangentIn:At.tuple([At.number(),At.number()]).optional()}),oe=At.object({segmentCount:At.number().optional(),extend:At.enum([jt.before,jt.after]).optional(),alternate:At.boolean().optional()}),ie=At.object({value:ne.optional(),keyframes:At.array(re).optional(),loop:At.union([oe,At.boolean()]).optional(),autoOrient:At.boolean().optional()}),ae=At.object({translate:At.tuple([At.number(),At.number()]).optional(),rotate:At.number().optional(),skew:At.number().optional(),scale:At.tuple([At.number(),At.number()]).optional(),origin:At.tuple([At.number(),At.number()]).optional()}),se=At.union([At.string(),ae,At.object({value:ae}),ie]),le=At.record(ie),ue=At.union([At.string(),At.array(At.union([At.string(),le])),le]),ce=At.object({startOn:At.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:At.enum(["continue","pause","reset","reverse"]).optional(),onFinish:At.enum(["hold","reset"]).optional(),scrollIntoViewThreshold:At.number().optional()}),fe=At.object({width:At.number(),d:At.string()}),de=At.object({fontFamily:At.string(),fontStyle:At.string(),ascent:At.number(),unitsPerEm:At.number(),glyphs:At.record(fe)}),he=At.object({easings:At.record(At.tuple([At.number(),At.number(),At.number(),At.number()])).optional(),animations:At.record(le).optional(),styles:At.record(At.record(At.union([At.string(),At.number()]))).optional(),glyphs:At.record(de).optional()}),pe=At.object({phase:At.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:At.number().optional()}),me=At.object({start:pe.optional(),end:pe.optional()}),ve=At.object({driver:At.enum(["custom","native"]).optional(),kind:At.enum(["view","scroll"]).optional(),axis:At.enum(["block","inline","x","y"]).optional(),source:At.enum(["nearest","root"]).optional(),subject:At.string().optional(),smoothing:At.number().optional(),pin:At.boolean().optional(),pinAlign:At.enum(["top","center","bottom"]).optional(),pinTop:At.number().optional(),pinDistance:At.number().optional(),range:me.optional()}),ge=At.object({align:At.enum(["top","center","bottom"]).optional(),top:At.number().optional(),distance:At.number().optional()}),ye=At.object({type:At.literal("clock"),duration:At.number().optional(),trigger:ce.optional(),delay:At.number().optional(),iterations:At.union([At.number(),At.literal("infinite")]).optional(),fill:At.enum(["forwards","backwards","both","none"]).optional(),direction:At.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),be={duration:At.number().optional(),iterations:At.number().optional(),engine:At.enum(["custom","native"]).optional(),axis:At.enum(["block","inline","x","y"]).optional(),source:At.enum(["nearest","root"]).optional(),subject:At.string().optional(),smoothing:At.number().optional(),pin:At.union([At.boolean(),ge]).optional(),range:me.optional()},ke=At.object(f({type:At.literal("scroll")},be)),Ae=At.object(f({type:At.literal("view")},be)),xe=At.discriminatedUnion("type",[ye,ke,Ae]),we=At.object({mode:At.enum([St.auto,St.waapi,St.frames]).optional(),frameRate:At.number().optional(),timeline:xe.optional(),definitions:he.optional(),animateById:At.record(ue).optional(),debugInstName:At.string().optional()}),Se=At.object({id:At.string(),animate:ue}),Pe=At.union([At.string(),At.number(),At.array(At.number()),At.object({value:At.defined()}),ae]),je=At.union([At.number(),ie,At.object({value:At.number()})]),Oe=At.union([At.tuple([At.number(),At.number()]),ie,At.object({value:At.tuple([At.number(),At.number()])})]),Me=At.union([At.string(),ie,At.object({value:At.string()})]),_e=At.object({translate:Oe.optional(),rotate:je.optional(),scale:Oe.optional(),skew:je.optional(),origin:Oe.optional()}),Te=At.object({copies:At.number().optional(),translate:Oe.optional(),rotate:je.optional(),skew:je.optional(),scale:Oe.optional(),origin:Oe.optional()}),Ie=At.object({sourceId:At.string().optional(),maskType:At.enum([Ot,Mt]).optional(),maskUnits:At.enum([_t,Tt]).optional(),maskContentUnits:At.enum([_t,Tt]).optional(),x:At.number().optional(),y:At.number().optional(),width:At.number().optional(),height:At.number().optional()}),ze=At.object({d:Me.optional()}),Ne=At.object({offset:je.optional(),range:Oe.optional(),subPaths:At.enum([Bt.separate,Bt.combined]).optional()}),Ee=At.object({start:At.number().optional(),stretch:At.number().optional(),timeCrop:At.tuple([At.number(),At.number()]).optional()}),De=At.object({type:At.enum(["content"]).optional(),sourceId:At.string().optional(),retime:Ee.optional()}),Ce=At.object({offset:At.number(),color:At.string()}),Fe=At.union([At.array(Ce),At.object({value:At.array(Ce)}),ie]),Le=At.object({type:At.enum([Zt.linear,Zt.radial]),start:Oe.optional(),end:Oe.optional(),center:Oe.optional(),radius:je.optional(),focal:Oe.optional(),stops:Fe.optional(),gradientUnits:At.enum([Gt.userSpaceOnUse,Gt.objectBoundingBox]).optional(),spreadMethod:At.enum([Kt.pad,Kt.reflect,Kt.repeat]).optional(),gradientTransform:At.string().optional()}),Be=Le,Ue=At.object({path:At.string(),pathOverflow:At.enum([It,zt]).optional(),lengthAdjust:At.enum([Nt,Et]).optional(),method:At.enum([Dt,Ct]).optional(),spacing:At.enum([Ft,Lt]).optional(),startOffset:je.optional(),textLength:je.optional()}),Ve=At.object({useGlyphs:At.boolean().optional()}),Re=At.object({transformBy:_e.optional(),repeater:Te.optional(),maskedBy:Ie.optional(),clipPath:ze.optional(),strokeTrim:Ne.optional(),clone:De.optional(),fillGradient:Le.optional(),strokeGradient:Be.optional(),textPath:Ue.optional(),text:Ve.optional()});function We(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Re.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 Ge=At.openObject({type:At.string(),id:At.string().optional(),meta:At.any().optional(),effects:Re.optional(),animate:ue.optional(),style:At.union([At.string(),At.record(At.union([At.string(),At.number()]))]).optional()},Pe),Ke=At.openObject(d(f({},Ge._shape),{children:At.lazy(()=>At.array(Ke),[]).optional()}),Pe),Ze=At.object({width:At.union([At.number(),At.string()]).optional(),height:At.union([At.number(),At.string()]).optional(),viewBox:At.string().optional(),animator:we.optional()}),Xe=At.openObject(d(f(f({},Ge._shape),Ze._shape),{type:At.literal("svg"),children:At.array(Ke).optional()}),Pe),Ye=At.object({v:At.array(At.array(At.number())),i:At.array(At.array(At.number())).optional(),o:At.array(At.array(At.number())).optional(),c:At.boolean().optional()});function qe(t){const e=Xe.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var Je=0;function Qe(){return"_px_"+Date.now().toString(36)+(++Je).toString(36)+Math.random().toString(36).substring(2,6)}function He(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>He(t));const e=t,n={};for(const t of Object.keys(e))n[t]=He(e[t]);return n}function $e(t){var e,n;const r=He(t),o=new Map,i=new Set(["href","xlink:href"]),a=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["sourceId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Qe();o.set(t,n),e.id=n}else e.animate&&(e.id=Qe());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(i.has(n)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(e[n]="#"+i)}else if(a.has(n))e[n]=tn(r,o);else if(s.has(n)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(e[n]=t?"#"+i:i)}else r.includes("url(#")&&(e[n]=tn(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=tn(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.animateById;if(l&&"object"==typeof l){const t={};for(const[e,r]of Object.entries(l)){const i=e.startsWith("#"),a=i?e.slice(1):e,s=null!=(n=o.get(a))?n:a;t[i?"#"+s:s]=r}r.animator=d(f({},r.animator),{animateById:t})}return r}function tn(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var en=new Set(["script","foreignobject"]),nn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),rn=new Set(["href","xlink:href","src"]),on=new Set(["mixBlendMode","isolation"]),an=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,sn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,ln=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,un=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function cn(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(nn.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||rn.has(n)&&(an.test(t)||sn.test(t)||function(t){const e=ln.exec(t);return!!e&&un.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 fn(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}function dn(t){const e={};for(const n of Object.keys(t)){const r=C(n);if(Rt.has(r))continue;if("style"===r)continue;let o=t[n];if(_.has(r)&&Array.isArray(o))e[r]=O(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)T.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e.transform=z(t,{withUnits:!1})}}return e}function hn(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 pn(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function mn(t){var e;return null!=(e=t.easing)?e:t.e}function vn(t){var e,n;const r=t.keyframes;if(!Array.isArray(r))return!1;if(t.autoOrient)return!0;for(const t of r)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(n=t.tangentOut)?n:t.to))return!0;return!1}var gn=new WeakMap;function yn(t,e,n,r){var o,i;let a=gn.get(t);const s=null==a?void 0:a.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=K(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return a||(a=new WeakMap,gn.set(t,a)),a.set(e,h),h}function bn(t,e,n,r,o,i){const a=yn(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=t.ds[t.ds.length-1],r=e*n,{ts:o,ds:i}=t,a=i.length-1;if(r<=0)return o[0];if(r>=i[a])return o[a];let s=1,l=a;for(;s<l;){const t=s+l>>>1;i[t]<r?s=t+1:l=t}const u=i[l-1],c=i[l]-u,f=c>0?(r-u)/c:0;return o[l-1]+f*(o[l]-o[l-1])}(a.lut,o),l=V(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const u=W(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var kn=.5,An=5,xn=32;function wn(t,e){var n,r,o;if(!vn(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const a=!!t.autoOrient,s=null!=(n=null==e?void 0:e.flatnessTolerance)?n:kn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:An,u=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:xn,c=[],f=hn(i[0]);if(!f)return t;const d=a?function(t,e){const n=hn(t),r=hn(e);if(!n||!r)return 0;const o=yn(t,e,n,r),i=W(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(i[0],i[1]):void 0;c.push(Pn(pn(i[0]),Mn(jn(i[0]),jn(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=hn(e),o=hn(n);r&&o?(a&&t>0&&Tn(c,e,n,r,o,l),zn(c,e,n,r,o,a,s,l,u)):c.push(Pn(pn(n),Mn(jn(n),jn(n),1,null!=o?o:[0,0],void 0,a)))}const h=mn(i[i.length-1]);h&&(c[c.length-1].e=h),a&&Sn(c);const p={keyframes:c};return void 0!==t.loop&&(p.loop=t.loop),p}function Sn(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function Pn(t,e){return{t:t,v:e}}function jn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function On(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 i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function Mn(t,e,n,r,o,i){const a={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&&i)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=On(o,s,n))}return void 0!==o&&(a.rotate=o+_n(t,e,n)),a}function _n(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=On(r,o,n);return"number"==typeof i?i:0}function Tn(t,e,n,r,o,i){var a;const s=t[t.length-1],l=null!=(a=s.v)?a:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=jn(e),f=u-_n(c,c,0),d=yn(e,n,r,o),h=W(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(h[1],h[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(p,f);if(Math.abs(m)<=i)return;const v=pn(e),g=Math.min(v+In,(v+pn(n))/2),y=Mn(jn(e),jn(e),0,r,p,!0);t.push(Pn(g,y))}var In=.05;function zn(t,e,n,r,o,i,a,s,l){const u=yn(e,n,r,o),c=pn(e),f=pn(n),d=mn(e),h=(p=d)?x([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=jn(e),v=jn(n),g=function(t,e,n,r,o){const i=[];Nn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Nn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)En(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=Z(u.lut,t),n=U(u.totalArc>0?e/u.totalArc:t,0,1),r={u:U(h(n),0,1),p:n,pos:V(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=W(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?U((n.u-k)/(1-k),0,1):1,{left:o,right:a}=P(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=Mn(m,v,n.p,n.pos,n.rotateDeg,i);t.push(Pn(l,u)),b=a,k=n.u}}function Nn(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function En(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=V(r.P0,r.P1,r.P2,r.P3,t),c=V(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=V(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=V(r.P0,r.P1,r.P2,r.P3,l),p=V(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(Dn(d,u,c),Dn(h,u,c),Dn(p,u,c));let v=!0;if(o){const n=W(r.P0,r.P1,r.P2,r.P3,t),o=W(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}m<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,En(t,l,n,r,o,i,a,s),En(l,e,n,r,o,i,a,s))}function Dn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function Cn(t,e){const n=Fn(t,e);return null!=n?n:t}function Fn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Fn(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&&vn(n)){const o=wn(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Ln=1;function Bn(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>Bn(t[n],e[n]))}function Un(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,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function Vn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Rn(t){return"string"==typeof t&&void 0!==Vn(t)}function Wn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=Vn(t.path);return e?{paths:Un(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Rn(e[0])){const t=[];for(const n of e){const e=Vn(n);e&&t.push(...Un(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Rn(t[0])){const e=[];for(const n of t){const t=Vn(n);t&&e.push(...Un(t))}return{paths:e}}return{paths:t}}if(Rn(t)){return{paths:Un(Vn(t))}}return t}function Gn(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 Kn(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 Zn(t,e,n,r){var o,i;if("d"===t){return{paths:b(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}}return _.has(t)?y(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?v(e,n,r):T.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?g(e||[],n||[],r):v(+(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 i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=v(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=g(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function Xn(t,e,n,r){var o,i,a,s,l;const u=e.length-1,c=U(null!=(o=n.segmentCount)?o:u,1,u);let h;h=n.extend===jt.before?e.slice(0,c+1):e.slice(u-c);const p=null!=(i=e[0].t)?i:0,m=null!=(a=e[e.length-1].t)?a:0;let v,g;n.extend===jt.before?(v=0,g=p):(v=m,g=r);const y=g-v;if(y<=0)return e;const b=null!=(s=h[0].t)?s:0,k=(null!=(l=h[h.length-1].t)?l:0)-b;if(k<=0)return e;const A=h.map(t=>{var e,n;return{relT:(t.t-b)/k,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),w=Math.floor(y/k),S=y-w*k,O=S/k,M=[],_=n.extend!==jt.before,T=e[e.length-1];let I,z=!1;function N(e,n,r){var o;let i;if(n){i=[];for(let t=A.length-1;t>=0;t--)i.push({relT:1-A[t].relT,v:A[t].v,e:t>0?j(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else i=A;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,u=o.e?x(o.e)(l):l,c=Zn(t,o.v,r.v,u),{left:f}=P(o.e,l);return M.length>0&&o.relT<=a&&(M[M.length-1].e=f),void M.push({t:e+a*k,v:c,e:void 0})}const s=M.length>0?M[M.length-1]:T,l=_&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*k))<1e-9;if(l){if(Bn(s.v,r.v)){M.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(I=r.e,z=!0);continue}M.length>0&&(delete s.tangentIn,delete s.tangentOut)}const u={t:e+r.relT*k+(l?Ln:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),M.push(u)}}if(n.extend===jt.before){if(O>1e-9){!function(e,n,r){let o;if(n){o=[];for(let t=A.length-1;t>=0;t--)o.push({relT:1-A[t].relT,v:A[t].v,e:t>0?j(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else o=A;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?x(a.e)(o):o,l=Zn(t,a.v,r.v,s),{right:u}=P(a.e,o);M.push({t:e,v:l,e:u})}const s={t:e+(r.relT-i)*k,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),M.push(s)}}(v,!!n.alternate&&w%2==0,O)}for(let t=0;t<w;t++){const e=w-1-t,r=!!n.alternate&&e%2==0;N(v+S+t*k,r)}}else{for(let t=0;t<w;t++){const e=!!n.alternate&&t%2==0;N(v+t*k,e)}if(O>1e-9){const t=!!n.alternate&&w%2==0;N(v+w*k,t,O)}}if(n.extend===jt.before)return[...M,...e];if(z&&e.length>0){return[...e.slice(0,-1),d(f({},e[e.length-1]),{e:I}),...M]}return[...e,...M]}function Yn(t,e,n,r){var o,i,a,s,l,u,c;const f=e.keyframes||[],d=[];for(const e of f){const n=null!=(i=null!=(o=e.time)?o:e.t)?i:0;let f=null!=(a=e.value)?a:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=Wn(f));const p=F(t)?B(t):t;_.has(p)&&(f=null!=(l=M(f))?l:f);const m={t:n,v:f,e:Gn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(m.tangentIn=v),g&&(m.tangentOut=g),d.push(m)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,p=!0===h?{}:h||void 0;return p&&d.length>=2?Xn(t,d,p,n):d}function qn(t,e,n){const r=e.loop;if(null==r||!1===r)return e;const o=!0===r?{}:r,i=e.keyframes;if(!Array.isArray(i)||i.length<2)return e;const a=F(t)?B(t):t,s=_.has(a),l=i.map(e=>{var n,r,o,i,a,l,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=Wn(d)),s&&(d=null!=(o=M(d))?o:d);const h={t:f,v:d,e:null!=(i=e.e)?i:e.easing};return(null!=(a=e.tangentIn)?a:e.ti)&&(h.tangentIn=null!=(l=e.tangentIn)?l:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),u={keyframes:Xn(t,l,o,n)};return void 0!==e.autoOrient&&(u.autoOrient=e.autoOrient),u}function Jn(t,e){const n=Qn(t,e);return null!=n?n:t}function Qn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Qn(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],i=qn(n,o,e);i!==o&&(r||(r=f({},t)),r[n]=i)}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Hn=0;function $n(t,e){if(!t)return t;const n=e&&"object"==typeof e&&!Array.isArray(e)?e:N(e);if(!n||!Object.keys(n).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?f(f({},n),t):t,o=t.transform;if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=d(f({},e),{keyframes:e.keyframes.map(t=>d(f({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),d(f({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>T.has(t));if(1!==i.length)return t;const a=i[0],s=t[a];if(!s||"object"!=typeof s||!Array.isArray(s.keyframes))return t;const l=d(f({},s),{keyframes:s.keyframes.map(t=>d(f({},t),{value:d(f({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=d(f({},n),{[a]:l.value}));const u=f({},t);return delete u[a],d(f({},u),{transform:l})}function tr(t,e=Pt.waapi){const n=Yt(t)||{},r=Ht(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=Kn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Kn(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const s=function(t,e,n,r=Pt.waapi){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Yn(i,a,e,n);if(s.length>0){const t={keyframes:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===Pt.waapi&&"transform"===i?wn(t):t}}return o}($n(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),i),o,r,e);return 0===Object.keys(s).length?null:{id:t,animate:s}},s=$t(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Hn;t.id=n;const r=a(n,e,t.transform);r&&i.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 i}function er(t,e,n){var r,o,i,a,s,l,u;const c=e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){i=t[s],a=t[s+1];break}e>u&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(c,n);let h=f===d?0:(p=n,k=null!=(r=f.t)?r:0,A=null!=(o=d.t)?o:0,w=0,S=1,A===k?w:w+(p-k)/(A-k)*(S-w));var p,k,A,w,S;h=U(h,0,1);const P=null!=(i=f.e)?i:f.easing;if(P&&Array.isArray(P))try{h=x(P)(h)}catch(t){}let j=F(t)?B(t):t,M=null;const T=null!=(a=null==f?void 0:f.v)?a:null==f?void 0:f.value,N=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===j){M=b(null!=(l=null==T?void 0:T.paths)?l:Array.isArray(T)?T:[],null!=(u=null==N?void 0:N.paths)?u:Array.isArray(N)?N:[],h).map(t=>m(t)).join("")}else if(_.has(j))M=O(y(T||[0,0,0,1],N||[0,0,0,1],h)),j=t;else if("stroke-dasharray"===j)M=g(T||[],N||[],h).join(" "),j=t;else if("transform"!==j||null===T||"object"!=typeof T||Array.isArray(T))if("translate"===j){M="translate("+g(T||[0,0],N||[0,0],h).join(",")+")",j="transform"}else if("rotate"===j){M="rotate("+v(+(T||0),+(N||0),h)+")",j="transform"}else if("scale"===j){M="scale("+g(T||[1,1],N||[1,1],h).join(",")+")",j="transform"}else{M=v(+(T||0),+(N||0),h)}else{const t=new Set([...T?Object.keys(T):[],...N?Object.keys(N):[]]),n={};for(const e of t){const t=null==T?void 0:T[e],r=null==N?void 0:N[e];if("rotate"===e||"skew"===e)n[e]=v(+(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],i=g(t||o,r||o,h);n[e]=i}}if(vn(e)){const t=T.translate,r=N.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=bn(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)}}M=z(n,{withUnits:!1}),j="transform"}return I.has(j)&&"number"==typeof M&&(M=100*M+"%"),{k:j,v:null===M?"":""+M}}function nr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=er(r,o,e);t&&(n[t.k]=t.v)}return n}function rr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(rr);const e={};for(const n of Object.keys(t))e[n]=rr(t[n]);return e}function or(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}),i=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(i)};return i(t),n}function ir(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function ar(t){var e;const n=ir(t.x),r=ir(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 sr(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 i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=ur(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};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 i=function(t){const e=fr(t.viewBox);if(e)return[e[2],e[3]];const n=lr(t.width),r=lr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=dr(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},u=[...null!=(e=s.children)?e:[],l];return d(f({},s),{children:u})}function lr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function ur(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function cr(t,e,n,r,o,i,a){var s,l,u,c;const h=rr(e);or(h,o);const p="symbol"===h.type?fr(h.viewBox):void 0,m=null!=(l=null!=(s=lr(t.width))?s:null==p?void 0:p[2])?l:a[0],v=null!=(c=null!=(u=lr(t.height))?u:null==p?void 0:p[3])?c:a[1],g="symbol"===h.type?function(t,e,n,r,o){const i=fr(t.viewBox),a=d(f({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,u,c]=i,h=u>0&&c>0?Math.min(r/u,o/c):1,p=(r-u*h)/2,m=(o-c*h)/2,v=[];0===p&&0===m||v.push("translate("+p+","+m+")");1!==h&&v.push("scale("+h+")");0===s&&0===l||v.push("translate("+-s+","+-l+")");v.length&&(a.transform=v.join(""));const g=e();return n.push({type:"clipPath",id:g,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),a.clipPath="url(#"+g+")",a}(h,o,i,m,v):h,y=dr(g,n,r,o,i,a),b=d(f({},t),{type:"g",children:[y]});return delete b.href,delete b.width,delete b.height,ar(b)}function fr(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 dr(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=ur(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return cr(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=dr(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?d(f({},t),{children:s}):t}function hr(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function pr(t){var e,n,r;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const o=t,i=null!=(e=o.keyframes)?e:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(vr),autoOrient:o.autoOrient,loop:o.loop},e=null!=(n=o.value)?n:o.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const a=null!=(r=o.value)?r:o.v;if(void 0!==a)return{kind:"static",value:a}}return{kind:"static",value:t}}function mr(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,c=f({},u||{}),d={keyframes:n.keyframes};void 0!==n.loop&&(d.loop=n.loop),void 0!==n.autoOrient&&(d.autoOrient=n.autoOrient),c[e]=d,t.animate=c;const h=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==h&&(t[e]=l(h))}function vr(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=f({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function gr(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 yr(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=kr(r,e.origin,!0),r=br(r,"scale",e.scale,n),r=br(r,"skew",e.skew,n),r=br(r,"rotate",e.rotate,n),r=kr(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=br(r,"translate",e.translate,n):(r=kr(r,e.origin,!0),r=br(r,"translate",e.translate,n),r=kr(r,e.origin,!1)),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function br(t,e,n,r){if(void 0===n)return t;const o=pr(n);if("static"===o.kind)return{type:"g",transform:{value:hr(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>gr(t,hr(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 kr(t,e,n){if(void 0===e)return t;const r=pr(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=>gr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Ar(t,e){return"_lw_"+e+"_"+t.nextId++}function xr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function wr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>wr(t,e))}var Sr=rr;function Pr(t,e,n){var r,o,i;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=xr(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>Pr(t,e,n))}function jr(t,e,n,r,o){const i=function(t,e){var n,r,o;const i={};let a=!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=Mr(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),i.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}a=!0}}const l=void 0!==(null==e?void 0:e.translate),u=a||l,c=a&&Mr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&Mr((null==(o=i.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],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=Or(i.full),r=Or(o.full),a=-n[0],s=-n[1],l=r[0]-a,u=r[1]-s;if(0===l&&0===u)return{rest:t};return{translate:"translate("+l+","+u+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.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 i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)?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&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=f({},r);delete e.translate;const n=Object.keys(e).length>0;u||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:a,inner:s}=function(t){if(!t)return{};const e=Mr(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=yr(l,s,o);let u={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==i.transform&&(u.transform=i.transform),void 0!==i.animate&&(u.animate=i.animate),a&&(delete u.id,u=yr(u,a,o),u.id=n),u}function Or(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 Mr(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 _r(t,e,n,r){if(!e)return t;const o=Ar(n,"grad"),i=function(t,e){const n={type:t.type===Zt.radial?"radialGradient":"linearGradient",id:e};t.type===Zt.linear?(Tr(n,"x1","y1",t.start),Tr(n,"x2","y2",t.end)):(Tr(n,"cx","cy",t.center),function(t,e,n){const r=pr(n);if("absent"===r.kind)return;mr(t,e,r,{asString:!0})}(n,"r",t.radius),Tr(n,"fx","fy",t.focal));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[];const i=pr(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(Ir):[];const a=i.keyframes;if(!a.length)return[];const s=i.loop;let l=0;for(const t of a){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=a[0].value)?n:a[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:zr(a,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 i,a,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(a=null!=(i=r.time)?i:r.t)?a:0,h=null!=(s=r.value)?s:r.v,p=null!=(l=null==h?void 0:h[n])?l:zr(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,v={time:o,value:p.color};void 0!==m&&(v.easing=m),c.push(v);const g={time:o,value:p.offset};void 0!==m&&(g.easing=m),f.push(g),p.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:Nr(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,a,e,0,s))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function Tr(t,e,n,r){var o,i,a;const s=pr(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},u=null!=(o=t.animate)?o:{};u[e]=l(0),u[n]=l(1),t.animate=u;const c=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function Ir(t){return{type:"stop",offset:Nr(t.offset),stopColor:t.color}}function zr(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 Nr(t){return Math.round(1e3*t)/10+"%"}function Er(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Dr(t,e,n,r){if(!e)return t;const o=xr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=Ar(r,"mask");let a={type:"use",href:"#"+o};if(n)a=Cr(a,n,r);else if(Ur(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,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=gr(t,void 0);if(Array.isArray(e.translate)&&a.push(d(f(f({},r),Br(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(d(f({},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(d(f({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let h=t;a.length&&(h={type:"g",animate:{transform:c(a)},children:[h]});s.length&&(h={type:"g",animate:{transform:c(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:c(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,i,a,s,l,u,c,f,d,h;const p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const v=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:m[1],args:t})}if(!v.length)return;const g=v[v.length-1];if("translate"===g.name)for(let t=v.length-2;t>=0;t--){const c=v[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,p=null!=(o=g.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(i=v[e].args[0])?i:0,n=null!=(a=v[e].args[1])?a:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[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 y,b,k;for(const t of v)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;y=y?[y[0]+e,y[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;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};y&&(A.translate=y);void 0!==b&&(A.rotate=b);k&&(A.scale=k);return Object.keys(A).length?A: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}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}return}(t);e&&(a=Cr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||Ur(t))}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Gr(e,r):void 0,l=s?[...a,s]:a,u=i&&r.maskAncestorChains.get(i)||[];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=Vr(l),n=Vr(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=Rr(l,t),n=Rr(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}function Cr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=pr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.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=Fr(o,"translate",e.translate,void 0,n),o=Fr(o,"rotate",e.rotate,r,n),o=Fr(o,"scale",e.scale,r,n),o}function Fr(t,e,n,r,o){if(void 0===n)return t;const i=pr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:hr(e,Lr(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=gr(t,hr(e,Lr(e,t.value),r));return"translate"===e?f(f({},n),Br(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Lr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function Br(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Ur(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function Vr(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 Rr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Wr(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Wr(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],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Gr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!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,i+=e[1]||0,a=!0):s=!0}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}var Kr="content";function Zr(t,e,n){if(!e)return;const r=xr(e.sourceId);if(!r)return void(e.type===Kr&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===Kr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Xr(t,e){const n={};return void 0!==t.translate&&(n.translate=Yr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=Yr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=Yr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];return Yr(t,n,!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function Yr(t,e,n=!1){const r=pr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return("number"==typeof t||Array.isArray(t))&&!n?o:{value:o}}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var qr=!1;function Jr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Qr=1;function Hr(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Qr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Qr,value:0}],a=f({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function $r(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function to(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function eo(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 no(t,e,n){const r=xr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=ro(r,e,n,new Set);if(o)if(qr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],ar(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function ro(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 i=Sr(o);if(function(t,e){or(t,()=>Ar(e,"retimed"))}(i,n),"use"===o.type?io(i,e.start,e.stretch):oo(i,e.start,e.stretch),eo(i),"use"===o.type&&o.href){const a=xr(o.href);if(a){const s=to(o),l=s?$r(Jr(s),e):e,u=new Set(r);u.add(t);const c=ro(a,l,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=to(t);if("use"===t.type&&s&&t.href){const i=xr(t.href);if(i){const a=$r(Jr(s),e),l=new Set(r);l.add(o);const u=ro(i,a,n,l);u&&(t.href="#"+u)}eo(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function oo(t,e,n){var r;io(t,e,n),null==(r=t.children)||r.forEach(t=>oo(t,e,n))}function io(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var ao=48,so=/[MmLlHhVvCcSsQqTtAaZz]/;function lo(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 uo(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,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),p=(t,e,r)=>{const a=[o,i],s=K(a,t,e,r,ao);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},m=(t,e)=>{p([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];so.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)m(h()+(n?o:0),h()+(n?i:0));else if("H"===v)m(h()+(n?o:0),i);else if("V"===v)m(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=lo([o,i],t,e);p(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=lo([o,i],t,e);p(r,a,e)}else{if("A"!==v){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?i:0))}d=t}else m(a,s),o=a,i=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,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=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 i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=V(o.P0,o.P1,o.P2,o.P3,a),[u,c]=W(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(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 co=.15;function fo(t){const e=pr(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function ho(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var po=t=>Math.round(1e3*t)/1e3;function mo(t,e){if(!e||null==t)return t;const n=pr(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>d(f({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function vo(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=uo(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=co*o,a=fo(e.startOffset),s=fo(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let p=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+po(e)+","+po(n)+"L"+po(d.x)+","+po(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+po(t)+","+po(e)}return{d:p,startShift:c}}function go(t,e,n){null!=n&&mr(t,e,pr(n),{asString:!0})}var yo=(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 bo(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function ko(t,e){let n="";for(let r=0;r<t.length;r++){const o=bo(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Ao(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var xo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function wo(t,e,n=2){const r=[];let o;for(xo.lastIndex=0;null!==(o=xo.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=Ao(e,s(),s());i+=t+ko([r,o],n)}else if("C"===t){const[t,r]=Ao(e,s(),s()),[o,a]=Ao(e,s(),s()),[l,u]=Ao(e,s(),s());i+="C"+ko([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=Ao(e,s(),s()),[o,a]=Ao(e,s(),s());i+="Q"+ko([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var So=16,Po=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Ut,Vt,"xml:space"],jo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Oo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Mo(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function _o(t){return"string"==typeof t?t:void 0}function To(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Oo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function Io(t,e){var n,r,o,i,a,s,l,u,c,f;const d="text"===t.type,h=t.style,p=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},m={fontFamily:null!=(n=_o(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Mo(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=Mo(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Mo(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=Mo(p("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:To(t))?c:e.animate};for(const t of jo){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function zo(t){var e,n,r;return{fontFamily:_o(t.fontFamily),fontSize:null!=(e=Mo(t.fontSize))?e:So,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Mo(t.letterSpacing))?n:0,wordSpacing:null!=(r=Mo(t.wordSpacing))?r:0}}function No(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of jo)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function Eo(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Do(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var Co=.6,Fo="px-missing-glyph";function Lo(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,i=.92*-e,a=o-r,s=-i,l=Math.max(1,.12*Math.min(a,s)),u="M"+r+" 0L"+o+" 0L"+o+" "+i+"L"+r+" "+i+"Z";if(a<=2*l||s<=2*l)return u;const c=r+l,f=o-l,d=-l,h=i+l;return u+"M"+c+" "+d+"L"+c+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function Bo(t,e){var n,r,o,i;const{glyphs:a,create:s=yo,warnings:l}=e,u=Do(a),c={x:null!=(n=Mo(t.x))?n:0,y:null!=(r=Mo(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{var n;const r=Eo(e,a,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,p=No(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:i}),c.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:Co*o;f.push({glyphD:Lo(t,s),m:[i,0,0,i,c.x,c.y],paint:p,isMissing:!0,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(l?l.width:0)*i;c.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,i;const a=Io(t,e),s=Mo(t.x),l=Mo(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=Mo(t.dx))?n:0,c.y+=null!=(r=Mo(t.dy))?r:0;const u=null!=(o=_o(t[Vt]))?o:_o(t[Ut]);if(u&&!(null==(i=t.children)?void 0:i.length)&&p(u,a),t.children)for(const e of t.children)m(e,a)},v=zo(t);if(t.children)for(const e of t.children)m(e,v);const g=null!=(o=_o(t[Vt]))?o:_o(t[Ut]);g&&!(null==(i=t.children)?void 0:i.length)&&p(g,v);const y=_o(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===y?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Qo(t,Jo(f,s,l),s)}function Uo(t,e){var n,r,o,i,a,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=uo(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=Do(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=Io(t,e),l=null!=(n=_o(t[Vt]))?n:_o(t[Ut]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=Eo(s,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,zo(t));const h=f,p=pr(null==s?void 0:s.textLength),m="animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0,v=m>0&&h>0?m/h:1,g=pr(null==s?void 0:s.startOffset),{along:y,perp:b}=Ro(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=Do(l),f={x:null!=(r=Mo(t.x))?r:0,y:null!=(o=Mo(t.y))?o:0},d=[],p=[{start:f.x,end:f.x}];let m=0;const v=(t,e)=>{var n;const r=Eo(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:a,fontSize:e.fontSize,line:m}),f.x+=l,p[m].end=f.x}},g=(t,e)=>{var n,r,o,i;const a=Io(t,e),s=Mo(t.x),l=Mo(t.y);void 0!==s&&(f.x=s,m=p.length,p.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=Mo(t.dx))?n:0,f.y+=null!=(r=Mo(t.dy))?r:0;const u=null!=(o=_o(t[Vt]))?o:_o(t[Ut]);if(u&&!(null==(i=t.children)?void 0:i.length)&&v(u,a),t.children)for(const e of t.children)g(e,a)},y=zo(t);if(t.children)for(const e of t.children){const t=d.length;if(g(e,y),d.length===t){const t=Io(e,y),n=Eo(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:m})}}const b=null!=(a=_o(t[Vt]))?a:_o(t[Ut]);b&&!(null==(s=t.children)?void 0:s.length)&&v(b,y);const k=_o(t.textAnchor);if("middle"===k||"end"===k)for(const t of d){const e=p[t.line].end-p[t.line].start;t.x+="middle"===k?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return h(e,["line"])})}function Vo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function Ro(t){var e,n,r;return{along:(null!=(e=Mo(t.x))?e:0)+(null!=(n=Mo(t.dx))?n:0),perp:null!=(r=Mo(t.dy))?r:0}}function Wo(t,e,n,r,o,i){const{glyphs:a,create:s=yo,warnings:l}=r,u=e?uo(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=Do(a),{cells:h,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u,c;const f=Io(t,s),d=null!=(l=_o(t[Vt]))?l:_o(t[Ut]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=Eo(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=No(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:Co*t.unitsPerEm,s=a*e;o.push({glyphD:Lo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,zo(t)),{cells:o,width:i}}(t,a,c,l);if(!h.length)return Qo(t,[],s);const{along:m,perp:v}=Ro(t),g=Go(n),y=Go(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!u.closed;if(g.animated||y.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(g.times,y.times),n=(t,e)=>m+g.at(e)+b(y.at(e))*t.midBase,r=g.animated?g.loop:y.loop;return Qo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/Ko,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=wo(h.glyphD,t),m=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Xo(r-s*l,3),Xo(o+s*a,3)],rotate:Xo(180*i/Math.PI,3)}}},v=[],g=[],y=(t,e)=>{v.push(m(t,e)),a&&g.push({time:e,value:u(t)?1:0})};y(n(h,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(h,e),a=n(h,o),s=Math.min(Zo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);y(n(h,r),r)}}Sn(v);const b={keyframes:v};void 0!==o&&(b.loop=o);const k={transform:b};if(h.paint.animate&&Object.assign(k,h.paint.animate),a&&g.some(t=>0===t.value)){const t={keyframes:g};void 0!==o&&(t.loop=o),k.opacity=t}c.push(i("path",d(f(f({d:p},Yo(h.paint)),qo(h.isMissing)),{animate:k}),[]))}return c}(h,u,n,e,r,s,k,v),s)}const A=b(y.at(0)),x=m+g.at(0);return Qo(t,Jo((k?h.filter(t=>{const e=x+t.midBase*A;return e>=0&&e<=u.totalLength}):h).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:Vo(u,x+t.midBase*A,t.scale,t.widthEm,v)})),s,l),s)}function Go(t){var e;const n=pr(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var Ko=48,Zo=64;function Xo(t,e){const n=u(10,e);return Math.round(t*n)/n}function Yo(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of jo)void 0!==t[n]&&(e[n]=t[n]);return e}function qo(t){return t?{class:Fo}:{}}function Jo(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=wo(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",f(f(f({d:n},Yo(t)),qo(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function Qo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Po.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Ho(t,e){return e.alongPath?Wo(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):Bo(t,e)}function $o(t,e,n){if(!e)return t;const r=e.subPaths===Bt.combined,o=[],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,i,a,s,l,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=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"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*pi,d=o*pi,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}return}(t);if(void 0===e)return;const n=Un(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=di(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}o.push(r)};if(i(t),!o.length)return t;let a=0;const s=r?[...o].reverse():o;for(const t of s)for(const e of t.subpaths)r||(a=0),e.startOffsetPx=a,a+=e.lengthPx;const l=a;if(r&&l<.001)return t;const u=pr(e.offset),c="absent"===u.kind?{kind:"static",value:0}:u,h=function(t){const e=pr(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=ci(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),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=fi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=fi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),p="absent"===h.kind?{kind:"static",value:[0,1]}:h,m=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}(c),v=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===o.length&&o[0].leaf===t&&1===o[0].subpaths.length){const e=o[0],n=e.subpaths[0],i=r?l:n.lengthPx;if(i<.001)return t;const a=r?n.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=ri(n,e,r),s=oi(e,r),l=f({},t);return delete l.effects,si(l,"strokeDasharray",ai(i,s)),si(l,"strokeDashoffset",ai(o,a)),si(l,"strokeOpacity",ui(i)),l}(e.leaf,i,a,v,c,p)}const g=new Map;for(const t of o){const e=[];for(const o of t.subpaths){const i=r?l:o.lengthPx;if(i<.001)continue;const a=r?o.startOffsetPx/i:0;e.push(...ei(t.leaf,o.subpath,i,a,v,c,p,n))}g.set(t.leaf,ti(t.leaf,e))}const y=t=>{const e=g.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(y)}):t)};return y(t)}function ti(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function ei(t,e,n,r,o,i,a,s){const l=ri(r,n,o),u=oi(n,o),c=ai(i,l),f=ai(a,u),d=ui(a),h=function(t){return{type:"path",d:t}}(m(e));return si(h,"strokeDasharray",f),si(h,"strokeDashoffset",c),si(h,"strokeOpacity",d),[h]}var ni=1;function ri(t,e,n){const[r]=ii(n);return n=>e*(-n-r+t)+ni}function oi(t,e){const[n,r]=ii(e),o=r-n+1;return e=>{const n=U(e[0],0,1),r=U(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=ni;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+ni),s}}function ii(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function ai(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,i;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function si(t,e,n){n&&mr(t,e,n)}var li=10;function ui(t){var e,n,r,o,i,a;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!=(i=u.value)?i:u.v):h,m=c?h&&s(null!=(a=c.value)?a:c.v):h;p&&!m?(f.push({time:d,value:0}),f.push({time:d+li,value:1})):!p&&m&&(f.push({time:d-li,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function ci(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,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>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;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function fi(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],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function di(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+=hi(t,r,r+1);return t.c&&e.length>1&&(n+=hi(t,e.length-1,0)),n}function hi(t,e,n){var r,o,i,a;const s=t.v,l=s[e],u=s[n],c=K(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var pi=.5522847498307936;function mi(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Yt(t))?void 0:e.mode)===St.frames?Pt.frames:Pt.waapi,glyphs:null==(n=Ht(t))?void 0:n.glyphs},o=Sr(t);wr(o,r.idMap),Pr(o,r,()=>Ar(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=xr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);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=Gr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),wr(t,e.idMap);const n=[],r=t=>{var e;to(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&to(o)&&n++,"use"===o.type&&o.href){const t=xr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=xr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=to(t);if(!n)continue;const r=n.timeCrop;eo(t),no(t,Jr(n),e),r&&Hr(t,r,e)}}(t,e),t}(vi(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function vi(t,e){t.children&&(t.children=t.children.map(t=>vi(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{transformBy:i,repeater:a,maskedBy:s,clipPath:l,strokeTrim:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:p}=null!=n?n:{};n&&delete t.effects;let m=t,v=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Wo(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,v=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?Bo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(m,p,e),v=!0;return v||(m=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=Ar(n,"tpath"),{d:i,startShift:a}=vo(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:ho(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),go(s,"startOffset",mo(e.startOffset,a)),go(s,"textLength",e.textLength),t.children=[s],t}(m,h,e)),m=function(t,e,n){return _r(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return _r(t,e,n,"stroke")}(m,d,e),m=$o(m,u,e),m=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=Sr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<i;t++){const r=Sr(l),o=Xr(e,t),i=o?yr(r,o,n):r;u.push(i)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==a&&(c.transform=a),void 0!==s&&(c.animate={transform:s}),c}(m,a,e),m=Dr(m,s,i,e),m=function(t,e,n){if(!(null==e?void 0:e.d))return t;const r=Ar(n,"clip"),o={type:"path"},i=pr(e.d);return"absent"!==i.kind&&("static"===i.kind?o.d=Er(i.value):(mr(o,"d",i),void 0!==o.d&&(o.d=Er(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(m,l,e),o?(Zr(m,c,e),m=jr(m,i,r,o,e)):m=function(t,e,n,r){return Zr(t,e,r),yr(t,n,r)}(m,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,m),m}var gi=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},yi=t=>{var e;return null!=(e=t.v)?e:t.value},bi=t=>{var e;return null!=(e=t.e)?e:t.easing},ki=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},Ai=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function xi(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,u=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+u*r[0],a*t[1]+s*e[1]+l*n[1]+u*r[1]]}function wi(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=xi(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var Si=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function Pi(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=yi(o[0]),a=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],s=[];for(const t of o){const n=yi(t),r=null==n?void 0:n.translate;if(!r||r.length<2)return;if(Object.keys(n).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(e=null==n?void 0:n.origin)?e:[0,0];if(o[0]!==a[0]||o[1]!==a[1])return;s.push([r[0]+a[0],r[1]+a[1]])}if(!o.some(t=>ki(t)||Ai(t)))return;let l="M"+Si(s[0][0])+","+Si(s[0][1]);const u=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=Ai(o[t]))?n:[0,0],c=null!=(r=ki(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+c[0],i[1]+c[1]];l+="C"+Si(f[0])+","+Si(f[1])+","+Si(d[0])+","+Si(d[1])+","+Si(i[0])+","+Si(i[1]),u.push(wi(e,f,d,i))}const c=u.reduce((t,e)=>t+e,0);if(!(c>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const e={t:gi(o[t]),v:d/c},n=bi(o[t]);void 0!==n&&(e.e=n),f.push(e)}return{pathStr:l,distanceKfs:f,autoOrient:!!t.autoOrient,anchor:a}}(i);if(e){const n=f({},o);delete n.transform;const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n.offsetDistance=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=f({},s);delete t.translate,delete t.origin,l=Object.keys(t).length?t:void 0}r=d(f({},t),{animate:n,style:d(f({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:Si(e.anchor[0])+"px "+Si(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=d(f({},r),{children:t}))}return r};return e(t)}function ji(t,e,n){var r,o;let i=mi(t).root;i=Pi(i);return i=Jn(i,null!=(o=null==(r=Yt(i))?void 0:r.duration)?o:D),e===Pt.waapi&&(i=Cn(i,null==n?void 0:n.motionPath),i=sr(i),i=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}(i)),i}function Oi(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function Mi(t,e,n){var r;const o=Yt(t)||{},i=tr(t,Pt.frames),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||D),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let p=null,m=!1,v=-(o.delay||0),g=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let x=0;const w=()=>{const t=g?(Date.now()-g)*y:0;return v+t},S=()=>{let t=w();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function P(t){let n=function(){const e=l>0?l:1;let n=0,r=0;if(l>0){t=U(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=U((t-r*e)/e,0,1)}else n=t;const o=c||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=nr(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?P(S()):h&&P(0));const j=()=>!!m&&(!!e.isConnected()&&(y<0?w()>0:!(Number.isFinite(u)&&S()>=u))),O=t=>{null!==p&&(Oi(p),p=null),(t||j())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=S(),i=w();if(i<0&&y>0)h&&P(0);else{if(y<0&&i<=0)return M(),P(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&u&&Number.isFinite(u)&&o>=u)return M(),P(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(x&&t-x<A)return;x=t}P(o)}})(),O()}))},M=()=>{if(!m)return;let t=w();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,m=!1,null!==p&&(Oi(p),p=null),t>=0?P(t):h&&P(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!m){if(y>=0)Number.isFinite(u)&&v>=u&&(v=0);else if(v<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");v=u}b=!1,m=!0,g=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),v=0,g=0,m=!1,b=!1,P(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:S(),g=0,m=!1,null!==p&&(Oi(p),p=null),P(d?v:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=w();Number.isFinite(u)&&e>u&&(e=u),t<0!=y<0&&(b=!1),y=t,v=e,m&&(g=Date.now())},getCurrentTime:()=>S(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,m&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),P(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var _i=[1,0,0,1,0,0];function Ti(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 Ii=(t,e)=>[1,0,0,1,t,e],zi=(t,e)=>[t,0,0,e,0,0];function Ni(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Ei=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],Di=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Ci(t){let e=_i;t.translate&&(e=Ti(e,Ii(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=Ti(e,Ii(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=Ti(e,Ni(t.rotate))),t.scale&&(e=Ti(e,zi(t.scale[0],t.scale[1]))),n&&(e=Ti(e,Ii(-t.origin[0],-t.origin[1]))),e}function Fi(t,e,n){return t+(e-t)*n}function Li(t,e){return null==t?_i:"string"==typeof t?function(t){let e=_i;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=Ti(e,Ii(n[0]||0,n[1]||0)):"scale"===t?e=Ti(e,zi(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=Ti(e,Ni(n[0])):"skewX"===t?e=Ti(e,Ei(n[0])):"skewY"===t?e=Ti(e,Di(n[0])):"matrix"===t&&(e=Ti(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Ci(function(t,e){var n,r,o,i,a,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!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[Fi(h.translate[0],p.translate[0],d),Fi(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=Fi(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[Fi(h.scale[0],p.scale[0],d),Fi(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?Ci(t.value):"object"!=typeof t||Array.isArray(t)?_i:Ci(t)}var Bi=new Set(["svg","g","symbol"]),Ui=new Set(["defs","mask","clipPath","title"]);function Vi(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Vi(t,e))}function Ri(t){return null==t?0:Number(t)}function Wi(t){return Math.round(100*t)/100+0}function Gi(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=Wi(function(t,e,n,r){var o,i,a,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!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a: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 Fi(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(Wi).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Ri(t.width)+","+Ri(t.height)+","+Ri(t.x)+","+Ri(t.y);case"ellipse":return Ri(t.rx)+","+Ri(t.ry)+","+Ri(t.cx)+","+Ri(t.cy);case"circle":return Ri(t.r)+","+Ri(t.cx)+","+Ri(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Ri(c)||"")+"|o:"+f+"|m:"+d}function Ki(t,e,n,r,o){var i;const a=t.type||"";if(Ui.has(a))return;const s=Ti(e,function(t,e){return t.animate&&t.animate.transform?Li(t.animate.transform,e):void 0!==t.transform?Li(t.transform,e):_i}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=Ti(s,Ii(Ri(t.x),Ri(t.y)));return void(i?Ki(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Bi.has(a)?null==(i=t.children)||i.forEach(t=>Ki(t,s,n,r,o)):o.push(Gi(t,s,n))}function Zi(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=>Zi(t,e))}function Xi(t,e){const n=new Map;Vi(t,n);const r=[];return Ki(t,_i,e,n,r),r.sort()}function Yi(t,e){const n=new Set;Zi(t,n),Zi(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Xi(t,o),i=Xi(e,o),a=qi(n,i),s=qi(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function qi(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}