presenter 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/presenter.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(E,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(E=typeof globalThis<"u"?globalThis:E||self,G(E.Presenter={}))})(this,(function(E){"use strict";var Nn=Object.defineProperty;var Bn=(E,G,m0)=>G in E?Nn(E,G,{enumerable:!0,configurable:!0,writable:!0,value:m0}):E[G]=m0;var I=(E,G,m0)=>Bn(E,typeof G!="symbol"?G+"":G,m0);var A0,b0,M0,L0,T0;const G={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function m0(n){return n*n*n}function Kt(n){return--n*n*n+1}function Qt(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var q0=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})(q0),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})(q0);var Jt=(function n(e){e=+e;function t(o){return((o*=2)<1?o*o*((e+1)*o-e):(o-=2)*o*((e+1)*o+e)+2)/2}return t.overshoot=n,t})(q0);const O0={LINEAR:n=>n,CUBIC:Qt,CUBIC_IN:m0,CUBIC_OUT:Kt,BACK_IN_OUT:Jt.overshoot(.8)},te=O0.LINEAR;function F0(n,e,t={}){return{type:G.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:te,block:!1,interpolators:null,isKey:!1,shortcut:null,...typeof t=="number"?{duration:t}:t}}function ee(n,e={}){return F0(n,{opacity:1},{duration:500,easing:O0.CUBIC,...typeof e=="number"?{duration:e}:e})}function ne(n,e={}){return F0(n,{opacity:0},{duration:500,easing:O0.CUBIC,...typeof e=="number"?{duration:e}:e})}function D0(n,e,t={}){return{type:G.UPDATE,isKey:!1,object:n,props:e,shortcut:null,...t}}function re(n){return D0(n,{opacity:0})}function ie(n){return D0(n,{opacity:1})}const e0={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},o0=e0.TOP_LEFT;function W(n,e=0,t=0,o=1){if(typeof n=="string"){const i=n.replace("#",""),a=parseInt(i,16);return isNaN(a)?(console.warn("Invalid hex color format:",n),J):i.length===6?{red:a>>16&255,green:a>>8&255,blue:a&255,alpha:1}:i.length===8?{red:a>>24&255,green:a>>16&255,blue:a>>8&255,alpha:(a&255)/255}:(console.warn("Invalid hex color format:",n),J)}else if(typeof n=="number")return{red:n,green:e??0,blue:t??0,alpha:o??1};return{red:0,green:0,blue:0,alpha:1,...n}}W.BLACK=W(0,0,0),W.BLUE=W(0,0,255),W.GREEN=W(0,255,0),W.RED=W(255,0,0),W.TRANSPARENT=W(0,0,0,0),W.WHITE=W(255,255,255);const J={red:0,green:0,blue:0,alpha:1};function j0(n=null){return{content:null,setup:null,anchor:e0.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function lt(n,e=null){return n.alpha*(e??1)}function P0(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(lt(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function oe(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=W.TRANSPARENT,strokeColor:o=J,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=o0,height:h=1e3,width:c=1e3,x:f=0,y:d=0}=n||{},l=document.createElement("iframe");l.src=e,l.style.backgroundColor=P0(t),l.style.border=i>0?`${i}px solid ${P0(o)}`:"none",l.style.pointerEvents=a;const u=(100/s).toFixed(3)+"%";return l.style.height=i===0?u:`calc(${u} - ${i*2}px)`,l.style.width=i===0?u:`calc(${u} - ${i*2}px)`,l.style.transform=`scale(${s})`,l.style.transformOrigin="top left",j0({content:l,anchor:r,height:h,width:c,x:f,y:d})}const p0={LEFT:"left",CENTER:"center",RIGHT:"right"},se=p0.LEFT;function s0(n,e){throw new Error("Unexpected value: "+n)}function ae(n=null){const{alignment:e=p0.LEFT,scale:t=1,anchor:o=o0,height:i=1e3,width:a=1e3,x:s=0,y:r=0}=n||{};function h(c){const f=document.createElement("video");switch(f.autoplay=!0,f.style.transform=`scale(${t})`,e){case p0.LEFT:f.style.transformOrigin="top left";break;case p0.CENTER:f.style.transformOrigin="top center";break;case p0.RIGHT:f.style.transformOrigin="top right";break;default:s0(e)}c.appendChild(f);const d={video:{displaySurface:"window"},audio:!1};return navigator.mediaDevices.getDisplayMedia(d).then(l=>{const u=l.getVideoTracks()[0];u!==void 0&&(u.onended=function(){f.style.display="none"}),f.srcObject=l,f.play()}).catch(l=>{console.error("Could not start screen capture -",l)}),()=>{f.srcObject.getTracks().forEach(u=>u.stop()),f.style.display="none",f.srcObject=null}}return j0({content:null,setup:h,anchor:o,height:i,width:a,x:s,y:r})}const j={ARROW:"Arrow",CIRCLE:"Circle",GROUP:"Group",IMAGE:"Image",LINE:"Line",MASK:"Mask",PATH:"Path",POLYGON:"Polygon",RECTANGLE:"Rectangle",SLIDE_OBJECT:"SlideObject",SVG:"SVG",TEXT:"Text"};function n0(n){return{objectType:j.SLIDE_OBJECT,opacity:1,...n}}function he(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return n0({objectType:j.ARROW,arrowheadSize:i,color:J,drawn:1,endX:100,endY:100,isArrowheadDoubled:!1,isArrowheadFilled:!1,isDrawnFromCenter:!1,startX:0,startY:0,width:t,...o})}const le=50;function ce(n=null){return n0({objectType:j.CIRCLE,anchor:o0,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,radius:le,x:0,y:0,...n})}function z0(n,e=null){return n0({objectType:j.GROUP,anchor:o0,height:0,objects:n,previewColor:null,rotateOriginPreviewSize:0,rotateOriginX:0,rotateOriginY:0,rotation:0,skewOriginPreviewSize:0,skewOriginX:0,skewOriginY:0,skewX:0,skewY:0,scale:1,scaleX:1,scaleY:1,width:0,x:0,y:0,...e})}function ue(n){const{anchor:e=o0,cols:t=1,rows:o=1,gapX:i=0,gapY:a=0,groupProps:s={},width:r=0,height:h=0,x:c=0,y:f=0,objects:d=()=>null}=n,l=[],u=[];let m=0,y=0;for(let T=0;T<o;T++){const S=[];m=0;let P=0;for(let k=0;k<t;k++){const C=d(T,k),F=typeof r=="function"?r(T,k):r,N=typeof h=="function"?h(T,k):h;S.push(C),C!=null&&u.push(z0([C],{x:m,y})),m+=F+i,P=Math.max(P,N)}l.push(S),y+=P+a}return{grid:z0(u,{x:c,y:f,height:y-a,width:m-i,anchor:e,...s}),objects:l}}function fe(n=null){return n0({objectType:j.IMAGE,anchor:o0,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function ge(n=null){return n0({objectType:j.LINE,color:J,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function pe(n,e=null){return n0({objectType:j.MASK,anchor:o0,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var de=Object.defineProperty,_=(n,e)=>de(n,"name",{value:e,configurable:!0}),C0={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},xe=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ye=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,ve=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(xe);if(!e)throw new Error(`No path elements found in string ${n}`);return e.reduce((t,o)=>{let i=o.charAt(0),a=i.toLowerCase(),s=we(o.substring(1));if(a==="m"&&s.length>2&&(t.push([i,...s.splice(0,2)]),a="l",i=i==="m"?"l":"L"),a.toLowerCase()==="a"&&(s.length===5||s.length===6)){const r=o.substring(1).trim().split(" ");s=[Number(r[0]),Number(r[1]),Number(r[2]),Number(r[3].charAt(0)),Number(r[3].charAt(1)),Number(r[3].substring(2)),Number(r[4])]}for(;s.length>=0;){if(s.length===C0[a]){t.push([i,...s.splice(0,C0[a])]);break}if(s.length<C0[a])throw new Error(`Malformed path data: "${i}" must have ${C0[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,C0[a])])}return t},[])},"default"),we=_(n=>{const e=n.match(ye);return e?e.map(Number):[]},"parseValues"),r0=(A0=class{constructor(e,t,o,i){I(this,"x0");I(this,"x1");I(this,"y0");I(this,"y1");I(this,"getTotalLength",_(()=>Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),"getTotalLength"));I(this,"getPointAtLength",_(e=>{let t=e/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2));t=Number.isNaN(t)?1:t;const o=(this.x1-this.x0)*t,i=(this.y1-this.y0)*t;return{x:this.x0+o,y:this.y0+i}},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getPointAtLength(e),o=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:o.x,tangentY:o.y}},"getPropertiesAtLength"));this.x0=e,this.x1=t,this.y0=o,this.y1=i}},_(A0,"LinearPosition"),A0),ct=(b0=class{constructor(e,t,o,i,a,s,r,h,c){I(this,"x0");I(this,"y0");I(this,"rx");I(this,"ry");I(this,"xAxisRotate");I(this,"LargeArcFlag");I(this,"SweepFlag");I(this,"x1");I(this,"y1");I(this,"length");I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=ut({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,o=this.getPointAtLength(e);let i;e<0?e=0:e>this.length&&(e=this.length),i=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const a=i.x-o.x,s=i.y-o.y,r=Math.sqrt(a*a+s*s);return e<this.length-t?{x:-a/r,y:-s/r}:{x:a/r,y:s/r}},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getTangentAtLength(e),o=this.getPointAtLength(e);return{x:o.x,y:o.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength"));this.x0=e,this.y0=t,this.rx=o,this.ry=i,this.xAxisRotate=a,this.LargeArcFlag=s,this.SweepFlag=r,this.x1=h,this.y1=c;const f=me(300,function(d){return ut({x:e,y:t},o,i,a,s,r,{x:h,y:c},d)});this.length=f.arcLength}},_(b0,"Arc"),b0),ut=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=Ae(o,360);const h=be(o);if(n.x===s.x&&n.y===s.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};const c=(n.x-s.x)/2,f=(n.y-s.y)/2,d={x:Math.cos(h)*c+Math.sin(h)*f,y:-Math.sin(h)*c+Math.cos(h)*f},l=Math.pow(d.x,2)/Math.pow(e,2)+Math.pow(d.y,2)/Math.pow(t,2);l>1&&(e=Math.sqrt(l)*e,t=Math.sqrt(l)*t);let u=(Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(d.y,2)-Math.pow(t,2)*Math.pow(d.x,2))/(Math.pow(e,2)*Math.pow(d.y,2)+Math.pow(t,2)*Math.pow(d.x,2));u=u<0?0:u;const m=(i!==a?1:-1)*Math.sqrt(u),y=m*(e*d.y/t),M=m*(-t*d.x/e),T={x:Math.cos(h)*y-Math.sin(h)*M+(n.x+s.x)/2,y:Math.sin(h)*y+Math.cos(h)*M+(n.y+s.y)/2},S={x:(d.x-y)/e,y:(d.y-M)/t},P=gt({x:1,y:0},S);let k=gt(S,{x:(-d.x-y)/e,y:(-d.y-M)/t});!a&&k>0?k-=2*Math.PI:a&&k<0&&(k+=2*Math.PI),k%=2*Math.PI;const C=P+k*r,F=e*Math.cos(C),N=t*Math.sin(C);return{x:Math.cos(h)*F-Math.sin(h)*N+T.x,y:Math.sin(h)*F+Math.cos(h)*N+T.y,ellipticalArcStartAngle:P,ellipticalArcEndAngle:P+k,ellipticalArcAngle:C,ellipticalArcCenter:T,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),me=_((n,e)=>{n=n??500;let t=0;const o=[],i=[];let a,s=e(0);for(let r=0;r<n;r++){const h=Me(r*(1/n),0,1);a=e(h),t+=ft(s,a),i.push([s,a]),o.push({t:h,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=ft(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),Ae=_((n,e)=>(n%e+e)%e,"mod"),be=_(n=>n*(Math.PI/180),"toRadians"),ft=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),Me=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),gt=_((n,e)=>{const t=n.x*e.x+n.y*e.y,o=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(n.x*e.y-n.y*e.x<0?-1:1)*Math.acos(t/o)},"angleBetween"),Le=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],Te=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Pe=[[1],[1,1],[1,2,1],[1,3,3,1]],Ce=_((n,e,t)=>({x:(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],y:(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3]}),"cubicPoint"),Se=_((n,e,t)=>pt([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t),"cubicDerivative"),Ee=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*Le[20][s]+a,o+=Te[20][s]*dt(n,e,i);return a*o},"getCubicArcLength"),pt=_((n,e,t)=>({x:(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],y:(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2]}),"quadraticPoint"),ke=_((n,e,t)=>{t===void 0&&(t=1);const o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),h=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));const f=h/(2*r),d=t+f,l=c/r-f*f,u=d*d+l>0?Math.sqrt(d*d+l):0,m=f*f+l>0?Math.sqrt(f*f+l):0,y=f+Math.sqrt(f*f+l)!==0&&(d+u)/(f+m)!==0?l*Math.log(Math.abs((d+u)/(f+m))):0;return Math.sqrt(r)/2*(d*u-f*m+y)},"getQuadraticArcLength"),Ie=_((n,e,t)=>({x:2*(1-t)*(n[1]-n[0])+2*t*(n[2]-n[1]),y:2*(1-t)*(e[1]-e[0])+2*t*(e[2]-e[1])}),"quadraticDerivative");function dt(n,e,t){const o=U0(1,t,n),i=U0(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(dt,"BFunc");var U0=_((n,e,t)=>{const o=t.length-1;let i,a;if(o===0)return 0;if(n===0){a=0;for(let s=0;s<=o;s++)a+=Pe[o][s]*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}i=new Array(o);for(let s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return U0(n-1,e,i)},"getDerivative"),Y0=_((n,e,t)=>{let o=1,i=n/e,a=(n-t(i))/e,s=0;for(;o>.001;){const r=t(i+a),h=Math.abs(n-r)/e;if(h<o)o=h,i+=a;else{const c=t(i-a),f=Math.abs(n-c)/e;f<o?(o=f,i-=a):a/=2}if(s++,s>500)break}return i},"t2length"),f0=(M0=class{constructor(e,t,o,i,a,s,r,h){I(this,"a");I(this,"b");I(this,"c");I(this,"d");I(this,"length");I(this,"getArcLength");I(this,"getPoint");I(this,"getDerivative");I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,a=>this.getArcLength(t,o,a));return this.getPoint(t,o,i)},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,h=>this.getArcLength(t,o,h)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;return r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0},r},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,c=>this.getArcLength(t,o,c)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0};const h=this.getPoint(t,o,i);return{x:h.x,y:h.y,tangentX:r.x,tangentY:r.y}},"getPropertiesAtLength"));I(this,"getC",_(()=>this.c,"getC"));I(this,"getD",_(()=>this.d,"getD"));this.a={x:e,y:t},this.b={x:o,y:i},this.c={x:a,y:s},r!==void 0&&h!==void 0?(this.getArcLength=Ee,this.getPoint=Ce,this.getDerivative=Se,this.d={x:r,y:h}):(this.getArcLength=ke,this.getPoint=pt,this.getDerivative=Ie,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},_(M0,"Bezier"),M0),_e=(L0=class{constructor(e){I(this,"length",0);I(this,"partial_lengths",[]);I(this,"functions",[]);I(this,"initial_point",null);I(this,"getPartAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength"));I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength"));I(this,"getParts",_(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(this.functions[t]!==null){this.functions[t]=this.functions[t];const o={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(o)}return e},"getParts"));const t=Array.isArray(e)?e:ve(e);let o,i=[0,0],a=[0,0],s=[0,0];for(let r=0;r<t.length;r++){if(t[r][0]==="M")i=[t[r][1],t[r][2]],s=[i[0],i[1]],this.functions.push(null),r===0&&(this.initial_point={x:t[r][1],y:t[r][2]});else if(t[r][0]==="m")i=[t[r][1]+i[0],t[r][2]+i[1]],s=[i[0],i[1]],this.functions.push(null);else if(t[r][0]==="L")this.length+=Math.sqrt(Math.pow(i[0]-t[r][1],2)+Math.pow(i[1]-t[r][2],2)),this.functions.push(new r0(i[0],t[r][1],i[1],t[r][2])),i=[t[r][1],t[r][2]];else if(t[r][0]==="l")this.length+=Math.sqrt(Math.pow(t[r][1],2)+Math.pow(t[r][2],2)),this.functions.push(new r0(i[0],t[r][1]+i[0],i[1],t[r][2]+i[1])),i=[t[r][1]+i[0],t[r][2]+i[1]];else if(t[r][0]==="H")this.length+=Math.abs(i[0]-t[r][1]),this.functions.push(new r0(i[0],t[r][1],i[1],i[1])),i[0]=t[r][1];else if(t[r][0]==="h")this.length+=Math.abs(t[r][1]),this.functions.push(new r0(i[0],i[0]+t[r][1],i[1],i[1])),i[0]=t[r][1]+i[0];else if(t[r][0]==="V")this.length+=Math.abs(i[1]-t[r][1]),this.functions.push(new r0(i[0],i[0],i[1],t[r][1])),i[1]=t[r][1];else if(t[r][0]==="v")this.length+=Math.abs(t[r][1]),this.functions.push(new r0(i[0],i[0],i[1],i[1]+t[r][1])),i[1]=t[r][1]+i[1];else if(t[r][0]==="z"||t[r][0]==="Z")this.length+=Math.sqrt(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)),this.functions.push(new r0(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new f0(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],t[r][5],t[r][6]),this.length+=o.getTotalLength(),i=[t[r][5],t[r][6]],this.functions.push(o);else if(t[r][0]==="c")o=new f0(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],i[0]+t[r][5],i[1]+t[r][6]),o.getTotalLength()>0?(this.length+=o.getTotalLength(),this.functions.push(o),i=[t[r][5]+i[0],t[r][6]+i[1]]):this.functions.push(new r0(i[0],i[0],i[1],i[1]));else if(t[r][0]==="S"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const h=o.getC();o=new f0(i[0],i[1],2*i[0]-h.x,2*i[1]-h.y,t[r][1],t[r][2],t[r][3],t[r][4])}}else o=new f0(i[0],i[1],i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3],t[r][4]],this.functions.push(o))}else if(t[r][0]==="s"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const h=o.getC(),c=o.getD();o=new f0(i[0],i[1],i[0]+c.x-h.x,i[1]+c.y-h.y,i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4])}}else o=new f0(i[0],i[1],i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3]+i[0],t[r][4]+i[1]],this.functions.push(o))}else if(t[r][0]==="Q"){if(i[0]===t[r][1]&&i[1]===t[r][2]){const h=new r0(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}else o=new f0(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);i=[t[r][3],t[r][4]],a=[t[r][1],t[r][2]]}else if(t[r][0]==="q"){if(t[r][1]!==0||t[r][2]!==0)o=new f0(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const h=new r0(i[0]+t[r][1],i[0]+t[r][3],i[1]+t[r][2],i[1]+t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}a=[i[0]+t[r][1],i[1]+t[r][2]],i=[t[r][3]+i[0],t[r][4]+i[1]]}else if(t[r][0]==="T"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new f0(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],t[r][1],t[r][2],void 0,void 0),this.functions.push(o),this.length+=o.getTotalLength();else{const h=new r0(i[0],t[r][1],i[1],t[r][2]);this.functions.push(h),this.length+=h.getTotalLength()}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1],t[r][2]]}else if(t[r][0]==="t"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new f0(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],i[0]+t[r][1],i[1]+t[r][2],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const h=new r0(i[0],i[0]+t[r][1],i[1],i[1]+t[r][2]);this.length+=h.getTotalLength(),this.functions.push(h)}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1]+i[0],t[r][2]+i[1]]}else if(t[r][0]==="A"){const h=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,t[r][6],t[r][7]);this.length+=h.getTotalLength(),i=[t[r][6],t[r][7]],this.functions.push(h)}else if(t[r][0]==="a"){const h=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,i[0]+t[r][6],i[1]+t[r][7]);this.length+=h.getTotalLength(),i=[i[0]+t[r][6],i[1]+t[r][7]],this.functions.push(h)}this.partial_lengths.push(this.length)}}},_(L0,"SVGPathProperties"),L0),H0=(T0=class{constructor(e){I(this,"inst");I(this,"getTotalLength",_(()=>this.inst.getTotalLength(),"getTotalLength"));I(this,"getPointAtLength",_(e=>this.inst.getPointAtLength(e),"getPointAtLength"));I(this,"getTangentAtLength",_(e=>this.inst.getTangentAtLength(e),"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength"));I(this,"getParts",_(()=>this.inst.getParts(),"getParts"));if(this.inst=new _e(e),!(this instanceof H0))return new H0(e)}},_(T0,"_svgPathProperties"),T0);function xt(n=W.BLACK){return{...n,alpha:0}}function Oe(n=null){const{path:e,height:t=100,width:o=100,viewboxHeight:i,viewboxWidth:a,...s}=n??{},r=e??"M 0 0 L 100 100",c=new H0(r).getTotalLength();return n0({objectType:j.PATH,anchor:o0,strokeColor:J,drawn:1,fillColor:xt(),isRounded:!1,height:t,path:r,pathLength:c,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function Fe(n=null){return n0({objectType:j.POLYGON,strokeColor:J,strokeWidth:0,drawn:1,points:[{x:0,y:0},{x:100,y:0},{x:100,y:100}],fillColor:J,...n})}function Re(n=null){return n0({objectType:j.RECTANGLE,anchor:o0,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function Ne(n=null){return n0({objectType:j.SVG,anchor:o0,height:100,svg:"",width:100,x:0,y:0,...n})}const yt={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},Be=yt.NORMAL,vt={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},qe=vt.NORMAL,De={color:J,fontFamily:"sans-serif",fontSize:100,fontStyle:Be,fontWeight:qe,ligatures:!1,subscript:!1,superscript:!1};function wt(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function mt(n){return wt(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function At(n="",e=null){return n0({objectType:j.TEXT,alignment:se,anchor:o0,length:null,lineSpacing:1,text:n,x:0,y:0,...De,...e})}At.writeOn=(n,e={})=>F0(n,{length:mt(n.text)},e);let K=null;function je({presentation:n,onNavigateToSlide:e}){if(K!==null&&!K.closed){K.focus();return}if(K=window.open("","Navigator","width=300,height=500,left=20,top=50"),K===null){console.error("Failed to open navigator window.");return}const t=ze(n,e);K.document.title=n.title,K.document.body.appendChild(t),K.addEventListener("keyup",o=>{(o.key==="Escape"||o.key==="`")&&(K==null||K.close(),K=null)})}function ze(n,e){const t=document.createElement("div");return t.style.fontFamily="Arial, sans-serif",n.slides.forEach((o,i)=>{const a=Ue(o,i);a.style.cursor="pointer",a.addEventListener("click",s=>{s.shiftKey&&(K==null||K.close()),e(i)}),t.appendChild(a)}),t}function Ue(n,e){const t=document.createElement("div");return t.style.marginBottom="8px",t.style.padding="8px",t.style.backgroundColor="#eceed7",t.style.borderRadius="4px",t.style.userSelect="none",t.innerHTML=`${e+1}: `+(n.title.length>0?n.title:`Slide ${e+1}`),t}function i0(n=null){return{height:0,width:0,...n}}const Ye=i0({width:0,height:0});function bt(n=null){return{backgroundColor:W.WHITE,slides:[],title:"Presentation",size:i0({width:3840,height:2160}),resources:{images:{}},...n}}function He(n){const e=Array.isArray(n)?n:[n];let t=0,o=0;for(const i of e)switch(i.type){case G.PAUSE:t+=i.duration;break;case G.ANIMATE:o=Math.max(o,t+i.delay+i.duration),i.block&&(t+=i.delay+i.duration);break;case G.UPDATE:break;default:s0(i)}return o}function X0(n,e=null){const{red:t,green:o,blue:i}=n,a=lt(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function Xe(n){return n===document.body}function Ge(n,e){const t=document.createElement("div");if(t.style.width="100%",t.style.aspectRatio=`${n.size.width} / ${n.size.height}`,t.style.position="relative",t.style.top="50%",t.style.transform="translateY(-50%)",t.style.marginLeft="auto",t.style.marginRight="auto",Xe(e)){t.style.overflowY="clip",document.title=n.title,document.documentElement.style.height="100%",document.body.style.margin="0",document.body.style.height="100%",document.body.style.width="100%",document.body.style.backgroundColor="#000000";const o=n.size.height/n.size.width;Mt(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>Mt(t,o))}return t}function Mt(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const Lt={check:n=>typeof n=="object"&&n!==null&&typeof n.red=="number"&&typeof n.green=="number"&&typeof n.blue=="number"&&typeof n.alpha=="number",interpolate:(n,e,t)=>({red:Math.round(n.red+(e.red-n.red)*t),green:Math.round(n.green+(e.green-n.green)*t),blue:Math.round(n.blue+(e.blue-n.blue)*t),alpha:n.alpha+(e.alpha-n.alpha)*t})},$e={check:n=>!0,interpolate:(n,e)=>e},Tt={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},Pt=[Tt,Lt,$e];function We(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...Pt]:Pt,a={};for(const s in e){const r=n[s],h=e[s];for(const c of i)if(c.check(r,s)&&c.check(h,s)){a[s]=c.interpolate(r,h,t);break}}return{...n,...a}}function Ct(n,e,t=null){if(e===null)return;const o=Array.isArray(e)?e:[e];let i=0;for(const a of o){if(t!==null&&i>t)break;switch(a.type){case G.ANIMATE:{const s=n.get(a.object);if(s===void 0)break;const r=t!==null?t-i:null,h=Math.max(Math.min(r!==null?(r-a.delay)/a.duration:1,1),0);n.set(a.object,{...s,...We(s,a.props,a.easing(h),a.interpolators)}),a.block&&(i+=a.delay+a.duration);break}case G.UPDATE:{const s=n.get(a.object);if(s===void 0)break;n.set(a.object,{...s,...a.props});break}case G.PAUSE:i+=a.duration;break;default:s0(a)}}}function St(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function Ze({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of St(s))i(r)}for(const s of n.objects)i(s);const a=t===null?e:e-1;for(let s=0;s<a;s++){const r=n.animations[s]??null;Ct(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;Ct(o,s,t)}return o}function Ve(n){const e={};function t(o){if(o.objectType===j.SVG){const a=o.svg;a!==void 0&&a.length>0&&(e[a]=a)}const i=St(o);for(const a of i)t(a)}for(const o of n.slides)for(const i of o.objects)t(i);return e}function Ke(n){var o;const{slides:e}=n,t={s:{slideIndex:0,buildIndex:0},c:{slideIndex:null,buildIndex:0},e:{slideIndex:e.length-1,buildIndex:((o=e[e.length-1])==null?void 0:o.animations.length)??0}};for(let i=0;i<e.length;i++){const a=e[i];if(a===void 0)continue;const s=a.shortcut;G0(t,s,i,0);for(let r=0;r<a.animations.length;r++){const h=a.animations[r];if(h!==void 0)if(Array.isArray(h))for(const c of h)G0(t,c.shortcut,i,r+1);else G0(t,h.shortcut,i,r+1)}}return t}function G0(n,e,t,o){if(e!==null)if(Array.isArray(e))for(const i of e)n[i]={slideIndex:t,buildIndex:o};else n[e]={slideIndex:t,buildIndex:o}}function Qe(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s}){t.shortcuts=Ke(n),e.addEventListener("mousemove",()=>{e.style.cursor="auto"}),e.addEventListener("keyup",r=>{if(r.code==="Escape"){t.textCommand=null;return}if(r.code==="ArrowRight"||r.code==="Space"){o(r.shiftKey);return}if(r.code==="ArrowLeft"){i(r.shiftKey);return}if(t.textCommand!==null){if(r.code==="Enter"){const h=t.textCommand;t.textCommand=null;const c=t.shortcuts[h];c!==void 0?a(c.slideIndex,c.buildIndex):isNaN(Number(h))||a(Number(h)-1,0);return}else r.code==="Backspace"?t.textCommand=t.textCommand.slice(0,-1):t.textCommand+=r.key;return}if(r.key==="g"){t.textCommand="";return}if(r.key==="`"){s();return}})}const y0="presenterState";function Je(n,e){const t=localStorage.getItem(y0);if(t===null)return null;if(e===null)return localStorage.removeItem(y0),null;let o;try{o=JSON.parse(t)}catch(c){return console.error("Failed to parse presentation state from localStorage:",c),localStorage.removeItem(y0),null}const{title:i,timestamp:a}=o;let{slideIndex:s,buildIndex:r}=o;if(typeof i!="string"||typeof s!="number"||typeof r!="number"||typeof a!="number"||i!==n.title||Date.now()-a>1e3*60*e)return localStorage.removeItem(y0),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const h=n.slides[s];return h===void 0?(localStorage.removeItem(y0),null):(r>h.animations.length&&(r=h.animations.length),{title:i,slideIndex:s,buildIndex:r})}function t1({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(y0,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const Et=Object.freeze({canvas:null,extrasContainer:null,mountedExtrasCleanups:[],mountedExtrasSlideIndex:null,slideIndex:0,buildIndex:0,currentAnimationId:null,imageById:{},shortcutState:{textCommand:null,shortcuts:{}}}),Q={Browser:"browser",Node:"node"};function e1(n,e){e.context.clearRect(0,0,n.width,n.height)}function n1(n){const e=document.createElement("canvas");return e.setAttribute("width",n.width.toString()),e.setAttribute("height",n.height.toString()),e.style.position="absolute",e.style.width="100%",e}const d0={Browser:"browser",Node:"node"};function r1(n){const e=new Path2D(n);return{type:d0.Browser,path:e}}function i1(n){const{drawn:e,startX:t,startY:o,endX:i,endY:a,arrowheadSize:s,isArrowheadFilled:r,isDrawnFromCenter:h}=n,c={x:t,y:o},f={x:i,y:a},d=Math.atan2(f.y-c.y,f.x-c.x),l={x:c.x+(f.x-c.x)/2,y:c.y+(f.y-c.y)/2},u=f.x-c.x,m=f.y-c.y,M=Math.hypot(u,m)*e,T=Math.cos(d),S=Math.sin(d),P=h?{x:l.x-T*M/2,y:l.y-S*M/2}:c,k=h?{x:l.x+T*M/2,y:l.y+S*M/2}:{x:c.x+T*M,y:c.y+S*M},C=r?Math.PI/6:Math.PI/4.5,F=M<s*2?M/2:s,N={x:k.x-F*Math.cos(d-C),y:k.y-F*Math.sin(d-C)},Z={x:k.x-F*Math.cos(d+C),y:k.y-F*Math.sin(d+C)},Y={x:P.x+F*Math.cos(d-C),y:P.y+F*Math.sin(d-C)},$={x:P.x+F*Math.cos(d+C),y:P.y+F*Math.sin(d+C)};return{arrowPoints:[P,k],arrowheadPoints:[N,k,Z],doubledArrowheadPoints:[Y,P,$]}}function v0({ctx:n,color:e,drawn:t=null,isDrawnFromCenter:o=!1,isRounded:i=!1,opacity:a=null,path:s,pathLength:r=null,width:h}){if(!(h===0||t===0)){if(t!==null&&r!==null&&t!==1){const c=r+(i?h:0),f=r*t;o?n.context.setLineDash([0,(c-f)/2,f,(c-f)/2]):n.context.setLineDash([f,c-f])}else n.context.setLineDash([]);if(n.context.lineWidth=h,n.context.strokeStyle=P0(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===d0.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===d0.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}}function w0({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=X0(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===d0.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===d0.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}function $0(n,e){const t=e(),o=n[0];if(o===void 0)return{path:t,length:0};t.path.moveTo(o.x,o.y);let i=0;for(let a=1;a<n.length;a++){const s=n[a],r=n[a-1];if(s===void 0||r===void 0)continue;const h=s.x-r.x,c=s.y-r.y;i+=Math.hypot(h,c),t.path.lineTo(s.x,s.y)}return{path:t,length:i}}const o1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{arrowPoints:a,arrowheadPoints:s,doubledArrowheadPoints:r}=i1(e),{path:h}=$0(a,o),{path:c}=$0(s,o);if(v0({color:e.color,ctx:n,path:h,opacity:i,width:e.width}),e.isArrowheadFilled&&(c.path.closePath(),w0({ctx:n,path:c,color:e.color,opacity:i})),v0({color:e.color,ctx:n,path:c,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:f}=$0(r,o);e.isArrowheadFilled&&(f.path.closePath(),w0({ctx:n,path:f,color:e.color,opacity:i})),v0({color:e.color,ctx:n,path:f,opacity:i,width:e.width})}};function s1(n,e){const t=n.radius-n.strokeWidth/2;if(t<=0)return;const o=e(),i=-Math.PI/2;return o.path.arc(n.x,n.y,t,i,i+2*Math.PI),o}function a1(n,e){const t=e(),o=-Math.PI/2;t.path.arc(n.x,n.y,n.radius,o,o+2*Math.PI);const i=2*Math.PI*n.radius;return{path:t,length:i}}function kt(n,e){switch(n.type){case Q.Browser:e.type===d0.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===d0.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}const h1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=a1(e,o);if(i<1&&e.strokeWidth>0){const r=s1(e,o);r!==void 0&&(n.context.save(),kt(n,r),w0({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else w0({ctx:n,path:a,color:e.fillColor,opacity:i});v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function X(n=null){return{x:0,y:0,...n}}const l1=X();function g0(n=null){return{origin:l1,size:Ye,...n}}g0();function x0(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case e0.TOP_LEFT:return g0({origin:X({x:o,y:i}),size:t});case e0.TOP:return g0({origin:X({x:o-a/2,y:i}),size:t});case e0.TOP_RIGHT:return g0({origin:X({x:o-a,y:i}),size:t});case e0.LEFT:return g0({origin:X({x:o,y:i-s/2}),size:t});case e0.CENTER:return g0({origin:X({x:o-a/2,y:i-s/2}),size:t});case e0.RIGHT:return g0({origin:X({x:o-a,y:i-s/2}),size:t});case e0.BOTTOM_LEFT:return g0({origin:X({x:o,y:i-s}),size:t});case e0.BOTTOM:return g0({origin:X({x:o-a/2,y:i-s}),size:t});case e0.BOTTOM_RIGHT:return g0({origin:X({x:o-a,y:i-s}),size:t});default:s0(e)}}const c1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width*Math.abs(i),height:e.height*Math.abs(a)})),{rotation:r,rotateOriginX:h,rotateOriginY:c,skewOriginX:f,skewOriginY:d,skewX:l,skewY:u}=e;if(!(i===0||a===0)){n.context.save(),n.context.translate(s.origin.x,s.origin.y),n.context.scale(i,a),n.context.translate(h,c),n.context.rotate(r*Math.PI/180),n.context.translate(-h,-c),n.context.translate(f,d),n.context.transform(1,Math.tan(u*Math.PI/180),Math.tan(l*Math.PI/180),1,0,0),n.context.translate(-f,-d);for(const m of e.objects)t(m,o*e.opacity);e.previewColor!==null&&(n.context.fillStyle=P0(e.previewColor),n.context.fillRect(0,0,e.width,e.height)),e.rotateOriginPreviewSize>0&&(n.context.fillStyle="red",n.context.beginPath(),n.context.arc(h,c,e.rotateOriginPreviewSize,0,2*Math.PI),n.context.fill()),e.skewOriginPreviewSize>0&&(n.context.fillStyle="blue",n.context.beginPath(),n.context.arc(f,d,e.skewOriginPreviewSize,0,2*Math.PI),n.context.fill()),n.context.restore()}};function W0(n,e,t,o,i=0){const a=o();a.path.moveTo(n.x+t,n.y),a.path.lineTo(n.x+e.width-t,n.y),a.path.arcTo(n.x+e.width,n.y,n.x+e.width,n.y+t,t),a.path.lineTo(n.x+e.width,n.y+e.height-t),a.path.arcTo(n.x+e.width,n.y+e.height,n.x+e.width-t,n.y+e.height,t),a.path.lineTo(n.x+t,n.y+e.height),a.path.arcTo(n.x,n.y+e.height,n.x,n.y+e.height-t,t),a.path.lineTo(n.x,n.y+t),a.path.arcTo(n.x,n.y,n.x+t,n.y,t),i>0&&a.path.lineTo(n.x+t+i,n.y);const s=2*(e.width+e.height-4*t)+2*Math.PI*t+i;return{path:a,length:s}}const S0={Browser:"browser",Node:"node"},u1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=x0(X({x:t.x,y:t.y}),t.anchor,i0({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=W0(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===d0.Browser?n.context.clip(r.path.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:r.path.type===d0.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===S0.Browser?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Node Image in Browser Canvas context");break;case Q.Node:s.type===S0.Node?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Browser Image in Node Canvas context");break;default:s0(n)}n.context.restore()}};function f1(n,e){const t=e();t.path.moveTo(n.startX,n.startY),t.path.lineTo(n.endX,n.endY);const o=Math.hypot(n.endX-n.startX,n.endY-n.startY);return{path:t,length:o}}const g1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{path:a,length:s}=f1(e,o);v0({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},p1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=P0(W.RED),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.stroke()),n.context.beginPath(),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.closePath(),n.context.clip();for(const a of e.objects)o(a,t*e.opacity);n.context.restore()},d1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{origin:a}=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height})),s=o(e.path);n.context.save(),n.context.translate(a.x,a.y),n.context.scale(e.width/e.viewboxWidth,e.height/e.viewboxHeight),w0({ctx:n,path:s,color:e.fillColor,opacity:i}),v0({color:e.strokeColor,ctx:n,drawn:e.drawn,isRounded:e.isRounded,path:s,pathLength:e.pathLength,opacity:i,width:e.strokeWidth}),n.context.restore()};function x1(n,e){const t=e(),o=n.points,i=o[0];if(i===void 0)return{path:t,length:0};t.path.moveTo(i.x,i.y);let a=0,s=i;for(let h=1;h<o.length;h++){const c=o[h];if(c===void 0)continue;t.path.lineTo(c.x,c.y);const f=Math.hypot(c.x-s.x,c.y-s.y);a+=f,s=c}t.path.closePath();const r=Math.hypot(i.x-s.x,i.y-s.y);return a+=r,{path:t,length:a}}const y1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=x1(e,o);w0({ctx:n,path:a,color:e.fillColor,opacity:i}),v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function v1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=x0(X({x:n.x,y:n.y}),n.anchor,i0({width:n.width,height:n.height})),a=i.width-n.strokeWidth,s=i.height-n.strokeWidth;if(a<=0||s<=0)return;const r=X({x:o.x+t,y:o.y+t}),h=i0({width:a,height:s}),c=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(c>0)return W0(r,h,c,e).path;const f=e();return f.path.moveTo(r.x,r.y),f.path.lineTo(r.x+a,r.y),f.path.lineTo(r.x+a,r.y+s),f.path.lineTo(r.x,r.y+s),f.path.closePath(),f}function w1(n,e){const{origin:t,size:o}=x0(X({x:n.x,y:n.y}),n.anchor,i0({width:n.width,height:n.height})),i=Math.max(0,Math.min(n.cornerRadius,Math.min(o.width,o.height)/2)),a=Math.min(n.strokeWidth*2,o.width-i);if(i>0)return W0(t,o,i,e,a);{const s=e();s.path.moveTo(t.x,t.y),s.path.lineTo(t.x+o.width,t.y),s.path.lineTo(t.x+o.width,t.y+o.height),s.path.lineTo(t.x,t.y+o.height),s.path.lineTo(t.x,t.y),s.path.lineTo(t.x+a,t.y);const r=2*(o.width+o.height)+a;return{path:s,length:r}}}const m1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=w1(e,o);if(i<1&&e.strokeWidth>0){const r=v1(e,o);r!==void 0&&(n.context.save(),kt(n,r),w0({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else w0({ctx:n,path:a,color:e.fillColor,opacity:i});v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})},A1=({ctx:n,imageById:e,object:t,opacity:o})=>{const i=t.opacity*o;if(i===0||!t.svg)return;const a=e[t.svg];if(a===void 0)return;const s=x0(X({x:t.x,y:t.y}),t.anchor,i0({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===S0.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===S0.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:s0(n)}n.context.restore()};function b1(n){return{color:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,ligatures:n.ligatures,subscript:n.subscript,superscript:n.superscript}}function M1(n,e=1){const t=Math.max(...n.map(a=>a.reduce((s,r)=>s+r.width,0)));let o=0,i=0;for(let a=0;a<n.length;a++){const s=n[a];if(s===void 0)continue;const r=Math.max(...s.map(h=>h.height));o+=r+i*(e-1),i=r}return{height:o,width:t}}const L1=.7,T1=.3;function It(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*T1*(e?-1:1),fontSize:n.fontSize*L1,isSubscript:t,isSuperscript:e}}function P1(n){return{width:n.width,height:n.fontBoundingBoxAscent}}function _t(n,e,t=1){const o=It(e);n.context.fillStyle=X0(e.color,t),n.context.font=`${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`,n.type===Q.Browser?n.context.textRendering=e.ligatures?"optimizeLegibility":"optimizeSpeed":n.context.fontVariant=e.ligatures?"common-ligatures":"no-common-ligatures"}function C1(n,e,t){const o=[];for(const i of n){const a=[];for(const s of i){const{text:r,...h}=s,c={...e,...h};_t(t,c);const f=t.context.measureText(r),d=P1(f),{baselineShift:l}=It(c),u=d.height+Math.max(0,-l),m=Math.max(0,l);a.push({...d,baselineShift:l,bottom:m,height:u+m,top:u})}o.push(a)}return o}const S1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=wt(e.text),s=b1(e),r=C1(a,s,n),h=M1(r,e.lineSpacing),c=x0(X({x:e.x,y:e.y}),e.anchor,h);let f=c.origin.x,d=c.origin.y,l=0,u=0;for(let m=0;m<a.length;m++){const y=a[m],M=r[m];if(y==null||M==null){console.error("Could not determine text units or sizes for line");continue}const T=M.reduce((F,N)=>F+N.width,0),S=M.length===0?u:M.reduce((F,N)=>Math.max(F,N.top),0),P=M.length===0?0:M.reduce((F,N)=>Math.max(F,N.bottom),0),k=S+P;switch(e.alignment){case p0.LEFT:f=c.origin.x;break;case p0.CENTER:f=c.origin.x+(c.size.width-T)/2;break;case p0.RIGHT:f=c.origin.x+(c.size.width-T);break;default:s0(e.alignment);break}d+=u*(e.lineSpacing-1);const C=d+S;u=k;for(let F=0;F<y.length&&!(i!==null&&l>=i);F++){const N=y[F],Z=M[F];if(N==null||Z==null){console.error("Could not determine text unit or size for unit");continue}const{text:Y,...$}=N;let l0;if(i!==null&&l+Y.length>i){const t0=i-l;l0=Y.slice(0,t0)}const c0=l0??Y;l+=c0.length;const u0={...s,...$};_t(n,u0,o),n.context.fillText(c0,f,C+Z.baselineShift),f+=Z.width}d+=k}},E1={[j.ARROW]:o1,[j.CIRCLE]:h1,[j.GROUP]:c1,[j.IMAGE]:u1,[j.LINE]:g1,[j.MASK]:p1,[j.PATH]:d1,[j.POLYGON]:y1,[j.RECTANGLE]:m1,[j.SLIDE_OBJECT]:()=>{},[j.SVG]:A1,[j.TEXT]:S1};function k1(n){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox",`0 0 ${n.width} ${n.height}`),e.style.backgroundColor="transparent",e.style.position="absolute",e.style.width="100%",e}function I1(n,e){if(n===null)return null;const t=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height})),o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");o.setAttribute("x",t.origin.x.toString()),o.setAttribute("y",t.origin.y.toString()),o.setAttribute("width",e.width.toString()),o.setAttribute("height",e.height.toString());const i=e.content;i!==null&&o.appendChild(i),n.appendChild(o);let a=null;if(e.setup!==null){const s=e.setup(o);s!==void 0&&(a=s)}return()=>{a!==null&&a(),n.removeChild(o)}}async function _1(n){if(Object.keys(n).length===0)return{};const e={},t=i=>new Promise((a,s)=>{const r=new Image;if(r.onload=()=>a(r),r.onerror=c=>s(c),i.includes("</svg>")){const c=i.replace(/<\?xml[^?]*\?>\s*/g,""),f=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(f);r.src=d}else r.src=i}),o=Object.entries(n).map(async([i,a])=>{const s=await t(a);e[i]={type:S0.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}class O1{constructor(e){const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:bt(),element:document.body,objectRenderers:{...E1,...t},cacheDurationMinutes:15,scale:F1(o),...i},this.state={...Et}}async present(){const{presentation:e,element:t,scale:o}=this.props,i=n1(e.size),a=k1(e.size);a.style.transformOrigin="center center",a.style.transform=`scale(${o})`,this.state={...Et,imageById:await _1({...e.resources.images,...Ve(e)}),canvas:i,extrasContainer:a};const s=Ge(e,t);Qe(e,t,this.state.shortcutState,{onNext:h=>this.next(h),onPrevious:h=>this.previous(h),onRenderSlide:(h,c)=>{this.state.shortcutState.shortcuts.b={slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex},this.renderSlide(h??this.state.slideIndex,c)},onShowNavigator:()=>je({presentation:e,onNavigateToSlide:h=>this.renderSlide(h)})}),t.replaceChildren(),s.appendChild(i),s.appendChild(a),t.appendChild(s);const r=Je(e,this.props.cacheDurationMinutes);r!==null?this.renderSlide(r.slideIndex,r.buildIndex):this.renderSlide(0)}renderSlide(e,t=0,o=null){const{objectRenderers:i,presentation:a,scale:s}=this.props,{canvas:r,imageById:h}=this.state,c=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&t1({title:a.title,slideIndex:e,buildIndex:t});const f=a.slides[e];if(f===void 0||r===null)return;if(c||this.state.mountedExtrasCleanups.length===0&&f.extras.length>0){for(const M of this.state.mountedExtrasCleanups)M();this.state.mountedExtrasCleanups=[];for(const M of f.extras){const T=I1(this.state.extrasContainer,M);T!==null&&this.state.mountedExtrasCleanups.push(T)}}const d=r.getContext("2d");if(d===null)return;const l={type:Q.Browser,context:d};e1(r,l);const u=Ze({slide:f,buildIndex:t,buildTime:o});l.context.fillStyle=X0(a.backgroundColor),l.context.fillRect(0,0,r.width,r.height);function m(M,T){const S=i[M.objectType],P=u.get(M);S===void 0||P===void 0||S({ctx:l,imageById:h,object:P,opacity:T,renderObject:m,createPath2D:r1})}const y=s!==1;y&&(l.context.save(),l.context.translate(r.width*(1-s)/2,r.height*(1-s)/2),l.context.scale(s,s));for(const M of f.objects)m(M,1);y&&l.context.restore()}next(e=!1){const{presentation:t}=this.props,{currentAnimationId:o,slideIndex:i,buildIndex:a}=this.state;this.props.element.style.cursor="none",o!==null&&cancelAnimationFrame(o);const s=t.slides[i];if(s===void 0)return;const r=s.animations[a];if(r!==void 0&&!e){const h=performance.now(),c=He(r),f=d=>{const l=d-h;l<c?(this.renderSlide(i,a+1,l),this.state.currentAnimationId=requestAnimationFrame(f)):this.renderSlide(i,a+1,null)};this.state.currentAnimationId=requestAnimationFrame(f)}else i+1<t.slides.length&&this.renderSlide(i+1)}previous(e=!1){const{currentAnimationId:t,slideIndex:o,buildIndex:i}=this.state;if(this.props.element.style.cursor="none",t!==null&&cancelAnimationFrame(t),i>0)e?this.renderSlide(o,0):this.renderSlide(o,i-1);else if(o>0){const a=this.props.presentation.slides[o-1],s=e?0:(a==null?void 0:a.animations.length)??0;this.renderSlide(o-1,s)}else this.renderSlide(0,0)}}function F1(n){return n<=0||n>1?(console.warn(`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`),1):n}function R1(n=1e3){return{type:G.PAUSE,isKey:!1,duration:n,shortcut:null}}function N1(n=null){return{objects:[],animations:[],extras:[],isAllKey:!1,isEndKey:!0,isStartKey:!1,shortcut:null,title:"",...n}}function B1(n,e={}){return{...e,text:n}}function q1(n=W.BLACK){return{...n,alpha:1}}function D1(n){for(var e=-1,t=n.length,o,i=n[t-1],a=0;++e<t;)o=i,i=n[e],a+=o[1]*i[0]-o[0]*i[1];return a/2}function j1(n){for(var e=-1,t=n.length,o=n[t-1],i,a,s=o[0],r=o[1],h=0;++e<t;)i=s,a=r,o=n[e],s=o[0],r=o[1],i-=s,a-=r,h+=Math.sqrt(i*i+a*a);return h}function z1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Z0,Ot;function U1(){if(Ot)return Z0;Ot=1;var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function t(u){return u===10||u===13||u===8232||u===8233||u===32||u===9||u===11||u===12||u===160||u>=5760&&e.indexOf(u)>=0}function o(u){switch(u|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function i(u){return(u|32)===97}function a(u){return u>=48&&u<=57}function s(u){return u>=48&&u<=57||u===43||u===45||u===46}function r(u){this.index=0,this.path=u,this.max=u.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function h(u){for(;u.index<u.max&&t(u.path.charCodeAt(u.index));)u.index++}function c(u){var m=u.path.charCodeAt(u.index);if(m===48){u.param=0,u.index++;return}if(m===49){u.param=1,u.index++;return}u.err="SvgPath: arc flag can be 0 or 1 only (at pos "+u.index+")"}function f(u){var m=u.index,y=m,M=u.max,T=!1,S=!1,P=!1,k=!1,C;if(y>=M){u.err="SvgPath: missed param (at pos "+y+")";return}if(C=u.path.charCodeAt(y),(C===43||C===45)&&(y++,C=y<M?u.path.charCodeAt(y):0),!a(C)&&C!==46){u.err="SvgPath: param should start with 0..9 or `.` (at pos "+y+")";return}if(C!==46){if(T=C===48,y++,C=y<M?u.path.charCodeAt(y):0,T&&y<M&&C&&a(C)){u.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+m+")";return}for(;y<M&&a(u.path.charCodeAt(y));)y++,S=!0;C=y<M?u.path.charCodeAt(y):0}if(C===46){for(k=!0,y++;a(u.path.charCodeAt(y));)y++,P=!0;C=y<M?u.path.charCodeAt(y):0}if(C===101||C===69){if(k&&!S&&!P){u.err="SvgPath: invalid float exponent (at pos "+y+")";return}if(y++,C=y<M?u.path.charCodeAt(y):0,(C===43||C===45)&&y++,y<M&&a(u.path.charCodeAt(y)))for(;y<M&&a(u.path.charCodeAt(y));)y++;else{u.err="SvgPath: invalid float exponent (at pos "+y+")";return}}u.index=y,u.param=parseFloat(u.path.slice(m,y))+0}function d(u){var m,y;m=u.path[u.segmentStart],y=m.toLowerCase();var M=u.data;if(y==="m"&&M.length>2&&(u.result.push([m,M[0],M[1]]),M=M.slice(2),y="l",m=m==="m"?"l":"L"),y==="r")u.result.push([m].concat(M));else for(;M.length>=n[y]&&(u.result.push([m].concat(M.splice(0,n[y]))),!!n[y]););}function l(u){var m=u.max,y,M,T,S,P;if(u.segmentStart=u.index,y=u.path.charCodeAt(u.index),M=i(y),!o(y)){u.err="SvgPath: bad command "+u.path[u.index]+" (at pos "+u.index+")";return}if(S=n[u.path[u.index].toLowerCase()],u.index++,h(u),u.data=[],!S){d(u);return}for(T=!1;;){for(P=S;P>0;P--){if(M&&(P===3||P===4)?c(u):f(u),u.err.length){d(u);return}u.data.push(u.param),h(u),T=!1,u.index<m&&u.path.charCodeAt(u.index)===44&&(u.index++,h(u),T=!0)}if(!T&&(u.index>=u.max||!s(u.path.charCodeAt(u.index))))break}d(u)}return Z0=function(m){var y=new r(m),M=y.max;for(h(y);y.index<M&&!y.err.length;)l(y);return y.result.length&&("mM".indexOf(y.result[0][0])<0?(y.err="SvgPath: string should start with `M` or `m`",y.result=[]):y.result[0][0]="M"),{err:y.err,segments:y.result}},Z0}var V0,Ft;function Rt(){if(Ft)return V0;Ft=1;function n(t,o){return[t[0]*o[0]+t[2]*o[1],t[1]*o[0]+t[3]*o[1],t[0]*o[2]+t[2]*o[3],t[1]*o[2]+t[3]*o[3],t[0]*o[4]+t[2]*o[5]+t[4],t[1]*o[4]+t[3]*o[5]+t[5]]}function e(){if(!(this instanceof e))return new e;this.queue=[],this.cache=null}return e.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},e.prototype.translate=function(t,o){return(t!==0||o!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,o])),this},e.prototype.scale=function(t,o){return(t!==1||o!==1)&&(this.cache=null,this.queue.push([t,0,0,o,0,0])),this},e.prototype.rotate=function(t,o,i){var a,s,r;return t!==0&&(this.translate(o,i),a=t*Math.PI/180,s=Math.cos(a),r=Math.sin(a),this.queue.push([s,r,-r,s,0,0]),this.cache=null,this.translate(-o,-i)),this},e.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},e.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},e.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=n(this.cache,this.queue[t]);return this.cache},e.prototype.calc=function(t,o,i){var a;return this.queue.length?(this.cache||(this.cache=this.toArray()),a=this.cache,[t*a[0]+o*a[2]+(i?0:a[4]),t*a[1]+o*a[3]+(i?0:a[5])]):[t,o]},V0=e,V0}var K0,Nt;function Y1(){if(Nt)return K0;Nt=1;var n=Rt(),e={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},t=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,o=/[\s,]+/;return K0=function(a){var s=new n,r,h;return a.split(t).forEach(function(c){if(c.length){if(typeof e[c]<"u"){r=c;return}switch(h=c.split(o).map(function(f){return+f||0}),r){case"matrix":h.length===6&&s.matrix(h);return;case"scale":h.length===1?s.scale(h[0],h[0]):h.length===2&&s.scale(h[0],h[1]);return;case"rotate":h.length===1?s.rotate(h[0],0,0):h.length===3&&s.rotate(h[0],h[1],h[2]);return;case"translate":h.length===1?s.translate(h[0],0):h.length===2&&s.translate(h[0],h[1]);return;case"skewX":h.length===1&&s.skewX(h[0]);return;case"skewY":h.length===1&&s.skewY(h[0]);return}}}),s},K0}var Q0,Bt;function H1(){if(Bt)return Q0;Bt=1;var n=Math.PI*2;function e(i,a,s,r){var h=i*r-a*s<0?-1:1,c=i*s+a*r;return c>1&&(c=1),c<-1&&(c=-1),h*Math.acos(c)}function t(i,a,s,r,h,c,f,d,l,u){var m=u*(i-s)/2+l*(a-r)/2,y=-l*(i-s)/2+u*(a-r)/2,M=f*f,T=d*d,S=m*m,P=y*y,k=M*T-M*P-T*S;k<0&&(k=0),k/=M*P+T*S,k=Math.sqrt(k)*(h===c?-1:1);var C=k*f/d*y,F=k*-d/f*m,N=u*C-l*F+(i+s)/2,Z=l*C+u*F+(a+r)/2,Y=(m-C)/f,$=(y-F)/d,l0=(-m-C)/f,c0=(-y-F)/d,u0=e(1,0,Y,$),t0=e(Y,$,l0,c0);return c===0&&t0>0&&(t0-=n),c===1&&t0<0&&(t0+=n),[N,Z,u0,t0]}function o(i,a){var s=1.3333333333333333*Math.tan(a/4),r=Math.cos(i),h=Math.sin(i),c=Math.cos(i+a),f=Math.sin(i+a);return[r,h,r-h*s,h+r*s,c+f*s,f-c*s,c,f]}return Q0=function(a,s,r,h,c,f,d,l,u){var m=Math.sin(u*n/360),y=Math.cos(u*n/360),M=y*(a-r)/2+m*(s-h)/2,T=-m*(a-r)/2+y*(s-h)/2;if(M===0&&T===0)return[];if(d===0||l===0)return[];d=Math.abs(d),l=Math.abs(l);var S=M*M/(d*d)+T*T/(l*l);S>1&&(d*=Math.sqrt(S),l*=Math.sqrt(S));var P=t(a,s,r,h,c,f,d,l,m,y),k=[],C=P[2],F=P[3],N=Math.max(Math.ceil(Math.abs(F)/(n/4)),1);F/=N;for(var Z=0;Z<N;Z++)k.push(o(C,F)),C+=F;return k.map(function(Y){for(var $=0;$<Y.length;$+=2){var l0=Y[$+0],c0=Y[$+1];l0*=d,c0*=l;var u0=y*l0-m*c0,t0=m*l0+y*c0;Y[$+0]=u0+P[0],Y[$+1]=t0+P[1]}return Y})},Q0}var J0,qt;function X1(){if(qt)return J0;qt=1;var n=1e-10,e=Math.PI/180;function t(o,i,a){if(!(this instanceof t))return new t(o,i,a);this.rx=o,this.ry=i,this.ax=a}return t.prototype.transform=function(o){var i=Math.cos(this.ax*e),a=Math.sin(this.ax*e),s=[this.rx*(o[0]*i+o[2]*a),this.rx*(o[1]*i+o[3]*a),this.ry*(-o[0]*a+o[2]*i),this.ry*(-o[1]*a+o[3]*i)],r=s[0]*s[0]+s[2]*s[2],h=s[1]*s[1]+s[3]*s[3],c=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),f=(r+h)/2;if(c<n*f)return this.rx=this.ry=Math.sqrt(f),this.ax=0,this;var d=s[0]*s[1]+s[2]*s[3];c=Math.sqrt(c);var l=f+c/2,u=f-c/2;return this.ax=Math.abs(d)<n&&Math.abs(l-h)<n?90:Math.atan(Math.abs(d)>Math.abs(l-h)?(l-r)/d:d/(l-h))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(u)):(this.ax+=90,this.rx=Math.sqrt(u),this.ry=Math.sqrt(l)),this},t.prototype.isDegenerate=function(){return this.rx<n*this.ry||this.ry<n*this.rx},J0=t,J0}var tt,Dt;function G1(){if(Dt)return tt;Dt=1;var n=U1(),e=Y1(),t=Rt(),o=H1(),i=X1();function a(s){if(!(this instanceof a))return new a(s);var r=n(s);this.segments=r.segments,this.err=r.err,this.__stack=[]}return a.from=function(s){if(typeof s=="string")return new a(s);if(s instanceof a){var r=new a("");return r.err=s.err,r.segments=s.segments.map(function(h){return h.slice()}),r.__stack=s.__stack.map(function(h){return t().matrix(h.toArray())}),r}throw new Error("SvgPath.from: invalid param type "+s)},a.prototype.__matrix=function(s){var r=this,h;s.queue.length&&this.iterate(function(c,f,d,l){var u,m,y,M;switch(c[0]){case"v":u=s.calc(0,c[1],!0),m=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=s.calc(d,c[1],!1),m=u[0]===s.calc(d,l,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=s.calc(c[1],0,!0),m=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=s.calc(c[1],l,!1),m=u[1]===s.calc(d,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var T=s.toArray(),S=i(c[1],c[2],c[3]).transform(T);if(T[0]*T[3]-T[1]*T[2]<0&&(c[5]=c[5]?"0":"1"),u=s.calc(c[6],c[7],c[0]==="a"),c[0]==="A"&&c[6]===d&&c[7]===l||c[0]==="a"&&c[6]===0&&c[7]===0){m=[c[0]==="a"?"l":"L",u[0],u[1]];break}S.isDegenerate()?m=[c[0]==="a"?"l":"L",u[0],u[1]]:m=[c[0],S.rx,S.ry,S.ax,c[4],c[5],u[0],u[1]];break;case"m":M=f>0,u=s.calc(c[1],c[2],M),m=["m",u[0],u[1]];break;default:for(y=c[0],m=[y],M=y.toLowerCase()===y,h=1;h<c.length;h+=2)u=s.calc(c[h],c[h+1],M),m.push(u[0],u[1])}r.segments[f]=m},!0)},a.prototype.__evaluateStack=function(){var s,r;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(s=t(),r=this.__stack.length;--r>=0;)s.matrix(this.__stack[r].toArray());this.__matrix(s),this.__stack=[]}},a.prototype.toString=function(){var s="",r="",h=!1;this.__evaluateStack();for(var c=0,f=this.segments.length;c<f;c++){var d=this.segments[c],l=d[0];l!==r||l==="m"||l==="M"?(l==="m"&&r==="z"&&(s+=" "),s+=l,h=!1):h=!0;for(var u=1;u<d.length;u++){var m=d[u];u===1?h&&m>=0&&(s+=" "):m>=0&&(s+=" "),s+=m}r=l}return s},a.prototype.translate=function(s,r){return this.__stack.push(t().translate(s,r||0)),this},a.prototype.scale=function(s,r){return this.__stack.push(t().scale(s,!r&&r!==0?s:r)),this},a.prototype.rotate=function(s,r,h){return this.__stack.push(t().rotate(s,r||0,h||0)),this},a.prototype.skewX=function(s){return this.__stack.push(t().skewX(s)),this},a.prototype.skewY=function(s){return this.__stack.push(t().skewY(s)),this},a.prototype.matrix=function(s){return this.__stack.push(t().matrix(s)),this},a.prototype.transform=function(s){return s.trim()?(this.__stack.push(e(s)),this):this},a.prototype.round=function(s){var r=0,h=0,c=0,f=0,d;return s=s||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=c),c=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"V":case"v":u&&(l[1]+=f),f=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"Z":case"z":c=r,f=h;return;case"M":case"m":u&&(l[1]+=c,l[2]+=f),c=l[1]-l[1].toFixed(s),f=l[2]-l[2].toFixed(s),r=c,h=f,l[1]=+l[1].toFixed(s),l[2]=+l[2].toFixed(s);return;case"A":case"a":u&&(l[6]+=c,l[7]+=f),c=l[6]-l[6].toFixed(s),f=l[7]-l[7].toFixed(s),l[1]=+l[1].toFixed(s),l[2]=+l[2].toFixed(s),l[3]=+l[3].toFixed(s+2),l[6]=+l[6].toFixed(s),l[7]=+l[7].toFixed(s);return;default:d=l.length,u&&(l[d-2]+=c,l[d-1]+=f),c=l[d-2]-l[d-2].toFixed(s),f=l[d-1]-l[d-1].toFixed(s),l.forEach(function(m,y){y&&(l[y]=+l[y].toFixed(s))});return}}),this},a.prototype.iterate=function(s,r){var h=this.segments,c={},f=!1,d=0,l=0,u=0,m=0,y,M,T;if(r||this.__evaluateStack(),h.forEach(function(S,P){var k=s(S,P,d,l);Array.isArray(k)&&(c[P]=k,f=!0);var C=S[0]===S[0].toLowerCase();switch(S[0]){case"m":case"M":d=S[1]+(C?d:0),l=S[2]+(C?l:0),u=d,m=l;return;case"h":case"H":d=S[1]+(C?d:0);return;case"v":case"V":l=S[1]+(C?l:0);return;case"z":case"Z":d=u,l=m;return;default:d=S[S.length-2]+(C?d:0),l=S[S.length-1]+(C?l:0)}}),!f)return this;for(T=[],y=0;y<h.length;y++)if(typeof c[y]<"u")for(M=0;M<c[y].length;M++)T.push(c[y][M]);else T.push(h[y]);return this.segments=T,this},a.prototype.abs=function(){return this.iterate(function(s,r,h,c){var f=s[0],d=f.toUpperCase(),l;if(f!==d)switch(s[0]=d,f){case"v":s[1]+=c;return;case"a":s[6]+=h,s[7]+=c;return;default:for(l=1;l<s.length;l++)s[l]+=l%2?h:c}},!0),this},a.prototype.rel=function(){return this.iterate(function(s,r,h,c){var f=s[0],d=f.toLowerCase(),l;if(f!==d&&!(r===0&&f==="M"))switch(s[0]=d,f){case"V":s[1]-=c;return;case"A":s[6]-=h,s[7]-=c;return;default:for(l=1;l<s.length;l++)s[l]-=l%2?h:c}},!0),this},a.prototype.unarc=function(){return this.iterate(function(s,r,h,c){var f,d,l,u=[],m=s[0];return m!=="A"&&m!=="a"?null:(m==="a"?(d=h+s[6],l=c+s[7]):(d=s[6],l=s[7]),f=o(h,c,d,l,s[4],s[5],s[1],s[2],s[3]),f.length===0?[[s[0]==="a"?"l":"L",s[6],s[7]]]:(f.forEach(function(y){u.push(["C",y[2],y[3],y[4],y[5],y[6],y[7]])}),u))}),this},a.prototype.unshort=function(){var s=this.segments,r,h,c,f,d;return this.iterate(function(l,u,m,y){var M=l[0],T=M.toUpperCase(),S;u&&(T==="T"?(S=M==="t",c=s[u-1],c[0]==="Q"?(r=c[1]-m,h=c[2]-y):c[0]==="q"?(r=c[1]-c[3],h=c[2]-c[4]):(r=0,h=0),f=-r,d=-h,S||(f+=m,d+=y),s[u]=[S?"q":"Q",f,d,l[1],l[2]]):T==="S"&&(S=M==="s",c=s[u-1],c[0]==="C"?(r=c[3]-m,h=c[4]-y):c[0]==="c"?(r=c[3]-c[5],h=c[4]-c[6]):(r=0,h=0),f=-r,d=-h,S||(f+=m,d+=y),s[u]=[S?"c":"C",f,d,l[1],l[2],l[3],l[4]]))}),this},tt=a,tt}var et,jt;function $1(){return jt||(jt=1,et=G1()),et}var W1=$1();const Z1=z1(W1);var nt={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},V1=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function K1(n){var e=[];return n.replace(V1,function(t,o,i){var a=o.toLowerCase();for(i=J1(i),a==="m"&&i.length>2&&(e.push([o].concat(i.splice(0,2))),a="l",o=o==="m"?"l":"L");i.length>=0;){if(i.length===nt[a])return i.unshift(o),e.push(i);if(i.length<nt[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,nt[a])))}}),e}var Q1=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function J1(n){var e=n.match(Q1);return e?e.map(Number):[]}function a0(n,e,t,o,i,a,s,r){return new rt(n,e,t,o,i,a,s,r)}function rt(n,e,t,o,i,a,s,r){this.a={x:n,y:e},this.b={x:t,y:o},this.c={x:i,y:a},this.d={x:s,y:r},s!=null&&r!==null&&r!==void 0?(this.getArcLength=cn,this.getPoint=nn,this.getDerivative=en):(this.getArcLength=rn,this.getPoint=zt,this.getDerivative=tn),this.init()}rt.prototype={constructor:rt,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e)},getTangentAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;return o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0},i},getPropertiesAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0};var a=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}}};function tn(n,e,t){return{x:(1-t)*2*(n[1]-n[0])+t*2*(n[2]-n[1]),y:(1-t)*2*(e[1]-e[0])+t*2*(e[2]-e[1])}}function en(n,e,t){var o=zt([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t);return o}function it(n,e,t,o,i){for(var a=1,s=n/e,r=(n-t(o,i,s))/e;a>.001;){var h=t(o,i,s+r),c=t(o,i,s-r),f=Math.abs(n-h)/e,d=Math.abs(n-c)/e;f<a?(a=f,s+=r):d<a?(a=d,s-=r):r/=2}return s}function zt(n,e,t){var o=(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],i=(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2];return{x:o,y:i}}function nn(n,e,t){var o=(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],i=(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3];return{x:o,y:i}}function rn(n,e,t){t===void 0&&(t=1);var o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),h=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));var f=h/(2*r),d=c/r,l=t+f,u=d-f*f;return Math.sqrt(r)/2*(l*Math.sqrt(l*l+u)-f*Math.sqrt(f*f+u)+u*Math.log(Math.abs((l+Math.sqrt(l*l+u))/(f+Math.sqrt(f*f+u)))))}var on=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],sn=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],an=[[1],[1,1],[1,2,1],[1,3,3,1]];function hn(n,e){return an[n][e]}function ot(n,e,t){var o=t.length-1,i,a,s;if(o===0)return 0;if(n===0){for(a=0,s=0;s<=o;s++)a+=hn(o,s)*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}else{for(i=new Array(o),s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return ot(n-1,e,i)}}function ln(n,e,t){var o=ot(1,t,n),i=ot(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function cn(n,e,t){var o,i,a,s;t===void 0&&(t=1);var r=20;for(o=t/2,i=0,a=0;a<r;a++)s=o*on[r][a]+o,i+=sn[r][a]*ln(n,e,s);return o*i}var E0=Math.PI*2;function Ut(n,e,t,o){var i=n*o-e*t<0?-1:1,a=n*t+e*o;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function un(n,e,t,o,i,a,s,r,h,c){var f=c*(n-t)/2+h*(e-o)/2,d=-h*(n-t)/2+c*(e-o)/2,l=s*s,u=r*r,m=f*f,y=d*d,M=l*u-l*y-u*m;M<0&&(M=0),M/=l*y+u*m,M=Math.sqrt(M)*(i===a?-1:1);var T=M*s/r*d,S=M*-r/s*f,P=c*T-h*S+(n+t)/2,k=h*T+c*S+(e+o)/2,C=(f-T)/s,F=(d-S)/r,N=(-f-T)/s,Z=(-d-S)/r,Y=Ut(1,0,C,F),$=Ut(C,F,N,Z);return a===0&&$>0&&($-=E0),a===1&&$<0&&($+=E0),[P,k,Y,$]}function fn(n,e){var t=1.3333333333333333*Math.tan(e/4),o=Math.cos(n),i=Math.sin(n),a=Math.cos(n+e),s=Math.sin(n+e);return[o,i,o-i*t,i+o*t,a+s*t,s-a*t,a,s]}function gn(n,e,t,o,i,a,s,r,h){var c=Math.sin(i*E0/360),f=Math.cos(i*E0/360),d=f*(n-r)/2+c*(e-h)/2,l=-c*(n-r)/2+f*(e-h)/2;if(d===0&&l===0)return[];if(t===0||o===0)return[];t=Math.abs(t),o=Math.abs(o);var u=d*d/(t*t)+l*l/(o*o);u>1&&(t*=Math.sqrt(u),o*=Math.sqrt(u));var m=un(n,e,r,h,a,s,t,o,c,f),y=[],M=m[2],T=m[3],S=Math.max(Math.ceil(Math.abs(T)/(E0/4)),1);T/=S;for(var P=0;P<S;P++)y.push(fn(M,T)),M+=T;return y.map(function(k){for(var C=0;C<k.length;C+=2){var F=k[C+0],N=k[C+1];F*=t,N*=o;var Z=f*F-c*N,Y=c*F+f*N;k[C+0]=Z+m[0],k[C+1]=Y+m[1]}return k})}function Yt(n,e,t,o,i,a,s,r,h){return new st(n,e,t,o,i,a,s,r,h)}function st(n,e,t,o,i,a,s,r,h){var c=0,f=[],d=[],l=gn(n,e,t,o,i,a,s,r,h);l.forEach(function(u){var m=new a0(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7]),y=m.getTotalLength();c+=y,f.push(y),d.push(m)}),this.length=c,this.partialLengths=f,this.curves=d}st.prototype={constructor:st,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getPointAtLength(n-t)},getTangentAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getTangentAtLength(n-t)},getPropertiesAtLength:function(n){var e=this.getTangentAtLength(n),t=this.getPointAtLength(n);return{x:t.x,y:t.y,tangentX:e.x,tangentY:e.y}}};function h0(n,e,t,o){return new k0(n,e,t,o)}function k0(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}k0.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},k0.prototype.getPointAtLength=function(n){var e=n/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),t=(this.x1-this.x0)*e,o=(this.y1-this.y0)*e;return{x:this.x0+t,y:this.y0+o}},k0.prototype.getTangentAtLength=function(){var n=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/n,y:(this.y1-this.y0)/n}},k0.prototype.getPropertiesAtLength=function(n){var e=this.getPointAtLength(n),t=this.getTangentAtLength();return{x:e.x,y:e.y,tangentX:t.x,tangentY:t.y}};function pn(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=K1(s),h=[0,0],c=[0,0],f,d,l=0;l<r.length;l++)r[l][0]==="M"?(h=[r[l][1],r[l][2]],d=[h[0],h[1]],o.push(null)):r[l][0]==="m"?(h=[r[l][1]+h[0],r[l][2]+h[1]],d=[h[0],h[1]],o.push(null)):r[l][0]==="L"?(e=e+Math.sqrt(Math.pow(h[0]-r[l][1],2)+Math.pow(h[1]-r[l][2],2)),o.push(new h0(h[0],r[l][1],h[1],r[l][2])),h=[r[l][1],r[l][2]]):r[l][0]==="l"?(e=e+Math.sqrt(Math.pow(r[l][1],2)+Math.pow(r[l][2],2)),o.push(new h0(h[0],r[l][1]+h[0],h[1],r[l][2]+h[1])),h=[r[l][1]+h[0],r[l][2]+h[1]]):r[l][0]==="H"?(e=e+Math.abs(h[0]-r[l][1]),o.push(new h0(h[0],r[l][1],h[1],h[1])),h[0]=r[l][1]):r[l][0]==="h"?(e=e+Math.abs(r[l][1]),o.push(new h0(h[0],h[0]+r[l][1],h[1],h[1])),h[0]=r[l][1]+h[0]):r[l][0]==="V"?(e=e+Math.abs(h[1]-r[l][1]),o.push(new h0(h[0],h[0],h[1],r[l][1])),h[1]=r[l][1]):r[l][0]==="v"?(e=e+Math.abs(r[l][1]),o.push(new h0(h[0],h[0],h[1],h[1]+r[l][1])),h[1]=r[l][1]+h[1]):r[l][0]==="z"||r[l][0]==="Z"?(e=e+Math.sqrt(Math.pow(d[0]-h[0],2)+Math.pow(d[1]-h[1],2)),o.push(new h0(h[0],d[0],h[1],d[1])),h=[d[0],d[1]]):r[l][0]==="C"?(f=new a0(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],r[l][6]),e=e+f.getTotalLength(),h=[r[l][5],r[l][6]],o.push(f)):r[l][0]==="c"?(f=new a0(h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4],h[0]+r[l][5],h[1]+r[l][6]),e=e+f.getTotalLength(),h=[r[l][5]+h[0],r[l][6]+h[1]],o.push(f)):r[l][0]==="S"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-r[l-1][r[l-1].length-4],2*h[1]-r[l-1][r[l-1].length-3],r[l][1],r[l][2],r[l][3],r[l][4]):f=new a0(h[0],h[1],h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]),e=e+f.getTotalLength(),h=[r[l][3],r[l][4]],o.push(f)):r[l][0]==="s"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],h[0]+f.d.x-f.c.x,h[1]+f.d.y-f.c.y,h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]):f=new a0(h[0],h[1],h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]),e=e+f.getTotalLength(),h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(f)):r[l][0]==="Q"?(h[0]!=r[l][1]&&h[1]!=r[l][2]?f=new a0(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]):f=new h0(r[l][1],r[l][3],r[l][2],r[l][4]),e=e+f.getTotalLength(),o.push(f),h=[r[l][3],r[l][4]],c=[r[l][1],r[l][2]]):r[l][0]==="q"?(r[l][1]==0&&r[l][2]==0?f=new h0(h[0]+r[l][1],h[0]+r[l][3],h[1]+r[l][2],h[1]+r[l][4]):f=new a0(h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]),e=e+f.getTotalLength(),c=[h[0]+r[l][1],h[1]+r[l][2]],h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(f)):r[l][0]==="T"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-c[0],2*h[1]-c[1],r[l][1],r[l][2]):f=new h0(h[0],r[l][1],h[1],r[l][2]),o.push(f),e=e+f.getTotalLength(),c=[2*h[0]-c[0],2*h[1]-c[1]],h=[r[l][1],r[l][2]]):r[l][0]==="t"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-c[0],2*h[1]-c[1],h[0]+r[l][1],h[1]+r[l][2]):f=new h0(h[0],h[0]+r[l][1],h[1],h[1]+r[l][2]),e=e+f.getTotalLength(),c=[2*h[0]-c[0],2*h[1]-c[1]],h=[r[l][1]+h[0],r[l][2]+h[0]],o.push(f)):r[l][0]==="A"?(f=new Yt(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],r[l][6],r[l][7]),e=e+f.getTotalLength(),h=[r[l][6],r[l][7]],o.push(f)):r[l][0]==="a"&&(f=new Yt(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],h[0]+r[l][6],h[1]+r[l][7]),e=e+f.getTotalLength(),h=[h[0]+r[l][6],h[1]+r[l][7]],o.push(f)),t.push(e);return i}i.getTotalLength=function(){return e},i.getPointAtLength=function(s){var r=a(s);return o[r.i].getPointAtLength(r.fraction)},i.getTangentAtLength=function(s){var r=a(s);return o[r.i].getTangentAtLength(r.fraction)},i.getPropertiesAtLength=function(s){var r=a(s);return o[r.i].getPropertiesAtLength(r.fraction)};var a=function(s){s<0?s=0:s>e&&(s=e);for(var r=t.length-1;t[r]>=s&&t[r]>0;)r--;return r++,{fraction:s-t[r-1],i:r}};return i(n)}function R0(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function Ht(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function dn(n,e){return R0(n,e)<1e-9}function xn(n,e,t){let o=n.map((i,a)=>yn(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?mn(a):a}}function yn(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function N0(n){return typeof n=="number"&&isFinite(n)}const at=`All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
1
+ (function(E,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(E=typeof globalThis<"u"?globalThis:E||self,G(E.Presenter={}))})(this,(function(E){"use strict";var Nn=Object.defineProperty;var Bn=(E,G,m0)=>G in E?Nn(E,G,{enumerable:!0,configurable:!0,writable:!0,value:m0}):E[G]=m0;var I=(E,G,m0)=>Bn(E,typeof G!="symbol"?G+"":G,m0);var A0,b0,M0,L0,T0;const G={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function m0(n){return n*n*n}function Kt(n){return--n*n*n+1}function Qt(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var q0=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})(q0),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})(q0);var Jt=(function n(e){e=+e;function t(o){return((o*=2)<1?o*o*((e+1)*o-e):(o-=2)*o*((e+1)*o+e)+2)/2}return t.overshoot=n,t})(q0);const O0={LINEAR:n=>n,CUBIC:Qt,CUBIC_IN:m0,CUBIC_OUT:Kt,BACK_IN_OUT:Jt.overshoot(.8)},te=O0.LINEAR;function F0(n,e,t={}){return{type:G.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:te,block:!1,interpolators:null,isKey:!1,shortcut:null,...typeof t=="number"?{duration:t}:t}}function ee(n,e={}){return F0(n,{opacity:1},{duration:500,easing:O0.CUBIC,...typeof e=="number"?{duration:e}:e})}function ne(n,e={}){return F0(n,{opacity:0},{duration:500,easing:O0.CUBIC,...typeof e=="number"?{duration:e}:e})}function D0(n,e,t={}){return{type:G.UPDATE,isKey:!1,object:n,props:e,shortcut:null,...t}}function re(n){return D0(n,{opacity:0})}function ie(n){return D0(n,{opacity:1})}const e0={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},o0=e0.TOP_LEFT;function W(n,e=0,t=0,o=1){if(typeof n=="string"){const i=n.replace("#",""),a=parseInt(i,16);return isNaN(a)?(console.warn("Invalid hex color format:",n),J):i.length===6?{red:a>>16&255,green:a>>8&255,blue:a&255,alpha:1}:i.length===8?{red:a>>24&255,green:a>>16&255,blue:a>>8&255,alpha:(a&255)/255}:(console.warn("Invalid hex color format:",n),J)}else if(typeof n=="number")return{red:n,green:e??0,blue:t??0,alpha:o??1};return{red:0,green:0,blue:0,alpha:1,...n}}W.BLACK=W(0,0,0),W.BLUE=W(0,0,255),W.GREEN=W(0,255,0),W.RED=W(255,0,0),W.TRANSPARENT=W(0,0,0,0),W.WHITE=W(255,255,255);const J={red:0,green:0,blue:0,alpha:1};function j0(n=null){return{content:null,setup:null,anchor:e0.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function lt(n,e=null){return n.alpha*(e??1)}function P0(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(lt(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function oe(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=W.TRANSPARENT,strokeColor:o=J,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=o0,height:h=1e3,width:c=1e3,x:f=0,y:d=0}=n||{},l=document.createElement("iframe");l.src=e,l.style.backgroundColor=P0(t),l.style.border=i>0?`${i}px solid ${P0(o)}`:"none",l.style.pointerEvents=a;const u=(100/s).toFixed(3)+"%";return l.style.height=i===0?u:`calc(${u} - ${i*2}px)`,l.style.width=i===0?u:`calc(${u} - ${i*2}px)`,l.style.transform=`scale(${s})`,l.style.transformOrigin="top left",j0({content:l,anchor:r,height:h,width:c,x:f,y:d})}const p0={LEFT:"left",CENTER:"center",RIGHT:"right"},se=p0.LEFT;function s0(n,e){throw new Error("Unexpected value: "+n)}function ae(n=null){const{alignment:e=p0.LEFT,scale:t=1,anchor:o=o0,height:i=1e3,width:a=1e3,x:s=0,y:r=0}=n||{};function h(c){const f=document.createElement("video");switch(f.autoplay=!0,f.style.transform=`scale(${t})`,e){case p0.LEFT:f.style.transformOrigin="top left";break;case p0.CENTER:f.style.transformOrigin="top center";break;case p0.RIGHT:f.style.transformOrigin="top right";break;default:s0(e)}c.appendChild(f);const d={video:{displaySurface:"window"},audio:!1};return navigator.mediaDevices.getDisplayMedia(d).then(l=>{const u=l.getVideoTracks()[0];u!==void 0&&(u.onended=function(){f.style.display="none"}),f.srcObject=l,f.play()}).catch(l=>{console.error("Could not start screen capture -",l)}),()=>{f.srcObject.getTracks().forEach(u=>u.stop()),f.style.display="none",f.srcObject=null}}return j0({content:null,setup:h,anchor:o,height:i,width:a,x:s,y:r})}const j={ARROW:"Arrow",CIRCLE:"Circle",GROUP:"Group",IMAGE:"Image",LINE:"Line",MASK:"Mask",PATH:"Path",POLYGON:"Polygon",RECTANGLE:"Rectangle",SLIDE_OBJECT:"SlideObject",SVG:"SVG",TEXT:"Text"};function n0(n){return{objectType:j.SLIDE_OBJECT,opacity:1,...n}}function he(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return n0({objectType:j.ARROW,arrowheadSize:i,color:J,drawn:1,endX:100,endY:100,isArrowheadDoubled:!1,isArrowheadFilled:!1,isDrawnFromCenter:!1,startX:0,startY:0,width:t,...o})}const le=50;function ce(n=null){return n0({objectType:j.CIRCLE,anchor:o0,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,radius:le,x:0,y:0,...n})}function z0(n,e=null){return n0({objectType:j.GROUP,anchor:o0,height:0,objects:n,previewColor:null,rotateOriginPreviewSize:0,rotateOriginX:0,rotateOriginY:0,rotation:0,skewOriginPreviewSize:0,skewOriginX:0,skewOriginY:0,skewX:0,skewY:0,scale:1,scaleX:1,scaleY:1,width:0,x:0,y:0,...e})}function ue(n){const{anchor:e=o0,cols:t=1,rows:o=1,gapX:i=0,gapY:a=0,groupProps:s={},width:r=0,height:h=0,x:c=0,y:f=0,objects:d=()=>null}=n,l=[],u=[];let m=0,y=0;for(let T=0;T<o;T++){const S=[];m=0;let P=0;for(let k=0;k<t;k++){const C=d(T,k),F=typeof r=="function"?r(T,k):r,N=typeof h=="function"?h(T,k):h;S.push(C),C!=null&&u.push(z0([C],{x:m,y})),m+=F+i,P=Math.max(P,N)}l.push(S),y+=P+a}return{grid:z0(u,{x:c,y:f,height:y-a,width:m-i,anchor:e,...s}),objects:l}}function fe(n=null){return n0({objectType:j.IMAGE,anchor:o0,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function ge(n=null){return n0({objectType:j.LINE,color:J,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function pe(n,e=null){return n0({objectType:j.MASK,anchor:o0,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var de=Object.defineProperty,_=(n,e)=>de(n,"name",{value:e,configurable:!0}),C0={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},xe=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ye=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,ve=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(xe);if(!e)throw new Error(`No path elements found in string ${n}`);return e.reduce((t,o)=>{let i=o.charAt(0),a=i.toLowerCase(),s=we(o.substring(1));if(a==="m"&&s.length>2&&(t.push([i,...s.splice(0,2)]),a="l",i=i==="m"?"l":"L"),a.toLowerCase()==="a"&&(s.length===5||s.length===6)){const r=o.substring(1).trim().split(" ");s=[Number(r[0]),Number(r[1]),Number(r[2]),Number(r[3].charAt(0)),Number(r[3].charAt(1)),Number(r[3].substring(2)),Number(r[4])]}for(;s.length>=0;){if(s.length===C0[a]){t.push([i,...s.splice(0,C0[a])]);break}if(s.length<C0[a])throw new Error(`Malformed path data: "${i}" must have ${C0[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,C0[a])])}return t},[])},"default"),we=_(n=>{const e=n.match(ye);return e?e.map(Number):[]},"parseValues"),r0=(A0=class{constructor(e,t,o,i){I(this,"x0");I(this,"x1");I(this,"y0");I(this,"y1");I(this,"getTotalLength",_(()=>Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),"getTotalLength"));I(this,"getPointAtLength",_(e=>{let t=e/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2));t=Number.isNaN(t)?1:t;const o=(this.x1-this.x0)*t,i=(this.y1-this.y0)*t;return{x:this.x0+o,y:this.y0+i}},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getPointAtLength(e),o=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:o.x,tangentY:o.y}},"getPropertiesAtLength"));this.x0=e,this.x1=t,this.y0=o,this.y1=i}},_(A0,"LinearPosition"),A0),ct=(b0=class{constructor(e,t,o,i,a,s,r,h,c){I(this,"x0");I(this,"y0");I(this,"rx");I(this,"ry");I(this,"xAxisRotate");I(this,"LargeArcFlag");I(this,"SweepFlag");I(this,"x1");I(this,"y1");I(this,"length");I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=ut({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,o=this.getPointAtLength(e);let i;e<0?e=0:e>this.length&&(e=this.length),i=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const a=i.x-o.x,s=i.y-o.y,r=Math.sqrt(a*a+s*s);return e<this.length-t?{x:-a/r,y:-s/r}:{x:a/r,y:s/r}},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getTangentAtLength(e),o=this.getPointAtLength(e);return{x:o.x,y:o.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength"));this.x0=e,this.y0=t,this.rx=o,this.ry=i,this.xAxisRotate=a,this.LargeArcFlag=s,this.SweepFlag=r,this.x1=h,this.y1=c;const f=me(300,function(d){return ut({x:e,y:t},o,i,a,s,r,{x:h,y:c},d)});this.length=f.arcLength}},_(b0,"Arc"),b0),ut=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=Ae(o,360);const h=be(o);if(n.x===s.x&&n.y===s.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};const c=(n.x-s.x)/2,f=(n.y-s.y)/2,d={x:Math.cos(h)*c+Math.sin(h)*f,y:-Math.sin(h)*c+Math.cos(h)*f},l=Math.pow(d.x,2)/Math.pow(e,2)+Math.pow(d.y,2)/Math.pow(t,2);l>1&&(e=Math.sqrt(l)*e,t=Math.sqrt(l)*t);let u=(Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(d.y,2)-Math.pow(t,2)*Math.pow(d.x,2))/(Math.pow(e,2)*Math.pow(d.y,2)+Math.pow(t,2)*Math.pow(d.x,2));u=u<0?0:u;const m=(i!==a?1:-1)*Math.sqrt(u),y=m*(e*d.y/t),M=m*(-t*d.x/e),T={x:Math.cos(h)*y-Math.sin(h)*M+(n.x+s.x)/2,y:Math.sin(h)*y+Math.cos(h)*M+(n.y+s.y)/2},S={x:(d.x-y)/e,y:(d.y-M)/t},P=gt({x:1,y:0},S);let k=gt(S,{x:(-d.x-y)/e,y:(-d.y-M)/t});!a&&k>0?k-=2*Math.PI:a&&k<0&&(k+=2*Math.PI),k%=2*Math.PI;const C=P+k*r,F=e*Math.cos(C),N=t*Math.sin(C);return{x:Math.cos(h)*F-Math.sin(h)*N+T.x,y:Math.sin(h)*F+Math.cos(h)*N+T.y,ellipticalArcStartAngle:P,ellipticalArcEndAngle:P+k,ellipticalArcAngle:C,ellipticalArcCenter:T,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),me=_((n,e)=>{n=n??500;let t=0;const o=[],i=[];let a,s=e(0);for(let r=0;r<n;r++){const h=Me(r*(1/n),0,1);a=e(h),t+=ft(s,a),i.push([s,a]),o.push({t:h,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=ft(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),Ae=_((n,e)=>(n%e+e)%e,"mod"),be=_(n=>n*(Math.PI/180),"toRadians"),ft=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),Me=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),gt=_((n,e)=>{const t=n.x*e.x+n.y*e.y,o=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(n.x*e.y-n.y*e.x<0?-1:1)*Math.acos(t/o)},"angleBetween"),Le=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],Te=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Pe=[[1],[1,1],[1,2,1],[1,3,3,1]],Ce=_((n,e,t)=>({x:(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],y:(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3]}),"cubicPoint"),Se=_((n,e,t)=>pt([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t),"cubicDerivative"),Ee=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*Le[20][s]+a,o+=Te[20][s]*dt(n,e,i);return a*o},"getCubicArcLength"),pt=_((n,e,t)=>({x:(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],y:(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2]}),"quadraticPoint"),ke=_((n,e,t)=>{t===void 0&&(t=1);const o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),h=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));const f=h/(2*r),d=t+f,l=c/r-f*f,u=d*d+l>0?Math.sqrt(d*d+l):0,m=f*f+l>0?Math.sqrt(f*f+l):0,y=f+Math.sqrt(f*f+l)!==0&&(d+u)/(f+m)!==0?l*Math.log(Math.abs((d+u)/(f+m))):0;return Math.sqrt(r)/2*(d*u-f*m+y)},"getQuadraticArcLength"),Ie=_((n,e,t)=>({x:2*(1-t)*(n[1]-n[0])+2*t*(n[2]-n[1]),y:2*(1-t)*(e[1]-e[0])+2*t*(e[2]-e[1])}),"quadraticDerivative");function dt(n,e,t){const o=U0(1,t,n),i=U0(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(dt,"BFunc");var U0=_((n,e,t)=>{const o=t.length-1;let i,a;if(o===0)return 0;if(n===0){a=0;for(let s=0;s<=o;s++)a+=Pe[o][s]*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}i=new Array(o);for(let s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return U0(n-1,e,i)},"getDerivative"),Y0=_((n,e,t)=>{let o=1,i=n/e,a=(n-t(i))/e,s=0;for(;o>.001;){const r=t(i+a),h=Math.abs(n-r)/e;if(h<o)o=h,i+=a;else{const c=t(i-a),f=Math.abs(n-c)/e;f<o?(o=f,i-=a):a/=2}if(s++,s>500)break}return i},"t2length"),f0=(M0=class{constructor(e,t,o,i,a,s,r,h){I(this,"a");I(this,"b");I(this,"c");I(this,"d");I(this,"length");I(this,"getArcLength");I(this,"getPoint");I(this,"getDerivative");I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,a=>this.getArcLength(t,o,a));return this.getPoint(t,o,i)},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,h=>this.getArcLength(t,o,h)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;return r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0},r},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Y0(e,this.length,c=>this.getArcLength(t,o,c)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0};const h=this.getPoint(t,o,i);return{x:h.x,y:h.y,tangentX:r.x,tangentY:r.y}},"getPropertiesAtLength"));I(this,"getC",_(()=>this.c,"getC"));I(this,"getD",_(()=>this.d,"getD"));this.a={x:e,y:t},this.b={x:o,y:i},this.c={x:a,y:s},r!==void 0&&h!==void 0?(this.getArcLength=Ee,this.getPoint=Ce,this.getDerivative=Se,this.d={x:r,y:h}):(this.getArcLength=ke,this.getPoint=pt,this.getDerivative=Ie,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},_(M0,"Bezier"),M0),_e=(L0=class{constructor(e){I(this,"length",0);I(this,"partial_lengths",[]);I(this,"functions",[]);I(this,"initial_point",null);I(this,"getPartAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength"));I(this,"getTotalLength",_(()=>this.length,"getTotalLength"));I(this,"getPointAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength"));I(this,"getTangentAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength"));I(this,"getParts",_(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(this.functions[t]!==null){this.functions[t]=this.functions[t];const o={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(o)}return e},"getParts"));const t=Array.isArray(e)?e:ve(e);let o,i=[0,0],a=[0,0],s=[0,0];for(let r=0;r<t.length;r++){if(t[r][0]==="M")i=[t[r][1],t[r][2]],s=[i[0],i[1]],this.functions.push(null),r===0&&(this.initial_point={x:t[r][1],y:t[r][2]});else if(t[r][0]==="m")i=[t[r][1]+i[0],t[r][2]+i[1]],s=[i[0],i[1]],this.functions.push(null);else if(t[r][0]==="L")this.length+=Math.sqrt(Math.pow(i[0]-t[r][1],2)+Math.pow(i[1]-t[r][2],2)),this.functions.push(new r0(i[0],t[r][1],i[1],t[r][2])),i=[t[r][1],t[r][2]];else if(t[r][0]==="l")this.length+=Math.sqrt(Math.pow(t[r][1],2)+Math.pow(t[r][2],2)),this.functions.push(new r0(i[0],t[r][1]+i[0],i[1],t[r][2]+i[1])),i=[t[r][1]+i[0],t[r][2]+i[1]];else if(t[r][0]==="H")this.length+=Math.abs(i[0]-t[r][1]),this.functions.push(new r0(i[0],t[r][1],i[1],i[1])),i[0]=t[r][1];else if(t[r][0]==="h")this.length+=Math.abs(t[r][1]),this.functions.push(new r0(i[0],i[0]+t[r][1],i[1],i[1])),i[0]=t[r][1]+i[0];else if(t[r][0]==="V")this.length+=Math.abs(i[1]-t[r][1]),this.functions.push(new r0(i[0],i[0],i[1],t[r][1])),i[1]=t[r][1];else if(t[r][0]==="v")this.length+=Math.abs(t[r][1]),this.functions.push(new r0(i[0],i[0],i[1],i[1]+t[r][1])),i[1]=t[r][1]+i[1];else if(t[r][0]==="z"||t[r][0]==="Z")this.length+=Math.sqrt(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)),this.functions.push(new r0(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new f0(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],t[r][5],t[r][6]),this.length+=o.getTotalLength(),i=[t[r][5],t[r][6]],this.functions.push(o);else if(t[r][0]==="c")o=new f0(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],i[0]+t[r][5],i[1]+t[r][6]),o.getTotalLength()>0?(this.length+=o.getTotalLength(),this.functions.push(o),i=[t[r][5]+i[0],t[r][6]+i[1]]):this.functions.push(new r0(i[0],i[0],i[1],i[1]));else if(t[r][0]==="S"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const h=o.getC();o=new f0(i[0],i[1],2*i[0]-h.x,2*i[1]-h.y,t[r][1],t[r][2],t[r][3],t[r][4])}}else o=new f0(i[0],i[1],i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3],t[r][4]],this.functions.push(o))}else if(t[r][0]==="s"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const h=o.getC(),c=o.getD();o=new f0(i[0],i[1],i[0]+c.x-h.x,i[1]+c.y-h.y,i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4])}}else o=new f0(i[0],i[1],i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3]+i[0],t[r][4]+i[1]],this.functions.push(o))}else if(t[r][0]==="Q"){if(i[0]===t[r][1]&&i[1]===t[r][2]){const h=new r0(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}else o=new f0(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);i=[t[r][3],t[r][4]],a=[t[r][1],t[r][2]]}else if(t[r][0]==="q"){if(t[r][1]!==0||t[r][2]!==0)o=new f0(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const h=new r0(i[0]+t[r][1],i[0]+t[r][3],i[1]+t[r][2],i[1]+t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}a=[i[0]+t[r][1],i[1]+t[r][2]],i=[t[r][3]+i[0],t[r][4]+i[1]]}else if(t[r][0]==="T"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new f0(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],t[r][1],t[r][2],void 0,void 0),this.functions.push(o),this.length+=o.getTotalLength();else{const h=new r0(i[0],t[r][1],i[1],t[r][2]);this.functions.push(h),this.length+=h.getTotalLength()}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1],t[r][2]]}else if(t[r][0]==="t"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new f0(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],i[0]+t[r][1],i[1]+t[r][2],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const h=new r0(i[0],i[0]+t[r][1],i[1],i[1]+t[r][2]);this.length+=h.getTotalLength(),this.functions.push(h)}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1]+i[0],t[r][2]+i[1]]}else if(t[r][0]==="A"){const h=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,t[r][6],t[r][7]);this.length+=h.getTotalLength(),i=[t[r][6],t[r][7]],this.functions.push(h)}else if(t[r][0]==="a"){const h=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,i[0]+t[r][6],i[1]+t[r][7]);this.length+=h.getTotalLength(),i=[i[0]+t[r][6],i[1]+t[r][7]],this.functions.push(h)}this.partial_lengths.push(this.length)}}},_(L0,"SVGPathProperties"),L0),H0=(T0=class{constructor(e){I(this,"inst");I(this,"getTotalLength",_(()=>this.inst.getTotalLength(),"getTotalLength"));I(this,"getPointAtLength",_(e=>this.inst.getPointAtLength(e),"getPointAtLength"));I(this,"getTangentAtLength",_(e=>this.inst.getTangentAtLength(e),"getTangentAtLength"));I(this,"getPropertiesAtLength",_(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength"));I(this,"getParts",_(()=>this.inst.getParts(),"getParts"));if(this.inst=new _e(e),!(this instanceof H0))return new H0(e)}},_(T0,"_svgPathProperties"),T0);function xt(n=W.BLACK){return{...n,alpha:0}}function Oe(n=null){const{path:e,height:t=100,width:o=100,viewboxHeight:i,viewboxWidth:a,...s}=n??{},r=e??"M 0 0 L 100 100",c=new H0(r).getTotalLength();return n0({objectType:j.PATH,anchor:o0,strokeColor:J,drawn:1,fillColor:xt(),isRounded:!1,height:t,path:r,pathLength:c,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function Fe(n=null){return n0({objectType:j.POLYGON,strokeColor:J,strokeWidth:0,drawn:1,points:[{x:0,y:0},{x:100,y:0},{x:100,y:100}],fillColor:J,...n})}function Re(n=null){return n0({objectType:j.RECTANGLE,anchor:o0,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function Ne(n=null){return n0({objectType:j.SVG,anchor:o0,height:100,svg:"",width:100,x:0,y:0,...n})}const yt={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},Be=yt.NORMAL,vt={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},qe=vt.NORMAL,De={color:J,fontFamily:"sans-serif",fontSize:100,fontStyle:Be,fontWeight:qe,ligatures:!1,subscript:!1,superscript:!1};function wt(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function mt(n){return wt(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function At(n="",e=null){return n0({objectType:j.TEXT,alignment:se,anchor:o0,length:null,lineSpacing:1,text:n,x:0,y:0,...De,...e})}At.writeOn=(n,e={})=>F0(n,{length:mt(n.text)},e);let K=null;function je({presentation:n,onNavigateToSlide:e}){if(K!==null&&!K.closed){K.focus();return}if(K=window.open("","Navigator","width=300,height=500,left=20,top=50"),K===null){console.error("Failed to open navigator window.");return}const t=ze(n,e);K.document.title=n.title,K.document.body.appendChild(t),K.addEventListener("keyup",o=>{(o.key==="Escape"||o.key==="`")&&(K==null||K.close(),K=null)})}function ze(n,e){const t=document.createElement("div");return t.style.fontFamily="Arial, sans-serif",n.slides.forEach((o,i)=>{const a=Ue(o,i);a.style.cursor="pointer",a.addEventListener("click",s=>{s.shiftKey&&(K==null||K.close()),e(i)}),t.appendChild(a)}),t}function Ue(n,e){const t=document.createElement("div");return t.style.marginBottom="8px",t.style.padding="8px",t.style.backgroundColor="#eceed7",t.style.borderRadius="4px",t.style.userSelect="none",t.innerHTML=`${e+1}: `+(n.title.length>0?n.title:`Slide ${e+1}`),t}function i0(n=null){return{height:0,width:0,...n}}const Ye=i0({width:0,height:0});function bt(n=null){return{backgroundColor:W.WHITE,slides:[],title:"Presentation",size:i0({width:3840,height:2160}),resources:{images:{}},...n}}function He(n){const e=Array.isArray(n)?n:[n];let t=0,o=0;for(const i of e)switch(i.type){case G.PAUSE:t+=i.duration;break;case G.ANIMATE:o=Math.max(o,t+i.delay+i.duration),i.block&&(t+=i.delay+i.duration);break;case G.UPDATE:break;default:s0(i)}return o}function X0(n,e=null){const{red:t,green:o,blue:i}=n,a=lt(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function Xe(n){return n===document.body}function Ge(n,e){const t=document.createElement("div");if(t.style.width="100%",t.style.aspectRatio=`${n.size.width} / ${n.size.height}`,t.style.position="relative",Xe(e)){t.style.top="50%",t.style.transform="translateY(-50%)",t.style.marginLeft="auto",t.style.marginRight="auto",t.style.overflowY="clip",document.title=n.title,document.documentElement.style.height="100%",document.body.style.margin="0",document.body.style.height="100%",document.body.style.width="100%",document.body.style.backgroundColor="#000000";const o=n.size.height/n.size.width;Mt(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>Mt(t,o))}return t}function Mt(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const Lt={check:n=>typeof n=="object"&&n!==null&&typeof n.red=="number"&&typeof n.green=="number"&&typeof n.blue=="number"&&typeof n.alpha=="number",interpolate:(n,e,t)=>({red:Math.round(n.red+(e.red-n.red)*t),green:Math.round(n.green+(e.green-n.green)*t),blue:Math.round(n.blue+(e.blue-n.blue)*t),alpha:n.alpha+(e.alpha-n.alpha)*t})},$e={check:n=>!0,interpolate:(n,e)=>e},Tt={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},Pt=[Tt,Lt,$e];function We(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...Pt]:Pt,a={};for(const s in e){const r=n[s],h=e[s];for(const c of i)if(c.check(r,s)&&c.check(h,s)){a[s]=c.interpolate(r,h,t);break}}return{...n,...a}}function Ct(n,e,t=null){if(e===null)return;const o=Array.isArray(e)?e:[e];let i=0;for(const a of o){if(t!==null&&i>t)break;switch(a.type){case G.ANIMATE:{const s=n.get(a.object);if(s===void 0)break;const r=t!==null?t-i:null,h=Math.max(Math.min(r!==null?(r-a.delay)/a.duration:1,1),0);n.set(a.object,{...s,...We(s,a.props,a.easing(h),a.interpolators)}),a.block&&(i+=a.delay+a.duration);break}case G.UPDATE:{const s=n.get(a.object);if(s===void 0)break;n.set(a.object,{...s,...a.props});break}case G.PAUSE:i+=a.duration;break;default:s0(a)}}}function St(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function Ze({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of St(s))i(r)}for(const s of n.objects)i(s);const a=t===null?e:e-1;for(let s=0;s<a;s++){const r=n.animations[s]??null;Ct(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;Ct(o,s,t)}return o}function Ve(n){const e={};function t(o){if(o.objectType===j.SVG){const a=o.svg;a!==void 0&&a.length>0&&(e[a]=a)}const i=St(o);for(const a of i)t(a)}for(const o of n.slides)for(const i of o.objects)t(i);return e}function Ke(n){var o;const{slides:e}=n,t={s:{slideIndex:0,buildIndex:0},c:{slideIndex:null,buildIndex:0},e:{slideIndex:e.length-1,buildIndex:((o=e[e.length-1])==null?void 0:o.animations.length)??0}};for(let i=0;i<e.length;i++){const a=e[i];if(a===void 0)continue;const s=a.shortcut;G0(t,s,i,0);for(let r=0;r<a.animations.length;r++){const h=a.animations[r];if(h!==void 0)if(Array.isArray(h))for(const c of h)G0(t,c.shortcut,i,r+1);else G0(t,h.shortcut,i,r+1)}}return t}function G0(n,e,t,o){if(e!==null)if(Array.isArray(e))for(const i of e)n[i]={slideIndex:t,buildIndex:o};else n[e]={slideIndex:t,buildIndex:o}}function Qe(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s}){t.shortcuts=Ke(n),e.addEventListener("mousemove",()=>{e.style.cursor="auto"}),e.addEventListener("keyup",r=>{if(r.code==="Escape"){t.textCommand=null;return}if(r.code==="ArrowRight"||r.code==="Space"){o(r.shiftKey);return}if(r.code==="ArrowLeft"){i(r.shiftKey);return}if(t.textCommand!==null){if(r.code==="Enter"){const h=t.textCommand;t.textCommand=null;const c=t.shortcuts[h];c!==void 0?a(c.slideIndex,c.buildIndex):isNaN(Number(h))||a(Number(h)-1,0);return}else r.code==="Backspace"?t.textCommand=t.textCommand.slice(0,-1):t.textCommand+=r.key;return}if(r.key==="g"){t.textCommand="";return}if(r.key==="`"){s();return}})}const y0="presenterState";function Je(n,e){const t=localStorage.getItem(y0);if(t===null)return null;if(e===null)return localStorage.removeItem(y0),null;let o;try{o=JSON.parse(t)}catch(c){return console.error("Failed to parse presentation state from localStorage:",c),localStorage.removeItem(y0),null}const{title:i,timestamp:a}=o;let{slideIndex:s,buildIndex:r}=o;if(typeof i!="string"||typeof s!="number"||typeof r!="number"||typeof a!="number"||i!==n.title||Date.now()-a>1e3*60*e)return localStorage.removeItem(y0),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const h=n.slides[s];return h===void 0?(localStorage.removeItem(y0),null):(r>h.animations.length&&(r=h.animations.length),{title:i,slideIndex:s,buildIndex:r})}function t1({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(y0,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const Et=Object.freeze({canvas:null,extrasContainer:null,mountedExtrasCleanups:[],mountedExtrasSlideIndex:null,slideIndex:0,buildIndex:0,currentAnimationId:null,imageById:{},shortcutState:{textCommand:null,shortcuts:{}}}),Q={Browser:"browser",Node:"node"};function e1(n,e){e.context.clearRect(0,0,n.width,n.height)}function n1(n){const e=document.createElement("canvas");return e.setAttribute("width",n.width.toString()),e.setAttribute("height",n.height.toString()),e.style.position="absolute",e.style.width="100%",e}const d0={Browser:"browser",Node:"node"};function r1(n){const e=new Path2D(n);return{type:d0.Browser,path:e}}function i1(n){const{drawn:e,startX:t,startY:o,endX:i,endY:a,arrowheadSize:s,isArrowheadFilled:r,isDrawnFromCenter:h}=n,c={x:t,y:o},f={x:i,y:a},d=Math.atan2(f.y-c.y,f.x-c.x),l={x:c.x+(f.x-c.x)/2,y:c.y+(f.y-c.y)/2},u=f.x-c.x,m=f.y-c.y,M=Math.hypot(u,m)*e,T=Math.cos(d),S=Math.sin(d),P=h?{x:l.x-T*M/2,y:l.y-S*M/2}:c,k=h?{x:l.x+T*M/2,y:l.y+S*M/2}:{x:c.x+T*M,y:c.y+S*M},C=r?Math.PI/6:Math.PI/4.5,F=M<s*2?M/2:s,N={x:k.x-F*Math.cos(d-C),y:k.y-F*Math.sin(d-C)},Z={x:k.x-F*Math.cos(d+C),y:k.y-F*Math.sin(d+C)},Y={x:P.x+F*Math.cos(d-C),y:P.y+F*Math.sin(d-C)},$={x:P.x+F*Math.cos(d+C),y:P.y+F*Math.sin(d+C)};return{arrowPoints:[P,k],arrowheadPoints:[N,k,Z],doubledArrowheadPoints:[Y,P,$]}}function v0({ctx:n,color:e,drawn:t=null,isDrawnFromCenter:o=!1,isRounded:i=!1,opacity:a=null,path:s,pathLength:r=null,width:h}){if(!(h===0||t===0)){if(t!==null&&r!==null&&t!==1){const c=r+(i?h:0),f=r*t;o?n.context.setLineDash([0,(c-f)/2,f,(c-f)/2]):n.context.setLineDash([f,c-f])}else n.context.setLineDash([]);if(n.context.lineWidth=h,n.context.strokeStyle=P0(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===d0.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===d0.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}}function w0({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=X0(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===d0.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===d0.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}function $0(n,e){const t=e(),o=n[0];if(o===void 0)return{path:t,length:0};t.path.moveTo(o.x,o.y);let i=0;for(let a=1;a<n.length;a++){const s=n[a],r=n[a-1];if(s===void 0||r===void 0)continue;const h=s.x-r.x,c=s.y-r.y;i+=Math.hypot(h,c),t.path.lineTo(s.x,s.y)}return{path:t,length:i}}const o1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{arrowPoints:a,arrowheadPoints:s,doubledArrowheadPoints:r}=i1(e),{path:h}=$0(a,o),{path:c}=$0(s,o);if(v0({color:e.color,ctx:n,path:h,opacity:i,width:e.width}),e.isArrowheadFilled&&(c.path.closePath(),w0({ctx:n,path:c,color:e.color,opacity:i})),v0({color:e.color,ctx:n,path:c,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:f}=$0(r,o);e.isArrowheadFilled&&(f.path.closePath(),w0({ctx:n,path:f,color:e.color,opacity:i})),v0({color:e.color,ctx:n,path:f,opacity:i,width:e.width})}};function s1(n,e){const t=n.radius-n.strokeWidth/2;if(t<=0)return;const o=e(),i=-Math.PI/2;return o.path.arc(n.x,n.y,t,i,i+2*Math.PI),o}function a1(n,e){const t=e(),o=-Math.PI/2;t.path.arc(n.x,n.y,n.radius,o,o+2*Math.PI);const i=2*Math.PI*n.radius;return{path:t,length:i}}function kt(n,e){switch(n.type){case Q.Browser:e.type===d0.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===d0.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}const h1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=a1(e,o);if(i<1&&e.strokeWidth>0){const r=s1(e,o);r!==void 0&&(n.context.save(),kt(n,r),w0({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else w0({ctx:n,path:a,color:e.fillColor,opacity:i});v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function X(n=null){return{x:0,y:0,...n}}const l1=X();function g0(n=null){return{origin:l1,size:Ye,...n}}g0();function x0(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case e0.TOP_LEFT:return g0({origin:X({x:o,y:i}),size:t});case e0.TOP:return g0({origin:X({x:o-a/2,y:i}),size:t});case e0.TOP_RIGHT:return g0({origin:X({x:o-a,y:i}),size:t});case e0.LEFT:return g0({origin:X({x:o,y:i-s/2}),size:t});case e0.CENTER:return g0({origin:X({x:o-a/2,y:i-s/2}),size:t});case e0.RIGHT:return g0({origin:X({x:o-a,y:i-s/2}),size:t});case e0.BOTTOM_LEFT:return g0({origin:X({x:o,y:i-s}),size:t});case e0.BOTTOM:return g0({origin:X({x:o-a/2,y:i-s}),size:t});case e0.BOTTOM_RIGHT:return g0({origin:X({x:o-a,y:i-s}),size:t});default:s0(e)}}const c1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width*Math.abs(i),height:e.height*Math.abs(a)})),{rotation:r,rotateOriginX:h,rotateOriginY:c,skewOriginX:f,skewOriginY:d,skewX:l,skewY:u}=e;if(!(i===0||a===0)){n.context.save(),n.context.translate(s.origin.x,s.origin.y),n.context.scale(i,a),n.context.translate(h,c),n.context.rotate(r*Math.PI/180),n.context.translate(-h,-c),n.context.translate(f,d),n.context.transform(1,Math.tan(u*Math.PI/180),Math.tan(l*Math.PI/180),1,0,0),n.context.translate(-f,-d);for(const m of e.objects)t(m,o*e.opacity);e.previewColor!==null&&(n.context.fillStyle=P0(e.previewColor),n.context.fillRect(0,0,e.width,e.height)),e.rotateOriginPreviewSize>0&&(n.context.fillStyle="red",n.context.beginPath(),n.context.arc(h,c,e.rotateOriginPreviewSize,0,2*Math.PI),n.context.fill()),e.skewOriginPreviewSize>0&&(n.context.fillStyle="blue",n.context.beginPath(),n.context.arc(f,d,e.skewOriginPreviewSize,0,2*Math.PI),n.context.fill()),n.context.restore()}};function W0(n,e,t,o,i=0){const a=o();a.path.moveTo(n.x+t,n.y),a.path.lineTo(n.x+e.width-t,n.y),a.path.arcTo(n.x+e.width,n.y,n.x+e.width,n.y+t,t),a.path.lineTo(n.x+e.width,n.y+e.height-t),a.path.arcTo(n.x+e.width,n.y+e.height,n.x+e.width-t,n.y+e.height,t),a.path.lineTo(n.x+t,n.y+e.height),a.path.arcTo(n.x,n.y+e.height,n.x,n.y+e.height-t,t),a.path.lineTo(n.x,n.y+t),a.path.arcTo(n.x,n.y,n.x+t,n.y,t),i>0&&a.path.lineTo(n.x+t+i,n.y);const s=2*(e.width+e.height-4*t)+2*Math.PI*t+i;return{path:a,length:s}}const S0={Browser:"browser",Node:"node"},u1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=x0(X({x:t.x,y:t.y}),t.anchor,i0({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=W0(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===d0.Browser?n.context.clip(r.path.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:r.path.type===d0.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:s0(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===S0.Browser?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Node Image in Browser Canvas context");break;case Q.Node:s.type===S0.Node?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Browser Image in Node Canvas context");break;default:s0(n)}n.context.restore()}};function f1(n,e){const t=e();t.path.moveTo(n.startX,n.startY),t.path.lineTo(n.endX,n.endY);const o=Math.hypot(n.endX-n.startX,n.endY-n.startY);return{path:t,length:o}}const g1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{path:a,length:s}=f1(e,o);v0({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},p1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=P0(W.RED),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.stroke()),n.context.beginPath(),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.closePath(),n.context.clip();for(const a of e.objects)o(a,t*e.opacity);n.context.restore()},d1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{origin:a}=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height})),s=o(e.path);n.context.save(),n.context.translate(a.x,a.y),n.context.scale(e.width/e.viewboxWidth,e.height/e.viewboxHeight),w0({ctx:n,path:s,color:e.fillColor,opacity:i}),v0({color:e.strokeColor,ctx:n,drawn:e.drawn,isRounded:e.isRounded,path:s,pathLength:e.pathLength,opacity:i,width:e.strokeWidth}),n.context.restore()};function x1(n,e){const t=e(),o=n.points,i=o[0];if(i===void 0)return{path:t,length:0};t.path.moveTo(i.x,i.y);let a=0,s=i;for(let h=1;h<o.length;h++){const c=o[h];if(c===void 0)continue;t.path.lineTo(c.x,c.y);const f=Math.hypot(c.x-s.x,c.y-s.y);a+=f,s=c}t.path.closePath();const r=Math.hypot(i.x-s.x,i.y-s.y);return a+=r,{path:t,length:a}}const y1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=x1(e,o);w0({ctx:n,path:a,color:e.fillColor,opacity:i}),v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function v1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=x0(X({x:n.x,y:n.y}),n.anchor,i0({width:n.width,height:n.height})),a=i.width-n.strokeWidth,s=i.height-n.strokeWidth;if(a<=0||s<=0)return;const r=X({x:o.x+t,y:o.y+t}),h=i0({width:a,height:s}),c=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(c>0)return W0(r,h,c,e).path;const f=e();return f.path.moveTo(r.x,r.y),f.path.lineTo(r.x+a,r.y),f.path.lineTo(r.x+a,r.y+s),f.path.lineTo(r.x,r.y+s),f.path.closePath(),f}function w1(n,e){const{origin:t,size:o}=x0(X({x:n.x,y:n.y}),n.anchor,i0({width:n.width,height:n.height})),i=Math.max(0,Math.min(n.cornerRadius,Math.min(o.width,o.height)/2)),a=Math.min(n.strokeWidth*2,o.width-i);if(i>0)return W0(t,o,i,e,a);{const s=e();s.path.moveTo(t.x,t.y),s.path.lineTo(t.x+o.width,t.y),s.path.lineTo(t.x+o.width,t.y+o.height),s.path.lineTo(t.x,t.y+o.height),s.path.lineTo(t.x,t.y),s.path.lineTo(t.x+a,t.y);const r=2*(o.width+o.height)+a;return{path:s,length:r}}}const m1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=w1(e,o);if(i<1&&e.strokeWidth>0){const r=v1(e,o);r!==void 0&&(n.context.save(),kt(n,r),w0({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else w0({ctx:n,path:a,color:e.fillColor,opacity:i});v0({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})},A1=({ctx:n,imageById:e,object:t,opacity:o})=>{const i=t.opacity*o;if(i===0||!t.svg)return;const a=e[t.svg];if(a===void 0)return;const s=x0(X({x:t.x,y:t.y}),t.anchor,i0({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===S0.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===S0.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:s0(n)}n.context.restore()};function b1(n){return{color:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,ligatures:n.ligatures,subscript:n.subscript,superscript:n.superscript}}function M1(n,e=1){const t=Math.max(...n.map(a=>a.reduce((s,r)=>s+r.width,0)));let o=0,i=0;for(let a=0;a<n.length;a++){const s=n[a];if(s===void 0)continue;const r=Math.max(...s.map(h=>h.height));o+=r+i*(e-1),i=r}return{height:o,width:t}}const L1=.7,T1=.3;function It(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*T1*(e?-1:1),fontSize:n.fontSize*L1,isSubscript:t,isSuperscript:e}}function P1(n){return{width:n.width,height:n.fontBoundingBoxAscent}}function _t(n,e,t=1){const o=It(e);n.context.fillStyle=X0(e.color,t),n.context.font=`${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`,n.type===Q.Browser?n.context.textRendering=e.ligatures?"optimizeLegibility":"optimizeSpeed":n.context.fontVariant=e.ligatures?"common-ligatures":"no-common-ligatures"}function C1(n,e,t){const o=[];for(const i of n){const a=[];for(const s of i){const{text:r,...h}=s,c={...e,...h};_t(t,c);const f=t.context.measureText(r),d=P1(f),{baselineShift:l}=It(c),u=d.height+Math.max(0,-l),m=Math.max(0,l);a.push({...d,baselineShift:l,bottom:m,height:u+m,top:u})}o.push(a)}return o}const S1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=wt(e.text),s=b1(e),r=C1(a,s,n),h=M1(r,e.lineSpacing),c=x0(X({x:e.x,y:e.y}),e.anchor,h);let f=c.origin.x,d=c.origin.y,l=0,u=0;for(let m=0;m<a.length;m++){const y=a[m],M=r[m];if(y==null||M==null){console.error("Could not determine text units or sizes for line");continue}const T=M.reduce((F,N)=>F+N.width,0),S=M.length===0?u:M.reduce((F,N)=>Math.max(F,N.top),0),P=M.length===0?0:M.reduce((F,N)=>Math.max(F,N.bottom),0),k=S+P;switch(e.alignment){case p0.LEFT:f=c.origin.x;break;case p0.CENTER:f=c.origin.x+(c.size.width-T)/2;break;case p0.RIGHT:f=c.origin.x+(c.size.width-T);break;default:s0(e.alignment);break}d+=u*(e.lineSpacing-1);const C=d+S;u=k;for(let F=0;F<y.length&&!(i!==null&&l>=i);F++){const N=y[F],Z=M[F];if(N==null||Z==null){console.error("Could not determine text unit or size for unit");continue}const{text:Y,...$}=N;let l0;if(i!==null&&l+Y.length>i){const t0=i-l;l0=Y.slice(0,t0)}const c0=l0??Y;l+=c0.length;const u0={...s,...$};_t(n,u0,o),n.context.fillText(c0,f,C+Z.baselineShift),f+=Z.width}d+=k}},E1={[j.ARROW]:o1,[j.CIRCLE]:h1,[j.GROUP]:c1,[j.IMAGE]:u1,[j.LINE]:g1,[j.MASK]:p1,[j.PATH]:d1,[j.POLYGON]:y1,[j.RECTANGLE]:m1,[j.SLIDE_OBJECT]:()=>{},[j.SVG]:A1,[j.TEXT]:S1};function k1(n){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox",`0 0 ${n.width} ${n.height}`),e.style.backgroundColor="transparent",e.style.position="absolute",e.style.width="100%",e}function I1(n,e){if(n===null)return null;const t=x0(X({x:e.x,y:e.y}),e.anchor,i0({width:e.width,height:e.height})),o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");o.setAttribute("x",t.origin.x.toString()),o.setAttribute("y",t.origin.y.toString()),o.setAttribute("width",e.width.toString()),o.setAttribute("height",e.height.toString());const i=e.content;i!==null&&o.appendChild(i),n.appendChild(o);let a=null;if(e.setup!==null){const s=e.setup(o);s!==void 0&&(a=s)}return()=>{a!==null&&a(),n.removeChild(o)}}async function _1(n){if(Object.keys(n).length===0)return{};const e={},t=i=>new Promise((a,s)=>{const r=new Image;if(r.onload=()=>a(r),r.onerror=c=>s(c),i.includes("</svg>")){const c=i.replace(/<\?xml[^?]*\?>\s*/g,""),f=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(f);r.src=d}else r.src=i}),o=Object.entries(n).map(async([i,a])=>{const s=await t(a);e[i]={type:S0.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}class O1{constructor(e){const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:bt(),element:document.body,objectRenderers:{...E1,...t},cacheDurationMinutes:15,scale:F1(o),...i},this.state={...Et}}async present(){const{presentation:e,element:t,scale:o}=this.props,i=n1(e.size),a=k1(e.size);a.style.transformOrigin="center center",a.style.transform=`scale(${o})`,this.state={...Et,imageById:await _1({...e.resources.images,...Ve(e)}),canvas:i,extrasContainer:a};const s=Ge(e,t);Qe(e,t,this.state.shortcutState,{onNext:h=>this.next(h),onPrevious:h=>this.previous(h),onRenderSlide:(h,c)=>{this.state.shortcutState.shortcuts.b={slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex},this.renderSlide(h??this.state.slideIndex,c)},onShowNavigator:()=>je({presentation:e,onNavigateToSlide:h=>this.renderSlide(h)})}),t.replaceChildren(),s.appendChild(i),s.appendChild(a),t.appendChild(s);const r=Je(e,this.props.cacheDurationMinutes);r!==null?this.renderSlide(r.slideIndex,r.buildIndex):this.renderSlide(0)}renderSlide(e,t=0,o=null){const{objectRenderers:i,presentation:a,scale:s}=this.props,{canvas:r,imageById:h}=this.state,c=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&t1({title:a.title,slideIndex:e,buildIndex:t});const f=a.slides[e];if(f===void 0||r===null)return;if(c||this.state.mountedExtrasCleanups.length===0&&f.extras.length>0){for(const M of this.state.mountedExtrasCleanups)M();this.state.mountedExtrasCleanups=[];for(const M of f.extras){const T=I1(this.state.extrasContainer,M);T!==null&&this.state.mountedExtrasCleanups.push(T)}}const d=r.getContext("2d");if(d===null)return;const l={type:Q.Browser,context:d};e1(r,l);const u=Ze({slide:f,buildIndex:t,buildTime:o});l.context.fillStyle=X0(a.backgroundColor),l.context.fillRect(0,0,r.width,r.height);function m(M,T){const S=i[M.objectType],P=u.get(M);S===void 0||P===void 0||S({ctx:l,imageById:h,object:P,opacity:T,renderObject:m,createPath2D:r1})}const y=s!==1;y&&(l.context.save(),l.context.translate(r.width*(1-s)/2,r.height*(1-s)/2),l.context.scale(s,s));for(const M of f.objects)m(M,1);y&&l.context.restore()}next(e=!1){const{presentation:t}=this.props,{currentAnimationId:o,slideIndex:i,buildIndex:a}=this.state;this.props.element.style.cursor="none",o!==null&&cancelAnimationFrame(o);const s=t.slides[i];if(s===void 0)return;const r=s.animations[a];if(r!==void 0&&!e){const h=performance.now(),c=He(r),f=d=>{const l=d-h;l<c?(this.renderSlide(i,a+1,l),this.state.currentAnimationId=requestAnimationFrame(f)):this.renderSlide(i,a+1,null)};this.state.currentAnimationId=requestAnimationFrame(f)}else i+1<t.slides.length&&this.renderSlide(i+1)}previous(e=!1){const{currentAnimationId:t,slideIndex:o,buildIndex:i}=this.state;if(this.props.element.style.cursor="none",t!==null&&cancelAnimationFrame(t),i>0)e?this.renderSlide(o,0):this.renderSlide(o,i-1);else if(o>0){const a=this.props.presentation.slides[o-1],s=e?0:(a==null?void 0:a.animations.length)??0;this.renderSlide(o-1,s)}else this.renderSlide(0,0)}hasNext(){const{presentation:e}=this.props,{slideIndex:t,buildIndex:o}=this.state,i=e.slides[t];return i===void 0?!1:i.animations[o]!==void 0?!0:t+1<e.slides.length}hasPrevious(){const{slideIndex:e,buildIndex:t}=this.state;return t>0||e>0}}function F1(n){return n<=0||n>1?(console.warn(`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`),1):n}function R1(n=1e3){return{type:G.PAUSE,isKey:!1,duration:n,shortcut:null}}function N1(n=null){return{objects:[],animations:[],extras:[],isAllKey:!1,isEndKey:!0,isStartKey:!1,shortcut:null,title:"",...n}}function B1(n,e={}){return{...e,text:n}}function q1(n=W.BLACK){return{...n,alpha:1}}function D1(n){for(var e=-1,t=n.length,o,i=n[t-1],a=0;++e<t;)o=i,i=n[e],a+=o[1]*i[0]-o[0]*i[1];return a/2}function j1(n){for(var e=-1,t=n.length,o=n[t-1],i,a,s=o[0],r=o[1],h=0;++e<t;)i=s,a=r,o=n[e],s=o[0],r=o[1],i-=s,a-=r,h+=Math.sqrt(i*i+a*a);return h}function z1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Z0,Ot;function U1(){if(Ot)return Z0;Ot=1;var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function t(u){return u===10||u===13||u===8232||u===8233||u===32||u===9||u===11||u===12||u===160||u>=5760&&e.indexOf(u)>=0}function o(u){switch(u|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function i(u){return(u|32)===97}function a(u){return u>=48&&u<=57}function s(u){return u>=48&&u<=57||u===43||u===45||u===46}function r(u){this.index=0,this.path=u,this.max=u.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function h(u){for(;u.index<u.max&&t(u.path.charCodeAt(u.index));)u.index++}function c(u){var m=u.path.charCodeAt(u.index);if(m===48){u.param=0,u.index++;return}if(m===49){u.param=1,u.index++;return}u.err="SvgPath: arc flag can be 0 or 1 only (at pos "+u.index+")"}function f(u){var m=u.index,y=m,M=u.max,T=!1,S=!1,P=!1,k=!1,C;if(y>=M){u.err="SvgPath: missed param (at pos "+y+")";return}if(C=u.path.charCodeAt(y),(C===43||C===45)&&(y++,C=y<M?u.path.charCodeAt(y):0),!a(C)&&C!==46){u.err="SvgPath: param should start with 0..9 or `.` (at pos "+y+")";return}if(C!==46){if(T=C===48,y++,C=y<M?u.path.charCodeAt(y):0,T&&y<M&&C&&a(C)){u.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+m+")";return}for(;y<M&&a(u.path.charCodeAt(y));)y++,S=!0;C=y<M?u.path.charCodeAt(y):0}if(C===46){for(k=!0,y++;a(u.path.charCodeAt(y));)y++,P=!0;C=y<M?u.path.charCodeAt(y):0}if(C===101||C===69){if(k&&!S&&!P){u.err="SvgPath: invalid float exponent (at pos "+y+")";return}if(y++,C=y<M?u.path.charCodeAt(y):0,(C===43||C===45)&&y++,y<M&&a(u.path.charCodeAt(y)))for(;y<M&&a(u.path.charCodeAt(y));)y++;else{u.err="SvgPath: invalid float exponent (at pos "+y+")";return}}u.index=y,u.param=parseFloat(u.path.slice(m,y))+0}function d(u){var m,y;m=u.path[u.segmentStart],y=m.toLowerCase();var M=u.data;if(y==="m"&&M.length>2&&(u.result.push([m,M[0],M[1]]),M=M.slice(2),y="l",m=m==="m"?"l":"L"),y==="r")u.result.push([m].concat(M));else for(;M.length>=n[y]&&(u.result.push([m].concat(M.splice(0,n[y]))),!!n[y]););}function l(u){var m=u.max,y,M,T,S,P;if(u.segmentStart=u.index,y=u.path.charCodeAt(u.index),M=i(y),!o(y)){u.err="SvgPath: bad command "+u.path[u.index]+" (at pos "+u.index+")";return}if(S=n[u.path[u.index].toLowerCase()],u.index++,h(u),u.data=[],!S){d(u);return}for(T=!1;;){for(P=S;P>0;P--){if(M&&(P===3||P===4)?c(u):f(u),u.err.length){d(u);return}u.data.push(u.param),h(u),T=!1,u.index<m&&u.path.charCodeAt(u.index)===44&&(u.index++,h(u),T=!0)}if(!T&&(u.index>=u.max||!s(u.path.charCodeAt(u.index))))break}d(u)}return Z0=function(m){var y=new r(m),M=y.max;for(h(y);y.index<M&&!y.err.length;)l(y);return y.result.length&&("mM".indexOf(y.result[0][0])<0?(y.err="SvgPath: string should start with `M` or `m`",y.result=[]):y.result[0][0]="M"),{err:y.err,segments:y.result}},Z0}var V0,Ft;function Rt(){if(Ft)return V0;Ft=1;function n(t,o){return[t[0]*o[0]+t[2]*o[1],t[1]*o[0]+t[3]*o[1],t[0]*o[2]+t[2]*o[3],t[1]*o[2]+t[3]*o[3],t[0]*o[4]+t[2]*o[5]+t[4],t[1]*o[4]+t[3]*o[5]+t[5]]}function e(){if(!(this instanceof e))return new e;this.queue=[],this.cache=null}return e.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},e.prototype.translate=function(t,o){return(t!==0||o!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,o])),this},e.prototype.scale=function(t,o){return(t!==1||o!==1)&&(this.cache=null,this.queue.push([t,0,0,o,0,0])),this},e.prototype.rotate=function(t,o,i){var a,s,r;return t!==0&&(this.translate(o,i),a=t*Math.PI/180,s=Math.cos(a),r=Math.sin(a),this.queue.push([s,r,-r,s,0,0]),this.cache=null,this.translate(-o,-i)),this},e.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},e.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},e.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=n(this.cache,this.queue[t]);return this.cache},e.prototype.calc=function(t,o,i){var a;return this.queue.length?(this.cache||(this.cache=this.toArray()),a=this.cache,[t*a[0]+o*a[2]+(i?0:a[4]),t*a[1]+o*a[3]+(i?0:a[5])]):[t,o]},V0=e,V0}var K0,Nt;function Y1(){if(Nt)return K0;Nt=1;var n=Rt(),e={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},t=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,o=/[\s,]+/;return K0=function(a){var s=new n,r,h;return a.split(t).forEach(function(c){if(c.length){if(typeof e[c]<"u"){r=c;return}switch(h=c.split(o).map(function(f){return+f||0}),r){case"matrix":h.length===6&&s.matrix(h);return;case"scale":h.length===1?s.scale(h[0],h[0]):h.length===2&&s.scale(h[0],h[1]);return;case"rotate":h.length===1?s.rotate(h[0],0,0):h.length===3&&s.rotate(h[0],h[1],h[2]);return;case"translate":h.length===1?s.translate(h[0],0):h.length===2&&s.translate(h[0],h[1]);return;case"skewX":h.length===1&&s.skewX(h[0]);return;case"skewY":h.length===1&&s.skewY(h[0]);return}}}),s},K0}var Q0,Bt;function H1(){if(Bt)return Q0;Bt=1;var n=Math.PI*2;function e(i,a,s,r){var h=i*r-a*s<0?-1:1,c=i*s+a*r;return c>1&&(c=1),c<-1&&(c=-1),h*Math.acos(c)}function t(i,a,s,r,h,c,f,d,l,u){var m=u*(i-s)/2+l*(a-r)/2,y=-l*(i-s)/2+u*(a-r)/2,M=f*f,T=d*d,S=m*m,P=y*y,k=M*T-M*P-T*S;k<0&&(k=0),k/=M*P+T*S,k=Math.sqrt(k)*(h===c?-1:1);var C=k*f/d*y,F=k*-d/f*m,N=u*C-l*F+(i+s)/2,Z=l*C+u*F+(a+r)/2,Y=(m-C)/f,$=(y-F)/d,l0=(-m-C)/f,c0=(-y-F)/d,u0=e(1,0,Y,$),t0=e(Y,$,l0,c0);return c===0&&t0>0&&(t0-=n),c===1&&t0<0&&(t0+=n),[N,Z,u0,t0]}function o(i,a){var s=1.3333333333333333*Math.tan(a/4),r=Math.cos(i),h=Math.sin(i),c=Math.cos(i+a),f=Math.sin(i+a);return[r,h,r-h*s,h+r*s,c+f*s,f-c*s,c,f]}return Q0=function(a,s,r,h,c,f,d,l,u){var m=Math.sin(u*n/360),y=Math.cos(u*n/360),M=y*(a-r)/2+m*(s-h)/2,T=-m*(a-r)/2+y*(s-h)/2;if(M===0&&T===0)return[];if(d===0||l===0)return[];d=Math.abs(d),l=Math.abs(l);var S=M*M/(d*d)+T*T/(l*l);S>1&&(d*=Math.sqrt(S),l*=Math.sqrt(S));var P=t(a,s,r,h,c,f,d,l,m,y),k=[],C=P[2],F=P[3],N=Math.max(Math.ceil(Math.abs(F)/(n/4)),1);F/=N;for(var Z=0;Z<N;Z++)k.push(o(C,F)),C+=F;return k.map(function(Y){for(var $=0;$<Y.length;$+=2){var l0=Y[$+0],c0=Y[$+1];l0*=d,c0*=l;var u0=y*l0-m*c0,t0=m*l0+y*c0;Y[$+0]=u0+P[0],Y[$+1]=t0+P[1]}return Y})},Q0}var J0,qt;function X1(){if(qt)return J0;qt=1;var n=1e-10,e=Math.PI/180;function t(o,i,a){if(!(this instanceof t))return new t(o,i,a);this.rx=o,this.ry=i,this.ax=a}return t.prototype.transform=function(o){var i=Math.cos(this.ax*e),a=Math.sin(this.ax*e),s=[this.rx*(o[0]*i+o[2]*a),this.rx*(o[1]*i+o[3]*a),this.ry*(-o[0]*a+o[2]*i),this.ry*(-o[1]*a+o[3]*i)],r=s[0]*s[0]+s[2]*s[2],h=s[1]*s[1]+s[3]*s[3],c=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),f=(r+h)/2;if(c<n*f)return this.rx=this.ry=Math.sqrt(f),this.ax=0,this;var d=s[0]*s[1]+s[2]*s[3];c=Math.sqrt(c);var l=f+c/2,u=f-c/2;return this.ax=Math.abs(d)<n&&Math.abs(l-h)<n?90:Math.atan(Math.abs(d)>Math.abs(l-h)?(l-r)/d:d/(l-h))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(u)):(this.ax+=90,this.rx=Math.sqrt(u),this.ry=Math.sqrt(l)),this},t.prototype.isDegenerate=function(){return this.rx<n*this.ry||this.ry<n*this.rx},J0=t,J0}var tt,Dt;function G1(){if(Dt)return tt;Dt=1;var n=U1(),e=Y1(),t=Rt(),o=H1(),i=X1();function a(s){if(!(this instanceof a))return new a(s);var r=n(s);this.segments=r.segments,this.err=r.err,this.__stack=[]}return a.from=function(s){if(typeof s=="string")return new a(s);if(s instanceof a){var r=new a("");return r.err=s.err,r.segments=s.segments.map(function(h){return h.slice()}),r.__stack=s.__stack.map(function(h){return t().matrix(h.toArray())}),r}throw new Error("SvgPath.from: invalid param type "+s)},a.prototype.__matrix=function(s){var r=this,h;s.queue.length&&this.iterate(function(c,f,d,l){var u,m,y,M;switch(c[0]){case"v":u=s.calc(0,c[1],!0),m=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=s.calc(d,c[1],!1),m=u[0]===s.calc(d,l,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=s.calc(c[1],0,!0),m=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=s.calc(c[1],l,!1),m=u[1]===s.calc(d,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var T=s.toArray(),S=i(c[1],c[2],c[3]).transform(T);if(T[0]*T[3]-T[1]*T[2]<0&&(c[5]=c[5]?"0":"1"),u=s.calc(c[6],c[7],c[0]==="a"),c[0]==="A"&&c[6]===d&&c[7]===l||c[0]==="a"&&c[6]===0&&c[7]===0){m=[c[0]==="a"?"l":"L",u[0],u[1]];break}S.isDegenerate()?m=[c[0]==="a"?"l":"L",u[0],u[1]]:m=[c[0],S.rx,S.ry,S.ax,c[4],c[5],u[0],u[1]];break;case"m":M=f>0,u=s.calc(c[1],c[2],M),m=["m",u[0],u[1]];break;default:for(y=c[0],m=[y],M=y.toLowerCase()===y,h=1;h<c.length;h+=2)u=s.calc(c[h],c[h+1],M),m.push(u[0],u[1])}r.segments[f]=m},!0)},a.prototype.__evaluateStack=function(){var s,r;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(s=t(),r=this.__stack.length;--r>=0;)s.matrix(this.__stack[r].toArray());this.__matrix(s),this.__stack=[]}},a.prototype.toString=function(){var s="",r="",h=!1;this.__evaluateStack();for(var c=0,f=this.segments.length;c<f;c++){var d=this.segments[c],l=d[0];l!==r||l==="m"||l==="M"?(l==="m"&&r==="z"&&(s+=" "),s+=l,h=!1):h=!0;for(var u=1;u<d.length;u++){var m=d[u];u===1?h&&m>=0&&(s+=" "):m>=0&&(s+=" "),s+=m}r=l}return s},a.prototype.translate=function(s,r){return this.__stack.push(t().translate(s,r||0)),this},a.prototype.scale=function(s,r){return this.__stack.push(t().scale(s,!r&&r!==0?s:r)),this},a.prototype.rotate=function(s,r,h){return this.__stack.push(t().rotate(s,r||0,h||0)),this},a.prototype.skewX=function(s){return this.__stack.push(t().skewX(s)),this},a.prototype.skewY=function(s){return this.__stack.push(t().skewY(s)),this},a.prototype.matrix=function(s){return this.__stack.push(t().matrix(s)),this},a.prototype.transform=function(s){return s.trim()?(this.__stack.push(e(s)),this):this},a.prototype.round=function(s){var r=0,h=0,c=0,f=0,d;return s=s||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=c),c=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"V":case"v":u&&(l[1]+=f),f=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"Z":case"z":c=r,f=h;return;case"M":case"m":u&&(l[1]+=c,l[2]+=f),c=l[1]-l[1].toFixed(s),f=l[2]-l[2].toFixed(s),r=c,h=f,l[1]=+l[1].toFixed(s),l[2]=+l[2].toFixed(s);return;case"A":case"a":u&&(l[6]+=c,l[7]+=f),c=l[6]-l[6].toFixed(s),f=l[7]-l[7].toFixed(s),l[1]=+l[1].toFixed(s),l[2]=+l[2].toFixed(s),l[3]=+l[3].toFixed(s+2),l[6]=+l[6].toFixed(s),l[7]=+l[7].toFixed(s);return;default:d=l.length,u&&(l[d-2]+=c,l[d-1]+=f),c=l[d-2]-l[d-2].toFixed(s),f=l[d-1]-l[d-1].toFixed(s),l.forEach(function(m,y){y&&(l[y]=+l[y].toFixed(s))});return}}),this},a.prototype.iterate=function(s,r){var h=this.segments,c={},f=!1,d=0,l=0,u=0,m=0,y,M,T;if(r||this.__evaluateStack(),h.forEach(function(S,P){var k=s(S,P,d,l);Array.isArray(k)&&(c[P]=k,f=!0);var C=S[0]===S[0].toLowerCase();switch(S[0]){case"m":case"M":d=S[1]+(C?d:0),l=S[2]+(C?l:0),u=d,m=l;return;case"h":case"H":d=S[1]+(C?d:0);return;case"v":case"V":l=S[1]+(C?l:0);return;case"z":case"Z":d=u,l=m;return;default:d=S[S.length-2]+(C?d:0),l=S[S.length-1]+(C?l:0)}}),!f)return this;for(T=[],y=0;y<h.length;y++)if(typeof c[y]<"u")for(M=0;M<c[y].length;M++)T.push(c[y][M]);else T.push(h[y]);return this.segments=T,this},a.prototype.abs=function(){return this.iterate(function(s,r,h,c){var f=s[0],d=f.toUpperCase(),l;if(f!==d)switch(s[0]=d,f){case"v":s[1]+=c;return;case"a":s[6]+=h,s[7]+=c;return;default:for(l=1;l<s.length;l++)s[l]+=l%2?h:c}},!0),this},a.prototype.rel=function(){return this.iterate(function(s,r,h,c){var f=s[0],d=f.toLowerCase(),l;if(f!==d&&!(r===0&&f==="M"))switch(s[0]=d,f){case"V":s[1]-=c;return;case"A":s[6]-=h,s[7]-=c;return;default:for(l=1;l<s.length;l++)s[l]-=l%2?h:c}},!0),this},a.prototype.unarc=function(){return this.iterate(function(s,r,h,c){var f,d,l,u=[],m=s[0];return m!=="A"&&m!=="a"?null:(m==="a"?(d=h+s[6],l=c+s[7]):(d=s[6],l=s[7]),f=o(h,c,d,l,s[4],s[5],s[1],s[2],s[3]),f.length===0?[[s[0]==="a"?"l":"L",s[6],s[7]]]:(f.forEach(function(y){u.push(["C",y[2],y[3],y[4],y[5],y[6],y[7]])}),u))}),this},a.prototype.unshort=function(){var s=this.segments,r,h,c,f,d;return this.iterate(function(l,u,m,y){var M=l[0],T=M.toUpperCase(),S;u&&(T==="T"?(S=M==="t",c=s[u-1],c[0]==="Q"?(r=c[1]-m,h=c[2]-y):c[0]==="q"?(r=c[1]-c[3],h=c[2]-c[4]):(r=0,h=0),f=-r,d=-h,S||(f+=m,d+=y),s[u]=[S?"q":"Q",f,d,l[1],l[2]]):T==="S"&&(S=M==="s",c=s[u-1],c[0]==="C"?(r=c[3]-m,h=c[4]-y):c[0]==="c"?(r=c[3]-c[5],h=c[4]-c[6]):(r=0,h=0),f=-r,d=-h,S||(f+=m,d+=y),s[u]=[S?"c":"C",f,d,l[1],l[2],l[3],l[4]]))}),this},tt=a,tt}var et,jt;function $1(){return jt||(jt=1,et=G1()),et}var W1=$1();const Z1=z1(W1);var nt={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},V1=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function K1(n){var e=[];return n.replace(V1,function(t,o,i){var a=o.toLowerCase();for(i=J1(i),a==="m"&&i.length>2&&(e.push([o].concat(i.splice(0,2))),a="l",o=o==="m"?"l":"L");i.length>=0;){if(i.length===nt[a])return i.unshift(o),e.push(i);if(i.length<nt[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,nt[a])))}}),e}var Q1=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function J1(n){var e=n.match(Q1);return e?e.map(Number):[]}function a0(n,e,t,o,i,a,s,r){return new rt(n,e,t,o,i,a,s,r)}function rt(n,e,t,o,i,a,s,r){this.a={x:n,y:e},this.b={x:t,y:o},this.c={x:i,y:a},this.d={x:s,y:r},s!=null&&r!==null&&r!==void 0?(this.getArcLength=cn,this.getPoint=nn,this.getDerivative=en):(this.getArcLength=rn,this.getPoint=zt,this.getDerivative=tn),this.init()}rt.prototype={constructor:rt,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e)},getTangentAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;return o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0},i},getPropertiesAtLength:function(n){var e=it(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0};var a=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}}};function tn(n,e,t){return{x:(1-t)*2*(n[1]-n[0])+t*2*(n[2]-n[1]),y:(1-t)*2*(e[1]-e[0])+t*2*(e[2]-e[1])}}function en(n,e,t){var o=zt([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t);return o}function it(n,e,t,o,i){for(var a=1,s=n/e,r=(n-t(o,i,s))/e;a>.001;){var h=t(o,i,s+r),c=t(o,i,s-r),f=Math.abs(n-h)/e,d=Math.abs(n-c)/e;f<a?(a=f,s+=r):d<a?(a=d,s-=r):r/=2}return s}function zt(n,e,t){var o=(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],i=(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2];return{x:o,y:i}}function nn(n,e,t){var o=(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],i=(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3];return{x:o,y:i}}function rn(n,e,t){t===void 0&&(t=1);var o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),h=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));var f=h/(2*r),d=c/r,l=t+f,u=d-f*f;return Math.sqrt(r)/2*(l*Math.sqrt(l*l+u)-f*Math.sqrt(f*f+u)+u*Math.log(Math.abs((l+Math.sqrt(l*l+u))/(f+Math.sqrt(f*f+u)))))}var on=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],sn=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],an=[[1],[1,1],[1,2,1],[1,3,3,1]];function hn(n,e){return an[n][e]}function ot(n,e,t){var o=t.length-1,i,a,s;if(o===0)return 0;if(n===0){for(a=0,s=0;s<=o;s++)a+=hn(o,s)*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}else{for(i=new Array(o),s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return ot(n-1,e,i)}}function ln(n,e,t){var o=ot(1,t,n),i=ot(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function cn(n,e,t){var o,i,a,s;t===void 0&&(t=1);var r=20;for(o=t/2,i=0,a=0;a<r;a++)s=o*on[r][a]+o,i+=sn[r][a]*ln(n,e,s);return o*i}var E0=Math.PI*2;function Ut(n,e,t,o){var i=n*o-e*t<0?-1:1,a=n*t+e*o;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function un(n,e,t,o,i,a,s,r,h,c){var f=c*(n-t)/2+h*(e-o)/2,d=-h*(n-t)/2+c*(e-o)/2,l=s*s,u=r*r,m=f*f,y=d*d,M=l*u-l*y-u*m;M<0&&(M=0),M/=l*y+u*m,M=Math.sqrt(M)*(i===a?-1:1);var T=M*s/r*d,S=M*-r/s*f,P=c*T-h*S+(n+t)/2,k=h*T+c*S+(e+o)/2,C=(f-T)/s,F=(d-S)/r,N=(-f-T)/s,Z=(-d-S)/r,Y=Ut(1,0,C,F),$=Ut(C,F,N,Z);return a===0&&$>0&&($-=E0),a===1&&$<0&&($+=E0),[P,k,Y,$]}function fn(n,e){var t=1.3333333333333333*Math.tan(e/4),o=Math.cos(n),i=Math.sin(n),a=Math.cos(n+e),s=Math.sin(n+e);return[o,i,o-i*t,i+o*t,a+s*t,s-a*t,a,s]}function gn(n,e,t,o,i,a,s,r,h){var c=Math.sin(i*E0/360),f=Math.cos(i*E0/360),d=f*(n-r)/2+c*(e-h)/2,l=-c*(n-r)/2+f*(e-h)/2;if(d===0&&l===0)return[];if(t===0||o===0)return[];t=Math.abs(t),o=Math.abs(o);var u=d*d/(t*t)+l*l/(o*o);u>1&&(t*=Math.sqrt(u),o*=Math.sqrt(u));var m=un(n,e,r,h,a,s,t,o,c,f),y=[],M=m[2],T=m[3],S=Math.max(Math.ceil(Math.abs(T)/(E0/4)),1);T/=S;for(var P=0;P<S;P++)y.push(fn(M,T)),M+=T;return y.map(function(k){for(var C=0;C<k.length;C+=2){var F=k[C+0],N=k[C+1];F*=t,N*=o;var Z=f*F-c*N,Y=c*F+f*N;k[C+0]=Z+m[0],k[C+1]=Y+m[1]}return k})}function Yt(n,e,t,o,i,a,s,r,h){return new st(n,e,t,o,i,a,s,r,h)}function st(n,e,t,o,i,a,s,r,h){var c=0,f=[],d=[],l=gn(n,e,t,o,i,a,s,r,h);l.forEach(function(u){var m=new a0(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7]),y=m.getTotalLength();c+=y,f.push(y),d.push(m)}),this.length=c,this.partialLengths=f,this.curves=d}st.prototype={constructor:st,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getPointAtLength(n-t)},getTangentAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getTangentAtLength(n-t)},getPropertiesAtLength:function(n){var e=this.getTangentAtLength(n),t=this.getPointAtLength(n);return{x:t.x,y:t.y,tangentX:e.x,tangentY:e.y}}};function h0(n,e,t,o){return new k0(n,e,t,o)}function k0(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}k0.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},k0.prototype.getPointAtLength=function(n){var e=n/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),t=(this.x1-this.x0)*e,o=(this.y1-this.y0)*e;return{x:this.x0+t,y:this.y0+o}},k0.prototype.getTangentAtLength=function(){var n=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/n,y:(this.y1-this.y0)/n}},k0.prototype.getPropertiesAtLength=function(n){var e=this.getPointAtLength(n),t=this.getTangentAtLength();return{x:e.x,y:e.y,tangentX:t.x,tangentY:t.y}};function pn(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=K1(s),h=[0,0],c=[0,0],f,d,l=0;l<r.length;l++)r[l][0]==="M"?(h=[r[l][1],r[l][2]],d=[h[0],h[1]],o.push(null)):r[l][0]==="m"?(h=[r[l][1]+h[0],r[l][2]+h[1]],d=[h[0],h[1]],o.push(null)):r[l][0]==="L"?(e=e+Math.sqrt(Math.pow(h[0]-r[l][1],2)+Math.pow(h[1]-r[l][2],2)),o.push(new h0(h[0],r[l][1],h[1],r[l][2])),h=[r[l][1],r[l][2]]):r[l][0]==="l"?(e=e+Math.sqrt(Math.pow(r[l][1],2)+Math.pow(r[l][2],2)),o.push(new h0(h[0],r[l][1]+h[0],h[1],r[l][2]+h[1])),h=[r[l][1]+h[0],r[l][2]+h[1]]):r[l][0]==="H"?(e=e+Math.abs(h[0]-r[l][1]),o.push(new h0(h[0],r[l][1],h[1],h[1])),h[0]=r[l][1]):r[l][0]==="h"?(e=e+Math.abs(r[l][1]),o.push(new h0(h[0],h[0]+r[l][1],h[1],h[1])),h[0]=r[l][1]+h[0]):r[l][0]==="V"?(e=e+Math.abs(h[1]-r[l][1]),o.push(new h0(h[0],h[0],h[1],r[l][1])),h[1]=r[l][1]):r[l][0]==="v"?(e=e+Math.abs(r[l][1]),o.push(new h0(h[0],h[0],h[1],h[1]+r[l][1])),h[1]=r[l][1]+h[1]):r[l][0]==="z"||r[l][0]==="Z"?(e=e+Math.sqrt(Math.pow(d[0]-h[0],2)+Math.pow(d[1]-h[1],2)),o.push(new h0(h[0],d[0],h[1],d[1])),h=[d[0],d[1]]):r[l][0]==="C"?(f=new a0(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],r[l][6]),e=e+f.getTotalLength(),h=[r[l][5],r[l][6]],o.push(f)):r[l][0]==="c"?(f=new a0(h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4],h[0]+r[l][5],h[1]+r[l][6]),e=e+f.getTotalLength(),h=[r[l][5]+h[0],r[l][6]+h[1]],o.push(f)):r[l][0]==="S"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-r[l-1][r[l-1].length-4],2*h[1]-r[l-1][r[l-1].length-3],r[l][1],r[l][2],r[l][3],r[l][4]):f=new a0(h[0],h[1],h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]),e=e+f.getTotalLength(),h=[r[l][3],r[l][4]],o.push(f)):r[l][0]==="s"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],h[0]+f.d.x-f.c.x,h[1]+f.d.y-f.c.y,h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]):f=new a0(h[0],h[1],h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]),e=e+f.getTotalLength(),h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(f)):r[l][0]==="Q"?(h[0]!=r[l][1]&&h[1]!=r[l][2]?f=new a0(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]):f=new h0(r[l][1],r[l][3],r[l][2],r[l][4]),e=e+f.getTotalLength(),o.push(f),h=[r[l][3],r[l][4]],c=[r[l][1],r[l][2]]):r[l][0]==="q"?(r[l][1]==0&&r[l][2]==0?f=new h0(h[0]+r[l][1],h[0]+r[l][3],h[1]+r[l][2],h[1]+r[l][4]):f=new a0(h[0],h[1],h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]),e=e+f.getTotalLength(),c=[h[0]+r[l][1],h[1]+r[l][2]],h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(f)):r[l][0]==="T"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-c[0],2*h[1]-c[1],r[l][1],r[l][2]):f=new h0(h[0],r[l][1],h[1],r[l][2]),o.push(f),e=e+f.getTotalLength(),c=[2*h[0]-c[0],2*h[1]-c[1]],h=[r[l][1],r[l][2]]):r[l][0]==="t"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?f=new a0(h[0],h[1],2*h[0]-c[0],2*h[1]-c[1],h[0]+r[l][1],h[1]+r[l][2]):f=new h0(h[0],h[0]+r[l][1],h[1],h[1]+r[l][2]),e=e+f.getTotalLength(),c=[2*h[0]-c[0],2*h[1]-c[1]],h=[r[l][1]+h[0],r[l][2]+h[0]],o.push(f)):r[l][0]==="A"?(f=new Yt(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],r[l][6],r[l][7]),e=e+f.getTotalLength(),h=[r[l][6],r[l][7]],o.push(f)):r[l][0]==="a"&&(f=new Yt(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],h[0]+r[l][6],h[1]+r[l][7]),e=e+f.getTotalLength(),h=[h[0]+r[l][6],h[1]+r[l][7]],o.push(f)),t.push(e);return i}i.getTotalLength=function(){return e},i.getPointAtLength=function(s){var r=a(s);return o[r.i].getPointAtLength(r.fraction)},i.getTangentAtLength=function(s){var r=a(s);return o[r.i].getTangentAtLength(r.fraction)},i.getPropertiesAtLength=function(s){var r=a(s);return o[r.i].getPropertiesAtLength(r.fraction)};var a=function(s){s<0?s=0:s>e&&(s=e);for(var r=t.length-1;t[r]>=s&&t[r]>0;)r--;return r++,{fraction:s-t[r-1],i:r}};return i(n)}function R0(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function Ht(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function dn(n,e){return R0(n,e)<1e-9}function xn(n,e,t){let o=n.map((i,a)=>yn(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?mn(a):a}}function yn(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function N0(n){return typeof n=="number"&&isFinite(n)}const at=`All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
2
2
  Example valid ways of supplying a shape would be:
3
3
  [[0, 0], [10, 0], [10, 10]]
4
4
  "M0,0 L10,0 L10,10Z"