@pixodesk/svg-animator-web 1.0.39 → 1.0.40

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 PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=Math.pow,u=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&u(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&u(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},v={};function m(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,c=t.o,u=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==c?void 0:c[t-1])?e:o,u=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=s[f-1],e=null!=(o=null==c?void 0:c[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],u=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),a.push("z")}return a.join("")}function y(t,n,e){return t+(n-t)*e}function p(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=y(t[i]||0,n[i]||0,e);return r}function h(t,n,e){return[y(t[0]||0,n[0]||0,e),y(t[1]||0,n[1]||0,e),y(t[2]||0,n[2]||0,e),y(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function g(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(b(t[i],n[i],e));return o}function b(t,n,e){var r,o,i,s,l,c,u,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),m=[],y=[],h=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];m.push(p(f,v,d));const g=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,b=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;y.push(p(g,b,d));const A=null!=(c=null==(l=t.o)?void 0:l[e])?c:f,w=null!=(a=null==(u=n.o)?void 0:u[e])?a:v;h.push(p(A,w,d))}return{v:m,i:y.length?y:void 0,o:h.length?h:void 0,c:null!=(f=t.c)?f:n.c}}function A(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let c=e,u=0,a=1;for(let t=0;t<8;t++){const t=s(c)-e;if(Math.abs(t)<1e-6)return c;const n=l(c);if(Math.abs(n)<1e-6)break;c-=t/n}for(c=e;u<a;){const t=s(c);if(Math.abs(t-e)<1e-6)return c;e>t?u=c:a=c,c=(a+u)/2}return c}function w(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=A(n,r,t),((l*e+s)*e+i)*e;var e}}function k(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function j(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=A(e,o,n),l=[e,r],c=[o,i],{left:u,right:a}=function(t,n,e,r,o){const i=k(t,n,o),s=k(n,e,o),l=k(e,r,o),c=k(i,s,o),u=k(s,l,o),a=k(c,u,o);return{left:[t,i,c,a],right:[a,u,l,r]}}([0,0],l,c,[1,1],s),f=u[3][0],d=u[3][1];let v,m;f>1e-9&&Math.abs(d)>1e-9&&(v=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const y=1-f,p=1-d;return y>1e-9&&Math.abs(p)>1e-9&&(m=[(a[1][0]-f)/y,(a[1][1]-d)/p,(a[2][0]-f)/y,(a[2][1]-d)/p]),{left:v,right:m}}function M(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function x(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}function O(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(v,{PX_ANIMATOR_DOC_KEY:()=>Gi,PX_ANIM_ATTR_NAME:()=>jt,PX_ANIM_SRC_ATTR_NAME:()=>kt,PxTimelineEngine:()=>_t,PxTimelineEngineExtra:()=>Dt,createAnimator:()=>Zi,generateNewIds:()=>re,loadTagAnimators:()=>Ji,setupAnimationTriggers:()=>xi,validateDocument:()=>Qn});var S=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),N=new Set(["translate","rotate","scale","skew"]),P=new Set(["offset-distance","offsetDistance"]);function z(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.l)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,c=t.skew,u=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=c&&o.push("skewX("+c+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}var C=new Set(["offset-distance","offsetDistance"]),T=1e3;function _(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function D(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var R=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 R.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function V(t,n,e){return Math.max(n,Math.min(t,e))}function I(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,c=s*i,u=3*o*s,a=3*l*i,f=l*o;return[c*t[0]+u*n[0]+a*e[0]+f*r[0],c*t[1]+u*n[1]+a*e[1]+f*r[1]]}var E=1e-4;function F(t,n,e,r,o){const i=B(t,n,e,r,o);return 0===i[0]&&0===i[1]?B(t,n,e,r,o<.5?o+E:o-E):i}function B(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,c=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+c*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+c*(r[1]-e[1])]}function U(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let c=I(t,n,e,r,0);s[0]=0,l[0]=0;let u=0;for(let a=1;a<i;a++){const i=a/o,f=I(t,n,e,r,i),d=f[0]-c[0],v=f[1]-c[1];u+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=u,c=f}return{ts:s,ds:l}}function G(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],c=e[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}function W(t){return"scroll"===(null==t?void 0:t.timelineSource)}var Z="cover";function J(t,n,e,r){var o;const[i,s]=function(t,n,e){const r=n,o=e;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]}}(null!=(o=null==t?void 0:t.phase)?o:Z,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(s-i)}function X(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}var q=class{_canSanitize(t){return this.isValid(t)}optional(){return new Q(this)}},Q=class extends q{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,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},K=class extends q{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(X(null!=e?e:[])+": expected string, got "+typeof t),!1)}},Y=class extends q{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(X(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},H=class extends q{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(X(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},$=class extends q{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(X(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},tt=class extends q{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(X(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},nt=class extends q{constructor(t,n){super(),this.h=t,this.A="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.h)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};if(this.h.some(n=>n.isValid(t,o,e?[...e]:void 0)))return!0;if(!n)return!1;const i=X(null!=e?e:[]);let s;n.errors.push(i+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240));let l=-1;const c=[];for(const r of this.h){const o={errors:[],warnings:[],strict:n.strict};if(r.isValid(t,o,e?[...e]:void 0),!o.errors.length)continue;const u=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((u>l||u===l&&s&&o.errors.length<s.length)&&(l=u,s=o.errors),u<=i.length)for(const t of o.errors){const n=/: expected (.+?), got /.exec(t);n&&!c.includes(n[1])&&c.push(n[1])}}if(s&&l>i.length)for(const t of s.slice(0,4))n.errors.includes(t)||n.errors.push(t);else c.length&&n.errors.push(i+": expected "+c.join(" | "));return!1}_canSanitize(t){return this.h.some(n=>n._canSanitize(t))}},et=class extends q{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(X(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(X(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},rt=class extends q{constructor(t,n){super(),this._shape=t,this.j=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.j)for(const t of Object.keys(n))t in this._shape||(e[t]=this.j.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(X(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.j)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.j.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ot=class extends q{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(X(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},it=class extends q{constructor(t){super(),this.value=t,this.A="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(X(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},st=class extends q{constructor(t,n){super(),this.fn=t,this._default=n,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,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},lt=class extends q{constructor(t){super(),this.h=t,this.A="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.h.length?this.h.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.h.length)return null==n||n.errors.push(X(null!=e?e:[])+": expected tuple of length "+this.h.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.h.length;e++)r.push("["+e+"]"),this.h[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.h.length}},ct=(t="")=>new K(t),ut=(t=0)=>new Y(t),at=(t=!1)=>new H(t),ft=t=>new $(t),dt=(t,n)=>new tt(t,n),vt=(t,n)=>new nt(t,n),mt=t=>new et(t),yt=(t,n)=>new rt(t,n),pt=t=>new ot(t),ht=t=>new it(t),gt=t=>new lt(t),bt=(t,n)=>new st(t,n),At=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function wt(t){if("string"!=typeof t)return;const n=At.exec(t.trim());return n?{a:Number(n[1]),b:Number(n[2]),c:void 0===n[3]?0:Number(n[3])}:void 0}wt("1.1");var kt="data-px-animation-src",jt="_px_animator",Mt="block",xt="inline",Ot="nearest",St="root",Nt="center",Pt="bottom",zt=["duration","iterations","engine","frameRate"],Ct=["trigger","delay","fillMode","direction"],Tt=[...zt,...Ct,"fill","resetOnFinish","timelineSource","scroll"],_t={native:"native",js:"js"},Dt=f(a({},_t),{auto:"auto"});function Rt(t){return t===Dt.js?_t.js:_t.native}function Lt(t){return t===Dt.native}var Vt={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},It={start:"start",end:"end"},Et={normal:"normal",alternate:"alternate"},Ft="userSpaceOnUse",Bt="objectBoundingBox",Ut={translate:"translate"},Gt={separate:"separate",combined:"combined"},Wt="textContent",Zt="class",Jt="transform",Xt="offsetDistance",qt=new Set(["type","children","animator","meta","animate","effects",Wt]),Qt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Kt=(Qt.translate,Qt.rotate,Qt.scale,Qt.origin,"pad"),Yt={linear:"linear",radial:"radial"};function Ht(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);if(!e)return;const r=$t.get(e);if(r)return r;const o=e,i=Tt.filter(t=>void 0!==o[t]),s=i.length?a({},o):e;for(const t of i)delete s[t];const l=function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=tn.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=a({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.offset&&(t.pinOffset=e.offset),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finishAction:e}=t,r=d(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return tn.set(t,i),i}(s);return $t.set(e,l),l}var $t=new WeakMap,tn=new WeakMap;function nn(t){var n;if(t)return null==(n=Ht(t))?void 0:n.definitions}var en,rn=vt([ct(),gt([ut(),ut(),ut(),ut()])]),on=vt([ct(),ut(),pt(ut()),mt({pathData:ct()}),bt(()=>pt(Bn),[]),bt(()=>mn,{})]),sn=mt({time:ut().optional(),value:on.optional(),easing:rn.optional(),tangentOut:gt([ut(),ut()]).optional(),tangentIn:gt([ut(),ut()]).optional()}),ln=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},cn=t=>{var n;return null!=(n=t.value)?n:t.v},un=t=>{var n;return null!=(n=t.easing)?n:t.e},an=t=>t.tangentIn,fn=t=>t.tangentOut,dn=mt({segmentCount:ut().optional(),repeatAt:dt([It.start,It.end]).optional(),direction:dt([Et.normal,Et.alternate]).optional()}),vn=mt({value:on.optional(),keyframes:pt(sn).optional(),loop:vt([dn,at()]).optional(),autoOrient:at().optional(),alongPathMode:dt(["sampled","offsetPath"]).optional()}),mn=mt({translate:gt([ut(),ut()]).optional(),rotate:ut().optional(),skew:ut().optional(),scale:gt([ut(),ut()]).optional(),origin:gt([ut(),ut()]).optional()}),yn=(vt([ct(),mn,mt({value:mn}),vn]),ht(vn)),pn=vt([ct(),pt(vt([ct(),yn])),yn]),hn=mt({startOn:dt(["load","mouseOver","click","scrollIntoView","programmatic"],Vt.startOn).optional(),outAction:dt(["continue","pause","reset","reverse"],Vt.outAction).optional(),finishAction:dt(["hold","reset"]).optional(),scrollIntoViewThreshold:ut().optional()}),gn=mt({width:ut(),pathData:ct()}),bn=mt({fontFamily:ct(),fontStyle:ct(),ascent:ut(),unitsPerEm:ut(),glyphs:ht(gn)}),An=mt({easings:ht(gt([ut(),ut(),ut(),ut()])).optional(),animations:ht(yn).optional(),styles:ht(ht(vt([ct(),ut()]))).optional(),fonts:ht(bn).optional()}),wn=mt({phase:dt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:ut().optional()}),kn=mt({start:wn.optional(),end:wn.optional()}),jn=(mt({kind:dt(["view","scroll"]).optional(),axis:dt([Mt,xt,"x","y"]).optional(),source:dt([Ot,St]).optional(),subject:ct().optional(),smoothing:ut().optional(),pin:at().optional(),pinAlign:dt(["top",Nt,Pt]).optional(),pinOffset:ut().optional(),pinDistance:ut().optional(),range:kn.optional()}),mt({align:dt(["top",Nt,Pt]).optional(),offset:ut().optional(),distance:ut().optional()})),Mn=dt([Dt.auto,Dt.native,Dt.js]).optional(),xn=mt({type:ft("time").optional(),engine:Mn,frameRate:ut().optional(),duration:ut().optional(),trigger:hn.optional(),delay:ut().optional(),iterations:vt([ut(),ft("infinite")]).optional(),fillMode:dt(["forwards","backwards","both","none"]).optional(),direction:dt(["normal","reverse","alternate","alternate-reverse"]).optional()}),On={duration:ut().optional(),iterations:ut().optional(),engine:Mn,frameRate:ut().optional(),axis:dt([Mt,xt,"x","y"]).optional(),source:dt([Ot,St]).optional(),subject:ct().optional(),smoothing:ut().optional(),pin:vt([at(),jn]).optional(),range:kn.optional()},Sn=mt(a({type:ft("scroll")},On)),Nn=mt(a({type:ft("view")},On)),Pn=mt({timeline:(en=[xn,Sn,Nn],new class extends q{constructor(t,n,e){var r;super(),this.M=t,this.O=n,this.A="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.S=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.S.set(o._default,e),n.inner&&(this.N=e)}}P(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.M];return null==n?this.N:this.S.get(n)}sanitize(t){var n;return(null!=(n=this.P(t))?n:this.O[0]).sanitize(t)}isValid(t,n,e){const r=this.P(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.M];return null==n||n.errors.push(X(null!=e?e:[])+": no discriminated union member matched "+this.M+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.P(t);return n?n._canSanitize(t):this.O[0]._canSanitize(t)}}("type",en)).optional(),definitions:An.optional(),animateById:ht(pn).optional(),debugGlobalName:ct().optional(),version:ct().optional()}),zn=(mt({id:ct(),animate:pn}),vt([ct(),ut(),pt(ut()),mt({value:new class extends q{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(X(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),mn])),Cn=vt([ut(),vn,mt({value:ut()})]),Tn=vt([gt([ut(),ut()]),vn,mt({value:gt([ut(),ut()])})]),_n=vt([ct(),vn,mt({value:ct()})]),Dn=mt({translate:Tn.optional(),rotate:Cn.optional(),scale:Tn.optional(),skew:Cn.optional(),origin:Tn.optional()}),Rn=mt({copies:ut().optional(),translate:Tn.optional(),rotate:Cn.optional(),skew:Cn.optional(),scale:Tn.optional(),origin:Tn.optional()}),Ln=mt({source:ct().optional(),maskType:dt(["luminance","alpha"]).optional(),maskUnits:dt([Ft,Bt]).optional(),maskContentUnits:dt([Ft,Bt]).optional(),x:ut().optional(),y:ut().optional(),width:ut().optional(),height:ut().optional()}),Vn=mt({pathData:_n.optional()}),In=mt({offset:Cn.optional(),range:Tn.optional(),subPaths:dt([Gt.separate,Gt.combined]).optional()}),En=mt({start:ut().optional(),stretch:ut().optional(),timeCrop:gt([ut(),ut()]).optional()}),Fn=mt({without:dt([Ut.translate]).optional(),source:ct().optional(),retime:En.optional()}),Bn=mt({offset:ut(),color:ct()}),Un=vt([pt(Bn),mt({value:pt(Bn)}),vn]),Gn=mt({type:dt([Yt.linear,Yt.radial]),start:Tn.optional(),end:Tn.optional(),center:Tn.optional(),radius:Cn.optional(),focal:Tn.optional(),stops:Un.optional(),gradientUnits:dt([Ft,Bt]).optional(),spreadMethod:dt([Kt,"reflect","repeat"]).optional(),gradientTransform:ct().optional()}),Wn=Gn,Zn=mt({pathData:ct(),pathOverflow:dt(["clip","extend"]).optional(),lengthAdjust:dt(["spacing","spacingAndGlyphs"]).optional(),method:dt(["align","stretch"]).optional(),spacing:dt(["auto","exact"]).optional(),startOffset:Cn.optional(),textLength:Cn.optional()}),Jn=mt({useGlyphs:at().optional()}),Xn=mt({transformBy:Dn.optional(),repeater:Rn.optional(),maskedBy:Ln.optional(),clipPath:Vn.optional(),strokeTrim:In.optional(),clone:Fn.optional(),fillGradient:Gn.optional(),strokeGradient:Wn.optional(),textPath:Zn.optional(),text:Jn.optional()});function qn(t,n){const e=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==n?void 0:n.strict)};if(!Xn.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)e.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]"))};return r(t,"root"),e}function Qn(t,n){var e;const r=!1!==(null==n?void 0:n.strict),o={errors:[],warnings:[],strict:r},i=$n.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const n of qn(t,{strict:r}))i.includes(n)||i.push(n);const n=null==(e=Ht(t))?void 0:e.definitions;for(const e of function(t,n){if(!n||!Object.keys(n).length)return[];const e=[],r=(t,o,i,s)=>{var l,c;if(!t)return;const u="string"==typeof t.fontFamily?t.fontFamily:void 0,a=null!=u?u:i,f=s||"text"===t.type&&!!(null==(c=null==(l=t.effects)?void 0:l.text)?void 0:c.useGlyphs);if(f&&u&&!Object.prototype.hasOwnProperty.call(n,u)){const t=o+': glyph-mode text uses font-family "'+u+'", which has no entry in animator.definitions.fonts';e.includes(t)||e.push(t)}Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]",a,f))};return r(t,"root",void 0,!1),e}(t,null==n?void 0:n.fonts))i.includes(e)||i.push(e);for(const e of function(t,n){const e=[],r=(t,o)=>{if(Array.isArray(t))return void t.forEach((t,n)=>r(t,o+"["+n+"]"));if(!t||"object"!=typeof t)return;const i=t.easing;if(!("string"!=typeof i||n&&Object.prototype.hasOwnProperty.call(n,i))){const t=o+'.easing: "'+i+'" names no entry in animator.definitions.easings — it will play linear';e.includes(t)||e.push(t)}for(const[n,e]of Object.entries(t))"easing"!==n&&e&&"object"==typeof e&&r(e,o+"."+n)};return r(t,"root"),e}(t,null==n?void 0:n.easings))i.includes(e)||i.push(e);for(const n of function(t){var n;const e=null==(n=Ht(t))?void 0:n.version;return void 0===e||void 0!==wt(e)?[]:["root.animator.version: "+JSON.stringify(e)+' is not a version stamp ("a.b" or "a.b.c") — it reads as unstamped']}(t))i.includes(n)||i.push(n)}return i}var Kn=yt({type:ct(),domType:ct().optional(),textContent:ct().optional(),id:ct().optional(),meta:(new class extends q{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:Xn.optional(),animate:pn.optional(),style:vt([ct(),ht(vt([ct(),ut()]))]).optional()},zn),Yn=yt(f(a({},Kn._shape),{children:bt(()=>pt(Yn),[]).optional()}),zn),Hn=mt({width:vt([ut(),ct()]).optional(),height:vt([ut(),ct()]).optional(),viewBox:ct().optional(),animator:Pn.optional()}),$n=yt(f(a(a({},Kn._shape),Hn._shape),{type:ft("svg"),children:pt(Yn).optional()}),zn),te=(mt({v:pt(pt(ut())),i:pt(pt(ut())).optional(),o:pt(pt(ut())).optional(),c:at().optional()}),0);function ne(){return"_px_"+Date.now().toString(36)+(++te).toString(36)+Math.random().toString(36).substring(2,6)}function ee(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>ee(t));const n=t,e={};for(const t of Object.keys(n))e[t]=ee(n[t]);return e}function re(t){var n,e;const r=ee(t),o=new Map,i=new Set(["href","xlink:href"]),s=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),l=new Set(["targetId","boundElementId"]),c=(t,n)=>"source"===t&&("maskedBy"===n||"clone"===n);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=ne();o.set(t,e),n.id=e}else n.animate&&(n.id=ne());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(r),function t(n,e){if(n&&"object"==typeof n)for(const[r,u]of Object.entries(n))if("children"!==r)if("string"==typeof u)if(i.has(r)&&u.startsWith("#")){const t=u.slice(1),e=o.get(t);e&&(n[r]="#"+e)}else if(s.has(r))n[r]=oe(u,o);else if(l.has(r)||c(r,e)){const t=u.startsWith("#"),e=o.get(t?u.slice(1):u);e&&(n[r]=t?"#"+e:e)}else u.includes("url(#")&&(n[r]=oe(u,o));else if("style"===r&&"object"==typeof u&&null!==u)for(const[t,n]of Object.entries(u))"string"==typeof n&&(u[t]=oe(n,o));else"object"==typeof u&&null!==u&&t(u,r);else if(Array.isArray(u))for(const n of u)t(n)}(r);const u=null==(n=r.animator)?void 0:n.animateById;if(u&&"object"==typeof u){const t={};for(const[n,r]of Object.entries(u)){const i=n.startsWith("#"),s=i?n.slice(1):n,l=null!=(e=o.get(s))?e:s;t[i?"#"+l:l]=r}r.animator=f(a({},r.animator),{animateById:t})}return r}function oe(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var ie=new Set(["script","foreignobject"]),se=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),le=new Set(["href","xlink:href","src"]),ce=new Set(["mixBlendMode","isolation"]),ue=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,ae=/^data:image\/svg\+xml(?:;[^,]*)?,/i,fe=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,de=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function ve(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(se.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||le.has(e)&&(ue.test(t)||ae.test(t)||function(t){const n=fe.exec(t);return!!n&&de.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function me(t){const n=cn(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function ye(t){return ln(t)}function pe(t){return un(t)}function he(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(an(t)||fn(t))return!0;return!1}var ge=new WeakMap;function be(t,n,e,r){let o=ge.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=fn(t),l=an(n),c=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],u=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=U(e,c,u,r),f={P0:e,P1:c,P2:u,P3:r,C:a,T:a.ds[a.ds.length-1]};return o||(o=new WeakMap,ge.set(t,o)),o.set(n,f),f}var Ae=.5,we=5,ke=32;function je(t,n){var e,r,o;if(!he(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:Ae,c=null!=(r=null==n?void 0:n.rotationTolerance)?r:we,u=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:ke,a=[],f=me(i[0]);if(!f)return t;const d=s?function(t,n){const e=me(t),r=me(n);if(!e||!r)return 0;const o=be(t,n,e,r),i=F(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;a.push(xe(ye(i[0]),Ne(Oe(i[0]),Oe(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=me(n),o=me(e);r&&o?(s&&t>0&&ze(a,n,e,r,o,c),Te(a,n,e,r,o,s,l,c,u)):a.push(xe(ye(e),Ne(Oe(e),Oe(e),1,null!=o?o:[0,0],void 0,s)))}const v=pe(i[i.length-1]);v&&(a[a.length-1].e=v),s&&Me(a);const m={keyframes:a};return void 0!==t.loop&&(m.loop=t.loop),m}function Me(t){let n;for(const e of t){const t=cn(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}function xe(t,n){return{t:t,v:n}}function Oe(t){const n=cn(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Se(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function Ne(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Se(o,l,e))}return void 0!==o&&(s.rotate=o+Pe(t,n,e)),s}function Pe(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Se(r,o,e);return"number"==typeof i?i:0}function ze(t,n,e,r,o,i){const s=t[t.length-1],l=cn(s),c=null==l?void 0:l.rotate;if("number"!=typeof c)return;const u=Oe(n),a=c-Pe(u,u,0),f=be(n,e,r,o),d=F(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,m=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(m)<=i)return;const y=ye(n),p=Math.min(y+Ce,(y+ye(e))/2),h=Ne(Oe(n),Oe(n),0,r,v,!0);t.push(xe(p,h))}var Ce=.05;function Te(t,n,e,r,o,i,s,l,c){const u=be(n,e,r,o),a=ye(n),f=ye(e),d=pe(n),v=(m=d)?w([m[1],m[0],m[3],m[2]]):t=>t;var m;const y=Oe(n),p=Oe(e),h=function(t,n,e,r,o){const i=[];_e(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),_e(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],c={_:o-s.length};for(let o=0;o<s.length-1;o++)De(s[o],s[o+1],l,t,n,e,r,c);return l}(u,i,s,l,c),g=[];for(const t of h){const n=G(u.C,t),e=V(u.T>0?n/u.T:t,0,1),r={u:V(v(e),0,1),p:e,D:I(u.P0,u.P1,u.P2,u.P3,t)};if(i){const n=F(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let b=d,A=0;const k=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=A<1?V((e.u-A)/(1-A),0,1):1,{left:o,right:s}=j(b,r),l=0===n?k:t.length-1;o?t[l].e=o:delete t[l].e;const c=a+e.u*(f-a),u=Ne(y,p,e.p,e.D,e.rotateDeg,i);t.push(xe(c,u)),b=s,A=e.u}}function _e(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),c=2*(s-i),u=i;if(Math.abs(l)<1e-10){if(Math.abs(c)>1e-10){const t=-u/c;t>1e-6&&t<.999999&&o.push(t)}return}const a=c*c-4*l*u;if(a<0)return;const f=Math.sqrt(a),d=(-c-f)/(2*l),v=(-c+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function De(t,n,e,r,o,i,s,l){const c=(t+n)/2,u=I(r.P0,r.P1,r.P2,r.P3,t),a=I(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=I(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=I(r.P0,r.P1,r.P2,r.P3,c),m=I(r.P0,r.P1,r.P2,r.P3,t+.75*f),y=Math.max(Re(d,u,a),Re(v,u,a),Re(m,u,a));let p=!0;if(o){const e=F(r.P0,r.P1,r.P2,r.P3,t),o=F(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let c=Math.abs(i-l);c>180&&(c=360-c),c>s&&(p=!1)}y<=i&&p||l._<=0||f<1e-6?e.push(n):(l._-=1,De(t,c,e,r,o,i,s,l),De(c,n,e,r,o,i,s,l))}function Re(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}function Le(t,n){const e=Ve(t,n);return null!=e?e:t}function Ve(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Ve(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&he(e)){const o=je(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Ie=1;function Ee(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Ee(t[e],n[e]))}function Fe(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function Be(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Ue(t){return"string"==typeof t&&void 0!==Be(t)}function Ge(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const n=Be(t.pathData);return n?{paths:Fe(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Ue(n[0])){const t=[];for(const e of n){const n=Be(e);n&&t.push(...Fe(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Ue(t[0])){const n=[];for(const e of t){const t=Be(e);t&&n.push(...Fe(t))}return{paths:n}}return{paths:t}}return Ue(t)?{paths:Fe(Be(t))}:t}function We(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Ze(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Je(t,n,e,r){var o,i;return"d"===t?{paths:g(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:S.has(t)?h(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?y(n,e,r):N.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?p(n||[],e||[],r):y(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=y(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=p(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Xe(t,n,e,r){var o,i,s,l,c;const u=n.length-1,d=V(null!=(o=e.segmentCount)?o:u,1,u);let v;v=e.repeatAt===It.start?n.slice(0,d+1):n.slice(u-d);const m=null!=(i=n[0].t)?i:0,y=null!=(s=n[n.length-1].t)?s:0;let p,h;e.repeatAt===It.start?(p=0,h=m):(p=y,h=r);const g=h-p;if(g<=0)return n;const b=null!=(l=v[0].t)?l:0,A=(null!=(c=v[v.length-1].t)?c:0)-b;if(A<=0)return n;const k=v.map(t=>({R:(t.t-b)/A,v:t.v,e:t.e,tangentIn:an(t),tangentOut:fn(t)})),x=Math.floor(g/A),O=g-x*A,S=O/A,N=[],P=e.repeatAt!==It.start,z=n[n.length-1];let C,T=!1;function _(n,e,r){var o;let i;if(e){i=[];for(let t=k.length-1;t>=0;t--)i.push({R:1-k[t].R,v:k[t].v,e:t>0?M(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else i=k;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.R>s+1e-9){const o=i[e-1],l=r.R-o.R,c=(s-o.R)/l,u=o.e?w(o.e)(c):c,a=Je(t,o.v,r.v,u),{left:f}=j(o.e,c);return N.length>0&&o.R<=s&&(N[N.length-1].e=f),void N.push({t:n+s*A,v:a,e:void 0})}const l=N.length>0?N[N.length-1]:z,c=P&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.R*A))<1e-9;if(c){if(Ee(l.v,r.v)){N.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(C=r.e,T=!0);continue}N.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:n+r.R*A+(c?Ie:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),N.push(u)}}if(e.repeatAt===It.start){S>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=k.length-1;t>=0;t--)o.push({R:1-k[t].R,v:k[t].v,e:t>0?M(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else o=k;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.R<i-1e-9)continue;const s=o[e-1];if(s&&s.R<i-1e-9&&r.R>i+1e-9){const e=r.R-s.R,o=(i-s.R)/e,l=s.e?w(s.e)(o):o,c=Je(t,s.v,r.v,l),{right:u}=j(s.e,o);N.push({t:n,v:c,e:u})}const l={t:n+(r.R-i)*A,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),N.push(l)}}(p,e.direction===Et.alternate&&x%2==0,S);for(let t=0;t<x;t++){const n=x-1-t,r=e.direction===Et.alternate&&n%2==0;_(p+O+t*A,r)}}else{for(let t=0;t<x;t++){const n=e.direction===Et.alternate&&t%2==0;_(p+t*A,n)}if(S>1e-9){const t=e.direction===Et.alternate&&x%2==0;_(p+x*A,t,S)}}return e.repeatAt===It.start?[...N,...n]:T&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:C}),...N]:[...n,...N]}function qe(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=ln(n);let i=cn(n);const l=un(n);"d"===t&&(i=Ge(i));const c=D(t)?L(t):t;S.has(c)&&(i=null!=(o=O(i))?o:i);const u={t:e,v:i,e:We(l,r)},a=an(n),f=fn(n);a&&(u.tangentIn=a),f&&(u.tangentOut=f),s.push(u)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,c=!0===l?{}:l||void 0;return c&&s.length>=2?Xe(t,s,c,e):s}function Qe(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const s=D(t)?L(t):t,l=S.has(s),c=i.map(n=>{var e;const r=ln(n);let o=cn(n);"d"===t&&(o=Ge(o)),l&&(o=null!=(e=O(o))?e:o);const i={t:r,v:o,e:un(n)},s=an(n),c=fn(n);return s&&(i.tangentIn=s),c&&(i.tangentOut=c),i}),u={keyframes:Xe(t,c,o,e)};return void 0!==n.autoOrient&&(u.autoOrient=n.autoOrient),u}function Ke(t,n){const e=Ye(t,n);return null!=e?e:t}function Ye(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Ye(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=Qe(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var He=0;function $e(t,n=_t.native){const e=Ht(t)||{},r=nn(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(!e)return null;const s=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Ze(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Ze(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===s.length)return null;const l=function(t,n,e,r=_t.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=qe(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===_t.native&&"transform"===i?je(t):t}}return o}(function(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const c=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(t=>Number.isNaN(t)))return;if("translate"===t){if(c.length<1||c.length>2)return;r.translate=[c[0],null!=(n=c[1])?n:0]}else if("rotate"===t){if(1!==c.length)return;r.rotate=c[0]}else if("skewX"===t){if(1!==c.length)return;r.skew=c[0]}else{if(c.length<1||c.length>2)return;r.scale=[c[0],null!=(e=c[1])?e:c[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?a(a({},e),t):t,o=t[Jt];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>N.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const c=f(a({},l),{keyframes:l.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[s]:t.value})}))});void 0!==c.value&&(c.value=f(a({},e),{[s]:c.value}));const u=a({},t);return delete u[s],f(a({},u),{transform:c})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(s),i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},l=function(t){var n;if(!t)return;const e=null==(n=Ht(t))?void 0:n.animateById;return e?Object.entries(e).map(([t,n])=>({id:t.startsWith("#")?t.slice(1):t,animate:n})):void 0}(t);if(l)for(const t of l){const n=s(t.id,t.animate);n&&i.push(n)}const c=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++He;t.id=e;const r=s(e,n,t.transform);r&&i.push(r)}if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n]);return i}function tr(t,n,e){var r,o,i,s;const l=n.keyframes||[];if(0===l.length)return null;const{L:c,V:u}=function(t,n){var e,r;const o=t.length-1;let i=t[0],s=t[o>0?1:0];for(let l=0;l<o;l++){const c=null!=(e=t[l].t)?e:0,u=null!=(r=t[l+1].t)?r:0;if(c<=n&&n<=u){i=t[l],s=t[l+1];break}n>u&&l===o-1&&(i=t[o>0?o-1:0],s=t[o])}return{L:i,V:s}}(l,e);let a=c===u?0:(f=e,d=null!=(r=c.t)?r:0,(v=null!=(o=u.t)?o:0)===d?0:0+(f-d)/(v-d)*1);var f,d,v;a=V(a,0,1);const b=un(c);if(b&&Array.isArray(b))try{a=w(b)(a)}catch(t){}let A=D(t)?L(t):t,k=null;const j=null==c?void 0:c.v,M=null==u?void 0:u.v;if("d"===A)k=g(null!=(i=null==j?void 0:j.paths)?i:Array.isArray(j)?j:[],null!=(s=null==M?void 0:M.paths)?s:Array.isArray(M)?M:[],a).map(t=>m(t)).join("");else if(S.has(A))k=x(h(j||[0,0,0,1],M||[0,0,0,1],a)),A=t;else if("stroke-dasharray"===A)k=p(j||[],M||[],a).join(" "),A=t;else if("transform"!==A||null===j||"object"!=typeof j||Array.isArray(j))"translate"===A?(k="translate("+p(j||[0,0],M||[0,0],a).join(",")+")",A="transform"):"rotate"===A?(k="rotate("+y(+(j||0),+(M||0),a)+")",A="transform"):"scale"===A?(k="scale("+p(j||[1,1],M||[1,1],a).join(",")+")",A="transform"):k=y(+(j||0),+(M||0),a);else{const t=new Set([...j?Object.keys(j):[],...M?Object.keys(M):[]]),e={};for(const n of t){const t=null==j?void 0:j[n],r=null==M?void 0:M[n];if("rotate"===n||"skew"===n)e[n]=y(+(null!=t?t:0),+(null!=r?r:0),a);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=p(t||o,r||o,a);e[n]=i}}if(he(n)){const t=j.translate,r=M.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const s=be(t,n,e,r),l=0===s.T?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;o[t]<e?s=t+1:l=t}const c=o[l-1],u=o[l]-c,a=u>0?(e-c)/u:0;return r[l-1]+a*(r[l]-r[l-1])}(s.C,o),c=I(s.P0,s.P1,s.P2,s.P3,l);if(!i)return{translate:c};const u=F(s.P0,s.P1,s.P2,s.P3,l);return{translate:c,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}(c,u,[+t[0],+t[1]],[+r[0],+r[1]],a,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(e.rotate=o.rotateDeg)}}k=z(e,{l:!1}),A="transform"}return P.has(A)&&"number"==typeof k&&(k=100*k+"%"),{k:A,v:null===k?"":""+k}}function nr(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=tr(r,o,n);t&&(e[t.k]=t.v)}return e}function er(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(er);const n={};for(const e of Object.keys(t))n[e]=er(t[e]);return n}function rr(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function or(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function ir(t){var n;const e=or(t.x),r=or(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function sr(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function lr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function cr(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function ur(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const s=lr(t.href);if(s&&e.has(s)){const l=n.get(s);if(l)return function(t,n,e,r,o,i,s){var l,c,u,d;const v=er(n);rr(v,o);const m="symbol"===v.type?cr(v.viewBox):void 0,y=null!=(c=null!=(l=sr(t.width))?l:null==m?void 0:m[2])?c:s[0],p=null!=(d=null!=(u=sr(t.height))?u:null==m?void 0:m[3])?d:s[1],h="symbol"===v.type?function(t,n,e,r,o){const i=cr(t.viewBox),s=f(a({},t),{type:"g"});if(delete s.viewBox,delete s.preserveAspectRatio,delete s.width,delete s.height,!i)return s;const[l,c,u,d]=i,v=u>0&&d>0?Math.min(r/u,o/d):1,m=(r-u*v)/2,y=(o-d*v)/2,p=[];0===m&&0===y||p.push("translate("+m+","+y+")"),1!==v&&p.push("scale("+v+")"),0===l&&0===c||p.push("translate("+-l+","+-c+")"),p.length&&(s.transform=p.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:l,y:c,width:u,height:d}]}),s.clipPath="url(#"+h+")",s}(v,o,i,y,p):v,g=ur(h,e,r,o,i,s),b=f(a({},t),{type:"g",children:[g]});return delete b.href,delete b.width,delete b.height,ir(b)}(t,l,n,e,r,o,i)}}if(!t.children)return t;let s=!1;const l=t.children.map(t=>{const l=ur(t,n,e,r,o,i);return l!==t&&(s=!0),l});return s?f(a({},t),{children:l}):t}function ar(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function fr(t){var n,e;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(vr),autoOrient:r.autoOrient,loop:r.loop},e=null!=(n=r.value)?n:r.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const i=null!=(e=r.value)?e:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function dr(t,n,e,r){var o,i,s,l;const c=t=>(null==r?void 0:r.I)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=c(e.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},u||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(l=null!=(i=e.base)?i:null==(o=e.keyframes[0])?void 0:o.value)?l:null==(s=e.keyframes[0])?void 0:s.v;void 0!==v&&(t[n]=c(v))}function vr(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function mr(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function yr(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=hr(r,n.origin,!0),r=pr(r,"scale",n.scale),r=pr(r,"skew",n.skew),r=pr(r,"rotate",n.rotate),r=hr(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=hr(r,n.origin,!0),r=pr(r,"translate",n.translate),r=hr(r,n.origin,!1)):r=pr(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function pr(t,n,e,r){if(void 0===e)return t;const o=fr(e);if("static"===o.kind)return{type:"g",transform:{value:ar(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>mr(t,ar(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function hr(t,n,e){if(void 0===n)return t;const r=fr(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>mr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function gr(t,n){return"_lw_"+n+"_"+t.nextId++}function br(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Ar(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>Ar(t,n))}var wr=er;function kr(t,n,e){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=br(t.effects.clone.source);"string"==typeof r&&r&&!n.contentRefInnerIds.has(r)&&n.contentRefInnerIds.set(r,e(r))}null==(i=t.children)||i.forEach(t=>kr(t,n,e))}function jr(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function Mr(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function xr(t,n,e,r){if(!n)return t;const o=gr(e,"grad"),i=function(t,n){const e={type:t.type===Yt.radial?"radialGradient":"linearGradient",id:n};return t.type===Yt.linear?(Or(e,"x1","y1",t.start),Or(e,"x2","y2",t.end)):(Or(e,"cx","cy",t.center),function(t,n,e){const r=fr(e);"absent"!==r.kind&&dr(t,"r",r,{I:!0})}(e,0,t.radius),Or(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e;if(!t)return[];const r=fr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Sr):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let s=0;for(const t of o){const n=cn(t);Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const l=cn(o[0]),c=[];for(let t=0;t<s;t++){const r=null!=(e=null!=(n=null==l?void 0:l[t])?n:Nr(o,0,t))?e:{offset:t/Math.max(1,s-1),color:"#000000"};c.push({offset:r.offset,color:r.color})}return c.map((t,n)=>function(t,n,e,r,o){var i;const s=[],l=[];let c=!1;for(const r of n){const o=ln(r),u=cn(r),a=null!=(i=null==u?void 0:u[e])?i:Nr(n,n.indexOf(r),e);if(!a)continue;const f=un(r),d={time:o,value:a.color};void 0!==f&&(d.easing=f),s.push(d);const v={time:o,value:a.offset};void 0!==f&&(v.easing=f),l.push(v),a.offset!==t.offset&&(c=!0)}const u={type:"stop",offset:Pr(t.offset),stopColor:t.color},a={};return s.length&&(a.stopColor={keyframes:s},void 0!==o&&(a.stopColor.loop=o)),c&&l.length&&(a.offset={keyframes:l},void 0!==o&&(a.offset.loop=o)),Object.keys(a).length&&(u.animate=a),u}(t,o,n,0,i))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function Or(t,n,e,r){var o,i,s;const l=fr(r);if("absent"===l.kind)return;if("static"===l.kind)return t[n]=String(l.value[0]),void(t[e]=String(l.value[1]));const c=t=>{const n={keyframes:l.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==l.loop&&(n.loop=l.loop),n},u=null!=(o=t.animate)?o:{};u[n]=c(0),u[e]=c(1),t.animate=u;const a=null!=(s=l.base)?s:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Sr(t){return{type:"stop",offset:Pr(t.offset),stopColor:t.color}}function Nr(t,n,e){for(let r=n;r>=0;r--){const n=cn(t[r]);if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=cn(t[r]);if(null==n?void 0:n[e])return n[e]}}function Pr(t){return Math.round(1e3*t)/10+"%"}function zr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function Cr(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=fr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=Tr(o,"translate",n.translate,void 0),o=Tr(o,"rotate",n.rotate,r),o=Tr(o,"scale",n.scale,r),o}function Tr(t,n,e,r,o){if(void 0===e)return t;const i=fr("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:ar(n,_r(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=mr(t,ar(n,_r(n,t.value),r));return"translate"===n?a(a({},e),Dr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function _r(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Dr(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Rr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function Lr(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function Vr(t,n){let e=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Ir(o.translateKeyframes,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function Ir(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Er(t,n){var e,r,o;const i=t.transform,s=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!s)return;const l={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,s=!1,l=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,s=!0):l=!0}return l&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),s?[o,i]:void 0}(i,n);t&&(l.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(l.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(s&&Array.isArray(s.keyframes)){const t=s.keyframes,i=[];for(const s of t){const t=null!=(e=s.value)?e:s.v,l=null!=(o=null!=(r=s.time)?r:s.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}function Fr(t,n,e){if(!n)return;const r=br(n.source);if(!r)return void(n.without===Ut.translate&&e.errors.push("clone: content ref missing `source`"));const o=n.without===Ut.translate&&e.contentRefInnerIds.get(r)||r;t.href="#"+o}function Br(t,n){const e={};return void 0!==t.translate&&(e.translate=Ur(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=Ur(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=Ur(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return Ur(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function Ur(t,n,e=!1){const r=fr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=n(r.base)),o}var Gr=!1;function Wr(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var Zr=1;function Jr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Zr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Zr,value:0}],s=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[s],t.animate={opacity:{keyframes:i}}}function Xr(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function qr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function Qr(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Kr(t,n,e){const r=br(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=Yr(r,n,e,new Set);if(o)if(Gr){const n=e.idMap.get(o);t.type="g",delete t.href,t.children=[n],ir(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function Yr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.idMap.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=wr(o);if(function(t,n){rr(t,()=>gr(n,"retimed"))}(i,e),"use"===o.type?$r(i,n.start,n.stretch):Hr(i,n.start,n.stretch),Qr(i),"use"===o.type&&o.href){const s=br(o.href);if(s){const l=qr(o),c=l?Xr(Wr(l),n):n,u=new Set(r);u.add(t);const a=Yr(s,c,e,u);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var s;const l=qr(t);if("use"===t.type&&l&&t.href){const i=br(t.href);if(i){const s=Xr(Wr(l),n),c=new Set(r);c.add(o);const u=Yr(i,s,e,c);u&&(t.href="#"+u)}Qr(t)}null==(s=t.children)||s.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Hr(t,n,e){var r;$r(t,n,e),null==(r=t.children)||r.forEach(t=>Hr(t,n,e))}function $r(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var to=48,no=/[MmLlHhVvCcSsQqTtAaZz]/;function eo(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function ro(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,s=0,l=0,c=0,u=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),m=(t,n,r)=>{const s=[o,i],l=U(s,t,n,r,to);e.push({P0:s,P1:t,P2:n,P3:r,C:l,F:l.ds[l.ds.length-1]}),o=r[0],i=r[1]},y=(t,n)=>{m([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];no.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",p=t.toUpperCase();if("Z"!==p){if("M"===p){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,s=n,l=r,d=t;continue}if("L"===p)y(v()+(e?o:0),v()+(e?i:0));else if("H"===p)y(v()+(e?o:0),i);else if("V"===p)y(o,v()+(e?i:0));else if("C"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],m(t,n,r)}else if("S"===p){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-c,2*i-u]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],m(t,n,r)}else if("Q"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=eo([o,i],t,n);m(r,s,n)}else if("T"===p){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=eo([o,i],t,n);m(r,s,n)}else{if("A"!==p){r++;continue}r+=5,y(v()+(e?o:0),v()+(e?i:0))}d=t}else y(s,l),o=s,i=l,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].F;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,s=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,l=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],s=o.F>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;r[t]<n?i=t+1:s=t}const l=r[s-1],c=r[s]-l,u=c>0?(n-l)/c:0;return e[s-1]+u*(e[s]-e[s-1])}(o.C,i):0,[l,c]=I(o.P0,o.P1,o.P2,o.P3,s),[u,a]=F(o.P0,o.P1,o.P2,o.P3,s);return{x:l,y:c,angle:Math.atan2(a,u)}};return{totalLength:r,closed:s,sampleAtDistance(t){if(s&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!s&&(t<0||t>r)){const n=t<0?0:r,e=l(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return l((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var oo=.15;function io(t){const n=fr(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function so(t){let n=0,e=16;const r=t=>{var o;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(e=Math.max(e,i));const s=t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var lo=t=>Math.round(1e3*t)/1e3;function co(t,n,e){null!=e&&dr(t,n,fr(e),{I:!0})}var uo=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function ao(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function fo(t,n){let e="";for(let r=0;r<t.length;r++){const o=ao(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function vo(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var mo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function yo(t,n,e=2){const r=[];let o;for(mo.lastIndex=0;null!==(o=mo.exec(t));)r.push(o[0]);let i="",s=0;const l=()=>parseFloat(r[s++]);for(;s<r.length;){const t=r[s++];if("M"===t||"L"===t){const[r,o]=vo(n,l(),l());i+=t+fo([r,o],e)}else if("C"===t){const[t,r]=vo(n,l(),l()),[o,s]=vo(n,l(),l()),[c,u]=vo(n,l(),l());i+="C"+fo([t,r,o,s,c,u],e)}else if("Q"===t){const[t,r]=vo(n,l(),l()),[o,s]=vo(n,l(),l());i+="Q"+fo([t,r,o,s],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var po=16,ho=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Wt,"xml:space"],go=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],bo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Ao(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function wo(t){return"string"==typeof t?t:void 0}function ko(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of bo)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function jo(t,n){var e,r,o,i,s,l,c,u,a,f;const d="text"===t.type,v=t.style,m=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},y={fontFamily:null!=(e=wo(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=Ao(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(s=t.strokeWidth)?s:n.strokeWidth,letterSpacing:null!=(l=Ao(t.letterSpacing))?l:n.letterSpacing,wordSpacing:null!=(c=Ao(t.wordSpacing))?c:n.wordSpacing,opacity:null!=(u=Ao(m("opacity")))?u:n.opacity,animate:null!=(a=d?void 0:ko(t))?a:n.animate};for(const t of go){const e=null!=(f=m(t))?f:n[t];void 0!==e&&(y[t]=e)}return y}function Mo(t){var n,e,r;return{fontFamily:wo(t.fontFamily),fontSize:null!=(n=Ao(t.fontSize))?n:po,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=Ao(t.letterSpacing))?e:0,wordSpacing:null!=(r=Ao(t.wordSpacing))?r:0}}function xo(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of go)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function Oo(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function So(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var No=.6,Po="px-missing-glyph";function zo(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,s=-o,l=Math.max(1,.12*Math.min(i,s)),c="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*l||s<=2*l)return c;const u=e+l,a=r-l,f=-l,d=o+l;return c+"M"+u+" "+f+"L"+u+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function Co(t,n,e,r,o=0){const{x:i,y:s,angle:l}=t.sampleAtDistance(n),c=Math.cos(l),u=Math.sin(l),a=r/2;return[e*c,e*u,-e*u,e*c,i-e*c*a-o*u,s-e*u*a+o*c]}function To(t){var n;const e=fr(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,B:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,B:[],at:()=>r}}var _o=48,Do=64;function Ro(t,n){const e=c(10,n);return Math.round(t*e)/e}function Lo(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of go)void 0!==t[e]&&(n[e]=t[e]);return n}function Vo(t){return t?{[Zt]:Po}:{}}function Io(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.U,!!n.G]),e=yo(n.W,n.m),o=r.get(t);o?o.d+=e:r.set(t,{U:n.U,d:e,G:n.G})}const o=[];for(const{U:t,d:e,G:i}of r.values())o.push(n("path",a(a(a({d:e},Lo(t)),Vo(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function Eo(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===ho.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function Fo(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function Bo(t,n,e,r,o,i,s,l){const c=Go(r,e,o),u=Wo(e,o),a=Jo(i,c),f=Jo(s,u),d=Qo(s),v={type:"path",d:m(n)};return Xo(v,"strokeDasharray",f),Xo(v,"strokeDashoffset",a),Xo(v,"strokeOpacity",d),[v]}var Uo=1;function Go(t,n,e){const[r]=Zo(e);return e=>n*(-e-r+t)+Uo}function Wo(t,n){const[e,r]=Zo(n),o=r-e+1;return n=>{const e=V(n[0],0,1),r=V(n[1],0,1),i=Math.min(e,r),s=Math.max(e,r),l=[0];let c=Uo;for(let n=0;n<o;n++)l.push(c+i*t),l.push((s-i)*t),c=(1-s)*t;return l.push(c+Uo),l}}function Zo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Jo(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:ln(t),value:n(cn(t)),easing:un(t)})),loop:t.loop}}function Xo(t,n,e){e&&dr(t,n,e)}var qo=10;function Qo(t){const n=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return n(t.value)?{kind:"static",value:0}:void 0;const e=t.keyframes;let r=!1,o=!0;for(const t of e)n(cn(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0,l=ln(r),c=n(cn(r)),u=o?c&&n(cn(o)):c,a=s?c&&n(cn(s)):c;u&&!a?(i.push({time:l,value:0}),i.push({time:l+qo,value:1})):!u&&a&&(i.push({time:l-qo,value:1}),i.push({time:l,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Ko(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const s=e(o);if(0===s)return o;if(i*s>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function Yo(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Ho(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=$o(t,r,r+1);return t.c&&n.length>1&&(e+=$o(t,n.length-1,0)),e}function $o(t,n,e){var r,o,i,s;const l=t.v,c=l[n],u=l[e],a=U(c,null!=(o=null==(r=t.o)?void 0:r[n])?o:c,null!=(s=null==(i=t.i)?void 0:i[e])?s:u,u);return a.ds[a.ds.length-1]}var ti=.5522847498307936;function ni(t){var n,e;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:Rt(null==(n=Ht(t))?void 0:n.engine),glyphs:null==(e=nn(t))?void 0:e.fonts},o=wr(t);Ar(o,r.idMap),kr(o,r,()=>gr(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const s=br(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof s){e.add(t);const r=n.idMap.get(s);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.maskAncestorChains.set(t,r),Array.isArray(t.children)){const e=Er(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.idMap.clear(),Ar(t,n.idMap);const e=[],r=t=>{var n;qr(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var s;if(o){if(o!==t&&qr(o)&&e++,"use"===o.type&&o.href){const t=br(o.href);t&&!r.has(t)&&(r.add(t),i(n.idMap.get(t)))}null==(s=o.children)||s.forEach(i)}},s=br(t.href);s&&(r.add(s),i(n.idMap.get(s))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=qr(t);if(!e)continue;const r=e.timeCrop;Qr(t),Kr(t,Wr(e),n),r&&Jr(t,r,n)}}(t,n),t}(ei(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function ei(t,n){t.children&&(t.children=t.children.map(t=>ei(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.contentRefInnerIds.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:s,maskedBy:l,clipPath:c,strokeTrim:u,clone:d,fillGradient:v,strokeGradient:m,textPath:y,text:p}=null!=e?e:{};e&&delete t.effects;let h=t,g=!1;if(null==p?void 0:p.useGlyphs)if(y){const t="string"==typeof y.pathData?y.pathData:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:s,create:l=uo,warnings:c}=r,u=n?ro(n):null;if(!u)return null==c||c.push("textGlyphs: unparsable along-path geometry"),null;const d=So(s),{cells:v,width:m}=function(t,n,e,r){const o=[];let i=0;const s=(t,l)=>{var c,u;const a=jo(t,l),f=wo(t[Wt]);if(f&&!(null==(c=t.children)?void 0:c.length)){const t=Oo(a,n,e,r);if(t){const n=a.fontSize/t.unitsPerEm,e=null!=(u=t.ascent)?u:.9*t.unitsPerEm,r=xo(a);for(let s=0;s<f.length;s++){const l=f.charAt(s),c=t.glyphs[l];if(c&&c.pathData){const t=c.width*n;o.push({W:c.pathData,Z:c.width,scale:n,U:r,J:i+t/2}),i+=t}else if(/\S/.test(l)){const s=c&&c.width>0?c.width:No*t.unitsPerEm,l=s*n;o.push({W:zo(s,e),Z:s,scale:n,U:r,G:!0,J:i+l/2}),i+=l}else i+=(c?c.width:0)*n;i+=a.letterSpacing+(" "===l?a.wordSpacing:0)}}}if(t.children)for(const n of t.children)s(n,a)};return s(t,Mo(t)),{cells:o,width:i}}(t,s,d,c);if(!v.length)return Eo(t,[],l);const{X:y,q:p}=function(t){var n,e,r;return{X:(null!=(n=Ao(t.x))?n:0)+(null!=(e=Ao(t.dx))?e:0),q:null!=(r=Ao(t.dy))?r:0}}(t),h=To(e),g=To(o),b=t=>t>0&&m>0?t/m:1,A="clip"===i&&!u.closed;if(h.animated||g.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.B,g.B),e=(t,n)=>y+h.at(n)+b(g.at(n))*t.J,r=h.animated?h.loop:g.loop;return Eo(t,function(t,n,e,r,o,i,s,l=0){const c=Math.max(n.totalLength/_o,.5),u=t=>t>=0&&t<=n.totalLength,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.Z/2),0],m=yo(v.W,t),y=(t,e)=>{const{x:r,y:o,angle:i}=n.sampleAtDistance(t),s=Math.cos(i),c=Math.sin(i);return{time:e,value:{translate:[Ro(r-l*c,3),Ro(o+l*s,3)],rotate:Ro(180*i/Math.PI,3)}}},p=[],h=[],g=(t,n)=>{p.push(y(t,n)),s&&h.push({time:n,value:u(t)?1:0})};g(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),s=e(v,o),l=Math.min(Do,Math.max(1,Math.ceil(Math.abs(s-i)/c)));for(let t=1;t<=l;t++){const r=n+t/l*(o-n);g(e(v,r),r)}}Me(p);const b={keyframes:p};void 0!==o&&(b.loop=o);const A={transform:b};if(v.U.animate&&Object.assign(A,v.U.animate),s&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),A.opacity=t}d.push(i("path",f(a(a({d:m},Lo(v.U)),Vo(v.G)),{animate:A}),[]))}return d}(v,u,e,n,r,l,A,p),l)}const w=b(g.at(0)),k=y+h.at(0);return Eo(t,Io((A?v.filter(t=>{const n=k+t.J*w;return n>=0&&n<=u.totalLength}):v).map(t=>({W:t.W,U:t.U,G:t.G,m:Co(u,k+t.J*w,t.scale,t.Z,p)})),l,c),l)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.fonts"),null)}(h,n,t,y.startOffset,y.textLength,y.pathOverflow);e&&(h=e,g=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o;const{glyphs:i,create:s=uo,warnings:l}=n,c=So(i),u={x:null!=(e=Ao(t.x))?e:0,y:null!=(r=Ao(t.y))?r:0},a=[],f=[{start:u.x,end:u.x}];let d=0;const v=(t,n)=>{var e;const r=Oo(n,i,c,l),o=(null==r?void 0:r.unitsPerEm)||1e3,s=n.fontSize/o,v=null!=(e=null==r?void 0:r.ascent)?e:.9*o,m=xo(n);for(let e=0;e<t.length;e++){const i=t.charAt(e),l=null==r?void 0:r.glyphs[i];if(l&&l.pathData)a.push({W:l.pathData,m:[s,0,0,s,u.x,u.y],U:m,line:d,x:u.x,y:u.y,scale:s}),u.x+=l.width*s;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:No*o;a.push({W:zo(t,v),m:[s,0,0,s,u.x,u.y],U:m,G:!0,line:d,x:u.x,y:u.y,scale:s}),u.x+=t*s}else u.x+=(l?l.width:0)*s;u.x+=n.letterSpacing+(" "===i?n.wordSpacing:0),f[d].end=u.x}},m=(t,n)=>{var e,r,o;const i=jo(t,n),s=Ao(t.x),l=Ao(t.y);void 0!==s&&(u.x=s,d=f.length,f.push({start:u.x,end:u.x})),void 0!==l&&(u.y=l),u.x+=null!=(e=Ao(t.dx))?e:0,u.y+=null!=(r=Ao(t.dy))?r:0;const c=wo(t[Wt]);if(c&&!(null==(o=t.children)?void 0:o.length)&&v(c,i),t.children)for(const n of t.children)m(n,i)},y=Mo(t);if(t.children)for(const n of t.children)m(n,y);const p=wo(t[Wt]);p&&!(null==(o=t.children)?void 0:o.length)&&v(p,y);const h=wo(t.textAnchor);if("middle"===h||"end"===h)for(const t of a){const n=f[t.line].end-f[t.line].start,e="middle"===h?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return Eo(t,Io(a,s,l),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(h,p,n),g=!0;return g||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.pathData||!n.pathData)return t;const o=gr(e,"tpath"),{d:i,startShift:s}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,startShift:0};const r=ro(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=oo*o,s=io(n.startOffset),l=io(n.textLength).max||(null!=(e=n.advance)?e:0),c=Math.max(0,-s.min),u=Math.max(0,s.max+l-o),a=c>0?c+i:0,f=u>0?u+i:0;if(f<=0&&a<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),v=r.sampleAtDistance(o);let m=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+lo(n)+","+lo(e)+"L"+lo(d.x)+","+lo(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;m+="L"+lo(t)+","+lo(n)}return{d:m,startShift:a}}(n.pathData,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:so(t)});e.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(l.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(l.method=n.method),void 0!==n.spacing&&(l.spacing=n.spacing),co(l,"startOffset",function(t,n){if(!n||null==t)return t;const e=fr(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.base&&(r.value=e.base+n),r}(n.startOffset,s)),co(l,"textLength",n.textLength),t.children=[l],t}(h,y,n)),h=function(t,n,e){return xr(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return xr(t,n,e,"stroke")}(h,m,n),h=function(t,n){if(!n)return t;const e=n.subPaths===Gt.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,s,l,c,u,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),s=Number(null!=(e=t.y)?e:0),l=Number(null!=(r=t.width)?r:0),c=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+s+"L"+(i+l)+","+(s+c)+"L"+i+","+(s+c)+"L"+i+","+s+"L"+(i+l)+","+s+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(s=t.cy)?s:0),r="circle"===t.type?Number(null!=(l=t.r)?l:0):Number(null!=(c=t.rx)?c:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*ti,d=o*ti,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=Fe(n);if(!e.length)return;const i={leaf:t,K:[]};for(const t of e){const n=Ho(t);i.K.push({Y:t,H:n,$:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const s=e?[...r].reverse():r;for(const t of s)for(const n of t.K)e||(i=0),n.$=i,i+=n.H;const l=i;if(e&&l<.001)return t;const c=fr(n.offset),u="absent"===c.kind?{kind:"static",value:0}:c,d=function(t){const n=fr(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>({time:ln(t),value:cn(t),easing:un(t)}));if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Ko(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let s=0;for(const t of e){for(;s<o.length&&o[s]<t.time;){const t=o[s++],n=Yo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;s<o.length;){const t=o[s++],n=Yo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,m=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const e of t.keyframes){const t=cn(e);"number"==typeof t&&n.push(t)}return n}(u),y=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===r.length&&r[0].leaf===t&&1===r[0].K.length){const n=r[0],o=n.K[0],i=e?l:o.H;if(i<.001)return t;const s=e?o.$/i:0;return function(t,n,e,r,o,i){const s=Go(e,n,r),l=Wo(n,r),c=a({},t);return delete c.effects,Xo(c,"strokeDasharray",Jo(i,l)),Xo(c,"strokeDashoffset",Jo(o,s)),Xo(c,"strokeOpacity",Qo(i)),c}(n.leaf,i,s,y,u,v)}const p=new Map;for(const t of r){const n=[];for(const r of t.K){const o=e?l:r.H;if(o<.001)continue;const i=e?r.$/o:0;n.push(...Bo(t.leaf,r.Y,o,i,y,u,v))}p.set(t.leaf,Fo(t.leaf,n))}const h=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,u),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const s=t.transform,l=null==(o=t.animate)?void 0:o.transform,c=wr(t);delete c.transform,c.animate&&(delete c.animate.transform,0===Object.keys(c.animate).length&&delete c.animate),delete c.id;const u=[c];for(let t=1;t<i;t++){const e=wr(c),r=Br(n,t),o=r?yr(e,r):e;u.push(o)}const a={type:"g",children:u};return t.id&&(a.id=t.id),void 0!==s&&(a.transform=s),void 0!==l&&(a.animate={transform:l}),a}(h,s,n),h=function(t,n,e,r){if(!n)return t;const o=br(n.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=gr(r,"mask");let s={type:"use",href:"#"+o};if(e)s=Cr(s,e,r);else if(Rr(t))s=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const s=[],l=[],c=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=mr(t,void 0);if(Array.isArray(n.translate)&&s.push(f(a(a({},r),Dr(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),l.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),c.push(f(a({},r),{value:t}))}}const u=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==u&&(n.loop=u),n};let v=t;return s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),c.length&&(v={type:"g",animate:{transform:d(c)},children:[v]}),v}(s,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,s,l,c,u,a,f,d,v;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let y;const p=[];for(;null!==(y=m.exec(t));){const t=y[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);p.push({name:y[1],tt:t})}if(!p.length)return;const h=p[p.length-1];if("translate"===h.name)for(let t=p.length-2;t>=0;t--){const a=p[t];if("translate"!==a.name)continue;const f=null!=(n=a.tt[0])?n:0,d=null!=(e=a.tt[1])?e:0,v=null!=(r=h.tt[0])?r:0,m=null!=(o=h.tt[1])?o:0;if(v!==-f||m!==-d)continue;const y={};y.origin=[f,d];for(let n=0;n<t;n++)if("translate"===p[n].name){const t=null!=(i=p[n].tt[0])?i:0,e=null!=(s=p[n].tt[1])?s:0;y.translate=y.translate?[y.translate[0]+t,y.translate[1]+e]:[t,e]}for(let n=t+1;n<p.length-1;n++){const t=p[n];if("rotate"===t.name)y.rotate=(null!=(l=y.rotate)?l:0)+(null!=(c=t.tt[0])?c:0);else if("scale"===t.name){const n=null!=(u=t.tt[0])?u:1,e=t.tt.length>1?t.tt[1]:n;y.scale=y.scale?[y.scale[0]*n,y.scale[1]*e]:[n,e]}}return y}let g,b,A;for(const t of p)if("translate"===t.name){const n=null!=(a=t.tt[0])?a:0,e=null!=(f=t.tt[1])?f:0;g=g?[g[0]+n,g[1]+e]:[n,e]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.tt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.tt[0])?v:1,e=t.tt.length>1?t.tt[1]:n;A=A?[A[0]*n,A[1]*e]:[n,e]}const w={};return g&&(w.translate=g),void 0!==b&&(w.rotate=b),A&&(w.scale=A),Object.keys(w).length?w:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(s=Cr(s,n,r))}const l=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Rr(t)}(t);s=function(t,n,e,r,o){const i=r.idMap.get(e),s=r.maskAncestorChains.get(n)||[],l=o?Er(n,r):void 0,c=l?[...s,l]:s,u=i&&r.maskAncestorChains.get(i)||[];if(!c.length&&!u.length)return t;const a=new Set;for(const t of c)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);for(const t of u)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);if(!(a.size>0)){const n=Lr(c),e=Lr(u),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=Vr(c,t),e=Vr(u,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(s,t,o,r,l);const c={type:"mask",id:i,children:[s]};return n.maskType&&(c.maskType=n.maskType),n.maskUnits&&(c.maskUnits=n.maskUnits),n.maskContentUnits&&(c.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(c.x=String(n.x)),void 0!==n.y&&(c.y=String(n.y)),void 0!==n.width&&(c.width=String(n.width)),void 0!==n.height&&(c.height=String(n.height)),r.defs.push(c),t.mask="url(#"+i+")",t}(h,l,i,n),h=function(t,n,e){if(!(null==n?void 0:n.pathData))return t;const r=gr(e,"clip"),o={type:"path"},i=fr(n.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=zr(i.value):(dr(o,"d",i),void 0!==o.d&&(o.d=zr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,c,n),o?(Fr(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let s=!1;const l=null==(e=t.animate)?void 0:e.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const n=l.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=Mr(l),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const c=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),u=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!c||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(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 n={keyframes:u};void 0!==o&&(n.loop=o),t.animate.transform=n}s=!0}}const c=void 0!==(null==n?void 0:n.translate),u=s||c,f=s&&Mr((null==(r=t.animate)?void 0:r.transform)||void 0)||s&&Mr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],nt:r[0]});if(!n.length)return{et:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=jr(i.nt),r=jr(o.nt),s=-e[0],l=-e[1],c=r[0]-s,u=r[1]-l;return 0===c&&0===u?{et:t}:{translate:"translate("+c+","+u+")",et:"translate("+s+","+l+")"+n.slice(1).map(t=>t.nt).join("")}}if("translate"===i.name)return{et:t};const s=[];let l=0;for(;l<n.length&&"translate"===n[l].name;)s.push(n[l].nt),l++;if(!s.length)return{et:t};const c=n.slice(l).map(t=>t.nt).join("");return{translate:s.join(""),et:c||void 0}}(t.transform);u?void 0!==n.translate?n.et?t.transform=n.et:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.et?t.transform=n.et:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;u||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{rt:i,inner:s}=function(t){if(!t)return{};const n=Mr(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{rt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let l=t;l=yr(l,s);let c={type:"g",id:e,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(c.transform=o.transform),void 0!==o.animate&&(c.animate=o.animate),i&&(delete c.id,c=yr(c,i),c.id=e),c}(h,i,r,o)):h=function(t,n,e,r){return Fr(t,n,r),yr(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.idMap.set(r,h),h}function ri(t,n,e,r,o){const i=1-o,s=i*i*i,l=3*i*i*o,c=3*i*o*o,u=o*o*o;return[s*t[0]+l*n[0]+c*e[0]+u*r[0],s*t[1]+l*n[1]+c*e[1]+u*r[1]]}function oi(t,n,e,r,o=64){let i=0,s=t;for(let l=1;l<=o;l++){const c=ri(t,n,e,r,l/o);i+=Math.hypot(c[0]-s[0],c[1]-s[1]),s=c}return i}var ii=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function si(t,n,e){var r,o;let i=ni(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=cn(o[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];for(const t of o){const e=cn(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(!o.some(t=>an(t)||fn(t)))return;let c="M"+ii(l[0][0])+","+ii(l[0][1]);const u=[];for(let t=0;t<l.length-1;t++){const n=l[t],i=l[t+1],s=null!=(e=fn(o[t]))?e:[0,0],a=null!=(r=an(o[t+1]))?r:[0,0],f=[n[0]+s[0],n[1]+s[1]],d=[i[0]+a[0],i[1]+a[1]];c+="C"+ii(f[0])+","+ii(f[1])+","+ii(d[0])+","+ii(d[1])+","+ii(i[0])+","+ii(i[1]),u.push(oi(n,f,d,i))}const a=u.reduce((t,n)=>t+n,0);if(!(a>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const n={t:ln(o[t]),v:d/a},e=un(o[t]);void 0!==e&&(n.e=e),f.push(n)}return{ot:c,it:f,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e[Jt];const s={keyframes:n.it};void 0!==i.loop&&(s.loop=i.loop),e[Xt]=s;const l=t.transform;let c=l;if(l&&"object"==typeof l){const t=a({},l);delete t[Qt.translate],delete t[Qt.origin],c=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.ot+"')",offsetAnchor:ii(n.anchor[0])+"px "+ii(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==c?r.transform=c:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=Ke(i,null!=(o=null==(r=Ht(i))?void 0:r.duration)?o:T),n===_t.native&&(i=Le(i,null==e?void 0:e.motionPath),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let s=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){s=!0;break}if(!s&&t.children)for(const n of t.children)if(o(n,r)){s=!0;break}if(!s&&"use"===t.type&&"string"==typeof t.href){const e=lr(t.href),i=e?n.get(e):void 0;i&&(s=o(i,r))}return r.delete(t),e.set(t,s),s};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=cr(t.viewBox);if(n)return[n[2],n[3]];const e=sr(t.width),r=sr(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),s=[],l=ur(t,e,r,()=>"_lw_use_mat_"+ ++o,s,i);if(0===s.length)return l;const c={type:"defs",children:s},u=[...null!=(n=l.children)?n:[],c];return f(a({},l),{children:u})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}var li="setPlaybackRate: rate must be finite and non-zero";function ci(t){return Number.isFinite(t)&&0!==t}function ui(t,n){return t>0?n===1/0?t:t*(n>0?n:1):0}function ai(t,n){return Number.isNaN(t)||t<0?0:Number.isFinite(n)?t>n?n:t:Number.isFinite(t)?t:0}function fi(t,n,e){const r=ui(n,e);return r>0&&Number.isFinite(t)?t<=0?0:e===1/0?t%r/r:t>=r?1:t/r:0}function di(t,n,e){const r=ui(n,e);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function vi(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}var mi={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"};function yi(t,n){return!!t&&(!0===t||t.includes(n))}function pi(t,n){const e=n?n+" ":"";return{warn:(n,r,o)=>{if(null==t?void 0:t.onWarn)return void t.onWarn({kind:n,message:r,detail:o});if(yi(null==t?void 0:t.silent,n))return;const i=e+n+": "+r;void 0===o?console.warn(i):console.warn(i,o)},error:(n,r)=>{const o=function(t){return"string"==typeof t?new Error(t):t}(r);(null==t?void 0:t.onError)?t.onError({kind:n,message:o.message,error:o}):yi(null==t?void 0:t.silent,n)||console.error(e+n+": "+o.message)}}}var hi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],gi=["definitions","animateById"],bi=t=>!!t&&"object"==typeof t&&!Array.isArray(t),Ai=t=>bi(t)&&"string"==typeof t.type?t.type:"time",wi=t=>"scroll"===t||"view"===t;function ki(t,n){const e=bi(t)?a({},t):{};for(const t of Object.keys(n)){const r=n[t];null!==r?bi(r)?e[t]=ki(e[t],r):e[t]=r:delete e[t]}return e}function ji(t,n,e){const r=Ai(t),o=bi(n)&&"string"==typeof n.type?String(n.type):r;let i;if(o!==r){const e={};if(bi(t))for(const n of zt)void 0!==t[n]&&(e[n]=t[n]);i=ki(e,n)}else i=ki(t,n);if(wi(o)){for(const t of Ct)void 0!==i[t]&&(e("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(e("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}var Mi=6;function xi(t,n,e){const r=null!=e?e:pi(void 0,"[PxAnimator]"),o=[],i=()=>{for(const t of o.splice(0))t()},{startOn:s,outAction:l,scrollIntoViewThreshold:c}={startOn:null!=(a=null==(u=n)?void 0:u.startOn)?a:Vt.startOn,outAction:null!=(f=null==u?void 0:u.outAction)?f:Vt.outAction,scrollIntoViewThreshold:null!=(d=null==u?void 0:u.scrollIntoViewThreshold)?d:Vt.scrollIntoViewThreshold};var u,a,f,d;const v=t.getRootElement();if(!v)return r.warn(mi.host,"setupAnimationTriggers: No root element found for animation."),i;let m=!1;const y=()=>{m&&(m=!1,t.setPlaybackRate(1)),t.play()},p=()=>{switch(l){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":m=!0,t.setPlaybackRate(-1),t.play()}};switch(s){case"load":{const t=()=>y();"complete"===document.readyState?t():(window.addEventListener("load",t,{once:!0}),o.push(()=>window.removeEventListener("load",t)));break}case"mouseOver":{let t=!1;const n=()=>{t=!0,y()},e=()=>{t&&p()};v.addEventListener("mouseenter",n),v.addEventListener("mouseleave",e),o.push(()=>{v.removeEventListener("mouseenter",n),v.removeEventListener("mouseleave",e)});break}case"click":{const n=()=>{t.isPlaying()?p():y()};v.addEventListener("click",n),o.push(()=>v.removeEventListener("click",n));break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),c=Math.min(r.height,Number.isFinite(l)?l:r.height);return c>0?o.height/c:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;const r=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=c?(e=!0,y()):e&&(e=!1,p())})},{threshold:n});r.observe(v),o.push(()=>r.disconnect());break}}return i}function Oi(t){return"#"+t}function Si(t,n,e,r){var o;const i=Ht(t)||{},s=pi(e,"[PxAnimator]");if(!r)if(t.id){const n=Oi(t.id);(r=document.querySelector(n))||s.warn(mi.host,"createFrameLoopAnimator: No root element found for selector: "+n)}else s.warn(mi.host,"createFrameLoopAnimator: No root element provided");const l=function(t,n,e){var r;const o=Ht(t)||{},i=$e(t,_t.js),s=o.iterations;let l=1;"number"==typeof s&&(l=s||1),"infinite"===s&&(l=1/0),l<1&&(l=1);const c=+(o.duration||T),u=c&&l?c*(l===1/0?1/0:l):c?(null!=l?l:1)*c:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let m=null,y=!1,p=-(o.delay||0),h=0,g=1,b=!1;const A=o.frameRate,w=A&&A>0?1e3/A:0;let k=0;const j=()=>{const t=h?(Date.now()-h)*g:0;return p+t},M=()=>{let t=j();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function x(t){let e=function(){const n=c>0?c:1;let e=0,r=0;c>0?(t=V(t,0,l*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,l-1),e=V((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=nr(r,e*c);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(M()):v&&x(0));const O=()=>!!y&&!!n.isConnected()&&(g<0?j()>0:!(Number.isFinite(u)&&M()>=u)),S=t=>{null!==m&&(vi(m),m=null),(t||O())&&(m=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=M(),i=j();if(i<0&&g>0)v&&x(0);else{if(g<0&&i<=0)return N(),x(0),void(b||(b=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(g>0&&u&&Number.isFinite(u)&&o>=u)return N(),x(d?u:0),void(b||(b=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(w>0){const t=Date.now();if(k&&t-k<w)return;k=t}x(o)}})(),S()}))},N=()=>{if(!y)return;let t=j();Number.isFinite(u)&&t>u&&(t=u),p=t,h=0,y=!1,null!==m&&(vi(m),m=null),t>=0?x(t):v&&x(0)},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!y){if(g>=0)Number.isFinite(u)&&p>=u&&(p=0);else if(p<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=u}b=!1,y=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;N(),p=0,h=0,y=!1,b=!1,x(p),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{((t=!0)=>{var n;p=Number.isFinite(u)?u:M(),h=0,y=!1,null!==m&&(vi(m),m=null),x(d?p:0),t&&!b&&(b=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!ci(t))return void console.warn(li);let n=j();Number.isFinite(u)&&n>u&&(n=u),t<0!=g<0&&(b=!1),g=t,p=n,y&&(h=Date.now())},getCurrentTime:()=>M(),setCurrentTime:t=>{t=ai(t,u),p=t,y&&(h=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),x(M())},getCurrentProgress:()=>fi(M(),c,l),setCurrentProgress:t=>{P.setCurrentTime(di(t,c,l))},destroy:()=>{var t;P.cancel(),null==(t=null==e?void 0:e.onRemove)||t.call(e)}};return P}(t,n||function(t,n){const e=new Set,r=null!=n?n:pi(void 0,"[PxAnimator]");return{isConnected:()=>!t||t.isConnected,setAttribute:(n,o,i)=>{o=L(o);const s=Oi(n),l=(null==t?void 0:t.querySelectorAll(s))||document.querySelectorAll(s);0!==l.length||e.has(s)||(e.add(s),r.warn(mi.host,'setAttribute: No elements found for selector "'+s+'"'));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===o&&"pattern"===n.tagName?"patternTransform":o;n.setAttribute(e,i),C.has(o)&&(n.style[o]=i)}}}}(r,s),e),c=f(a({},l),{getRootElement:()=>r||null});if(W(i))i.trigger&&s.warn(mi.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=xi(c,null!=(o=i.trigger)?o:{},s),n=c.destroy.bind(c);c.destroy=()=>{t(),n()}}return c}function Ni(t,n,e,r){let o=cn(t);const i=un(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,c=e;return S.has(e)&&Array.isArray(o)?l=x(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?N.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",c="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>m(t,!0)).join("")+'")':P.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=z(o,{l:!0}),c="transform"),CSS.supports(L(c),l)||r.add(c),c=_(c),s[c]=l,s}function Pi(t,n,e){var r,o,i,s,l;const c=[];for(let u=0;u<n.length;u++){const d=n[u],v=null!=(r=d.t)?r:0;if(v<0){const e=n[u+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?w(d.e)(n):n,{right:o}=j(d.e,n);c.push({t:0,v:Je(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[u-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?w(r.e)(o):o,{left:s}=j(r.e,o);c.length>0&&(c[c.length-1]=f(a({},c[c.length-1]),{e:s})),c.push({t:e,v:Je(t,r.v,d.v,i),e:void 0})}break}c.push(d)}return c}function zi(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=Pi(i,s.keyframes||[],t),c=[];for(let e=0;e<l.length;e++){const o=l[e],s=Ni(o,V((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&c.push(f(a({},s),{offset:0})),c.push(s)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(f(a({},c[c.length-1]),{offset:1})),c.length>0&&o.set(i,c)}return o}function Ci(t,n,e,r,o){var i,s;const l=Ht(t)||{},c=pi(n,"[PxAnimator]");if(!e)if(t.id){const n=Oi(t.id);(e=document.querySelector(n))||c.warn(mi.host,"createWebApiAnimator: No root element found for selector: "+n)}else c.warn(mi.host,"createWebApiAnimator: No root element provided");const u=$e(t,_t.native),a=[],f=l.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let m=!1,y=!1;(null==u?void 0:u.length)||c.warn(mi.document,"createWebApiAnimator: No animation bindings defined");for(const t of u||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){c.warn(mi.document,"createWebApiAnimator: Empty or unresolved binding",t);continue}const s=Oi(t.id),u=(null==e?void 0:e.querySelectorAll(s))||document.querySelectorAll(s);0===u.length&&c.warn(mi.host,'createWebApiAnimator: No elements found for selector "'+s+'"');const f=zi(r,v,l),p=l.delay&&l.delay>0?l.delay:void 0;let h;if(l.delay&&l.delay<0&&l.duration){const t=-l.delay;h=d===1/0?t%l.duration:Math.min(t,l.duration*(null!=d?d:1))}const g={duration:l.duration,delay:p,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:d};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of f)if(t.length>0)try{const r=new KeyframeEffect(e,t,g),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;m||(m=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;y||(y=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==h&&(i.currentTime=h),a.push(i)}catch(t){c.warn(mi.internal,"createWebApiAnimator: could not build the animation",t)}}}if(!r&&v.size)return c.warn(mi.platform,"Unsupported CSS attrs: "+[...v].join(", ")),null;const p={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=a[0])?void 0:t.playState)},play:()=>{var t;m=!1,a.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;a.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;m=!1,a.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of a)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>ci(t)?(a.forEach(n=>n.playbackRate=t),p):(c.warn(mi.usage,li),p),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=a[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{var n;const e=function(t,n){return t>0?n===1/0?1/0:t*(n>0?n:1):0}(null!=(n=l.duration)?n:0,null!=d?d:1),r=e>0?ai(t,e):Math.max(0,t);m=!1,a.forEach(t=>{t.currentTime=r})},getCurrentProgress:()=>{var t;const n=p.getCurrentTime();return null===n?null:fi(n,null!=(t=l.duration)?t:0,null!=d?d:1)},setCurrentProgress:t=>{var n;p.setCurrentTime(di(t,null!=(n=l.duration)?n:0,null!=d?d:1))},destroy:()=>{var t;p.cancel(),a.splice(0,a.length),y||(y=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};if("scroll"===l.timelineSource)l.trigger&&c.warn(mi.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=xi(p,null!=(s=l.trigger)?s:{},c),n=p.destroy.bind(p);p.destroy=()=>{t(),n()}}return o&&a.forEach(t=>t.play()),p}function Ti(t,n,e){var r,o,i;const s="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*s);if(void 0!==l)return e?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function _i(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function Di(){return document.scrollingElement||document.documentElement}var Ri="parent",Li="scroller";function Vi(t,n,e){var r,o;const i=null!=e?e:pi(void 0,"[PxAnimator]"),s=null==n?void 0:n.trim();if(!s)return t;if(s===Ri){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(o=null!=(r=null==n?void 0:n.parentElement)?r:t.parentElement)?o:t}if(s===Li)return _i(t,"y")||_i(t,"x")||Di();let l=null;try{l=document.querySelector(s)}catch(n){return i.warn(mi.document,'scroll timeline: subject "'+s+'" is not a valid selector — measuring the SVG itself'),t}return l||(i.warn(mi.host,'scroll timeline: subject "'+s+'" matched no element — measuring the SVG itself'),t)}function Ii(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const s="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,l=()=>{var e;const o=null!=(e=n.pinOffset)?e:0;if(!s)return void(r.top=o+"px");const i=function(t){const n=_i(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),l=t.getBoundingClientRect().height;r.top=Math.round((i-l)*s+o)+"px"};l();let c=null;const u=s?l:null;s&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(c=new ResizeObserver(l),c.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==c||c.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function Ei(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var Fi="http://www.w3.org/2000/svg";function Bi(t,n,e){if(!t)return null;const r=t,{type:o,children:i,style:s}=r,l=d(r,["type","children","style"]),c=l.domType;void 0!==c&&delete l.domType;const u=nn(t)||n,a=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(s,u);let f;if(i)for(const t of i){const n=Bi(t,u,e);n&&(f||(f=[]),f.push(n))}const v=function(t,n,e,r,o,i){if(ie.has(t.toLowerCase()))return(null!=i?i:pi(void 0,"[PxAnimator]")).warn(mi.document,"SVG tag blocked (dangerous): "+t),null;const s=document.createElementNS(Fi,t);for(const t in n){const e=ve(t,n[t]);void 0!==e&&(ce.has(t)?s.style[t]=String(e):s.setAttribute(L(t),e))}if(e)for(const t in e)s.style[t]=String(e[t]);if(null==r?void 0:r.length)for(const t of r)s.appendChild(t);else o&&(s.textContent=o);return s}(o||"g",function(t){const n={};for(const e of Object.keys(t)){const r=_(e);if(qt.has(r))continue;if("style"===r)continue;let o=t[e];if(S.has(r)&&Array.isArray(o))n[r]=x(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)N.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n[Jt]=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n[Jt]=z(t,{l:!1})}}return n}(l),a,f,l[Wt],e);return v&&void 0!==c&&v.setAttribute("type",c),v}var Ui,Gi="doc";function Wi(t,n,e,r,o,i){const s=pi(e,"[PxAnimator]"),l=qn(t);for(const t of l)s.warn(mi.document,"effects shape: "+t);if(function(t){const{problems:n}=function(t){try{return{problems:Qn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const e=n.slice(0,Mi),r=n.length-e.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+e.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const n=function(t,n,e){var r,o;const i=!!(null==e?void 0:e.st);if(!t||void 0===n||!(i||null!==n&&bi(n)&&Object.keys(n).length))return{doc:t,warnings:[]};const s=t,l=bi(s.animator),c=!l&&bi(null==(r=s.meta)?void 0:r.animator),u=l?s.animator:c?s.meta.animator:void 0,d=[];l&&bi(null==(o=s.meta)?void 0:o.animator)&&d.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let v=u;if(i){const t={};for(const n of gi)bi(u)&&void 0!==u[n]&&(t[n]=u[n]);v=t}const m=function(t,n){const e=[],r=t=>e.push(t);if(null===n)return{config:void 0,warnings:e};if(!bi(n)||0===Object.keys(n).length)return{config:t,warnings:e};const o=bi(t)?hi.filter(n=>void 0!==t[n]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=bi(t)?a({},t):{};for(const t of Object.keys(n)){const e=n[t];null!==e?"timeline"!==t?bi(e)?i[t]=ki(i[t],e):i[t]=e:i.timeline=bi(e)?ji(i.timeline,e,r):e:delete i[t]}return{config:i,warnings:e}}(v,null!=n?n:{});return d.push(...m.warnings),m.config===u?{doc:t,warnings:d}:c?{doc:f(a({},s),{meta:f(a({},s.meta),{animator:m.config})}),warnings:d}:{doc:f(a({},s),{animator:m.config}),warnings:d}}(t,null!=o?o:{},{st:!!i});for(const t of n.warnings)s.warn(mi.usage,"timeline override: "+t);t=n.doc}t=si(t,Rt((Ht(t)||{}).engine));let c=null;if(r){t=re(t);const n="string"==typeof r?document.querySelector(r):r;n&&(c=Bi(t,void 0,s),c&&n.replaceChildren(c))}const u=function(t,n,e,r){return function(t,n,e,r){const o=Ht(t)||{},i=pi(e,"[PxAnimator]");return W(o)?Ei(o,e,e=>{var s;let l=()=>{};if(o.engine!==Dt.js&&r){l=Ii(r,o.scroll);const n=function(t,n,e){var r,o,i,s;const l=null!=e?e:pi(void 0,"[PxAnimator]");if(!n||!W(n))return null;const c=n.scroll||{},u=null!=(r=c.kind)?r:"view";if(c.smoothing)return l.warn(mi.platform,"scroll timeline: `smoothing` needs the built-in driver — using the built-in driver instead of the browser timeline"),null;const a=globalThis,f="view"===u,d=f?a.ViewTimeline:a.ScrollTimeline;if("function"!=typeof d)return null;const v=null!=(o=c.axis)?o:"block";let m;try{m=new d(f?{subject:Vi(t,c.subject,l),axis:v}:{source:"root"===c.source?Di():_i(t,"y")||_i(t,"x")||Di(),axis:v})}catch(t){return l.warn(mi.platform,"scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:m,rangeStart:Ti(null==(i=c.range)?void 0:i.start,0,f),rangeEnd:Ti(null==(s=c.range)?void 0:s.end,1,f)}}(r,o,i);if(n){const i=Ci(t,e,r,Lt(o.engine),n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{l(),t()},i}}l(),l=()=>{}}const c=(o.engine!==Dt.js?Ci(t,e,r,Lt(o.engine)):null)||Si(t,n,e,r),u=(null==(s=c.getRootElement)?void 0:s.call(c))||r;if(u){l=Ii(u,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:T)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),n=function(t,n,e,r){var o,i;if(!n||!W(n))return null;const s=null!=r?r:pi(void 0,"[PxAnimator]"),l=n.scroll||{},c=null!=(o=l.kind)?o:"view",u=Vi(t,l.subject,s),a=_i(t,"y")||_i(t,"x"),f="scroll"===c&&"root"===l.source?Di():a||Di(),d=f===Di(),v=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(l.axis,getComputedStyle(f).writingMode),m=()=>{if("scroll"===c)return function(t,n,e){var r,o;const i=n>0?V(t/n,0,1):1,s="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,l="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return l<=s?i>=l?1:0:V((i-s)/(l-s),0,1)}("y"===v?f.scrollTop:f.scrollLeft,"y"===v?f.scrollHeight-f.clientHeight:f.scrollWidth-f.clientWidth,l.range);const t=u.getBoundingClientRect();let n,e;if(d)n=0,e="y"===v?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=f.getBoundingClientRect();n="y"===v?t.top:t.left,e="y"===v?f.clientHeight:f.clientWidth}return function(t,n,e,r){const o=e-t,i=J(null==r?void 0:r.start,0,n,e),s=J(null==r?void 0:r.end,1,n,e);return s<=i?o>=s?1:0:V((o-i)/(s-i),0,1)}(("y"===v?t.top:t.left)-n,"y"===v?t.height:t.width,e,l.range)},y=Math.max(0,null!=(i=l.smoothing)?i:0)/1e3;let p=!1,h=null,g=null,b=0,A=null;const w=()=>{A=null,p||(t=>{if(!y)return void e(t);if(null===h)return h=t,void e(t);if(null!==g)return;b=0;const n=t=>{if(g=null,p)return;const r=b?Math.min(.1,(t-b)/1e3):1/60;b=t;const o=m(),i=1-Math.exp(-r/y);h+=(o-h)*i,Math.abs(o-h)<.001&&(h=o),e(h),h!==o&&(g=requestAnimationFrame(n))};g=requestAnimationFrame(n)})(m())},k=()=>{p||null!==A||(A=requestAnimationFrame(w))},j=d?window:f;let M;j.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(k),M.observe(u),u!==t&&M.observe(t),d||M.observe(f));const x={destroy:()=>{p||(p=!0,j.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==M||M.disconnect(),null!==A&&(cancelAnimationFrame(A),A=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{p||(h=m(),e(h))}};return x.refresh(),x}(u,o,n=>c.setCurrentTime(n*t),i);if(n){const t=c.destroy.bind(c);c.destroy=()=>{n.destroy(),l(),t()}}}else i.warn(mi.host,"scroll timeline: no root element to observe — animation will stay at frame 0");var a;return c}):Ei(o,e,e=>o.engine===Dt.js?Si(t,n,e,r):Ci(t,e,r,Lt(o.engine))||Si(t,n,e,r))}(t,n,e,r)}(t,n,e,c);if(r&&c){const t=c,n=u.destroy.bind(u);u.destroy=()=>{n(),t.remove()}}return u}function Zi(t){const{src:n,doc:e,adapter:r,container:o,resetTimeline:i}=t,s=function(t){const{timeline:n,duration:e,delay:r,iterations:o,startOn:i}=t;return function(t,n){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.warn("timeline override: not valid JSON — ignored",t),e=void 0}else e=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:s}=n;if(void 0===r&&void 0===o&&void 0===i&&void 0===s)return void 0===e?void 0:{timeline:e};const l=bi(e)?a({},e):{};return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==s&&(l.trigger=f(a({},l.trigger),{startOn:s})),{timeline:l}}(n,{duration:e,delay:r,iterations:o,startOn:i})}(t),l=function(t){const{onPlay:n,onPause:e,onCancel:r,onFinish:o,onRemove:i,onStop:s,onWarn:l,onError:c,silent:u}=null!=t?t:{},a=t=>t||s?()=>{null==t||t(),null==s||s()}:void 0;return{onPlay:n,onPause:a(e),onCancel:a(r),onFinish:a(o),onRemove:a(i),onWarn:l,onError:c,silent:u}}(t);if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `doc`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `doc` is required");if(void 0!==e)return Wi(e,r,l,o,s,i);let c=null,u=[],d=!1;const v=t=>{c?t(c):u&&u.push(t)},m=pi(l,"[PxAnimator]");return fetch(n).then(t=>t.json()).then(t=>{var e;if(!d)if((e=t)&&"object"==typeof e&&!Array.isArray(e)&&"svg"===e.type){c=Wi(t,r,l,o,s,i);const n=u;u=null,null==n||n.forEach(t=>t(c))}else m.error(mi.document,'createAnimator: invalid animation document format at "'+n+'"')}).catch(t=>{var e;u=null,m.error(mi.host,'createAnimator: failed to load "'+n+'" — '+(null!=(e=null==t?void 0:t.message)?e:String(t)))}),{isReady:()=>!!c,getRootElement:()=>c?c.getRootElement():null,isPlaying:()=>(null==c?void 0:c.isPlaying())||!1,play:()=>{v(t=>t.play())},pause:()=>{v(t=>t.pause())},cancel:()=>{v(t=>t.cancel())},finish:()=>{v(t=>t.finish())},setPlaybackRate:t=>{v(n=>n.setPlaybackRate(t))},getCurrentTime:()=>c?c.getCurrentTime():null,setCurrentTime:t=>{v(n=>n.setCurrentTime(t))},getCurrentProgress:()=>c?c.getCurrentProgress():null,setCurrentProgress:t=>{v(n=>n.setCurrentProgress(t))},destroy:()=>{d=!0,u=null,null==c||c.destroy()}}}function Ji(t){const n=document.querySelectorAll("["+kt+"]");for(let e=0;e<n.length;e++){const r=n[e];if(!r[jt]){const n=r.getAttribute(kt);n&&(r[jt]=Zi(f(a({},t),{src:n,container:r})))}}}return Ui=v,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),Ui)})();
1
+ "use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=Math.pow,u=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&u(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&u(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},v={};function m(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(v,{PX_ANIMATOR_DOC_KEY:()=>Bi,PX_ANIM_ATTR_NAME:()=>G,PX_ANIM_SRC_ATTR_NAME:()=>W,PxTimelineEngine:()=>tt,PxTimelineEngineExtra:()=>nt,createAnimator:()=>Gi,generateNewIds:()=>Mn,loadTagAnimators:()=>Zi,setupAnimationTriggers:()=>Mi,validateDocument:()=>pn});var y=class{_canSanitize(t){return this.isValid(t)}optional(){return new p(this)}},p=class extends y{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,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},h=class extends y{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(m(null!=e?e:[])+": expected string, got "+typeof t),!1)}},g=class extends y{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(m(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},b=class extends y{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(m(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},A=class extends y{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(m(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},w=class extends y{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(m(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},k=class extends y{constructor(t,n){super(),this.l=t,this.h="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.l)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};if(this.l.some(n=>n.isValid(t,o,e?[...e]:void 0)))return!0;if(!n)return!1;const i=m(null!=e?e:[]);let s;n.errors.push(i+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240));let l=-1;const c=[];for(const r of this.l){const o={errors:[],warnings:[],strict:n.strict};if(r.isValid(t,o,e?[...e]:void 0),!o.errors.length)continue;const u=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((u>l||u===l&&s&&o.errors.length<s.length)&&(l=u,s=o.errors),u<=i.length)for(const t of o.errors){const n=/: expected (.+?), got /.exec(t);n&&!c.includes(n[1])&&c.push(n[1])}}if(s&&l>i.length)for(const t of s.slice(0,4))n.errors.includes(t)||n.errors.push(t);else c.length&&n.errors.push(i+": expected "+c.join(" | "));return!1}_canSanitize(t){return this.l.some(n=>n._canSanitize(t))}},j=class extends y{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(m(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(m(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=class extends y{constructor(t,n){super(),this._shape=t,this.A=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.A)for(const t of Object.keys(n))t in this._shape||(e[t]=this.A.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(m(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.A)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.A.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},x=class extends y{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(m(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},O=class extends y{constructor(t){super(),this.value=t,this.h="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(m(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},S=class extends y{constructor(t,n){super(),this.fn=t,this._default=n,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,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},N=class extends y{constructor(t){super(),this.l=t,this.h="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.l.length?this.l.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.l.length)return null==n||n.errors.push(m(null!=e?e:[])+": expected tuple of length "+this.l.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.l.length;e++)r.push("["+e+"]"),this.l[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.l.length}},P=(t="")=>new h(t),z=(t=0)=>new g(t),C=(t=!1)=>new b(t),T=t=>new A(t),_=(t,n)=>new w(t,n),D=(t,n)=>new k(t,n),R=t=>new j(t),L=(t,n)=>new M(t,n),E=t=>new x(t),V=t=>new O(t),F=t=>new N(t),I=(t,n)=>new S(t,n),U=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function B(t){if("string"!=typeof t)return;const n=U.exec(t.trim());return n?{a:Number(n[1]),b:Number(n[2]),c:void 0===n[3]?0:Number(n[3])}:void 0}B("1.1");var W="data-px-animation-src",G="_px_animator",Z="block",J="inline",X="nearest",q="root",Q="center",K="bottom",Y=["duration","iterations","engine","frameRate"],H=["trigger","delay","fillMode","direction"],$=[...Y,...H,"fill","resetOnFinish","timelineSource","scroll"],tt={native:"native",js:"js"},nt=f(a({},tt),{auto:"auto"});function et(t){return t===nt.js?tt.js:tt.native}function rt(t){return t===nt.native}var ot={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},it={start:"start",end:"end"},st={normal:"normal",alternate:"alternate"},lt="userSpaceOnUse",ct="objectBoundingBox",ut={translate:"translate"},at={separate:"separate",combined:"combined"},ft="textContent",dt="class",vt="transform",mt="offsetDistance",yt=new Set(["type","children","animator","meta","animate","effects",ft]),pt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},ht=(pt.translate,pt.rotate,pt.scale,pt.origin,"pad"),gt={linear:"linear",radial:"radial"};function bt(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);if(!e)return;const r=At.get(e);if(r)return r;const o=e,i=$.filter(t=>void 0!==o[t]),s=i.length?a({},o):e;for(const t of i)delete s[t];const l=function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=wt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=a({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.offset&&(t.pinOffset=e.offset),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finishAction:e}=t,r=d(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return wt.set(t,i),i}(s);return At.set(e,l),l}var At=new WeakMap,wt=new WeakMap;function kt(t){var n;if(t)return null==(n=bt(t))?void 0:n.definitions}var jt,Mt=D([P(),F([z(),z(),z(),z()])]),xt=D([P(),z(),E(z()),R({pathData:P()}),I(()=>E(cn),[]),I(()=>Dt,{})]),Ot=R({time:z().optional(),value:xt.optional(),easing:Mt.optional(),tangentOut:F([z(),z()]).optional(),tangentIn:F([z(),z()]).optional()}),St=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},Nt=t=>{var n;return null!=(n=t.value)?n:t.v},Pt=t=>{var n;return null!=(n=t.easing)?n:t.e},zt=t=>t.tangentIn,Ct=t=>t.tangentOut,Tt=R({segmentCount:z().optional(),repeatAt:_([it.start,it.end]).optional(),direction:_([st.normal,st.alternate]).optional()}),_t=R({value:xt.optional(),keyframes:E(Ot).optional(),loop:D([Tt,C()]).optional(),autoOrient:C().optional(),alongPathMode:_(["sampled","offsetPath"]).optional()}),Dt=R({translate:F([z(),z()]).optional(),rotate:z().optional(),skew:z().optional(),scale:F([z(),z()]).optional(),origin:F([z(),z()]).optional()}),Rt=(D([P(),Dt,R({value:Dt}),_t]),V(_t)),Lt=D([P(),E(D([P(),Rt])),Rt]),Et=R({startOn:_(["load","mouseOver","click","scrollIntoView","programmatic"],ot.startOn).optional(),outAction:_(["continue","pause","reset","reverse"],ot.outAction).optional(),finishAction:_(["hold","reset"]).optional(),scrollIntoViewThreshold:z().optional()}),Vt=R({width:z(),pathData:P()}),Ft=R({fontFamily:P(),fontStyle:P(),ascent:z(),unitsPerEm:z(),glyphs:V(Vt)}),It=R({easings:V(F([z(),z(),z(),z()])).optional(),animations:V(Rt).optional(),fonts:V(Ft).optional()}),Ut=R({phase:_(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:z().optional()}),Bt=R({start:Ut.optional(),end:Ut.optional()}),Wt=(R({kind:_(["view","scroll"]).optional(),axis:_([Z,J,"x","y"]).optional(),source:_([X,q]).optional(),subject:P().optional(),smoothing:z().optional(),pin:C().optional(),pinAlign:_(["top",Q,K]).optional(),pinOffset:z().optional(),pinDistance:z().optional(),range:Bt.optional()}),R({align:_(["top",Q,K]).optional(),offset:z().optional(),distance:z().optional()})),Gt=_([nt.auto,nt.native,nt.js]).optional(),Zt=R({type:T("time").optional(),engine:Gt,frameRate:z().optional(),duration:z().optional(),trigger:Et.optional(),delay:z().optional(),iterations:D([z(),T("infinite")]).optional(),fillMode:_(["forwards","backwards","both","none"]).optional(),direction:_(["normal","reverse","alternate","alternate-reverse"]).optional()}),Jt={duration:z().optional(),iterations:z().optional(),engine:Gt,frameRate:z().optional(),axis:_([Z,J,"x","y"]).optional(),source:_([X,q]).optional(),subject:P().optional(),smoothing:z().optional(),pin:D([C(),Wt]).optional(),range:Bt.optional()},Xt=(jt=[Zt,R(a({type:T("scroll")},Jt)),R(a({type:T("view")},Jt))],new class extends y{constructor(t,n,e){var r;super(),this.j=t,this.M=n,this.h="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.O=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.O.set(o._default,e),n.inner&&(this.S=e)}}N(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.j];return null==n?this.S:this.O.get(n)}sanitize(t){var n;return(null!=(n=this.N(t))?n:this.M[0]).sanitize(t)}isValid(t,n,e){const r=this.N(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.j];return null==n||n.errors.push(m(null!=e?e:[])+": no discriminated union member matched "+this.j+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.N(t);return n?n._canSanitize(t):this.M[0]._canSanitize(t)}}("type",jt)),qt=R({target:P(),animateWith:E(P())}),Qt=R({timeline:Xt.optional(),definitions:It.optional(),bindings:E(qt).optional(),debugGlobalName:P().optional(),version:P().optional()}),Kt=D([P(),z(),E(z()),R({value:new class extends y{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(m(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),Dt]),Yt=D([z(),_t,R({value:z()})]),Ht=D([F([z(),z()]),_t,R({value:F([z(),z()])})]),$t=D([P(),_t,R({value:P()})]),tn=R({translate:Ht.optional(),rotate:Yt.optional(),scale:Ht.optional(),skew:Yt.optional(),origin:Ht.optional()}),nn=R({copies:z().optional(),translate:Ht.optional(),rotate:Yt.optional(),skew:Yt.optional(),scale:Ht.optional(),origin:Ht.optional()}),en=R({source:P().optional(),maskType:_(["luminance","alpha"]).optional(),maskUnits:_([lt,ct]).optional(),maskContentUnits:_([lt,ct]).optional(),x:z().optional(),y:z().optional(),width:z().optional(),height:z().optional()}),rn=R({pathData:$t.optional()}),on=R({offset:Yt.optional(),range:Ht.optional(),subPaths:_([at.separate,at.combined]).optional()}),sn=R({start:z().optional(),stretch:z().optional(),timeCrop:F([z(),z()]).optional()}),ln=R({without:_([ut.translate]).optional(),source:P().optional(),retime:sn.optional()}),cn=R({offset:z(),color:P()}),un=D([E(cn),R({value:E(cn)}),_t]),an=R({type:_([gt.linear,gt.radial]),start:Ht.optional(),end:Ht.optional(),center:Ht.optional(),radius:Yt.optional(),focal:Ht.optional(),stops:un.optional(),gradientUnits:_([lt,ct]).optional(),spreadMethod:_([ht,"reflect","repeat"]).optional(),gradientTransform:P().optional()}),fn=an,dn=R({pathData:P(),pathOverflow:_(["clip","extend"]).optional(),lengthAdjust:_(["spacing","spacingAndGlyphs"]).optional(),method:_(["align","stretch"]).optional(),spacing:_(["auto","exact"]).optional(),startOffset:Yt.optional(),textLength:Yt.optional()}),vn=R({useGlyphs:C().optional()}),mn=R({transformBy:tn.optional(),repeater:nn.optional(),maskedBy:en.optional(),clipPath:rn.optional(),strokeTrim:on.optional(),clone:ln.optional(),fillGradient:an.optional(),strokeGradient:fn.optional(),textPath:dn.optional(),text:vn.optional()});function yn(t,n){const e=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==n?void 0:n.strict)};if(!mn.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)e.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]"))};return r(t,"root"),e}function pn(t,n){var e;const r=!1!==(null==n?void 0:n.strict),o={errors:[],warnings:[],strict:r},i=An.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const n of yn(t,{strict:r}))i.includes(n)||i.push(n);const n=null==(e=bt(t))?void 0:e.definitions;for(const e of function(t,n){if(!n||!Object.keys(n).length)return[];const e=[],r=(t,o,i,s)=>{var l,c;if(!t)return;const u="string"==typeof t.fontFamily?t.fontFamily:void 0,a=null!=u?u:i,f=s||"text"===t.type&&!!(null==(c=null==(l=t.effects)?void 0:l.text)?void 0:c.useGlyphs);if(f&&u&&!Object.prototype.hasOwnProperty.call(n,u)){const t=o+': glyph-mode text uses font-family "'+u+'", which has no entry in animator.definitions.fonts';e.includes(t)||e.push(t)}Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]",a,f))};return r(t,"root",void 0,!1),e}(t,null==n?void 0:n.fonts))i.includes(e)||i.push(e);for(const e of function(t,n){const e=[],r=(t,o)=>{if(Array.isArray(t))return void t.forEach((t,n)=>r(t,o+"["+n+"]"));if(!t||"object"!=typeof t)return;const i=t.easing;if(!("string"!=typeof i||n&&Object.prototype.hasOwnProperty.call(n,i))){const t=o+'.easing: "'+i+'" names no entry in animator.definitions.easings — it will play linear';e.includes(t)||e.push(t)}for(const[n,e]of Object.entries(t))"easing"!==n&&e&&"object"==typeof e&&r(e,o+"."+n)};return r(t,"root"),e}(t,null==n?void 0:n.easings))i.includes(e)||i.push(e);for(const n of function(t){var n;const e=null==(n=bt(t))?void 0:n.version;return void 0===e||void 0!==B(e)?[]:["root.animator.version: "+JSON.stringify(e)+' is not a version stamp ("a.b" or "a.b.c") — it reads as unstamped']}(t))i.includes(n)||i.push(n)}return i}var hn=L({type:P(),domType:P().optional(),textContent:P().optional(),id:P().optional(),meta:(new class extends y{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:mn.optional(),animate:Lt.optional(),style:V(D([P(),z()])).optional()},Kt),gn=L(f(a({},hn._shape),{children:I(()=>E(gn),[]).optional()}),Kt),bn=R({width:D([z(),P()]).optional(),height:D([z(),P()]).optional(),viewBox:P().optional(),animator:Qt.optional()}),An=L(f(a(a({},hn._shape),bn._shape),{type:T("svg"),children:E(gn).optional()}),Kt),wn=(R({v:E(E(z())),i:E(E(z())).optional(),o:E(E(z())).optional(),c:C().optional()}),0);function kn(){return"_px_"+Date.now().toString(36)+(++wn).toString(36)+Math.random().toString(36).substring(2,6)}function jn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>jn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=jn(n[t]);return e}function Mn(t){var n;const e=jn(t),r=new Map,o=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["targetId","boundElementId"]),l=(t,n)=>"source"===t&&("maskedBy"===n||"clone"===n);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=kn();r.set(t,e),n.id=e}else n.animate&&(n.id=kn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(e),function t(n,e){if(n&&"object"==typeof n)for(const[c,u]of Object.entries(n))if("children"!==c)if("string"==typeof u)if(o.has(c)&&u.startsWith("#")){const t=u.slice(1),e=r.get(t);e&&(n[c]="#"+e)}else if(i.has(c))n[c]=xn(u,r);else if(s.has(c)||l(c,e)){const t=u.startsWith("#"),e=r.get(t?u.slice(1):u);e&&(n[c]=t?"#"+e:e)}else u.includes("url(#")&&(n[c]=xn(u,r));else if("style"===c&&"object"==typeof u&&null!==u)for(const[t,n]of Object.entries(u))"string"==typeof n&&(u[t]=xn(n,r));else"object"==typeof u&&null!==u&&t(u,c);else if(Array.isArray(u))for(const n of u)t(n)}(e);const c=null==(n=e.animator)?void 0:n.bindings;if(Array.isArray(c)){const t=c.map(t=>{var n;const e=t.target.startsWith("#"),o=e?t.target.slice(1):t.target,i=null!=(n=r.get(o))?n:o;return f(a({},t),{target:e?"#"+i:i})});e.animator=f(a({},e.animator),{bindings:t})}return e}function xn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}function On(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,c=t.o,u=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==c?void 0:c[t-1])?e:o,u=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=s[f-1],e=null!=(o=null==c?void 0:c[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],u=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),a.push("z")}return a.join("")}function Sn(t,n,e){return t+(n-t)*e}function Nn(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=Sn(t[i]||0,n[i]||0,e);return r}function Pn(t,n,e){return[Sn(t[0]||0,n[0]||0,e),Sn(t[1]||0,n[1]||0,e),Sn(t[2]||0,n[2]||0,e),Sn(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function zn(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(Cn(t[i],n[i],e));return o}function Cn(t,n,e){var r,o,i,s,l,c,u,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),m=[],y=[],p=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];m.push(Nn(f,v,d));const h=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;y.push(Nn(h,g,d));const b=null!=(c=null==(l=t.o)?void 0:l[e])?c:f,A=null!=(a=null==(u=n.o)?void 0:u[e])?a:v;p.push(Nn(b,A,d))}return{v:m,i:y.length?y:void 0,o:p.length?p:void 0,c:null!=(f=t.c)?f:n.c}}function Tn(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let c=e,u=0,a=1;for(let t=0;t<8;t++){const t=s(c)-e;if(Math.abs(t)<1e-6)return c;const n=l(c);if(Math.abs(n)<1e-6)break;c-=t/n}for(c=e;u<a;){const t=s(c);if(Math.abs(t-e)<1e-6)return c;e>t?u=c:a=c,c=(a+u)/2}return c}function _n(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=Tn(n,r,t),((l*e+s)*e+i)*e;var e}}function Dn(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function Rn(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=Tn(e,o,n),l=[e,r],c=[o,i],{left:u,right:a}=function(t,n,e,r,o){const i=Dn(t,n,o),s=Dn(n,e,o),l=Dn(e,r,o),c=Dn(i,s,o),u=Dn(s,l,o),a=Dn(c,u,o);return{left:[t,i,c,a],right:[a,u,l,r]}}([0,0],l,c,[1,1],s),f=u[3][0],d=u[3][1];let v,m;f>1e-9&&Math.abs(d)>1e-9&&(v=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const y=1-f,p=1-d;return y>1e-9&&Math.abs(p)>1e-9&&(m=[(a[1][0]-f)/y,(a[1][1]-d)/p,(a[2][0]-f)/y,(a[2][1]-d)/p]),{left:v,right:m}}function Ln(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function En(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}function Vn(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}var Fn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),In=new Set(["translate","rotate","scale","skew"]),Un=new Set(["offset-distance","offsetDistance"]);function Bn(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.P)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,c=t.skew,u=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=c&&o.push("skewX("+c+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}var Wn=new Set(["offset-distance","offsetDistance"]),Gn=1e3;function Zn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function Jn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var Xn=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 qn(t){return Xn.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Qn(t,n,e){return Math.max(n,Math.min(t,e))}function Kn(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,c=s*i,u=3*o*s,a=3*l*i,f=l*o;return[c*t[0]+u*n[0]+a*e[0]+f*r[0],c*t[1]+u*n[1]+a*e[1]+f*r[1]]}var Yn=1e-4;function Hn(t,n,e,r,o){const i=$n(t,n,e,r,o);return 0===i[0]&&0===i[1]?$n(t,n,e,r,o<.5?o+Yn:o-Yn):i}function $n(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,c=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+c*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+c*(r[1]-e[1])]}function te(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let c=Kn(t,n,e,r,0);s[0]=0,l[0]=0;let u=0;for(let a=1;a<i;a++){const i=a/o,f=Kn(t,n,e,r,i),d=f[0]-c[0],v=f[1]-c[1];u+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=u,c=f}return{ts:s,ds:l}}function ne(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],c=e[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}var ee=new Set(["script","foreignobject"]),re=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),oe=new Set(["href","xlink:href","src"]),ie=new Set(["mixBlendMode","isolation"]),se=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,le=/^data:image\/svg\+xml(?:;[^,]*)?,/i,ce=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,ue=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function ae(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(re.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||oe.has(e)&&(se.test(t)||le.test(t)||function(t){const n=ce.exec(t);return!!n&&ue.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function fe(t){const n=Nt(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function de(t){return St(t)}function ve(t){return Pt(t)}function me(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(zt(t)||Ct(t))return!0;return!1}var ye=new WeakMap;function pe(t,n,e,r){let o=ye.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=Ct(t),l=zt(n),c=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],u=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=te(e,c,u,r),f={P0:e,P1:c,P2:u,P3:r,C:a,T:a.ds[a.ds.length-1]};return o||(o=new WeakMap,ye.set(t,o)),o.set(n,f),f}var he=.5,ge=5,be=32;function Ae(t,n){var e,r,o;if(!me(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:he,c=null!=(r=null==n?void 0:n.rotationTolerance)?r:ge,u=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:be,a=[],f=fe(i[0]);if(!f)return t;const d=s?function(t,n){const e=fe(t),r=fe(n);if(!e||!r)return 0;const o=pe(t,n,e,r),i=Hn(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;a.push(ke(de(i[0]),xe(je(i[0]),je(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=fe(n),o=fe(e);r&&o?(s&&t>0&&Se(a,n,e,r,o,c),Pe(a,n,e,r,o,s,l,c,u)):a.push(ke(de(e),xe(je(e),je(e),1,null!=o?o:[0,0],void 0,s)))}const v=ve(i[i.length-1]);v&&(a[a.length-1].e=v),s&&we(a);const m={keyframes:a};return void 0!==t.loop&&(m.loop=t.loop),m}function we(t){let n;for(const e of t){const t=Nt(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}function ke(t,n){return{t:t,v:n}}function je(t){const n=Nt(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Me(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function xe(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Me(o,l,e))}return void 0!==o&&(s.rotate=o+Oe(t,n,e)),s}function Oe(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Me(r,o,e);return"number"==typeof i?i:0}function Se(t,n,e,r,o,i){const s=t[t.length-1],l=Nt(s),c=null==l?void 0:l.rotate;if("number"!=typeof c)return;const u=je(n),a=c-Oe(u,u,0),f=pe(n,e,r,o),d=Hn(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,m=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(m)<=i)return;const y=de(n),p=Math.min(y+Ne,(y+de(e))/2),h=xe(je(n),je(n),0,r,v,!0);t.push(ke(p,h))}var Ne=.05;function Pe(t,n,e,r,o,i,s,l,c){const u=pe(n,e,r,o),a=de(n),f=de(e),d=ve(n),v=(m=d)?_n([m[1],m[0],m[3],m[2]]):t=>t;var m;const y=je(n),p=je(e),h=function(t,n,e,r,o){const i=[];ze(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),ze(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],c={_:o-s.length};for(let o=0;o<s.length-1;o++)Ce(s[o],s[o+1],l,t,n,e,r,c);return l}(u,i,s,l,c),g=[];for(const t of h){const n=ne(u.C,t),e=Qn(u.T>0?n/u.T:t,0,1),r={u:Qn(v(e),0,1),p:e,D:Kn(u.P0,u.P1,u.P2,u.P3,t)};if(i){const n=Hn(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let b=d,A=0;const w=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=A<1?Qn((e.u-A)/(1-A),0,1):1,{left:o,right:s}=Rn(b,r),l=0===n?w:t.length-1;o?t[l].e=o:delete t[l].e;const c=a+e.u*(f-a),u=xe(y,p,e.p,e.D,e.rotateDeg,i);t.push(ke(c,u)),b=s,A=e.u}}function ze(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),c=2*(s-i),u=i;if(Math.abs(l)<1e-10){if(Math.abs(c)>1e-10){const t=-u/c;t>1e-6&&t<.999999&&o.push(t)}return}const a=c*c-4*l*u;if(a<0)return;const f=Math.sqrt(a),d=(-c-f)/(2*l),v=(-c+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Ce(t,n,e,r,o,i,s,l){const c=(t+n)/2,u=Kn(r.P0,r.P1,r.P2,r.P3,t),a=Kn(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=Kn(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=Kn(r.P0,r.P1,r.P2,r.P3,c),m=Kn(r.P0,r.P1,r.P2,r.P3,t+.75*f),y=Math.max(Te(d,u,a),Te(v,u,a),Te(m,u,a));let p=!0;if(o){const e=Hn(r.P0,r.P1,r.P2,r.P3,t),o=Hn(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let c=Math.abs(i-l);c>180&&(c=360-c),c>s&&(p=!1)}y<=i&&p||l._<=0||f<1e-6?e.push(n):(l._-=1,Ce(t,c,e,r,o,i,s,l),Ce(c,n,e,r,o,i,s,l))}function Te(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}function _e(t,n){const e=De(t,n);return null!=e?e:t}function De(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=De(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&me(e)){const o=Ae(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Re=1;function Le(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Le(t[e],n[e]))}function Ee(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function Ve(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Fe(t){return"string"==typeof t&&void 0!==Ve(t)}function Ie(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const n=Ve(t.pathData);return n?{paths:Ee(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Fe(n[0])){const t=[];for(const e of n){const n=Ve(e);n&&t.push(...Ee(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Fe(t[0])){const n=[];for(const e of t){const t=Ve(e);t&&n.push(...Ee(t))}return{paths:n}}return{paths:t}}return Fe(t)?{paths:Ee(Ve(t))}:t}function Ue(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Be(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function We(t,n,e,r){var o,i;return"d"===t?{paths:zn(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:Fn.has(t)?Pn(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?Sn(n,e,r):In.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Nn(n||[],e||[],r):Sn(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=Sn(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=Nn(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Ge(t,n,e,r){var o,i,s,l,c;const u=n.length-1,d=Qn(null!=(o=e.segmentCount)?o:u,1,u);let v;v=e.repeatAt===it.start?n.slice(0,d+1):n.slice(u-d);const m=null!=(i=n[0].t)?i:0,y=null!=(s=n[n.length-1].t)?s:0;let p,h;e.repeatAt===it.start?(p=0,h=m):(p=y,h=r);const g=h-p;if(g<=0)return n;const b=null!=(l=v[0].t)?l:0,A=(null!=(c=v[v.length-1].t)?c:0)-b;if(A<=0)return n;const w=v.map(t=>({R:(t.t-b)/A,v:t.v,e:t.e,tangentIn:zt(t),tangentOut:Ct(t)})),k=Math.floor(g/A),j=g-k*A,M=j/A,x=[],O=e.repeatAt!==it.start,S=n[n.length-1];let N,P=!1;function z(n,e,r){var o;let i;if(e){i=[];for(let t=w.length-1;t>=0;t--)i.push({R:1-w[t].R,v:w[t].v,e:t>0?Ln(w[t-1].e):void 0,tangentIn:w[t].tangentOut,tangentOut:w[t].tangentIn})}else i=w;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.R>s+1e-9){const o=i[e-1],l=r.R-o.R,c=(s-o.R)/l,u=o.e?_n(o.e)(c):c,a=We(t,o.v,r.v,u),{left:f}=Rn(o.e,c);return x.length>0&&o.R<=s&&(x[x.length-1].e=f),void x.push({t:n+s*A,v:a,e:void 0})}const l=x.length>0?x[x.length-1]:S,c=O&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.R*A))<1e-9;if(c){if(Le(l.v,r.v)){x.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(N=r.e,P=!0);continue}x.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:n+r.R*A+(c?Re:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),x.push(u)}}if(e.repeatAt===it.start){M>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=w.length-1;t>=0;t--)o.push({R:1-w[t].R,v:w[t].v,e:t>0?Ln(w[t-1].e):void 0,tangentIn:w[t].tangentOut,tangentOut:w[t].tangentIn})}else o=w;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.R<i-1e-9)continue;const s=o[e-1];if(s&&s.R<i-1e-9&&r.R>i+1e-9){const e=r.R-s.R,o=(i-s.R)/e,l=s.e?_n(s.e)(o):o,c=We(t,s.v,r.v,l),{right:u}=Rn(s.e,o);x.push({t:n,v:c,e:u})}const l={t:n+(r.R-i)*A,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),x.push(l)}}(p,e.direction===st.alternate&&k%2==0,M);for(let t=0;t<k;t++){const n=k-1-t,r=e.direction===st.alternate&&n%2==0;z(p+j+t*A,r)}}else{for(let t=0;t<k;t++){const n=e.direction===st.alternate&&t%2==0;z(p+t*A,n)}if(M>1e-9){const t=e.direction===st.alternate&&k%2==0;z(p+k*A,t,M)}}return e.repeatAt===it.start?[...x,...n]:P&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:N}),...x]:[...n,...x]}function Ze(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=St(n);let i=Nt(n);const l=Pt(n);"d"===t&&(i=Ie(i));const c=Jn(t)?qn(t):t;Fn.has(c)&&(i=null!=(o=Vn(i))?o:i);const u={t:e,v:i,e:Ue(l,r)},a=zt(n),f=Ct(n);a&&(u.tangentIn=a),f&&(u.tangentOut=f),s.push(u)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,c=!0===l?{}:l||void 0;return c&&s.length>=2?Ge(t,s,c,e):s}function Je(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const s=Jn(t)?qn(t):t,l=Fn.has(s),c=i.map(n=>{var e;const r=St(n);let o=Nt(n);"d"===t&&(o=Ie(o)),l&&(o=null!=(e=Vn(o))?e:o);const i={t:r,v:o,e:Pt(n)},s=zt(n),c=Ct(n);return s&&(i.tangentIn=s),c&&(i.tangentOut=c),i}),u={keyframes:Ge(t,c,o,e)};return void 0!==n.autoOrient&&(u.autoOrient=n.autoOrient),u}function Xe(t,n){const e=qe(t,n);return null!=e?e:t}function qe(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=qe(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=Je(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Qe=0;function Ke(t,n=tt.native){const e=bt(t)||{},r=kt(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(0===e.length)return null;const s=function(t,n,e,r=tt.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=Ze(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===tt.native&&"transform"===i?Ae(t):t}}return o}(function(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const c=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(t=>Number.isNaN(t)))return;if("translate"===t){if(c.length<1||c.length>2)return;r.translate=[c[0],null!=(n=c[1])?n:0]}else if("rotate"===t){if(1!==c.length)return;r.rotate=c[0]}else if("skewX"===t){if(1!==c.length)return;r.skew=c[0]}else{if(c.length<1||c.length>2)return;r.scale=[c[0],null!=(e=c[1])?e:c[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?a(a({},e),t):t,o=t[vt];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>In.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const c=f(a({},l),{keyframes:l.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[s]:t.value})}))});void 0!==c.value&&(c.value=f(a({},e),{[s]:c.value}));const u=a({},t);return delete u[s],f(a({},u),{transform:c})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(e),i),o,r,n);return 0===Object.keys(s).length?null:{id:t,animate:s}},l=function(t){var n;if(t)return null==(n=bt(t))?void 0:n.bindings}(t);if(l)for(const t of l){const n=t.target.startsWith("#")?t.target.slice(1):t.target,e=t.animateWith.map(t=>Be(t,r)).filter(t=>!!t),o=s(n,e);o&&i.push(o)}const c=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++Qe;t.id=e;const o=s(e,function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Be(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Be(r,n);t&&e.push(t)}else e.push(t);return e}(n,r),t.transform);o&&i.push(o)}if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n]);return i}function Ye(t,n,e){var r,o,i,s;const l=n.keyframes||[];if(0===l.length)return null;const{L:c,V:u}=function(t,n){var e,r;const o=t.length-1;let i=t[0],s=t[o>0?1:0];for(let l=0;l<o;l++){const c=null!=(e=t[l].t)?e:0,u=null!=(r=t[l+1].t)?r:0;if(c<=n&&n<=u){i=t[l],s=t[l+1];break}n>u&&l===o-1&&(i=t[o>0?o-1:0],s=t[o])}return{L:i,V:s}}(l,e);let a=c===u?0:(f=e,d=null!=(r=c.t)?r:0,(v=null!=(o=u.t)?o:0)===d?0:0+(f-d)/(v-d)*1);var f,d,v;a=Qn(a,0,1);const m=Pt(c);if(m&&Array.isArray(m))try{a=_n(m)(a)}catch(t){}let y=Jn(t)?qn(t):t,p=null;const h=null==c?void 0:c.v,g=null==u?void 0:u.v;if("d"===y)p=zn(null!=(i=null==h?void 0:h.paths)?i:Array.isArray(h)?h:[],null!=(s=null==g?void 0:g.paths)?s:Array.isArray(g)?g:[],a).map(t=>On(t)).join("");else if(Fn.has(y))p=En(Pn(h||[0,0,0,1],g||[0,0,0,1],a)),y=t;else if("stroke-dasharray"===y)p=Nn(h||[],g||[],a).join(" "),y=t;else if("transform"!==y||null===h||"object"!=typeof h||Array.isArray(h))"translate"===y?(p="translate("+Nn(h||[0,0],g||[0,0],a).join(",")+")",y="transform"):"rotate"===y?(p="rotate("+Sn(+(h||0),+(g||0),a)+")",y="transform"):"scale"===y?(p="scale("+Nn(h||[1,1],g||[1,1],a).join(",")+")",y="transform"):p=Sn(+(h||0),+(g||0),a);else{const t=new Set([...h?Object.keys(h):[],...g?Object.keys(g):[]]),e={};for(const n of t){const t=null==h?void 0:h[n],r=null==g?void 0:g[n];if("rotate"===n||"skew"===n)e[n]=Sn(+(null!=t?t:0),+(null!=r?r:0),a);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=Nn(t||o,r||o,a);e[n]=i}}if(me(n)){const t=h.translate,r=g.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const s=pe(t,n,e,r),l=0===s.T?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;o[t]<e?s=t+1:l=t}const c=o[l-1],u=o[l]-c,a=u>0?(e-c)/u:0;return r[l-1]+a*(r[l]-r[l-1])}(s.C,o),c=Kn(s.P0,s.P1,s.P2,s.P3,l);if(!i)return{translate:c};const u=Hn(s.P0,s.P1,s.P2,s.P3,l);return{translate:c,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}(c,u,[+t[0],+t[1]],[+r[0],+r[1]],a,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(e.rotate=o.rotateDeg)}}p=Bn(e,{P:!1}),y="transform"}return Un.has(y)&&"number"==typeof p&&(p=100*p+"%"),{k:y,v:null===p?"":""+p}}function He(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=Ye(r,o,n);t&&(e[t.k]=t.v)}return e}function $e(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function tr(t){var n,e;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(er),autoOrient:r.autoOrient,loop:r.loop},e=null!=(n=r.value)?n:r.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const i=null!=(e=r.value)?e:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function nr(t,n,e,r){var o,i,s,l;const c=t=>(null==r?void 0:r.F)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=c(e.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},u||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(l=null!=(i=e.base)?i:null==(o=e.keyframes[0])?void 0:o.value)?l:null==(s=e.keyframes[0])?void 0:s.v;void 0!==v&&(t[n]=c(v))}function er(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function rr(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function or(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=sr(r,n.origin,!0),r=ir(r,"scale",n.scale),r=ir(r,"skew",n.skew),r=ir(r,"rotate",n.rotate),r=sr(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=sr(r,n.origin,!0),r=ir(r,"translate",n.translate),r=sr(r,n.origin,!1)):r=ir(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function ir(t,n,e,r){if(void 0===e)return t;const o=tr(e);if("static"===o.kind)return{type:"g",transform:{value:$e(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>rr(t,$e(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function sr(t,n,e){if(void 0===n)return t;const r=tr(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>rr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function lr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(lr);const n={};for(const e of Object.keys(t))n[e]=lr(t[e]);return n}function cr(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function ur(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function ar(t){var n;const e=ur(t.x),r=ur(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function fr(t,n){return"_lw_"+n+"_"+t.nextId++}function dr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function vr(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>vr(t,n))}var mr=lr;function yr(t,n,e){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=dr(t.effects.clone.source);"string"==typeof r&&r&&!n.contentRefInnerIds.has(r)&&n.contentRefInnerIds.set(r,e(r))}null==(i=t.children)||i.forEach(t=>yr(t,n,e))}function pr(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function hr(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function gr(t,n,e,r){if(!n)return t;const o=fr(e,"grad"),i=function(t,n){const e={type:t.type===gt.radial?"radialGradient":"linearGradient",id:n};return t.type===gt.linear?(br(e,"x1","y1",t.start),br(e,"x2","y2",t.end)):(br(e,"cx","cy",t.center),function(t,n,e){const r=tr(e);"absent"!==r.kind&&nr(t,"r",r,{F:!0})}(e,0,t.radius),br(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e;if(!t)return[];const r=tr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Ar):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let s=0;for(const t of o){const n=Nt(t);Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const l=Nt(o[0]),c=[];for(let t=0;t<s;t++){const r=null!=(e=null!=(n=null==l?void 0:l[t])?n:wr(o,0,t))?e:{offset:t/Math.max(1,s-1),color:"#000000"};c.push({offset:r.offset,color:r.color})}return c.map((t,n)=>function(t,n,e,r,o){var i;const s=[],l=[];let c=!1;for(const r of n){const o=St(r),u=Nt(r),a=null!=(i=null==u?void 0:u[e])?i:wr(n,n.indexOf(r),e);if(!a)continue;const f=Pt(r),d={time:o,value:a.color};void 0!==f&&(d.easing=f),s.push(d);const v={time:o,value:a.offset};void 0!==f&&(v.easing=f),l.push(v),a.offset!==t.offset&&(c=!0)}const u={type:"stop",offset:kr(t.offset),stopColor:t.color},a={};return s.length&&(a.stopColor={keyframes:s},void 0!==o&&(a.stopColor.loop=o)),c&&l.length&&(a.offset={keyframes:l},void 0!==o&&(a.offset.loop=o)),Object.keys(a).length&&(u.animate=a),u}(t,o,n,0,i))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function br(t,n,e,r){var o,i,s;const l=tr(r);if("absent"===l.kind)return;if("static"===l.kind)return t[n]=String(l.value[0]),void(t[e]=String(l.value[1]));const c=t=>{const n={keyframes:l.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==l.loop&&(n.loop=l.loop),n},u=null!=(o=t.animate)?o:{};u[n]=c(0),u[e]=c(1),t.animate=u;const a=null!=(s=l.base)?s:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Ar(t){return{type:"stop",offset:kr(t.offset),stopColor:t.color}}function wr(t,n,e){for(let r=n;r>=0;r--){const n=Nt(t[r]);if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=Nt(t[r]);if(null==n?void 0:n[e])return n[e]}}function kr(t){return Math.round(1e3*t)/10+"%"}function jr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function Mr(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=tr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=xr(o,"translate",n.translate,void 0),o=xr(o,"rotate",n.rotate,r),o=xr(o,"scale",n.scale,r),o}function xr(t,n,e,r,o){if(void 0===e)return t;const i=tr("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:$e(n,Or(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=rr(t,$e(n,Or(n,t.value),r));return"translate"===n?a(a({},e),Sr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Or(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Sr(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Nr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function Pr(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function zr(t,n){let e=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Cr(o.translateKeyframes,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function Cr(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Tr(t,n){var e,r,o;const i=t.transform,s=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!s)return;const l={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,s=!1,l=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,s=!0):l=!0}return l&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),s?[o,i]:void 0}(i,n);t&&(l.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(l.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(s&&Array.isArray(s.keyframes)){const t=s.keyframes,i=[];for(const s of t){const t=null!=(e=s.value)?e:s.v,l=null!=(o=null!=(r=s.time)?r:s.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}function _r(t,n,e){if(!n)return;const r=dr(n.source);if(!r)return void(n.without===ut.translate&&e.errors.push("clone: content ref missing `source`"));const o=n.without===ut.translate&&e.contentRefInnerIds.get(r)||r;t.href="#"+o}function Dr(t,n){const e={};return void 0!==t.translate&&(e.translate=Rr(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=Rr(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=Rr(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return Rr(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function Rr(t,n,e=!1){const r=tr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=n(r.base)),o}var Lr=!1;function Er(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var Vr=1;function Fr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Vr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Vr,value:0}],s=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[s],t.animate={opacity:{keyframes:i}}}function Ir(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function Ur(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function Br(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Wr(t,n,e){const r=dr(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=Gr(r,n,e,new Set);if(o)if(Lr){const n=e.idMap.get(o);t.type="g",delete t.href,t.children=[n],ar(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function Gr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.idMap.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=mr(o);if(function(t,n){cr(t,()=>fr(n,"retimed"))}(i,e),"use"===o.type?Jr(i,n.start,n.stretch):Zr(i,n.start,n.stretch),Br(i),"use"===o.type&&o.href){const s=dr(o.href);if(s){const l=Ur(o),c=l?Ir(Er(l),n):n,u=new Set(r);u.add(t);const a=Gr(s,c,e,u);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var s;const l=Ur(t);if("use"===t.type&&l&&t.href){const i=dr(t.href);if(i){const s=Ir(Er(l),n),c=new Set(r);c.add(o);const u=Gr(i,s,e,c);u&&(t.href="#"+u)}Br(t)}null==(s=t.children)||s.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Zr(t,n,e){var r;Jr(t,n,e),null==(r=t.children)||r.forEach(t=>Zr(t,n,e))}function Jr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var Xr=48,qr=/[MmLlHhVvCcSsQqTtAaZz]/;function Qr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function Kr(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,s=0,l=0,c=0,u=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),m=(t,n,r)=>{const s=[o,i],l=te(s,t,n,r,Xr);e.push({P0:s,P1:t,P2:n,P3:r,C:l,I:l.ds[l.ds.length-1]}),o=r[0],i=r[1]},y=(t,n)=>{m([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];qr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",p=t.toUpperCase();if("Z"!==p){if("M"===p){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,s=n,l=r,d=t;continue}if("L"===p)y(v()+(e?o:0),v()+(e?i:0));else if("H"===p)y(v()+(e?o:0),i);else if("V"===p)y(o,v()+(e?i:0));else if("C"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],m(t,n,r)}else if("S"===p){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-c,2*i-u]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],m(t,n,r)}else if("Q"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Qr([o,i],t,n);m(r,s,n)}else if("T"===p){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Qr([o,i],t,n);m(r,s,n)}else{if("A"!==p){r++;continue}r+=5,y(v()+(e?o:0),v()+(e?i:0))}d=t}else y(s,l),o=s,i=l,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].I;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,s=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,l=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],s=o.I>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;r[t]<n?i=t+1:s=t}const l=r[s-1],c=r[s]-l,u=c>0?(n-l)/c:0;return e[s-1]+u*(e[s]-e[s-1])}(o.C,i):0,[l,c]=Kn(o.P0,o.P1,o.P2,o.P3,s),[u,a]=Hn(o.P0,o.P1,o.P2,o.P3,s);return{x:l,y:c,angle:Math.atan2(a,u)}};return{totalLength:r,closed:s,sampleAtDistance(t){if(s&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!s&&(t<0||t>r)){const n=t<0?0:r,e=l(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return l((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var Yr=.15;function Hr(t){const n=tr(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function $r(t){let n=0,e=16;const r=t=>{var o;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(e=Math.max(e,i));const s=t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var to=t=>Math.round(1e3*t)/1e3;function no(t,n,e){null!=e&&nr(t,n,tr(e),{F:!0})}var eo=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function ro(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function oo(t,n){let e="";for(let r=0;r<t.length;r++){const o=ro(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function io(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var so=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function lo(t,n,e=2){const r=[];let o;for(so.lastIndex=0;null!==(o=so.exec(t));)r.push(o[0]);let i="",s=0;const l=()=>parseFloat(r[s++]);for(;s<r.length;){const t=r[s++];if("M"===t||"L"===t){const[r,o]=io(n,l(),l());i+=t+oo([r,o],e)}else if("C"===t){const[t,r]=io(n,l(),l()),[o,s]=io(n,l(),l()),[c,u]=io(n,l(),l());i+="C"+oo([t,r,o,s,c,u],e)}else if("Q"===t){const[t,r]=io(n,l(),l()),[o,s]=io(n,l(),l());i+="Q"+oo([t,r,o,s],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var co=16,uo=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",ft,"xml:space"],ao=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],fo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function vo(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function mo(t){return"string"==typeof t?t:void 0}function yo(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of fo)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function po(t,n){var e,r,o,i,s,l,c,u,a,f;const d="text"===t.type,v=t.style,m=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},y={fontFamily:null!=(e=mo(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=vo(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(s=t.strokeWidth)?s:n.strokeWidth,letterSpacing:null!=(l=vo(t.letterSpacing))?l:n.letterSpacing,wordSpacing:null!=(c=vo(t.wordSpacing))?c:n.wordSpacing,opacity:null!=(u=vo(m("opacity")))?u:n.opacity,animate:null!=(a=d?void 0:yo(t))?a:n.animate};for(const t of ao){const e=null!=(f=m(t))?f:n[t];void 0!==e&&(y[t]=e)}return y}function ho(t){var n,e,r;return{fontFamily:mo(t.fontFamily),fontSize:null!=(n=vo(t.fontSize))?n:co,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=vo(t.letterSpacing))?e:0,wordSpacing:null!=(r=vo(t.wordSpacing))?r:0}}function go(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of ao)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function bo(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Ao(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var wo=.6,ko="px-missing-glyph";function jo(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,s=-o,l=Math.max(1,.12*Math.min(i,s)),c="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*l||s<=2*l)return c;const u=e+l,a=r-l,f=-l,d=o+l;return c+"M"+u+" "+f+"L"+u+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function Mo(t,n,e,r,o=0){const{x:i,y:s,angle:l}=t.sampleAtDistance(n),c=Math.cos(l),u=Math.sin(l),a=r/2;return[e*c,e*u,-e*u,e*c,i-e*c*a-o*u,s-e*u*a+o*c]}function xo(t){var n;const e=tr(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,U:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,U:[],at:()=>r}}var Oo=48,So=64;function No(t,n){const e=c(10,n);return Math.round(t*e)/e}function Po(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of ao)void 0!==t[e]&&(n[e]=t[e]);return n}function zo(t){return t?{[dt]:ko}:{}}function Co(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.B,!!n.W]),e=lo(n.G,n.m),o=r.get(t);o?o.d+=e:r.set(t,{B:n.B,d:e,W:n.W})}const o=[];for(const{B:t,d:e,W:i}of r.values())o.push(n("path",a(a(a({d:e},Po(t)),zo(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function To(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===uo.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function _o(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function Do(t,n,e,r,o,i,s,l){const c=Lo(r,e,o),u=Eo(e,o),a=Fo(i,c),f=Fo(s,u),d=Bo(s),v={type:"path",d:On(n)};return Io(v,"strokeDasharray",f),Io(v,"strokeDashoffset",a),Io(v,"strokeOpacity",d),[v]}var Ro=1;function Lo(t,n,e){const[r]=Vo(e);return e=>n*(-e-r+t)+Ro}function Eo(t,n){const[e,r]=Vo(n),o=r-e+1;return n=>{const e=Qn(n[0],0,1),r=Qn(n[1],0,1),i=Math.min(e,r),s=Math.max(e,r),l=[0];let c=Ro;for(let n=0;n<o;n++)l.push(c+i*t),l.push((s-i)*t),c=(1-s)*t;return l.push(c+Ro),l}}function Vo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Fo(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:St(t),value:n(Nt(t)),easing:Pt(t)})),loop:t.loop}}function Io(t,n,e){e&&nr(t,n,e)}var Uo=10;function Bo(t){const n=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return n(t.value)?{kind:"static",value:0}:void 0;const e=t.keyframes;let r=!1,o=!0;for(const t of e)n(Nt(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0,l=St(r),c=n(Nt(r)),u=o?c&&n(Nt(o)):c,a=s?c&&n(Nt(s)):c;u&&!a?(i.push({time:l,value:0}),i.push({time:l+Uo,value:1})):!u&&a&&(i.push({time:l-Uo,value:1}),i.push({time:l,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Wo(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const s=e(o);if(0===s)return o;if(i*s>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function Go(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Zo(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=Jo(t,r,r+1);return t.c&&n.length>1&&(e+=Jo(t,n.length-1,0)),e}function Jo(t,n,e){var r,o,i,s;const l=t.v,c=l[n],u=l[e],a=te(c,null!=(o=null==(r=t.o)?void 0:r[n])?o:c,null!=(s=null==(i=t.i)?void 0:i[e])?s:u,u);return a.ds[a.ds.length-1]}var Xo=.5522847498307936;function qo(t){var n,e;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:et(null==(n=bt(t))?void 0:n.engine),glyphs:null==(e=kt(t))?void 0:e.fonts},o=mr(t);vr(o,r.idMap),yr(o,r,()=>fr(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const s=dr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof s){e.add(t);const r=n.idMap.get(s);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.maskAncestorChains.set(t,r),Array.isArray(t.children)){const e=Tr(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.idMap.clear(),vr(t,n.idMap);const e=[],r=t=>{var n;Ur(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var s;if(o){if(o!==t&&Ur(o)&&e++,"use"===o.type&&o.href){const t=dr(o.href);t&&!r.has(t)&&(r.add(t),i(n.idMap.get(t)))}null==(s=o.children)||s.forEach(i)}},s=dr(t.href);s&&(r.add(s),i(n.idMap.get(s))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=Ur(t);if(!e)continue;const r=e.timeCrop;Br(t),Wr(t,Er(e),n),r&&Fr(t,r,n)}}(t,n),t}(Qo(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Qo(t,n){t.children&&(t.children=t.children.map(t=>Qo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.contentRefInnerIds.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:s,maskedBy:l,clipPath:c,strokeTrim:u,clone:d,fillGradient:v,strokeGradient:m,textPath:y,text:p}=null!=e?e:{};e&&delete t.effects;let h=t,g=!1;if(null==p?void 0:p.useGlyphs)if(y){const t="string"==typeof y.pathData?y.pathData:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:s,create:l=eo,warnings:c}=r,u=n?Kr(n):null;if(!u)return null==c||c.push("textGlyphs: unparsable along-path geometry"),null;const d=Ao(s),{cells:v,width:m}=function(t,n,e,r){const o=[];let i=0;const s=(t,l)=>{var c,u;const a=po(t,l),f=mo(t[ft]);if(f&&!(null==(c=t.children)?void 0:c.length)){const t=bo(a,n,e,r);if(t){const n=a.fontSize/t.unitsPerEm,e=null!=(u=t.ascent)?u:.9*t.unitsPerEm,r=go(a);for(let s=0;s<f.length;s++){const l=f.charAt(s),c=t.glyphs[l];if(c&&c.pathData){const t=c.width*n;o.push({G:c.pathData,Z:c.width,scale:n,B:r,J:i+t/2}),i+=t}else if(/\S/.test(l)){const s=c&&c.width>0?c.width:wo*t.unitsPerEm,l=s*n;o.push({G:jo(s,e),Z:s,scale:n,B:r,W:!0,J:i+l/2}),i+=l}else i+=(c?c.width:0)*n;i+=a.letterSpacing+(" "===l?a.wordSpacing:0)}}}if(t.children)for(const n of t.children)s(n,a)};return s(t,ho(t)),{cells:o,width:i}}(t,s,d,c);if(!v.length)return To(t,[],l);const{X:y,q:p}=function(t){var n,e,r;return{X:(null!=(n=vo(t.x))?n:0)+(null!=(e=vo(t.dx))?e:0),q:null!=(r=vo(t.dy))?r:0}}(t),h=xo(e),g=xo(o),b=t=>t>0&&m>0?t/m:1,A="clip"===i&&!u.closed;if(h.animated||g.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.U,g.U),e=(t,n)=>y+h.at(n)+b(g.at(n))*t.J,r=h.animated?h.loop:g.loop;return To(t,function(t,n,e,r,o,i,s,l=0){const c=Math.max(n.totalLength/Oo,.5),u=t=>t>=0&&t<=n.totalLength,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.Z/2),0],m=lo(v.G,t),y=(t,e)=>{const{x:r,y:o,angle:i}=n.sampleAtDistance(t),s=Math.cos(i),c=Math.sin(i);return{time:e,value:{translate:[No(r-l*c,3),No(o+l*s,3)],rotate:No(180*i/Math.PI,3)}}},p=[],h=[],g=(t,n)=>{p.push(y(t,n)),s&&h.push({time:n,value:u(t)?1:0})};g(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),s=e(v,o),l=Math.min(So,Math.max(1,Math.ceil(Math.abs(s-i)/c)));for(let t=1;t<=l;t++){const r=n+t/l*(o-n);g(e(v,r),r)}}we(p);const b={keyframes:p};void 0!==o&&(b.loop=o);const A={transform:b};if(v.B.animate&&Object.assign(A,v.B.animate),s&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),A.opacity=t}d.push(i("path",f(a(a({d:m},Po(v.B)),zo(v.W)),{animate:A}),[]))}return d}(v,u,e,n,r,l,A,p),l)}const w=b(g.at(0)),k=y+h.at(0);return To(t,Co((A?v.filter(t=>{const n=k+t.J*w;return n>=0&&n<=u.totalLength}):v).map(t=>({G:t.G,B:t.B,W:t.W,m:Mo(u,k+t.J*w,t.scale,t.Z,p)})),l,c),l)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.fonts"),null)}(h,n,t,y.startOffset,y.textLength,y.pathOverflow);e&&(h=e,g=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o;const{glyphs:i,create:s=eo,warnings:l}=n,c=Ao(i),u={x:null!=(e=vo(t.x))?e:0,y:null!=(r=vo(t.y))?r:0},a=[],f=[{start:u.x,end:u.x}];let d=0;const v=(t,n)=>{var e;const r=bo(n,i,c,l),o=(null==r?void 0:r.unitsPerEm)||1e3,s=n.fontSize/o,v=null!=(e=null==r?void 0:r.ascent)?e:.9*o,m=go(n);for(let e=0;e<t.length;e++){const i=t.charAt(e),l=null==r?void 0:r.glyphs[i];if(l&&l.pathData)a.push({G:l.pathData,m:[s,0,0,s,u.x,u.y],B:m,line:d,x:u.x,y:u.y,scale:s}),u.x+=l.width*s;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:wo*o;a.push({G:jo(t,v),m:[s,0,0,s,u.x,u.y],B:m,W:!0,line:d,x:u.x,y:u.y,scale:s}),u.x+=t*s}else u.x+=(l?l.width:0)*s;u.x+=n.letterSpacing+(" "===i?n.wordSpacing:0),f[d].end=u.x}},m=(t,n)=>{var e,r,o;const i=po(t,n),s=vo(t.x),l=vo(t.y);void 0!==s&&(u.x=s,d=f.length,f.push({start:u.x,end:u.x})),void 0!==l&&(u.y=l),u.x+=null!=(e=vo(t.dx))?e:0,u.y+=null!=(r=vo(t.dy))?r:0;const c=mo(t[ft]);if(c&&!(null==(o=t.children)?void 0:o.length)&&v(c,i),t.children)for(const n of t.children)m(n,i)},y=ho(t);if(t.children)for(const n of t.children)m(n,y);const p=mo(t[ft]);p&&!(null==(o=t.children)?void 0:o.length)&&v(p,y);const h=mo(t.textAnchor);if("middle"===h||"end"===h)for(const t of a){const n=f[t.line].end-f[t.line].start,e="middle"===h?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return To(t,Co(a,s,l),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(h,p,n),g=!0;return g||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.pathData||!n.pathData)return t;const o=fr(e,"tpath"),{d:i,startShift:s}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,startShift:0};const r=Kr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Yr*o,s=Hr(n.startOffset),l=Hr(n.textLength).max||(null!=(e=n.advance)?e:0),c=Math.max(0,-s.min),u=Math.max(0,s.max+l-o),a=c>0?c+i:0,f=u>0?u+i:0;if(f<=0&&a<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),v=r.sampleAtDistance(o);let m=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+to(n)+","+to(e)+"L"+to(d.x)+","+to(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;m+="L"+to(t)+","+to(n)}return{d:m,startShift:a}}(n.pathData,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:$r(t)});e.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(l.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(l.method=n.method),void 0!==n.spacing&&(l.spacing=n.spacing),no(l,"startOffset",function(t,n){if(!n||null==t)return t;const e=tr(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.base&&(r.value=e.base+n),r}(n.startOffset,s)),no(l,"textLength",n.textLength),t.children=[l],t}(h,y,n)),h=function(t,n,e){return gr(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return gr(t,n,e,"stroke")}(h,m,n),h=function(t,n){if(!n)return t;const e=n.subPaths===at.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,s,l,c,u,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),s=Number(null!=(e=t.y)?e:0),l=Number(null!=(r=t.width)?r:0),c=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+s+"L"+(i+l)+","+(s+c)+"L"+i+","+(s+c)+"L"+i+","+s+"L"+(i+l)+","+s+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(s=t.cy)?s:0),r="circle"===t.type?Number(null!=(l=t.r)?l:0):Number(null!=(c=t.rx)?c:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*Xo,d=o*Xo,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=Ee(n);if(!e.length)return;const i={leaf:t,K:[]};for(const t of e){const n=Zo(t);i.K.push({Y:t,H:n,$:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const s=e?[...r].reverse():r;for(const t of s)for(const n of t.K)e||(i=0),n.$=i,i+=n.H;const l=i;if(e&&l<.001)return t;const c=tr(n.offset),u="absent"===c.kind?{kind:"static",value:0}:c,d=function(t){const n=tr(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>({time:St(t),value:Nt(t),easing:Pt(t)}));if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Wo(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let s=0;for(const t of e){for(;s<o.length&&o[s]<t.time;){const t=o[s++],n=Go(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;s<o.length;){const t=o[s++],n=Go(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,m=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const e of t.keyframes){const t=Nt(e);"number"==typeof t&&n.push(t)}return n}(u),y=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===r.length&&r[0].leaf===t&&1===r[0].K.length){const n=r[0],o=n.K[0],i=e?l:o.H;if(i<.001)return t;const s=e?o.$/i:0;return function(t,n,e,r,o,i){const s=Lo(e,n,r),l=Eo(n,r),c=a({},t);return delete c.effects,Io(c,"strokeDasharray",Fo(i,l)),Io(c,"strokeDashoffset",Fo(o,s)),Io(c,"strokeOpacity",Bo(i)),c}(n.leaf,i,s,y,u,v)}const p=new Map;for(const t of r){const n=[];for(const r of t.K){const o=e?l:r.H;if(o<.001)continue;const i=e?r.$/o:0;n.push(...Do(t.leaf,r.Y,o,i,y,u,v))}p.set(t.leaf,_o(t.leaf,n))}const h=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,u),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const s=t.transform,l=null==(o=t.animate)?void 0:o.transform,c=mr(t);delete c.transform,c.animate&&(delete c.animate.transform,0===Object.keys(c.animate).length&&delete c.animate),delete c.id;const u=[c];for(let t=1;t<i;t++){const e=mr(c),r=Dr(n,t),o=r?or(e,r):e;u.push(o)}const a={type:"g",children:u};return t.id&&(a.id=t.id),void 0!==s&&(a.transform=s),void 0!==l&&(a.animate={transform:l}),a}(h,s,n),h=function(t,n,e,r){if(!n)return t;const o=dr(n.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=fr(r,"mask");let s={type:"use",href:"#"+o};if(e)s=Mr(s,e,r);else if(Nr(t))s=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const s=[],l=[],c=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=rr(t,void 0);if(Array.isArray(n.translate)&&s.push(f(a(a({},r),Sr(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),l.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),c.push(f(a({},r),{value:t}))}}const u=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==u&&(n.loop=u),n};let v=t;return s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),c.length&&(v={type:"g",animate:{transform:d(c)},children:[v]}),v}(s,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,s,l,c,u,a,f,d,v;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let y;const p=[];for(;null!==(y=m.exec(t));){const t=y[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);p.push({name:y[1],tt:t})}if(!p.length)return;const h=p[p.length-1];if("translate"===h.name)for(let t=p.length-2;t>=0;t--){const a=p[t];if("translate"!==a.name)continue;const f=null!=(n=a.tt[0])?n:0,d=null!=(e=a.tt[1])?e:0,v=null!=(r=h.tt[0])?r:0,m=null!=(o=h.tt[1])?o:0;if(v!==-f||m!==-d)continue;const y={};y.origin=[f,d];for(let n=0;n<t;n++)if("translate"===p[n].name){const t=null!=(i=p[n].tt[0])?i:0,e=null!=(s=p[n].tt[1])?s:0;y.translate=y.translate?[y.translate[0]+t,y.translate[1]+e]:[t,e]}for(let n=t+1;n<p.length-1;n++){const t=p[n];if("rotate"===t.name)y.rotate=(null!=(l=y.rotate)?l:0)+(null!=(c=t.tt[0])?c:0);else if("scale"===t.name){const n=null!=(u=t.tt[0])?u:1,e=t.tt.length>1?t.tt[1]:n;y.scale=y.scale?[y.scale[0]*n,y.scale[1]*e]:[n,e]}}return y}let g,b,A;for(const t of p)if("translate"===t.name){const n=null!=(a=t.tt[0])?a:0,e=null!=(f=t.tt[1])?f:0;g=g?[g[0]+n,g[1]+e]:[n,e]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.tt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.tt[0])?v:1,e=t.tt.length>1?t.tt[1]:n;A=A?[A[0]*n,A[1]*e]:[n,e]}const w={};return g&&(w.translate=g),void 0!==b&&(w.rotate=b),A&&(w.scale=A),Object.keys(w).length?w:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(s=Mr(s,n,r))}const l=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Nr(t)}(t);s=function(t,n,e,r,o){const i=r.idMap.get(e),s=r.maskAncestorChains.get(n)||[],l=o?Tr(n,r):void 0,c=l?[...s,l]:s,u=i&&r.maskAncestorChains.get(i)||[];if(!c.length&&!u.length)return t;const a=new Set;for(const t of c)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);for(const t of u)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);if(!(a.size>0)){const n=Pr(c),e=Pr(u),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=zr(c,t),e=zr(u,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(s,t,o,r,l);const c={type:"mask",id:i,children:[s]};return n.maskType&&(c.maskType=n.maskType),n.maskUnits&&(c.maskUnits=n.maskUnits),n.maskContentUnits&&(c.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(c.x=String(n.x)),void 0!==n.y&&(c.y=String(n.y)),void 0!==n.width&&(c.width=String(n.width)),void 0!==n.height&&(c.height=String(n.height)),r.defs.push(c),t.mask="url(#"+i+")",t}(h,l,i,n),h=function(t,n,e){if(!(null==n?void 0:n.pathData))return t;const r=fr(e,"clip"),o={type:"path"},i=tr(n.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=jr(i.value):(nr(o,"d",i),void 0!==o.d&&(o.d=jr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,c,n),o?(_r(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let s=!1;const l=null==(e=t.animate)?void 0:e.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const n=l.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=hr(l),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const c=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),u=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!c||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(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 n={keyframes:u};void 0!==o&&(n.loop=o),t.animate.transform=n}s=!0}}const c=void 0!==(null==n?void 0:n.translate),u=s||c,f=s&&hr((null==(r=t.animate)?void 0:r.transform)||void 0)||s&&hr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],nt:r[0]});if(!n.length)return{et:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=pr(i.nt),r=pr(o.nt),s=-e[0],l=-e[1],c=r[0]-s,u=r[1]-l;return 0===c&&0===u?{et:t}:{translate:"translate("+c+","+u+")",et:"translate("+s+","+l+")"+n.slice(1).map(t=>t.nt).join("")}}if("translate"===i.name)return{et:t};const s=[];let l=0;for(;l<n.length&&"translate"===n[l].name;)s.push(n[l].nt),l++;if(!s.length)return{et:t};const c=n.slice(l).map(t=>t.nt).join("");return{translate:s.join(""),et:c||void 0}}(t.transform);u?void 0!==n.translate?n.et?t.transform=n.et:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.et?t.transform=n.et:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;u||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{rt:i,inner:s}=function(t){if(!t)return{};const n=hr(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{rt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let l=t;l=or(l,s);let c={type:"g",id:e,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(c.transform=o.transform),void 0!==o.animate&&(c.animate=o.animate),i&&(delete c.id,c=or(c,i),c.id=e),c}(h,i,r,o)):h=function(t,n,e,r){return _r(t,n,r),or(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.idMap.set(r,h),h}function Ko(t,n,e,r,o){const i=1-o,s=i*i*i,l=3*i*i*o,c=3*i*o*o,u=o*o*o;return[s*t[0]+l*n[0]+c*e[0]+u*r[0],s*t[1]+l*n[1]+c*e[1]+u*r[1]]}function Yo(t,n,e,r,o=64){let i=0,s=t;for(let l=1;l<=o;l++){const c=Ko(t,n,e,r,l/o);i+=Math.hypot(c[0]-s[0],c[1]-s[1]),s=c}return i}var Ho=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function $o(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function ti(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function ni(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function ei(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const s=ti(t.href);if(s&&e.has(s)){const l=n.get(s);if(l)return function(t,n,e,r,o,i,s){var l,c,u,d;const v=lr(n);cr(v,o);const m="symbol"===v.type?ni(v.viewBox):void 0,y=null!=(c=null!=(l=$o(t.width))?l:null==m?void 0:m[2])?c:s[0],p=null!=(d=null!=(u=$o(t.height))?u:null==m?void 0:m[3])?d:s[1],h="symbol"===v.type?function(t,n,e,r,o){const i=ni(t.viewBox),s=f(a({},t),{type:"g"});if(delete s.viewBox,delete s.preserveAspectRatio,delete s.width,delete s.height,!i)return s;const[l,c,u,d]=i,v=u>0&&d>0?Math.min(r/u,o/d):1,m=(r-u*v)/2,y=(o-d*v)/2,p=[];0===m&&0===y||p.push("translate("+m+","+y+")"),1!==v&&p.push("scale("+v+")"),0===l&&0===c||p.push("translate("+-l+","+-c+")"),p.length&&(s.transform=p.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:l,y:c,width:u,height:d}]}),s.clipPath="url(#"+h+")",s}(v,o,i,y,p):v,g=ei(h,e,r,o,i,s),b=f(a({},t),{type:"g",children:[g]});return delete b.href,delete b.width,delete b.height,ar(b)}(t,l,n,e,r,o,i)}}if(!t.children)return t;let s=!1;const l=t.children.map(t=>{const l=ei(t,n,e,r,o,i);return l!==t&&(s=!0),l});return s?f(a({},t),{children:l}):t}function ri(t,n,e){var r,o;let i=qo(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=Nt(o[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];for(const t of o){const e=Nt(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(!o.some(t=>zt(t)||Ct(t)))return;let c="M"+Ho(l[0][0])+","+Ho(l[0][1]);const u=[];for(let t=0;t<l.length-1;t++){const n=l[t],i=l[t+1],s=null!=(e=Ct(o[t]))?e:[0,0],a=null!=(r=zt(o[t+1]))?r:[0,0],f=[n[0]+s[0],n[1]+s[1]],d=[i[0]+a[0],i[1]+a[1]];c+="C"+Ho(f[0])+","+Ho(f[1])+","+Ho(d[0])+","+Ho(d[1])+","+Ho(i[0])+","+Ho(i[1]),u.push(Yo(n,f,d,i))}const a=u.reduce((t,n)=>t+n,0);if(!(a>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const n={t:St(o[t]),v:d/a},e=Pt(o[t]);void 0!==e&&(n.e=e),f.push(n)}return{ot:c,it:f,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e[vt];const s={keyframes:n.it};void 0!==i.loop&&(s.loop=i.loop),e[mt]=s;const l=t.transform;let c=l;if(l&&"object"==typeof l){const t=a({},l);delete t[pt.translate],delete t[pt.origin],c=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.ot+"')",offsetAnchor:Ho(n.anchor[0])+"px "+Ho(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==c?r.transform=c:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=Xe(i,null!=(o=null==(r=bt(i))?void 0:r.duration)?o:Gn),n===tt.native&&(i=_e(i,null==e?void 0:e.motionPath),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let s=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){s=!0;break}if(!s&&t.children)for(const n of t.children)if(o(n,r)){s=!0;break}if(!s&&"use"===t.type&&"string"==typeof t.href){const e=ti(t.href),i=e?n.get(e):void 0;i&&(s=o(i,r))}return r.delete(t),e.set(t,s),s};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=ni(t.viewBox);if(n)return[n[2],n[3]];const e=$o(t.width),r=$o(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),s=[],l=ei(t,e,r,()=>"_lw_use_mat_"+ ++o,s,i);if(0===s.length)return l;const c={type:"defs",children:s},u=[...null!=(n=l.children)?n:[],c];return f(a({},l),{children:u})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}var oi="setPlaybackRate: rate must be finite and non-zero";function ii(t){return Number.isFinite(t)&&0!==t}function si(t,n){return t>0?n===1/0?t:t*(n>0?n:1):0}function li(t,n){return Number.isNaN(t)||t<0?0:Number.isFinite(n)?t>n?n:t:Number.isFinite(t)?t:0}function ci(t,n,e){const r=si(n,e);return r>0&&Number.isFinite(t)?t<=0?0:e===1/0?t%r/r:t>=r?1:t/r:0}function ui(t,n,e){const r=si(n,e);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function ai(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}var fi={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"};function di(t,n){const e=n?n+" ":"";return{warn:(n,r,o)=>{if(null==t?void 0:t.onWarn)return void t.onWarn({kind:n,message:r,detail:o});if(null==t?void 0:t.muteWarn)return;const i=e+n+": "+r;void 0===o?console.warn(i):console.warn(i,o)},error:(n,r,o)=>{const i=function(t){return"string"==typeof t?new Error(t):t}(r);if(null==t?void 0:t.onError)return void t.onError({kind:n,message:i.message,error:i,detail:o});if(null==t?void 0:t.muteError)return;const s=e+n+": "+i.message;void 0===o?console.error(s):console.error(s,o)}}}var vi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],mi=["definitions","bindings"],yi=t=>!!t&&"object"==typeof t&&!Array.isArray(t),pi=t=>yi(t)&&"string"==typeof t.type?t.type:"time",hi=t=>"scroll"===t||"view"===t;function gi(t,n){const e=yi(t)?a({},t):{};for(const t of Object.keys(n)){const r=n[t];null!==r?yi(r)?e[t]=gi(e[t],r):e[t]=r:delete e[t]}return e}function bi(t,n,e){const r=pi(t),o=yi(n)&&"string"==typeof n.type?String(n.type):r;let i;if(o!==r){const e={};if(yi(t))for(const n of Y)void 0!==t[n]&&(e[n]=t[n]);i=gi(e,n)}else i=gi(t,n);if(hi(o)){for(const t of H)void 0!==i[t]&&(e("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(e("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}var Ai=6;function wi(t){return"scroll"===(null==t?void 0:t.timelineSource)}var ki="cover";function ji(t,n,e,r){var o;const[i,s]=function(t,n,e){const r=n,o=e;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]}}(null!=(o=null==t?void 0:t.phase)?o:ki,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(s-i)}function Mi(t,n,e){const r=null!=e?e:di(void 0,"[PxAnimator]"),o=[],i=()=>{for(const t of o.splice(0))t()},{startOn:s,outAction:l,scrollIntoViewThreshold:c}={startOn:null!=(a=null==(u=n)?void 0:u.startOn)?a:ot.startOn,outAction:null!=(f=null==u?void 0:u.outAction)?f:ot.outAction,scrollIntoViewThreshold:null!=(d=null==u?void 0:u.scrollIntoViewThreshold)?d:ot.scrollIntoViewThreshold};var u,a,f,d;const v=t.getRootElement();if(!v)return r.warn(fi.host,"setupAnimationTriggers: No root element found for animation."),i;let m=!1;const y=()=>{m&&(m=!1,t.setPlaybackRate(1)),t.play()},p=()=>{switch(l){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":m=!0,t.setPlaybackRate(-1),t.play()}};switch(s){case"load":{const t=()=>y();"complete"===document.readyState?t():(window.addEventListener("load",t,{once:!0}),o.push(()=>window.removeEventListener("load",t)));break}case"mouseOver":{let t=!1;const n=()=>{t=!0,y()},e=()=>{t&&p()};v.addEventListener("mouseenter",n),v.addEventListener("mouseleave",e),o.push(()=>{v.removeEventListener("mouseenter",n),v.removeEventListener("mouseleave",e)});break}case"click":{const n=()=>{t.isPlaying()?p():y()};v.addEventListener("click",n),o.push(()=>v.removeEventListener("click",n));break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),c=Math.min(r.height,Number.isFinite(l)?l:r.height);return c>0?o.height/c:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;const r=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=c?(e=!0,y()):e&&(e=!1,p())})},{threshold:n});r.observe(v),o.push(()=>r.disconnect());break}}return i}function xi(t){return"#"+t}function Oi(t,n,e,r){var o;const i=bt(t)||{},s=di(e,"[PxAnimator]");if(!r)if(t.id){const n=xi(t.id);(r=document.querySelector(n))||s.warn(fi.host,"createFrameLoopAnimator: No root element found for selector: "+n)}else s.warn(fi.host,"createFrameLoopAnimator: No root element provided");const l=function(t,n,e){var r;const o=bt(t)||{},i=Ke(t,tt.js),s=o.iterations;let l=1;"number"==typeof s&&(l=s||1),"infinite"===s&&(l=1/0),l<1&&(l=1);const c=+(o.duration||Gn),u=c&&l?c*(l===1/0?1/0:l):c?(null!=l?l:1)*c:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let m=null,y=!1,p=-(o.delay||0),h=0,g=1,b=!1;const A=o.frameRate,w=A&&A>0?1e3/A:0;let k=0;const j=()=>{const t=h?(Date.now()-h)*g:0;return p+t},M=()=>{let t=j();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function x(t){let e=function(){const n=c>0?c:1;let e=0,r=0;c>0?(t=Qn(t,0,l*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,l-1),e=Qn((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=He(r,e*c);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(M()):v&&x(0));const O=()=>!!y&&!!n.isConnected()&&(g<0?j()>0:!(Number.isFinite(u)&&M()>=u)),S=t=>{null!==m&&(ai(m),m=null),(t||O())&&(m=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=M(),i=j();if(i<0&&g>0)v&&x(0);else{if(g<0&&i<=0)return N(),x(0),void(b||(b=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(g>0&&u&&Number.isFinite(u)&&o>=u)return N(),x(d?u:0),void(b||(b=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(w>0){const t=Date.now();if(k&&t-k<w)return;k=t}x(o)}})(),S()}))},N=()=>{if(!y)return;let t=j();Number.isFinite(u)&&t>u&&(t=u),p=t,h=0,y=!1,null!==m&&(ai(m),m=null),t>=0?x(t):v&&x(0)},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!y){if(g>=0)Number.isFinite(u)&&p>=u&&(p=0);else if(p<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=u}b=!1,y=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;N(),p=0,h=0,y=!1,b=!1,x(p),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{((t=!0)=>{var n;p=Number.isFinite(u)?u:M(),h=0,y=!1,null!==m&&(ai(m),m=null),x(d?p:0),t&&!b&&(b=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!ii(t))return void console.warn(oi);let n=j();Number.isFinite(u)&&n>u&&(n=u),t<0!=g<0&&(b=!1),g=t,p=n,y&&(h=Date.now())},getCurrentTime:()=>M(),setCurrentTime:t=>{t=li(t,u),p=t,y&&(h=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),x(M())},getCurrentProgress:()=>ci(M(),c,l),setCurrentProgress:t=>{P.setCurrentTime(ui(t,c,l))},destroy:()=>{var t;P.cancel(),null==(t=null==e?void 0:e.onRemove)||t.call(e)}};return P}(t,n||function(t,n){const e=new Set,r=null!=n?n:di(void 0,"[PxAnimator]");return{isConnected:()=>!t||t.isConnected,setAttribute:(n,o,i)=>{o=qn(o);const s=xi(n),l=(null==t?void 0:t.querySelectorAll(s))||document.querySelectorAll(s);0!==l.length||e.has(s)||(e.add(s),r.warn(fi.host,'setAttribute: No elements found for selector "'+s+'"'));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===o&&"pattern"===n.tagName?"patternTransform":o;n.setAttribute(e,i),Wn.has(o)&&(n.style[o]=i)}}}}(r,s),e),c=f(a({},l),{getRootElement:()=>r||null});if(wi(i))i.trigger&&s.warn(fi.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=Mi(c,null!=(o=i.trigger)?o:{},s),n=c.destroy.bind(c);c.destroy=()=>{t(),n()}}return c}function Si(t,n,e,r){let o=Nt(t);const i=Pt(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,c=e;return Fn.has(e)&&Array.isArray(o)?l=En(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?In.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",c="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>On(t,!0)).join("")+'")':Un.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=Bn(o,{P:!0}),c="transform"),CSS.supports(qn(c),l)||r.add(c),c=Zn(c),s[c]=l,s}function Ni(t,n,e){var r,o,i,s,l;const c=[];for(let u=0;u<n.length;u++){const d=n[u],v=null!=(r=d.t)?r:0;if(v<0){const e=n[u+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?_n(d.e)(n):n,{right:o}=Rn(d.e,n);c.push({t:0,v:We(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[u-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?_n(r.e)(o):o,{left:s}=Rn(r.e,o);c.length>0&&(c[c.length-1]=f(a({},c[c.length-1]),{e:s})),c.push({t:e,v:We(t,r.v,d.v,i),e:void 0})}break}c.push(d)}return c}function Pi(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=Ni(i,s.keyframes||[],t),c=[];for(let e=0;e<l.length;e++){const o=l[e],s=Si(o,Qn((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&c.push(f(a({},s),{offset:0})),c.push(s)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(f(a({},c[c.length-1]),{offset:1})),c.length>0&&o.set(i,c)}return o}function zi(t,n,e,r,o){var i,s;const l=bt(t)||{},c=di(n,"[PxAnimator]");if(!e)if(t.id){const n=xi(t.id);(e=document.querySelector(n))||c.warn(fi.host,"createWebApiAnimator: No root element found for selector: "+n)}else c.warn(fi.host,"createWebApiAnimator: No root element provided");const u=Ke(t,tt.native),a=[],f=l.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let m=!1,y=!1;(null==u?void 0:u.length)||c.warn(fi.document,"createWebApiAnimator: No animation bindings defined");for(const t of u||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){c.warn(fi.document,"createWebApiAnimator: Empty or unresolved binding",t);continue}const s=xi(t.id),u=(null==e?void 0:e.querySelectorAll(s))||document.querySelectorAll(s);0===u.length&&c.warn(fi.host,'createWebApiAnimator: No elements found for selector "'+s+'"');const f=Pi(r,v,l),p=l.delay&&l.delay>0?l.delay:void 0;let h;if(l.delay&&l.delay<0&&l.duration){const t=-l.delay;h=d===1/0?t%l.duration:Math.min(t,l.duration*(null!=d?d:1))}const g={duration:l.duration,delay:p,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:d};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of f)if(t.length>0)try{const r=new KeyframeEffect(e,t,g),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;m||(m=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;y||(y=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==h&&(i.currentTime=h),a.push(i)}catch(t){c.warn(fi.internal,"createWebApiAnimator: could not build the animation",t)}}}if(!r&&v.size)return c.warn(fi.platform,"Unsupported CSS attrs: "+[...v].join(", ")),null;const p={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=a[0])?void 0:t.playState)},play:()=>{var t;m=!1,a.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;a.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;m=!1,a.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of a)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>ii(t)?(a.forEach(n=>n.playbackRate=t),p):(c.warn(fi.usage,oi),p),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=a[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{var n;const e=function(t,n){return t>0?n===1/0?1/0:t*(n>0?n:1):0}(null!=(n=l.duration)?n:0,null!=d?d:1),r=e>0?li(t,e):Math.max(0,t);m=!1,a.forEach(t=>{t.currentTime=r})},getCurrentProgress:()=>{var t;const n=p.getCurrentTime();return null===n?null:ci(n,null!=(t=l.duration)?t:0,null!=d?d:1)},setCurrentProgress:t=>{var n;p.setCurrentTime(ui(t,null!=(n=l.duration)?n:0,null!=d?d:1))},destroy:()=>{var t;p.cancel(),a.splice(0,a.length),y||(y=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};if("scroll"===l.timelineSource)l.trigger&&c.warn(fi.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=Mi(p,null!=(s=l.trigger)?s:{},c),n=p.destroy.bind(p);p.destroy=()=>{t(),n()}}return o&&a.forEach(t=>t.play()),p}function Ci(t,n,e){var r,o,i;const s="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*s);if(void 0!==l)return e?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function Ti(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function _i(){return document.scrollingElement||document.documentElement}var Di="parent",Ri="scroller";function Li(t,n,e){var r,o;const i=null!=e?e:di(void 0,"[PxAnimator]"),s=null==n?void 0:n.trim();if(!s)return t;if(s===Di){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(o=null!=(r=null==n?void 0:n.parentElement)?r:t.parentElement)?o:t}if(s===Ri)return Ti(t,"y")||Ti(t,"x")||_i();let l=null;try{l=document.querySelector(s)}catch(n){return i.warn(fi.document,'scroll timeline: subject "'+s+'" is not a valid selector — measuring the SVG itself'),t}return l||(i.warn(fi.host,'scroll timeline: subject "'+s+'" matched no element — measuring the SVG itself'),t)}function Ei(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const s="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,l=()=>{var e;const o=null!=(e=n.pinOffset)?e:0;if(!s)return void(r.top=o+"px");const i=function(t){const n=Ti(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),l=t.getBoundingClientRect().height;r.top=Math.round((i-l)*s+o)+"px"};l();let c=null;const u=s?l:null;s&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(c=new ResizeObserver(l),c.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==c||c.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function Vi(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var Fi="http://www.w3.org/2000/svg";function Ii(t,n,e){if(!t)return null;const r=t,{type:o,children:i,style:s}=r,l=d(r,["type","children","style"]),c=l.domType;void 0!==c&&delete l.domType;const u=kt(t)||n,a=s;let f;if(i)for(const t of i){const n=Ii(t,u,e);n&&(f||(f=[]),f.push(n))}const v=function(t,n,e,r,o,i){if(ee.has(t.toLowerCase()))return(null!=i?i:di(void 0,"[PxAnimator]")).warn(fi.document,"SVG tag blocked (dangerous): "+t),null;const s=document.createElementNS(Fi,t);for(const t in n){const e=ae(t,n[t]);void 0!==e&&(ie.has(t)?s.style[t]=String(e):s.setAttribute(qn(t),e))}if(e)for(const t in e)s.style[t]=String(e[t]);if(null==r?void 0:r.length)for(const t of r)s.appendChild(t);else o&&(s.textContent=o);return s}(o||"g",function(t){const n={};for(const e of Object.keys(t)){const r=Zn(e);if(yt.has(r))continue;if("style"===r)continue;let o=t[e];if(Fn.has(r)&&Array.isArray(o))n[r]=En(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)In.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n[vt]=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n[vt]=Bn(t,{P:!1})}}return n}(l),a,f,l[ft],e);return v&&void 0!==c&&v.setAttribute("type",c),v}var Ui,Bi="doc";function Wi(t,n,e,r,o,i){const s=di(e,"[PxAnimator]"),l=yn(t);for(const t of l)s.warn(fi.document,"effects shape: "+t);if(function(t){const{problems:n}=function(t){try{return{problems:pn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const e=n.slice(0,Ai),r=n.length-e.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+e.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const n=function(t,n,e){var r,o;const i=!!(null==e?void 0:e.st);if(!t||void 0===n||!(i||null!==n&&yi(n)&&Object.keys(n).length))return{doc:t,warnings:[]};const s=t,l=yi(s.animator),c=!l&&yi(null==(r=s.meta)?void 0:r.animator),u=l?s.animator:c?s.meta.animator:void 0,d=[];l&&yi(null==(o=s.meta)?void 0:o.animator)&&d.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let v=u;if(i){const t={};for(const n of mi)yi(u)&&void 0!==u[n]&&(t[n]=u[n]);v=t}const m=function(t,n){const e=[],r=t=>e.push(t);if(null===n)return{config:void 0,warnings:e};if(!yi(n)||0===Object.keys(n).length)return{config:t,warnings:e};const o=yi(t)?vi.filter(n=>void 0!==t[n]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=yi(t)?a({},t):{};for(const t of Object.keys(n)){const e=n[t];null!==e?"timeline"!==t?yi(e)?i[t]=gi(i[t],e):i[t]=e:i.timeline=yi(e)?bi(i.timeline,e,r):e:delete i[t]}return{config:i,warnings:e}}(v,null!=n?n:{});return d.push(...m.warnings),m.config===u?{doc:t,warnings:d}:c?{doc:f(a({},s),{meta:f(a({},s.meta),{animator:m.config})}),warnings:d}:{doc:f(a({},s),{animator:m.config}),warnings:d}}(t,null!=o?o:{},{st:!!i});for(const t of n.warnings)s.warn(fi.usage,"timeline override: "+t);t=n.doc}t=ri(t,et((bt(t)||{}).engine));let c=null;if(r){t=Mn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(c=Ii(t,void 0,s),c&&n.replaceChildren(c))}const u=function(t,n,e,r){return function(t,n,e,r){const o=bt(t)||{},i=di(e,"[PxAnimator]");return wi(o)?Vi(o,e,e=>{var s;let l=()=>{};if(o.engine!==nt.js&&r){l=Ei(r,o.scroll);const n=function(t,n,e){var r,o,i,s;const l=null!=e?e:di(void 0,"[PxAnimator]");if(!n||!wi(n))return null;const c=n.scroll||{},u=null!=(r=c.kind)?r:"view";if(c.smoothing)return l.warn(fi.platform,"scroll timeline: `smoothing` needs the built-in driver — using the built-in driver instead of the browser timeline"),null;const a=globalThis,f="view"===u,d=f?a.ViewTimeline:a.ScrollTimeline;if("function"!=typeof d)return null;const v=null!=(o=c.axis)?o:"block";let m;try{m=new d(f?{subject:Li(t,c.subject,l),axis:v}:{source:"root"===c.source?_i():Ti(t,"y")||Ti(t,"x")||_i(),axis:v})}catch(t){return l.warn(fi.platform,"scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:m,rangeStart:Ci(null==(i=c.range)?void 0:i.start,0,f),rangeEnd:Ci(null==(s=c.range)?void 0:s.end,1,f)}}(r,o,i);if(n){const i=zi(t,e,r,rt(o.engine),n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{l(),t()},i}}l(),l=()=>{}}const c=(o.engine!==nt.js?zi(t,e,r,rt(o.engine)):null)||Oi(t,n,e,r),u=(null==(s=c.getRootElement)?void 0:s.call(c))||r;if(u){l=Ei(u,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:Gn)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),n=function(t,n,e,r){var o,i;if(!n||!wi(n))return null;const s=null!=r?r:di(void 0,"[PxAnimator]"),l=n.scroll||{},c=null!=(o=l.kind)?o:"view",u=Li(t,l.subject,s),a=Ti(t,"y")||Ti(t,"x"),f="scroll"===c&&"root"===l.source?_i():a||_i(),d=f===_i(),v=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(l.axis,getComputedStyle(f).writingMode),m=()=>{if("scroll"===c)return function(t,n,e){var r,o;const i=n>0?Qn(t/n,0,1):1,s="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,l="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return l<=s?i>=l?1:0:Qn((i-s)/(l-s),0,1)}("y"===v?f.scrollTop:f.scrollLeft,"y"===v?f.scrollHeight-f.clientHeight:f.scrollWidth-f.clientWidth,l.range);const t=u.getBoundingClientRect();let n,e;if(d)n=0,e="y"===v?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=f.getBoundingClientRect();n="y"===v?t.top:t.left,e="y"===v?f.clientHeight:f.clientWidth}return function(t,n,e,r){const o=e-t,i=ji(null==r?void 0:r.start,0,n,e),s=ji(null==r?void 0:r.end,1,n,e);return s<=i?o>=s?1:0:Qn((o-i)/(s-i),0,1)}(("y"===v?t.top:t.left)-n,"y"===v?t.height:t.width,e,l.range)},y=Math.max(0,null!=(i=l.smoothing)?i:0)/1e3;let p=!1,h=null,g=null,b=0,A=null;const w=()=>{A=null,p||(t=>{if(!y)return void e(t);if(null===h)return h=t,void e(t);if(null!==g)return;b=0;const n=t=>{if(g=null,p)return;const r=b?Math.min(.1,(t-b)/1e3):1/60;b=t;const o=m(),i=1-Math.exp(-r/y);h+=(o-h)*i,Math.abs(o-h)<.001&&(h=o),e(h),h!==o&&(g=requestAnimationFrame(n))};g=requestAnimationFrame(n)})(m())},k=()=>{p||null!==A||(A=requestAnimationFrame(w))},j=d?window:f;let M;j.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(k),M.observe(u),u!==t&&M.observe(t),d||M.observe(f));const x={destroy:()=>{p||(p=!0,j.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==M||M.disconnect(),null!==A&&(cancelAnimationFrame(A),A=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{p||(h=m(),e(h))}};return x.refresh(),x}(u,o,n=>c.setCurrentTime(n*t),i);if(n){const t=c.destroy.bind(c);c.destroy=()=>{n.destroy(),l(),t()}}}else i.warn(fi.host,"scroll timeline: no root element to observe — animation will stay at frame 0");var a;return c}):Vi(o,e,e=>o.engine===nt.js?Oi(t,n,e,r):zi(t,e,r,rt(o.engine))||Oi(t,n,e,r))}(t,n,e,r)}(t,n,e,c);if(r&&c){const t=c,n=u.destroy.bind(u);u.destroy=()=>{n(),t.remove()}}return u}function Gi(t){const{src:n,doc:e,container:r,resetTimeline:o}=t,i=function(t){return"adapter"in t}(t)?t.adapter:void 0,s=function(t){const{timeline:n,duration:e,delay:r,iterations:o,startOn:i}=t;return function(t,n){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.warn("timeline override: not valid JSON — ignored",t),e=void 0}else e=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:s}=n;if(void 0===r&&void 0===o&&void 0===i&&void 0===s)return void 0===e?void 0:{timeline:e};const l=yi(e)?a({},e):{};return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==s&&(l.trigger=f(a({},l.trigger),{startOn:s})),{timeline:l}}(n,{duration:e,delay:r,iterations:o,startOn:i})}(t),l=function(t){const{onPlay:n,onPause:e,onCancel:r,onFinish:o,onRemove:i,onStop:s,onWarn:l,onError:c,muteWarn:u,muteError:a}=null!=t?t:{},f=t=>t||s?()=>{null==t||t(),null==s||s()}:void 0;return{onPlay:n,onPause:f(e),onCancel:f(r),onFinish:f(o),onRemove:f(i),onWarn:l,onError:c,muteWarn:u,muteError:a}}(t);if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `doc`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `doc` is required");let c=null,u=[],d=!1;const v=t=>{c?t(c):u&&u.push(t)},m=di(l,"[PxAnimator]"),y=(t,n,e)=>{u=null,m.error(t,n,e)},p=t=>{try{(t=>{c=t;const n=u;u=null,null==n||n.forEach(n=>n(t))})(Wi(t,i,l,r,s,o))}catch(t){const n=function(t){return t instanceof Error?t:new Error(String(t))}(t);y(fi.internal,"createAnimator: could not build the player — "+n.message,n)}};return void 0!==e?p(e):fetch(n).then(t=>t.json()).then(t=>{var e;d||((e=t)&&"object"==typeof e&&!Array.isArray(e)&&"svg"===e.type?p(t):y(fi.document,'createAnimator: invalid animation document format at "'+n+'"'))}).catch(t=>{var e;y(fi.host,'createAnimator: failed to load "'+n+'" — '+(null!=(e=null==t?void 0:t.message)?e:String(t)))}),{isReady:()=>!!c,getRootElement:()=>c?c.getRootElement():null,isPlaying:()=>(null==c?void 0:c.isPlaying())||!1,play:()=>{v(t=>t.play())},pause:()=>{v(t=>t.pause())},cancel:()=>{v(t=>t.cancel())},finish:()=>{v(t=>t.finish())},setPlaybackRate:t=>{v(n=>n.setPlaybackRate(t))},getCurrentTime:()=>c?c.getCurrentTime():null,setCurrentTime:t=>{v(n=>n.setCurrentTime(t))},getCurrentProgress:()=>c?c.getCurrentProgress():null,setCurrentProgress:t=>{v(n=>n.setCurrentProgress(t))},destroy:()=>{d=!0,u=null,null==c||c.destroy()}}}function Zi(t){const n=document.querySelectorAll("["+W+"]");for(let e=0;e<n.length;e++){const r=n[e];if(!r[G]){const n=r.getAttribute(W);n&&(r[G]=Gi(f(a({},t),{src:n,container:r})))}}}return Ui=v,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),Ui)})();