presenter 0.8.3 → 0.8.4
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/navigator/openNavigator.d.ts +12 -2
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +965 -900
- package/dist/presenter.mjs.map +1 -1
- package/dist/utils/dom/hasModifierKey.d.ts +1 -0
- package/dist/utils/dom/isInteractiveElement.d.ts +1 -0
- package/dist/utils/presentation/setupKeyEventListeners.d.ts +5 -1
- package/package.json +1 -1
package/dist/presenter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(k,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(k=typeof globalThis<"u"?globalThis:k||self,G(k.Presenter={}))})(this,(function(k){"use strict";var jn=Object.defineProperty;var Hn=(k,G,mt)=>G in k?jn(k,G,{enumerable:!0,configurable:!0,writable:!0,value:mt}):k[G]=mt;var I=(k,G,mt)=>Hn(k,typeof G!="symbol"?G+"":G,mt);var bt,At,Mt,Lt,Tt;const G={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function mt(n){return n*n*n}function ee(n){return--n*n*n+1}function ne(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var Dt=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})(Dt),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})(Dt);var re=(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})(Dt);const _t={LINEAR:n=>n,CUBIC:ne,CUBIC_IN:mt,CUBIC_OUT:ee,BACK_IN_OUT:re.overshoot(.8)},ie=_t.LINEAR;function Ft(n,e,t={}){return{type:G.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:ie,block:!1,interpolators:null,isKey:!1,shortcut:null,...typeof t=="number"?{duration:t}:t}}function oe(n,e={}){return Ft(n,{opacity:1},{duration:500,easing:_t.CUBIC,...typeof e=="number"?{duration:e}:e})}function se(n,e={}){return Ft(n,{opacity:0},{duration:500,easing:_t.CUBIC,...typeof e=="number"?{duration:e}:e})}function zt(n,e,t={}){return{type:G.UPDATE,isKey:!1,object:n,props:e,shortcut:null,...t}}function ae(n){return zt(n,{opacity:0})}function he(n){return zt(n,{opacity:1})}const et={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},ot=et.TOP_LEFT;function V(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}}V.BLACK=V(0,0,0),V.BLUE=V(0,0,255),V.GREEN=V(0,255,0),V.RED=V(255,0,0),V.TRANSPARENT=V(0,0,0,0),V.WHITE=V(255,255,255);const J={red:0,green:0,blue:0,alpha:1};function jt(n=null){return{content:null,setup:null,anchor:et.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function u0(n,e=null){return n.alpha*(e??1)}function Ct(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(u0(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function le(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=V.TRANSPARENT,strokeColor:o=J,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=ot,height:h=1e3,width:c=1e3,x:f=0,y:d=0}=n||{},l=document.createElement("iframe");l.src=e,l.style.backgroundColor=Ct(t),l.style.border=i>0?`${i}px solid ${Ct(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",jt({content:l,anchor:r,height:h,width:c,x:f,y:d})}const pt={LEFT:"left",CENTER:"center",RIGHT:"right"},ce=pt.LEFT;function st(n,e){throw new Error("Unexpected value: "+n)}function ue(n=null){const{alignment:e=pt.LEFT,scale:t=1,anchor:o=ot,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 pt.LEFT:f.style.transformOrigin="top left";break;case pt.CENTER:f.style.transformOrigin="top center";break;case pt.RIGHT:f.style.transformOrigin="top right";break;default:st(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 jt({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 nt(n){return{objectType:j.SLIDE_OBJECT,opacity:1,...n}}function fe(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return nt({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 ge=50;function pe(n=null){return nt({objectType:j.CIRCLE,anchor:ot,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,radius:ge,x:0,y:0,...n})}function Ht(n,e=null){return nt({objectType:j.GROUP,anchor:ot,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 de(n){const{anchor:e=ot,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,x=0;for(let S=0;S<o;S++){const L=[];m=0;let C=0;for(let E=0;E<t;E++){const T=d(S,E),O=typeof r=="function"?r(S,E):r,B=typeof h=="function"?h(S,E):h;L.push(T),T!=null&&u.push(Ht([T],{x:m,y:x})),m+=O+i,C=Math.max(C,B)}l.push(L),x+=C+a}return{grid:Ht(u,{x:c,y:f,height:x-a,width:m-i,anchor:e,...s}),objects:l}}function ye(n=null){return nt({objectType:j.IMAGE,anchor:ot,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function xe(n=null){return nt({objectType:j.LINE,color:J,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function ve(n,e=null){return nt({objectType:j.MASK,anchor:ot,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var we=Object.defineProperty,_=(n,e)=>we(n,"name",{value:e,configurable:!0}),Pt={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},me=/([astvzqmhlc])([^astvzqmhlc]*)/gi,be=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Ae=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(me);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=Me(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===Pt[a]){t.push([i,...s.splice(0,Pt[a])]);break}if(s.length<Pt[a])throw new Error(`Malformed path data: "${i}" must have ${Pt[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,Pt[a])])}return t},[])},"default"),Me=_(n=>{const e=n.match(be);return e?e.map(Number):[]},"parseValues"),rt=(bt=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}},_(bt,"LinearPosition"),bt),f0=(At=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=g0({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=Le(300,function(d){return g0({x:e,y:t},o,i,a,s,r,{x:h,y:c},d)});this.length=f.arcLength}},_(At,"Arc"),At),g0=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=Te(o,360);const h=Ce(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),x=m*(e*d.y/t),M=m*(-t*d.x/e),S={x:Math.cos(h)*x-Math.sin(h)*M+(n.x+s.x)/2,y:Math.sin(h)*x+Math.cos(h)*M+(n.y+s.y)/2},L={x:(d.x-x)/e,y:(d.y-M)/t},C=d0({x:1,y:0},L);let E=d0(L,{x:(-d.x-x)/e,y:(-d.y-M)/t});!a&&E>0?E-=2*Math.PI:a&&E<0&&(E+=2*Math.PI),E%=2*Math.PI;const T=C+E*r,O=e*Math.cos(T),B=t*Math.sin(T);return{x:Math.cos(h)*O-Math.sin(h)*B+S.x,y:Math.sin(h)*O+Math.cos(h)*B+S.y,ellipticalArcStartAngle:C,ellipticalArcEndAngle:C+E,ellipticalArcAngle:T,ellipticalArcCenter:S,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),Le=_((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=Pe(r*(1/n),0,1);a=e(h),t+=p0(s,a),i.push([s,a]),o.push({t:h,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=p0(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),Te=_((n,e)=>(n%e+e)%e,"mod"),Ce=_(n=>n*(Math.PI/180),"toRadians"),p0=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),Pe=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),d0=_((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"),Se=[[],[],[-.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]],Ee=[[],[],[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]],ke=[[1],[1,1],[1,2,1],[1,3,3,1]],Ie=_((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"),Oe=_((n,e,t)=>y0([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"),_e=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*Se[20][s]+a,o+=Ee[20][s]*x0(n,e,i);return a*o},"getCubicArcLength"),y0=_((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"),Fe=_((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,x=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+x)},"getQuadraticArcLength"),Re=_((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 x0(n,e,t){const o=Ut(1,t,n),i=Ut(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(x0,"BFunc");var Ut=_((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+=ke[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 Ut(n-1,e,i)},"getDerivative"),Yt=_((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"),ft=(Mt=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=Yt(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=Yt(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=Yt(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=_e,this.getPoint=Ie,this.getDerivative=Oe,this.d={x:r,y:h}):(this.getArcLength=Fe,this.getPoint=y0,this.getDerivative=Re,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)}},_(Mt,"Bezier"),Mt),Ne=(Lt=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:Ae(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 rt(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 rt(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 rt(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 rt(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 rt(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 rt(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 rt(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new ft(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 ft(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 rt(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 ft(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 ft(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 ft(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 ft(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 rt(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}else o=new ft(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 ft(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 rt(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 ft(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 rt(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 ft(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 rt(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 f0(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 f0(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)}}},_(Lt,"SVGPathProperties"),Lt),$t=(Tt=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 Ne(e),!(this instanceof $t))return new $t(e)}},_(Tt,"_svgPathProperties"),Tt);function v0(n=V.BLACK){return{...n,alpha:0}}function Be(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 $t(r).getTotalLength();return nt({objectType:j.PATH,anchor:ot,strokeColor:J,drawn:1,fillColor:v0(),isRounded:!1,height:t,path:r,pathLength:c,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function qe(n=null){return nt({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 De(n=null){return nt({objectType:j.RECTANGLE,anchor:ot,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function ze(n=null){return nt({objectType:j.SVG,anchor:ot,height:100,svg:"",width:100,x:0,y:0,...n})}const w0={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},je=w0.NORMAL,m0={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},He=m0.NORMAL,Ue={color:J,fontFamily:"sans-serif",fontSize:100,fontStyle:je,fontWeight:He,ligatures:!1,subscript:!1,superscript:!1};function b0(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function A0(n){return b0(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function M0(n="",e=null){return nt({objectType:j.TEXT,alignment:ce,anchor:ot,length:null,lineSpacing:1,text:n,x:0,y:0,...Ue,...e})}M0.writeOn=(n,e={})=>Ft(n,{length:A0(n.text)},e);let N=null,Rt=null;function Ye({presentation:n,onNavigateToSlide:e,onNext:t}){if(N!==null&&!N.closed)return N.focus(),Rt;if(N=window.open("","Navigator","width=1100,height=680,left=20,top=50"),N===null)return console.error("Failed to open navigator window."),null;const o=$e(n,e,t);return Rt=o,N.document.title=n.title,N.document.body.replaceChildren(o.element),N.addEventListener("keyup",i=>{(i.key==="Escape"||i.key==="`")&&(N==null||N.close(),N=null,Rt=null)}),Rt}function $e(n,e,t){const o=(N==null?void 0:N.document)??document,i=o.createElement("div");i.style.boxSizing="border-box",i.style.display="grid",i.style.gridTemplateColumns="260px 1fr",i.style.gap="18px",i.style.height="100vh",i.style.overflow="hidden",i.style.padding="18px",i.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',i.style.backgroundColor="#f5f6f8",i.style.color="#1f2937",o.body.style.margin="0",o.body.style.overflow="hidden";const a=o.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="8px",a.style.minHeight="0",a.style.overflowY="auto",a.style.paddingRight="4px";const s=o.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="14px",s.style.minHeight="0",s.style.minWidth="0",s.style.overflow="hidden";const r=o.createElement("div");r.style.display="flex",r.style.gap="14px",r.style.alignItems="center",r.style.flexWrap="wrap",r.style.fontSize="13px",r.style.color="#4b5563";const h=o.createElement("div");h.style.display="flex",h.style.gap="14px",h.style.flex="1 1 auto",h.style.minHeight="0",h.style.minWidth="0",h.style.overflow="hidden";const c=L0("Current",n),f=L0("Next",n);f.container.style.cursor="pointer",f.container.addEventListener("click",t);const d=n.slides.map((L,C)=>{const E=Xe(L,C);return E.style.cursor="pointer",E.addEventListener("click",T=>{T.shiftKey&&(N==null||N.close()),e(C)}),a.appendChild(E),E}),l=Xt("Slides",a,!0),u=Xt("Current",c.container,!0),m=Xt("Next",f.container,!0),x=()=>{const L=u.input.checked&&m.input.checked&&S();i.style.gridTemplateColumns=l.input.checked?"260px 1fr":"1fr",h.style.flexDirection=L?"column":"row",c.container.style.flex="1 1 0",f.container.style.flex="1 1 0",requestAnimationFrame(()=>{c.resize(),f.resize()})};l.input.addEventListener("change",x),u.input.addEventListener("change",x),m.input.addEventListener("change",x),N==null||N.addEventListener("resize",x),r.appendChild(l.element),r.appendChild(u.element),r.appendChild(m.element),h.appendChild(c.container),h.appendChild(f.container),s.appendChild(r),s.appendChild(h),i.appendChild(a),i.appendChild(s);function M(L,C,E,T){d.forEach((O,B)=>{const Z=B===L;O.style.backgroundColor=Z?"#dbeafe":"#ffffff",O.style.borderColor=Z?"#60a5fa":"#e5e7eb",O.style.color=Z?"#1e3a8a":"#1f2937"}),c.label.textContent=T0(n,L,C),f.label.textContent=T0(n,E,T),Ge(d[L],a),x()}function S(){const L=N;if(L===null)return!1;const C=l.input.checked?278:0,E=L.innerWidth-36-C,T=L.innerHeight-36-r.offsetHeight-14;return E<=0||T<=0?!1:E/T<1.1}return{element:i,currentCanvas:c.canvas,nextCanvas:f.canvas,currentLabel:c.label,nextLabel:f.label,isOpen:()=>N!==null&&!N.closed,update:M}}function Xe(n,e){const t=(N==null?void 0:N.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="10px",o.style.padding="8px 10px",o.style.backgroundColor="#ffffff",o.style.border="1px solid #e5e7eb",o.style.borderRadius="6px",o.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)",o.style.fontSize="14px",o.style.lineHeight="1",o.style.userSelect="none";const i=t.createElement("div");i.textContent=`${e+1}`,i.style.minWidth="24px",i.style.fontWeight="700",i.style.color="#6b7280";const a=t.createElement("div");return a.textContent=n.title.length>0?n.title:`Slide ${e+1}`,a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.whiteSpace="nowrap",o.appendChild(i),o.appendChild(a),o}function L0(n,e){var f;const t=(N==null?void 0:N.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.flexDirection="column",o.style.minHeight="0",o.style.minWidth="0";const i=t.createElement("div");i.textContent=n,i.style.marginBottom="4px",i.style.fontSize="12px",i.style.fontWeight="700",i.style.textAlign="center",i.style.textTransform="uppercase",i.style.color="#6b7280";const a=t.createElement("div");a.style.marginBottom="6px",a.style.fontSize="14px",a.style.fontWeight="600",a.style.textAlign="center";const s=t.createElement("div");s.style.flex="1 1 auto",s.style.display="flex",s.style.alignItems="flex-start",s.style.justifyContent="center",s.style.minHeight="0",s.style.width="100%",s.style.overflow="hidden";const r=t.createElement("canvas");r.style.display="block",r.style.width="0",r.style.height="0";function h(){const d=s.clientWidth,l=s.clientHeight;if(d<=0||l<=0)return;const u=e.size.width/e.size.height,m=Math.min(d,l*u),x=m/u;r.style.width=`${m}px`,r.style.height=`${x}px`}const c=(f=t.defaultView)==null?void 0:f.ResizeObserver;return c!==void 0&&new c(h).observe(s),N==null||N.addEventListener("resize",h),s.appendChild(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),{container:o,label:a,canvas:r,resize:h}}function Xt(n,e,t){const o=(N==null?void 0:N.document)??document,i=e.style.display||"block",a=o.createElement("label");a.style.display="inline-flex",a.style.alignItems="center",a.style.gap="6px",a.style.userSelect="none";const s=o.createElement("input");return s.type="checkbox",s.checked=t,s.addEventListener("change",()=>{e.style.display=s.checked?i:"none"}),a.appendChild(s),a.appendChild(o.createTextNode(n)),{element:a,input:s}}function T0(n,e,t){if(e===null)return"End of presentation";const o=n.slides[e];return o===void 0?"No slide":`Slide ${e+1} of ${n.slides.length}, Build ${t+1} of ${o.animations.length+1}`}function Ge(n,e){if(n===void 0)return;const t=n.offsetTop,o=t+n.offsetHeight,i=e.scrollTop,a=i+e.clientHeight;(t<i||o>a)&&n.scrollIntoView({block:"nearest"})}function it(n=null){return{height:0,width:0,...n}}const We=it({width:0,height:0});function C0(n=null){return{backgroundColor:V.WHITE,slides:[],title:"Presentation",size:it({width:3840,height:2160}),resources:{images:{}},...n}}function Ze(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:st(i)}return o}function Gt(n,e=null){const{red:t,green:o,blue:i}=n,a=u0(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function Ve(n){return n===document.body}function Ke(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",Ve(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;P0(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>P0(t,o))}return t}function P0(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const S0={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})},Qe={check:n=>!0,interpolate:(n,e)=>e},E0={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},k0=[E0,S0,Qe];function Je(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...k0]:k0,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 I0(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,...Je(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:st(a)}}}function O0(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function t1({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of O0(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;I0(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;I0(o,s,t)}return o}function e1(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=O0(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 n1(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;Wt(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)Wt(t,c.shortcut,i,r+1);else Wt(t,h.shortcut,i,r+1)}}return t}function Wt(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 r1(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s}){t.shortcuts=n1(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 xt="presenterState";function i1(n,e){const t=localStorage.getItem(xt);if(t===null)return null;if(e===null)return localStorage.removeItem(xt),null;let o;try{o=JSON.parse(t)}catch(c){return console.error("Failed to parse presentation state from localStorage:",c),localStorage.removeItem(xt),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(xt),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const h=n.slides[s];return h===void 0?(localStorage.removeItem(xt),null):(r>h.animations.length&&(r=h.animations.length),{title:i,slideIndex:s,buildIndex:r})}function o1({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(xt,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const _0=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 s1(n,e){e.context.clearRect(0,0,n.width,n.height)}function a1(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 dt={Browser:"browser",Node:"node"};function h1(n){const e=new Path2D(n);return{type:dt.Browser,path:e}}function l1(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,S=Math.cos(d),L=Math.sin(d),C=h?{x:l.x-S*M/2,y:l.y-L*M/2}:c,E=h?{x:l.x+S*M/2,y:l.y+L*M/2}:{x:c.x+S*M,y:c.y+L*M},T=r?Math.PI/6:Math.PI/4.5,O=M<s*2?M/2:s,B={x:E.x-O*Math.cos(d-T),y:E.y-O*Math.sin(d-T)},Z={x:E.x-O*Math.cos(d+T),y:E.y-O*Math.sin(d+T)},Y={x:C.x+O*Math.cos(d-T),y:C.y+O*Math.sin(d-T)},W={x:C.x+O*Math.cos(d+T),y:C.y+O*Math.sin(d+T)};return{arrowPoints:[C,E],arrowheadPoints:[B,E,Z],doubledArrowheadPoints:[Y,C,W]}}function vt({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=Ct(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===dt.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===dt.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}}function wt({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=Gt(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===dt.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===dt.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}function Zt(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 c1=({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}=l1(e),{path:h}=Zt(a,o),{path:c}=Zt(s,o);if(vt({color:e.color,ctx:n,path:h,opacity:i,width:e.width}),e.isArrowheadFilled&&(c.path.closePath(),wt({ctx:n,path:c,color:e.color,opacity:i})),vt({color:e.color,ctx:n,path:c,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:f}=Zt(r,o);e.isArrowheadFilled&&(f.path.closePath(),wt({ctx:n,path:f,color:e.color,opacity:i})),vt({color:e.color,ctx:n,path:f,opacity:i,width:e.width})}};function u1(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 f1(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 F0(n,e){switch(n.type){case Q.Browser:e.type===dt.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===dt.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}const g1=({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}=f1(e,o);if(i<1&&e.strokeWidth>0){const r=u1(e,o);r!==void 0&&(n.context.save(),F0(n,r),wt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else wt({ctx:n,path:a,color:e.fillColor,opacity:i});vt({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 p1=X();function gt(n=null){return{origin:p1,size:We,...n}}gt();function yt(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case et.TOP_LEFT:return gt({origin:X({x:o,y:i}),size:t});case et.TOP:return gt({origin:X({x:o-a/2,y:i}),size:t});case et.TOP_RIGHT:return gt({origin:X({x:o-a,y:i}),size:t});case et.LEFT:return gt({origin:X({x:o,y:i-s/2}),size:t});case et.CENTER:return gt({origin:X({x:o-a/2,y:i-s/2}),size:t});case et.RIGHT:return gt({origin:X({x:o-a,y:i-s/2}),size:t});case et.BOTTOM_LEFT:return gt({origin:X({x:o,y:i-s}),size:t});case et.BOTTOM:return gt({origin:X({x:o-a/2,y:i-s}),size:t});case et.BOTTOM_RIGHT:return gt({origin:X({x:o-a,y:i-s}),size:t});default:st(e)}}const d1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=yt(X({x:e.x,y:e.y}),e.anchor,it({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=Ct(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 Vt(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 St={Browser:"browser",Node:"node"},y1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=yt(X({x:t.x,y:t.y}),t.anchor,it({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=Vt(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===dt.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===dt.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===St.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===St.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:st(n)}n.context.restore()}};function x1(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 v1=({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}=x1(e,o);vt({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},w1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=yt(X({x:e.x,y:e.y}),e.anchor,it({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=Ct(V.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()},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{origin:a}=yt(X({x:e.x,y:e.y}),e.anchor,it({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),wt({ctx:n,path:s,color:e.fillColor,opacity:i}),vt({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 b1(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 A1=({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}=b1(e,o);wt({ctx:n,path:a,color:e.fillColor,opacity:i}),vt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function M1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=yt(X({x:n.x,y:n.y}),n.anchor,it({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=it({width:a,height:s}),c=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(c>0)return Vt(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 L1(n,e){const{origin:t,size:o}=yt(X({x:n.x,y:n.y}),n.anchor,it({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 Vt(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 T1=({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}=L1(e,o);if(i<1&&e.strokeWidth>0){const r=M1(e,o);r!==void 0&&(n.context.save(),F0(n,r),wt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else wt({ctx:n,path:a,color:e.fillColor,opacity:i});vt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})},C1=({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=yt(X({x:t.x,y:t.y}),t.anchor,it({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===St.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===St.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:st(n)}n.context.restore()};function P1(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 S1(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 E1=.7,k1=.3;function R0(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*k1*(e?-1:1),fontSize:n.fontSize*E1,isSubscript:t,isSuperscript:e}}function I1(n){return{width:n.width,height:n.fontBoundingBoxAscent}}function N0(n,e,t=1){const o=R0(e);n.context.fillStyle=Gt(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 O1(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};N0(t,c);const f=t.context.measureText(r),d=I1(f),{baselineShift:l}=R0(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 _1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=b0(e.text),s=P1(e),r=O1(a,s,n),h=S1(r,e.lineSpacing),c=yt(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 x=a[m],M=r[m];if(x==null||M==null){console.error("Could not determine text units or sizes for line");continue}const S=M.reduce((O,B)=>O+B.width,0),L=M.length===0?u:M.reduce((O,B)=>Math.max(O,B.top),0),C=M.length===0?0:M.reduce((O,B)=>Math.max(O,B.bottom),0),E=L+C;switch(e.alignment){case pt.LEFT:f=c.origin.x;break;case pt.CENTER:f=c.origin.x+(c.size.width-S)/2;break;case pt.RIGHT:f=c.origin.x+(c.size.width-S);break;default:st(e.alignment);break}d+=u*(e.lineSpacing-1);const T=d+L;u=E;for(let O=0;O<x.length&&!(i!==null&&l>=i);O++){const B=x[O],Z=M[O];if(B==null||Z==null){console.error("Could not determine text unit or size for unit");continue}const{text:Y,...W}=B;let lt;if(i!==null&&l+Y.length>i){const tt=i-l;lt=Y.slice(0,tt)}const ct=lt??Y;l+=ct.length;const ut={...s,...W};N0(n,ut,o),n.context.fillText(ct,f,T+Z.baselineShift),f+=Z.width}d+=E}},F1={[j.ARROW]:c1,[j.CIRCLE]:g1,[j.GROUP]:d1,[j.IMAGE]:y1,[j.LINE]:v1,[j.MASK]:w1,[j.PATH]:m1,[j.POLYGON]:A1,[j.RECTANGLE]:T1,[j.SLIDE_OBJECT]:()=>{},[j.SVG]:C1,[j.TEXT]:_1};function R1(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 N1(n,e){if(n===null)return null;const t=yt(X({x:e.x,y:e.y}),e.anchor,it({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 B1(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:St.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}class q1{constructor(e){this.navigator=null;const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:C0(),element:document.body,objectRenderers:{...F1,...t},cacheDurationMinutes:15,scale:D1(o),...i},this.state={..._0}}async present(){const{presentation:e,element:t,scale:o}=this.props,i=a1(e.size),a=R1(e.size);a.style.transformOrigin="center center",a.style.transform=`scale(${o})`,this.state={..._0,imageById:await B1({...e.resources.images,...e1(e)}),canvas:i,extrasContainer:a};const s=Ke(e,t);r1(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:()=>{this.navigator=Ye({presentation:e,onNavigateToSlide:h=>this.renderSlide(h),onNext:()=>this.next()}),this.updateNavigator()}}),t.replaceChildren(),s.appendChild(i),s.appendChild(a),t.appendChild(s);const r=i1(e,this.props.cacheDurationMinutes);r!==null?this.renderSlide(r.slideIndex,r.buildIndex):this.renderSlide(0)}renderSlide(e,t=0,o=null){const{presentation:i}=this.props,{canvas:a}=this.state,s=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&o1({title:i.title,slideIndex:e,buildIndex:t});const r=i.slides[e];if(!(r===void 0||a===null)){if(s||this.state.mountedExtrasCleanups.length===0&&r.extras.length>0){for(const h of this.state.mountedExtrasCleanups)h();this.state.mountedExtrasCleanups=[];for(const h of r.extras){const c=N1(this.state.extrasContainer,h);c!==null&&this.state.mountedExtrasCleanups.push(c)}}this.renderCanvas(a,e,t,o,this.props.scale),o===null&&this.updateNavigator()}}renderCanvas(e,t,o=0,i=null,a=1){const{objectRenderers:s,presentation:r}=this.props,{imageById:h}=this.state;e.width=r.size.width,e.height=r.size.height;const c=e.getContext("2d");if(c===null)return;const f={type:Q.Browser,context:c};s1(e,f);const d=r.slides[t];if(d===void 0)return;const l=t1({slide:d,buildIndex:o,buildTime:i});f.context.fillStyle=Gt(r.backgroundColor),f.context.fillRect(0,0,e.width,e.height);function u(x,M){const S=s[x.objectType],L=l.get(x);S===void 0||L===void 0||S({ctx:f,imageById:h,object:L,opacity:M,renderObject:u,createPath2D:h1})}const m=a!==1;m&&(f.context.save(),f.context.translate(e.width*(1-a)/2,e.height*(1-a)/2),f.context.scale(a,a));for(const x of d.objects)u(x,1);m&&f.context.restore()}updateNavigator(){const{navigator:e}=this;if(e===null)return;if(!e.isOpen()){this.navigator=null;return}const{slideIndex:t,buildIndex:o}=this.state,i=this.getNextSlideBuild(t,o);e.update(t,o,i.slideIndex,i.buildIndex),this.renderCanvas(e.currentCanvas,t,o),i.slideIndex===null?this.renderEndCanvas(e.nextCanvas):this.renderCanvas(e.nextCanvas,i.slideIndex,i.buildIndex)}getNextSlideBuild(e,t){const{presentation:o}=this.props,i=o.slides[e];return i===void 0?{slideIndex:e,buildIndex:t}:t<i.animations.length?{slideIndex:e,buildIndex:t+1}:e+1<o.slides.length?{slideIndex:e+1,buildIndex:0}:{slideIndex:null,buildIndex:0}}renderEndCanvas(e){const{presentation:t}=this.props;e.width=t.size.width,e.height=t.size.height;const o=e.getContext("2d");o!==null&&(o.fillStyle="#000000",o.fillRect(0,0,e.width,e.height))}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=Ze(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 D1(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 z1(n=1e3){return{type:G.PAUSE,isKey:!1,duration:n,shortcut:null}}function j1(n=null){return{objects:[],animations:[],extras:[],isAllKey:!1,isEndKey:!0,isStartKey:!1,shortcut:null,title:"",...n}}function H1(n,e={}){return{...e,text:n}}function U1(n=V.BLACK){return{...n,alpha:1}}function Y1(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 $1(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 X1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Kt,B0;function G1(){if(B0)return Kt;B0=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,x=m,M=u.max,S=!1,L=!1,C=!1,E=!1,T;if(x>=M){u.err="SvgPath: missed param (at pos "+x+")";return}if(T=u.path.charCodeAt(x),(T===43||T===45)&&(x++,T=x<M?u.path.charCodeAt(x):0),!a(T)&&T!==46){u.err="SvgPath: param should start with 0..9 or `.` (at pos "+x+")";return}if(T!==46){if(S=T===48,x++,T=x<M?u.path.charCodeAt(x):0,S&&x<M&&T&&a(T)){u.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+m+")";return}for(;x<M&&a(u.path.charCodeAt(x));)x++,L=!0;T=x<M?u.path.charCodeAt(x):0}if(T===46){for(E=!0,x++;a(u.path.charCodeAt(x));)x++,C=!0;T=x<M?u.path.charCodeAt(x):0}if(T===101||T===69){if(E&&!L&&!C){u.err="SvgPath: invalid float exponent (at pos "+x+")";return}if(x++,T=x<M?u.path.charCodeAt(x):0,(T===43||T===45)&&x++,x<M&&a(u.path.charCodeAt(x)))for(;x<M&&a(u.path.charCodeAt(x));)x++;else{u.err="SvgPath: invalid float exponent (at pos "+x+")";return}}u.index=x,u.param=parseFloat(u.path.slice(m,x))+0}function d(u){var m,x;m=u.path[u.segmentStart],x=m.toLowerCase();var M=u.data;if(x==="m"&&M.length>2&&(u.result.push([m,M[0],M[1]]),M=M.slice(2),x="l",m=m==="m"?"l":"L"),x==="r")u.result.push([m].concat(M));else for(;M.length>=n[x]&&(u.result.push([m].concat(M.splice(0,n[x]))),!!n[x]););}function l(u){var m=u.max,x,M,S,L,C;if(u.segmentStart=u.index,x=u.path.charCodeAt(u.index),M=i(x),!o(x)){u.err="SvgPath: bad command "+u.path[u.index]+" (at pos "+u.index+")";return}if(L=n[u.path[u.index].toLowerCase()],u.index++,h(u),u.data=[],!L){d(u);return}for(S=!1;;){for(C=L;C>0;C--){if(M&&(C===3||C===4)?c(u):f(u),u.err.length){d(u);return}u.data.push(u.param),h(u),S=!1,u.index<m&&u.path.charCodeAt(u.index)===44&&(u.index++,h(u),S=!0)}if(!S&&(u.index>=u.max||!s(u.path.charCodeAt(u.index))))break}d(u)}return Kt=function(m){var x=new r(m),M=x.max;for(h(x);x.index<M&&!x.err.length;)l(x);return x.result.length&&("mM".indexOf(x.result[0][0])<0?(x.err="SvgPath: string should start with `M` or `m`",x.result=[]):x.result[0][0]="M"),{err:x.err,segments:x.result}},Kt}var Qt,q0;function D0(){if(q0)return Qt;q0=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]},Qt=e,Qt}var Jt,z0;function W1(){if(z0)return Jt;z0=1;var n=D0(),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 Jt=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},Jt}var t0,j0;function Z1(){if(j0)return t0;j0=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,x=-l*(i-s)/2+u*(a-r)/2,M=f*f,S=d*d,L=m*m,C=x*x,E=M*S-M*C-S*L;E<0&&(E=0),E/=M*C+S*L,E=Math.sqrt(E)*(h===c?-1:1);var T=E*f/d*x,O=E*-d/f*m,B=u*T-l*O+(i+s)/2,Z=l*T+u*O+(a+r)/2,Y=(m-T)/f,W=(x-O)/d,lt=(-m-T)/f,ct=(-x-O)/d,ut=e(1,0,Y,W),tt=e(Y,W,lt,ct);return c===0&&tt>0&&(tt-=n),c===1&&tt<0&&(tt+=n),[B,Z,ut,tt]}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 t0=function(a,s,r,h,c,f,d,l,u){var m=Math.sin(u*n/360),x=Math.cos(u*n/360),M=x*(a-r)/2+m*(s-h)/2,S=-m*(a-r)/2+x*(s-h)/2;if(M===0&&S===0)return[];if(d===0||l===0)return[];d=Math.abs(d),l=Math.abs(l);var L=M*M/(d*d)+S*S/(l*l);L>1&&(d*=Math.sqrt(L),l*=Math.sqrt(L));var C=t(a,s,r,h,c,f,d,l,m,x),E=[],T=C[2],O=C[3],B=Math.max(Math.ceil(Math.abs(O)/(n/4)),1);O/=B;for(var Z=0;Z<B;Z++)E.push(o(T,O)),T+=O;return E.map(function(Y){for(var W=0;W<Y.length;W+=2){var lt=Y[W+0],ct=Y[W+1];lt*=d,ct*=l;var ut=x*lt-m*ct,tt=m*lt+x*ct;Y[W+0]=ut+C[0],Y[W+1]=tt+C[1]}return Y})},t0}var e0,H0;function V1(){if(H0)return e0;H0=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},e0=t,e0}var n0,U0;function K1(){if(U0)return n0;U0=1;var n=G1(),e=W1(),t=D0(),o=Z1(),i=V1();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,x,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 S=s.toArray(),L=i(c[1],c[2],c[3]).transform(S);if(S[0]*S[3]-S[1]*S[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}L.isDegenerate()?m=[c[0]==="a"?"l":"L",u[0],u[1]]:m=[c[0],L.rx,L.ry,L.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(x=c[0],m=[x],M=x.toLowerCase()===x,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,x){x&&(l[x]=+l[x].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,x,M,S;if(r||this.__evaluateStack(),h.forEach(function(L,C){var E=s(L,C,d,l);Array.isArray(E)&&(c[C]=E,f=!0);var T=L[0]===L[0].toLowerCase();switch(L[0]){case"m":case"M":d=L[1]+(T?d:0),l=L[2]+(T?l:0),u=d,m=l;return;case"h":case"H":d=L[1]+(T?d:0);return;case"v":case"V":l=L[1]+(T?l:0);return;case"z":case"Z":d=u,l=m;return;default:d=L[L.length-2]+(T?d:0),l=L[L.length-1]+(T?l:0)}}),!f)return this;for(S=[],x=0;x<h.length;x++)if(typeof c[x]<"u")for(M=0;M<c[x].length;M++)S.push(c[x][M]);else S.push(h[x]);return this.segments=S,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(x){u.push(["C",x[2],x[3],x[4],x[5],x[6],x[7]])}),u))}),this},a.prototype.unshort=function(){var s=this.segments,r,h,c,f,d;return this.iterate(function(l,u,m,x){var M=l[0],S=M.toUpperCase(),L;u&&(S==="T"?(L=M==="t",c=s[u-1],c[0]==="Q"?(r=c[1]-m,h=c[2]-x):c[0]==="q"?(r=c[1]-c[3],h=c[2]-c[4]):(r=0,h=0),f=-r,d=-h,L||(f+=m,d+=x),s[u]=[L?"q":"Q",f,d,l[1],l[2]]):S==="S"&&(L=M==="s",c=s[u-1],c[0]==="C"?(r=c[3]-m,h=c[4]-x):c[0]==="c"?(r=c[3]-c[5],h=c[4]-c[6]):(r=0,h=0),f=-r,d=-h,L||(f+=m,d+=x),s[u]=[L?"c":"C",f,d,l[1],l[2],l[3],l[4]]))}),this},n0=a,n0}var r0,Y0;function Q1(){return Y0||(Y0=1,r0=K1()),r0}var J1=Q1();const tn=X1(J1);var i0={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},en=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function nn(n){var e=[];return n.replace(en,function(t,o,i){var a=o.toLowerCase();for(i=on(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===i0[a])return i.unshift(o),e.push(i);if(i.length<i0[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,i0[a])))}}),e}var rn=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function on(n){var e=n.match(rn);return e?e.map(Number):[]}function at(n,e,t,o,i,a,s,r){return new o0(n,e,t,o,i,a,s,r)}function o0(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=dn,this.getPoint=hn,this.getDerivative=an):(this.getArcLength=ln,this.getPoint=$0,this.getDerivative=sn),this.init()}o0.prototype={constructor:o0,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=s0(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=s0(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=s0(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 sn(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 an(n,e,t){var o=$0([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 s0(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 $0(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 hn(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 ln(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 cn=[[],[],[-.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]],un=[[],[],[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]],fn=[[1],[1,1],[1,2,1],[1,3,3,1]];function gn(n,e){return fn[n][e]}function a0(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+=gn(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 a0(n-1,e,i)}}function pn(n,e,t){var o=a0(1,t,n),i=a0(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function dn(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*cn[r][a]+o,i+=un[r][a]*pn(n,e,s);return o*i}var Et=Math.PI*2;function X0(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 yn(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,x=d*d,M=l*u-l*x-u*m;M<0&&(M=0),M/=l*x+u*m,M=Math.sqrt(M)*(i===a?-1:1);var S=M*s/r*d,L=M*-r/s*f,C=c*S-h*L+(n+t)/2,E=h*S+c*L+(e+o)/2,T=(f-S)/s,O=(d-L)/r,B=(-f-S)/s,Z=(-d-L)/r,Y=X0(1,0,T,O),W=X0(T,O,B,Z);return a===0&&W>0&&(W-=Et),a===1&&W<0&&(W+=Et),[C,E,Y,W]}function xn(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 vn(n,e,t,o,i,a,s,r,h){var c=Math.sin(i*Et/360),f=Math.cos(i*Et/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=yn(n,e,r,h,a,s,t,o,c,f),x=[],M=m[2],S=m[3],L=Math.max(Math.ceil(Math.abs(S)/(Et/4)),1);S/=L;for(var C=0;C<L;C++)x.push(xn(M,S)),M+=S;return x.map(function(E){for(var T=0;T<E.length;T+=2){var O=E[T+0],B=E[T+1];O*=t,B*=o;var Z=f*O-c*B,Y=c*O+f*B;E[T+0]=Z+m[0],E[T+1]=Y+m[1]}return E})}function G0(n,e,t,o,i,a,s,r,h){return new h0(n,e,t,o,i,a,s,r,h)}function h0(n,e,t,o,i,a,s,r,h){var c=0,f=[],d=[],l=vn(n,e,t,o,i,a,s,r,h);l.forEach(function(u){var m=new at(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7]),x=m.getTotalLength();c+=x,f.push(x),d.push(m)}),this.length=c,this.partialLengths=f,this.curves=d}h0.prototype={constructor:h0,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 ht(n,e,t,o){return new kt(n,e,t,o)}function kt(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}kt.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},kt.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}},kt.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}},kt.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 wn(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=nn(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 ht(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 ht(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 ht(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 ht(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 ht(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 ht(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 ht(h[0],d[0],h[1],d[1])),h=[d[0],d[1]]):r[l][0]==="C"?(f=new at(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 at(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 at(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 at(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 at(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 at(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 at(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]):f=new ht(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 ht(h[0]+r[l][1],h[0]+r[l][3],h[1]+r[l][2],h[1]+r[l][4]):f=new at(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 at(h[0],h[1],2*h[0]-c[0],2*h[1]-c[1],r[l][1],r[l][2]):f=new ht(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 at(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 ht(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 G0(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 G0(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 Nt(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function W0(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function mn(n,e){return Nt(n,e)<1e-9}function bn(n,e,t){let o=n.map((i,a)=>An(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?Tn(a):a}}function An(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function Bt(n){return typeof n=="number"&&isFinite(n)}const l0=`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(k,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(k=typeof globalThis<"u"?globalThis:k||self,X(k.Presenter={}))})(this,(function(k){"use strict";var Xn=Object.defineProperty;var Gn=(k,X,mt)=>X in k?Xn(k,X,{enumerable:!0,configurable:!0,writable:!0,value:mt}):k[X]=mt;var I=(k,X,mt)=>Gn(k,typeof X!="symbol"?X+"":X,mt);var bt,At,Mt,Lt,Tt;const X={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function mt(n){return n*n*n}function he(n){return--n*n*n+1}function le(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var zt=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})(zt),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})(zt);var ce=(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})(zt);const _t={LINEAR:n=>n,CUBIC:le,CUBIC_IN:mt,CUBIC_OUT:he,BACK_IN_OUT:ce.overshoot(.8)},ue=_t.LINEAR;function Ft(n,e,t={}){return{type:X.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:ue,block:!1,interpolators:null,isKey:!1,shortcut:null,...typeof t=="number"?{duration:t}:t}}function fe(n,e={}){return Ft(n,{opacity:1},{duration:500,easing:_t.CUBIC,...typeof e=="number"?{duration:e}:e})}function ge(n,e={}){return Ft(n,{opacity:0},{duration:500,easing:_t.CUBIC,...typeof e=="number"?{duration:e}:e})}function jt(n,e,t={}){return{type:X.UPDATE,isKey:!1,object:n,props:e,shortcut:null,...t}}function de(n){return jt(n,{opacity:0})}function pe(n){return jt(n,{opacity:1})}const et={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},ot=et.TOP_LEFT;function V(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}}V.BLACK=V(0,0,0),V.BLUE=V(0,0,255),V.GREEN=V(0,255,0),V.RED=V(255,0,0),V.TRANSPARENT=V(0,0,0,0),V.WHITE=V(255,255,255);const J={red:0,green:0,blue:0,alpha:1};function Ht(n=null){return{content:null,setup:null,anchor:et.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function g0(n,e=null){return n.alpha*(e??1)}function Ct(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(g0(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function ye(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=V.TRANSPARENT,strokeColor:o=J,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=ot,height:h=1e3,width:u=1e3,x:c=0,y:p=0}=n||{},l=document.createElement("iframe");l.src=e,l.style.backgroundColor=Ct(t),l.style.border=i>0?`${i}px solid ${Ct(o)}`:"none",l.style.pointerEvents=a;const f=(100/s).toFixed(3)+"%";return l.style.height=i===0?f:`calc(${f} - ${i*2}px)`,l.style.width=i===0?f:`calc(${f} - ${i*2}px)`,l.style.transform=`scale(${s})`,l.style.transformOrigin="top left",Ht({content:l,anchor:r,height:h,width:u,x:c,y:p})}const dt={LEFT:"left",CENTER:"center",RIGHT:"right"},xe=dt.LEFT;function st(n,e){throw new Error("Unexpected value: "+n)}function ve(n=null){const{alignment:e=dt.LEFT,scale:t=1,anchor:o=ot,height:i=1e3,width:a=1e3,x:s=0,y:r=0}=n||{};function h(u){const c=document.createElement("video");switch(c.autoplay=!0,c.style.transform=`scale(${t})`,e){case dt.LEFT:c.style.transformOrigin="top left";break;case dt.CENTER:c.style.transformOrigin="top center";break;case dt.RIGHT:c.style.transformOrigin="top right";break;default:st(e)}u.appendChild(c);const p={video:{displaySurface:"window"},audio:!1};return navigator.mediaDevices.getDisplayMedia(p).then(l=>{const f=l.getVideoTracks()[0];f!==void 0&&(f.onended=function(){c.style.display="none"}),c.srcObject=l,c.play()}).catch(l=>{console.error("Could not start screen capture -",l)}),()=>{c.srcObject.getTracks().forEach(f=>f.stop()),c.style.display="none",c.srcObject=null}}return Ht({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 nt(n){return{objectType:j.SLIDE_OBJECT,opacity:1,...n}}function we(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return nt({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 me=50;function be(n=null){return nt({objectType:j.CIRCLE,anchor:ot,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,radius:me,x:0,y:0,...n})}function Ut(n,e=null){return nt({objectType:j.GROUP,anchor:ot,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 Ae(n){const{anchor:e=ot,cols:t=1,rows:o=1,gapX:i=0,gapY:a=0,groupProps:s={},width:r=0,height:h=0,x:u=0,y:c=0,objects:p=()=>null}=n,l=[],f=[];let m=0,x=0;for(let S=0;S<o;S++){const L=[];m=0;let C=0;for(let E=0;E<t;E++){const T=p(S,E),O=typeof r=="function"?r(S,E):r,B=typeof h=="function"?h(S,E):h;L.push(T),T!=null&&f.push(Ut([T],{x:m,y:x})),m+=O+i,C=Math.max(C,B)}l.push(L),x+=C+a}return{grid:Ut(f,{x:u,y:c,height:x-a,width:m-i,anchor:e,...s}),objects:l}}function Me(n=null){return nt({objectType:j.IMAGE,anchor:ot,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function Le(n=null){return nt({objectType:j.LINE,color:J,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function Te(n,e=null){return nt({objectType:j.MASK,anchor:ot,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var Ce=Object.defineProperty,_=(n,e)=>Ce(n,"name",{value:e,configurable:!0}),Pt={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Pe=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Se=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Ee=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(Pe);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=ke(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===Pt[a]){t.push([i,...s.splice(0,Pt[a])]);break}if(s.length<Pt[a])throw new Error(`Malformed path data: "${i}" must have ${Pt[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,Pt[a])])}return t},[])},"default"),ke=_(n=>{const e=n.match(Se);return e?e.map(Number):[]},"parseValues"),rt=(bt=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}},_(bt,"LinearPosition"),bt),d0=(At=class{constructor(e,t,o,i,a,s,r,h,u){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=p0({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=u;const c=Ie(300,function(p){return p0({x:e,y:t},o,i,a,s,r,{x:h,y:u},p)});this.length=c.arcLength}},_(At,"Arc"),At),p0=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=Oe(o,360);const h=_e(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 u=(n.x-s.x)/2,c=(n.y-s.y)/2,p={x:Math.cos(h)*u+Math.sin(h)*c,y:-Math.sin(h)*u+Math.cos(h)*c},l=Math.pow(p.x,2)/Math.pow(e,2)+Math.pow(p.y,2)/Math.pow(t,2);l>1&&(e=Math.sqrt(l)*e,t=Math.sqrt(l)*t);let f=(Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(p.y,2)-Math.pow(t,2)*Math.pow(p.x,2))/(Math.pow(e,2)*Math.pow(p.y,2)+Math.pow(t,2)*Math.pow(p.x,2));f=f<0?0:f;const m=(i!==a?1:-1)*Math.sqrt(f),x=m*(e*p.y/t),M=m*(-t*p.x/e),S={x:Math.cos(h)*x-Math.sin(h)*M+(n.x+s.x)/2,y:Math.sin(h)*x+Math.cos(h)*M+(n.y+s.y)/2},L={x:(p.x-x)/e,y:(p.y-M)/t},C=x0({x:1,y:0},L);let E=x0(L,{x:(-p.x-x)/e,y:(-p.y-M)/t});!a&&E>0?E-=2*Math.PI:a&&E<0&&(E+=2*Math.PI),E%=2*Math.PI;const T=C+E*r,O=e*Math.cos(T),B=t*Math.sin(T);return{x:Math.cos(h)*O-Math.sin(h)*B+S.x,y:Math.sin(h)*O+Math.cos(h)*B+S.y,ellipticalArcStartAngle:C,ellipticalArcEndAngle:C+E,ellipticalArcAngle:T,ellipticalArcCenter:S,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),Ie=_((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=Fe(r*(1/n),0,1);a=e(h),t+=y0(s,a),i.push([s,a]),o.push({t:h,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=y0(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),Oe=_((n,e)=>(n%e+e)%e,"mod"),_e=_(n=>n*(Math.PI/180),"toRadians"),y0=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),Fe=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),x0=_((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"),Ne=[[],[],[-.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]],Re=[[],[],[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]],Be=[[1],[1,1],[1,2,1],[1,3,3,1]],qe=_((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"),De=_((n,e,t)=>v0([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"),ze=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*Ne[20][s]+a,o+=Re[20][s]*w0(n,e,i);return a*o},"getCubicArcLength"),v0=_((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"),je=_((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),u=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 c=h/(2*r),p=t+c,l=u/r-c*c,f=p*p+l>0?Math.sqrt(p*p+l):0,m=c*c+l>0?Math.sqrt(c*c+l):0,x=c+Math.sqrt(c*c+l)!==0&&(p+f)/(c+m)!==0?l*Math.log(Math.abs((p+f)/(c+m))):0;return Math.sqrt(r)/2*(p*f-c*m+x)},"getQuadraticArcLength"),He=_((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 w0(n,e,t){const o=$t(1,t,n),i=$t(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(w0,"BFunc");var $t=_((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+=Be[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 $t(n-1,e,i)},"getDerivative"),Wt=_((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 u=t(i-a),c=Math.abs(n-u)/e;c<o?(o=c,i-=a):a/=2}if(s++,s>500)break}return i},"t2length"),ft=(Mt=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=Wt(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=Wt(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=Wt(e,this.length,u=>this.getArcLength(t,o,u)),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=ze,this.getPoint=qe,this.getDerivative=De,this.d={x:r,y:h}):(this.getArcLength=je,this.getPoint=v0,this.getDerivative=He,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)}},_(Mt,"Bezier"),Mt),Ue=(Lt=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:Ee(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 rt(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 rt(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 rt(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 rt(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 rt(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 rt(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 rt(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new ft(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 ft(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 rt(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 ft(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 ft(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(),u=o.getD();o=new ft(i[0],i[1],i[0]+u.x-h.x,i[1]+u.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 ft(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 rt(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=h.getTotalLength(),this.functions.push(h)}else o=new ft(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 ft(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 rt(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 ft(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 rt(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 ft(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 rt(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 d0(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 d0(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)}}},_(Lt,"SVGPathProperties"),Lt),Yt=(Tt=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 Ue(e),!(this instanceof Yt))return new Yt(e)}},_(Tt,"_svgPathProperties"),Tt);function m0(n=V.BLACK){return{...n,alpha:0}}function $e(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",u=new Yt(r).getTotalLength();return nt({objectType:j.PATH,anchor:ot,strokeColor:J,drawn:1,fillColor:m0(),isRounded:!1,height:t,path:r,pathLength:u,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function We(n=null){return nt({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 Ye(n=null){return nt({objectType:j.RECTANGLE,anchor:ot,strokeColor:J,strokeWidth:0,drawn:1,fillColor:J,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function Xe(n=null){return nt({objectType:j.SVG,anchor:ot,height:100,svg:"",width:100,x:0,y:0,...n})}const b0={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},Ge=b0.NORMAL,A0={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},Ze=A0.NORMAL,Ve={color:J,fontFamily:"sans-serif",fontSize:100,fontStyle:Ge,fontWeight:Ze,ligatures:!1,subscript:!1,superscript:!1};function M0(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function L0(n){return M0(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function T0(n="",e=null){return nt({objectType:j.TEXT,alignment:xe,anchor:ot,length:null,lineSpacing:1,text:n,x:0,y:0,...Ve,...e})}T0.writeOn=(n,e={})=>Ft(n,{length:L0(n.text)},e);function C0(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function P0(n){var o,i;if(n===null)return!1;const e=n,t=(o=e.tagName)==null?void 0:o.toLowerCase();return t==="input"||t==="textarea"||t==="select"||t==="button"||e.isContentEditable?!0:(((i=e.closest)==null?void 0:i.call(e,"[contenteditable=''], [contenteditable='true']"))??null)!==null}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;Xt(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 u of h)Xt(t,u.shortcut,i,r+1);else Xt(t,h.shortcut,i,r+1)}}return t}function Xt(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 S0(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s},{focusOnPointerDown:r=!1,keyEventTarget:h=e}={}){t.shortcuts=Ke(n),r&&(e.hasAttribute("tabindex")||(e.tabIndex=-1),e.addEventListener("pointerdown",u=>{P0(u.target)||e.focus({preventScroll:!0})})),e.addEventListener("mousemove",()=>{e.style.cursor="auto"}),h.addEventListener("keyup",u=>{const c=u;if(!P0(c.target)){if(c.code==="Escape"){t.textCommand=null;return}if(c.code==="ArrowRight"||c.code==="Space"){o(c.shiftKey);return}if(c.code==="ArrowLeft"){i(c.shiftKey);return}if(t.textCommand!==null){if(c.code==="Enter"){const p=t.textCommand;t.textCommand=null;const l=t.shortcuts[p];l!==void 0?a(l.slideIndex,l.buildIndex):isNaN(Number(p))||a(Number(p)-1,0);return}else c.code==="Backspace"?t.textCommand=t.textCommand.slice(0,-1):t.textCommand+=c.key;return}if(c.key==="g"){t.textCommand="";return}if(c.key==="`"&&!C0(c)){s();return}}})}let R=null,Nt=null,E0={width:700,height:680,left:20,top:50};function Qe({presentation:n,shortcutState:e,onNavigateToSlide:t,onRenderSlide:o,onNext:i,onPrevious:a}){if(R!==null&&!R.closed)return Rt(R),R.focus(),Nt;if(R=window.open("","Navigator",n1()),R===null)return console.error("Failed to open navigator window."),null;const s=Je(n,t,i);return Nt=s,R.document.title=n.title,R.document.body.replaceChildren(s.element),S0(n,s.element,e,{onNext:r=>i(r),onPrevious:a,onRenderSlide:o,onShowNavigator:()=>Zt()},{keyEventTarget:R}),R.addEventListener("resize",()=>Rt(R)),R.addEventListener("beforeunload",()=>{Rt(R)}),R.addEventListener("keyup",r=>{(r.key==="Escape"||r.key==="`"&&!C0(r))&&Zt()}),Nt}function Je(n,e,t){const o=(R==null?void 0:R.document)??document,i=o.createElement("div");i.style.boxSizing="border-box",i.style.display="grid",i.style.gridTemplateColumns="260px 1fr",i.style.gap="18px",i.style.height="100vh",i.style.overflow="hidden",i.style.padding="18px",i.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',i.style.backgroundColor="#f5f6f8",i.style.color="#1f2937",o.body.style.margin="0",o.body.style.overflow="hidden";const a=o.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="8px",a.style.minHeight="0",a.style.overflowY="auto",a.style.paddingRight="4px";const s=o.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="14px",s.style.minHeight="0",s.style.minWidth="0",s.style.overflow="hidden";const r=o.createElement("div");r.style.display="flex",r.style.gap="14px",r.style.alignItems="center",r.style.flexWrap="wrap",r.style.fontSize="13px",r.style.color="#4b5563";const h=o.createElement("div");h.style.display="flex",h.style.gap="14px",h.style.flex="1 1 auto",h.style.minHeight="0",h.style.minWidth="0",h.style.overflow="hidden";const u=k0("Current",n),c=k0("Next",n);c.container.style.cursor="pointer",c.container.addEventListener("click",t);const p=n.slides.map((L,C)=>{const E=t1(L,C);return E.style.cursor="pointer",E.addEventListener("click",T=>{T.shiftKey&&Zt(),e(C)}),a.appendChild(E),E}),l=Gt("Slides",a,!0),f=Gt("Current",u.container,!0),m=Gt("Next",c.container,!0),x=()=>{const L=f.input.checked&&m.input.checked&&S();i.style.gridTemplateColumns=l.input.checked?"260px 1fr":"1fr",h.style.flexDirection=L?"column":"row",u.container.style.flex="1 1 0",c.container.style.flex="1 1 0",requestAnimationFrame(()=>{u.resize(),c.resize()})};l.input.addEventListener("change",x),f.input.addEventListener("change",x),m.input.addEventListener("change",x),R==null||R.addEventListener("resize",x),r.appendChild(l.element),r.appendChild(f.element),r.appendChild(m.element),h.appendChild(u.container),h.appendChild(c.container),s.appendChild(r),s.appendChild(h),i.appendChild(a),i.appendChild(s);function M(L,C,E,T){p.forEach((O,B)=>{const Z=B===L;O.style.backgroundColor=Z?"#dbeafe":"#ffffff",O.style.borderColor=Z?"#60a5fa":"#e5e7eb",O.style.color=Z?"#1e3a8a":"#1f2937"}),u.label.textContent=I0(n,L,C),c.label.textContent=I0(n,E,T),e1(p[L],a),x()}function S(){const L=R;if(L===null)return!1;const C=l.input.checked?278:0,E=L.innerWidth-36-C,T=L.innerHeight-36-r.offsetHeight-14;return E<=0||T<=0?!1:E/T<1.1}return{element:i,currentCanvas:u.canvas,nextCanvas:c.canvas,currentLabel:u.label,nextLabel:c.label,isOpen:()=>R!==null&&!R.closed,update:M}}function t1(n,e){const t=(R==null?void 0:R.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="10px",o.style.padding="8px 10px",o.style.backgroundColor="#ffffff",o.style.border="1px solid #e5e7eb",o.style.borderRadius="6px",o.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)",o.style.fontSize="14px",o.style.lineHeight="1",o.style.userSelect="none";const i=t.createElement("div");i.textContent=`${e+1}`,i.style.minWidth="24px",i.style.fontWeight="700",i.style.color="#6b7280";const a=t.createElement("div");return a.textContent=n.title.length>0?n.title:`Slide ${e+1}`,a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.whiteSpace="nowrap",o.appendChild(i),o.appendChild(a),o}function k0(n,e){var c;const t=(R==null?void 0:R.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.flexDirection="column",o.style.minHeight="0",o.style.minWidth="0";const i=t.createElement("div");i.textContent=n,i.style.marginBottom="4px",i.style.fontSize="12px",i.style.fontWeight="700",i.style.textAlign="center",i.style.textTransform="uppercase",i.style.color="#6b7280";const a=t.createElement("div");a.style.marginBottom="6px",a.style.fontSize="14px",a.style.fontWeight="600",a.style.textAlign="center";const s=t.createElement("div");s.style.flex="1 1 auto",s.style.display="flex",s.style.alignItems="flex-start",s.style.justifyContent="center",s.style.minHeight="0",s.style.width="100%",s.style.overflow="hidden";const r=t.createElement("canvas");r.style.display="block",r.style.width="0",r.style.height="0";function h(){const p=s.clientWidth,l=s.clientHeight;if(p<=0||l<=0)return;const f=e.size.width/e.size.height,m=Math.min(p,l*f),x=m/f;r.style.width=`${m}px`,r.style.height=`${x}px`}const u=(c=t.defaultView)==null?void 0:c.ResizeObserver;return u!==void 0&&new u(h).observe(s),R==null||R.addEventListener("resize",h),s.appendChild(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),{container:o,label:a,canvas:r,resize:h}}function Gt(n,e,t){const o=(R==null?void 0:R.document)??document,i=e.style.display||"block",a=o.createElement("label");a.style.display="inline-flex",a.style.alignItems="center",a.style.gap="6px",a.style.userSelect="none";const s=o.createElement("input");return s.type="checkbox",s.checked=t,s.addEventListener("change",()=>{e.style.display=s.checked?i:"none"}),a.appendChild(s),a.appendChild(o.createTextNode(n)),{element:a,input:s}}function I0(n,e,t){if(e===null)return"End of presentation";const o=n.slides[e];return o===void 0?"No slide":`Slide ${e+1} of ${n.slides.length}, Build ${t+1} of ${o.animations.length+1}`}function e1(n,e){if(n===void 0)return;const t=n.offsetTop,o=t+n.offsetHeight,i=e.scrollTop,a=i+e.clientHeight;(t<i||o>a)&&n.scrollIntoView({block:"nearest"})}function Zt(){Rt(R),R==null||R.close(),R=null,Nt=null}function n1(){const{width:n,height:e,left:t,top:o}=E0;return`width=${n},height=${e},left=${t},top=${o}`}function Rt(n){n===null||n.closed||(E0={width:n.outerWidth,height:n.outerHeight,left:n.screenX,top:n.screenY})}function it(n=null){return{height:0,width:0,...n}}const r1=it({width:0,height:0});function O0(n=null){return{backgroundColor:V.WHITE,slides:[],title:"Presentation",size:it({width:3840,height:2160}),resources:{images:{}},...n}}function i1(n){const e=Array.isArray(n)?n:[n];let t=0,o=0;for(const i of e)switch(i.type){case X.PAUSE:t+=i.duration;break;case X.ANIMATE:o=Math.max(o,t+i.delay+i.duration),i.block&&(t+=i.delay+i.duration);break;case X.UPDATE:break;default:st(i)}return o}function Vt(n,e=null){const{red:t,green:o,blue:i}=n,a=g0(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function _0(n){return n===document.body}function o1(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",_0(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;F0(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>F0(t,o))}return t}function F0(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const N0={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})},s1={check:n=>!0,interpolate:(n,e)=>e},R0={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},B0=[R0,N0,s1];function a1(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...B0]:B0,a={};for(const s in e){const r=n[s],h=e[s];for(const u of i)if(u.check(r,s)&&u.check(h,s)){a[s]=u.interpolate(r,h,t);break}}return{...n,...a}}function q0(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 X.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,...a1(s,a.props,a.easing(h),a.interpolators)}),a.block&&(i+=a.delay+a.duration);break}case X.UPDATE:{const s=n.get(a.object);if(s===void 0)break;n.set(a.object,{...s,...a.props});break}case X.PAUSE:i+=a.duration;break;default:st(a)}}}function D0(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function h1({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of D0(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;q0(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;q0(o,s,t)}return o}function l1(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=D0(o);for(const a of i)t(a)}for(const o of n.slides)for(const i of o.objects)t(i);return e}const xt="presenterState";function c1(n,e){const t=localStorage.getItem(xt);if(t===null)return null;if(e===null)return localStorage.removeItem(xt),null;let o;try{o=JSON.parse(t)}catch(u){return console.error("Failed to parse presentation state from localStorage:",u),localStorage.removeItem(xt),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(xt),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const h=n.slides[s];return h===void 0?(localStorage.removeItem(xt),null):(r>h.animations.length&&(r=h.animations.length),{title:i,slideIndex:s,buildIndex:r})}function u1({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(xt,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const z0=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 f1(n,e){e.context.clearRect(0,0,n.width,n.height)}function g1(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 pt={Browser:"browser",Node:"node"};function d1(n){const e=new Path2D(n);return{type:pt.Browser,path:e}}function p1(n){const{drawn:e,startX:t,startY:o,endX:i,endY:a,arrowheadSize:s,isArrowheadFilled:r,isDrawnFromCenter:h}=n,u={x:t,y:o},c={x:i,y:a},p=Math.atan2(c.y-u.y,c.x-u.x),l={x:u.x+(c.x-u.x)/2,y:u.y+(c.y-u.y)/2},f=c.x-u.x,m=c.y-u.y,M=Math.hypot(f,m)*e,S=Math.cos(p),L=Math.sin(p),C=h?{x:l.x-S*M/2,y:l.y-L*M/2}:u,E=h?{x:l.x+S*M/2,y:l.y+L*M/2}:{x:u.x+S*M,y:u.y+L*M},T=r?Math.PI/6:Math.PI/4.5,O=M<s*2?M/2:s,B={x:E.x-O*Math.cos(p-T),y:E.y-O*Math.sin(p-T)},Z={x:E.x-O*Math.cos(p+T),y:E.y-O*Math.sin(p+T)},$={x:C.x+O*Math.cos(p-T),y:C.y+O*Math.sin(p-T)},G={x:C.x+O*Math.cos(p+T),y:C.y+O*Math.sin(p+T)};return{arrowPoints:[C,E],arrowheadPoints:[B,E,Z],doubledArrowheadPoints:[$,C,G]}}function vt({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 u=r+(i?h:0),c=r*t;o?n.context.setLineDash([0,(u-c)/2,c,(u-c)/2]):n.context.setLineDash([c,u-c])}else n.context.setLineDash([]);if(n.context.lineWidth=h,n.context.strokeStyle=Ct(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===pt.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===pt.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}}function wt({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=Vt(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}function Kt(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,u=s.y-r.y;i+=Math.hypot(h,u),t.path.lineTo(s.x,s.y)}return{path:t,length:i}}const y1=({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}=p1(e),{path:h}=Kt(a,o),{path:u}=Kt(s,o);if(vt({color:e.color,ctx:n,path:h,opacity:i,width:e.width}),e.isArrowheadFilled&&(u.path.closePath(),wt({ctx:n,path:u,color:e.color,opacity:i})),vt({color:e.color,ctx:n,path:u,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:c}=Kt(r,o);e.isArrowheadFilled&&(c.path.closePath(),wt({ctx:n,path:c,color:e.color,opacity:i})),vt({color:e.color,ctx:n,path:c,opacity:i,width:e.width})}};function x1(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 v1(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 j0(n,e){switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}const w1=({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}=v1(e,o);if(i<1&&e.strokeWidth>0){const r=x1(e,o);r!==void 0&&(n.context.save(),j0(n,r),wt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else wt({ctx:n,path:a,color:e.fillColor,opacity:i});vt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function Y(n=null){return{x:0,y:0,...n}}const m1=Y();function gt(n=null){return{origin:m1,size:r1,...n}}gt();function yt(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case et.TOP_LEFT:return gt({origin:Y({x:o,y:i}),size:t});case et.TOP:return gt({origin:Y({x:o-a/2,y:i}),size:t});case et.TOP_RIGHT:return gt({origin:Y({x:o-a,y:i}),size:t});case et.LEFT:return gt({origin:Y({x:o,y:i-s/2}),size:t});case et.CENTER:return gt({origin:Y({x:o-a/2,y:i-s/2}),size:t});case et.RIGHT:return gt({origin:Y({x:o-a,y:i-s/2}),size:t});case et.BOTTOM_LEFT:return gt({origin:Y({x:o,y:i-s}),size:t});case et.BOTTOM:return gt({origin:Y({x:o-a/2,y:i-s}),size:t});case et.BOTTOM_RIGHT:return gt({origin:Y({x:o-a,y:i-s}),size:t});default:st(e)}}const b1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=yt(Y({x:e.x,y:e.y}),e.anchor,it({width:e.width*Math.abs(i),height:e.height*Math.abs(a)})),{rotation:r,rotateOriginX:h,rotateOriginY:u,skewOriginX:c,skewOriginY:p,skewX:l,skewY:f}=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,u),n.context.rotate(r*Math.PI/180),n.context.translate(-h,-u),n.context.translate(c,p),n.context.transform(1,Math.tan(f*Math.PI/180),Math.tan(l*Math.PI/180),1,0,0),n.context.translate(-c,-p);for(const m of e.objects)t(m,o*e.opacity);e.previewColor!==null&&(n.context.fillStyle=Ct(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,u,e.rotateOriginPreviewSize,0,2*Math.PI),n.context.fill()),e.skewOriginPreviewSize>0&&(n.context.fillStyle="blue",n.context.beginPath(),n.context.arc(c,p,e.skewOriginPreviewSize,0,2*Math.PI),n.context.fill()),n.context.restore()}};function Qt(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 St={Browser:"browser",Node:"node"},A1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=yt(Y({x:t.x,y:t.y}),t.anchor,it({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=Qt(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===pt.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===pt.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===St.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===St.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:st(n)}n.context.restore()}};function M1(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 L1=({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}=M1(e,o);vt({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},T1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=yt(Y({x:e.x,y:e.y}),e.anchor,it({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=Ct(V.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()},C1=({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}=yt(Y({x:e.x,y:e.y}),e.anchor,it({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),wt({ctx:n,path:s,color:e.fillColor,opacity:i}),vt({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 P1(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 u=o[h];if(u===void 0)continue;t.path.lineTo(u.x,u.y);const c=Math.hypot(u.x-s.x,u.y-s.y);a+=c,s=u}t.path.closePath();const r=Math.hypot(i.x-s.x,i.y-s.y);return a+=r,{path:t,length:a}}const S1=({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}=P1(e,o);wt({ctx:n,path:a,color:e.fillColor,opacity:i}),vt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function E1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=yt(Y({x:n.x,y:n.y}),n.anchor,it({width:n.width,height:n.height})),a=i.width-n.strokeWidth,s=i.height-n.strokeWidth;if(a<=0||s<=0)return;const r=Y({x:o.x+t,y:o.y+t}),h=it({width:a,height:s}),u=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(u>0)return Qt(r,h,u,e).path;const c=e();return c.path.moveTo(r.x,r.y),c.path.lineTo(r.x+a,r.y),c.path.lineTo(r.x+a,r.y+s),c.path.lineTo(r.x,r.y+s),c.path.closePath(),c}function k1(n,e){const{origin:t,size:o}=yt(Y({x:n.x,y:n.y}),n.anchor,it({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 Qt(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 I1=({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}=k1(e,o);if(i<1&&e.strokeWidth>0){const r=E1(e,o);r!==void 0&&(n.context.save(),j0(n,r),wt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else wt({ctx:n,path:a,color:e.fillColor,opacity:i});vt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})},O1=({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=yt(Y({x:t.x,y:t.y}),t.anchor,it({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===St.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===St.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:st(n)}n.context.restore()};function _1(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 F1(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 N1=.7,R1=.3;function H0(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*R1*(e?-1:1),fontSize:n.fontSize*N1,isSubscript:t,isSuperscript:e}}function B1(n){return{width:n.width,height:n.fontBoundingBoxAscent}}function U0(n,e,t=1){const o=H0(e);n.context.fillStyle=Vt(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 q1(n,e,t){const o=[];for(const i of n){const a=[];for(const s of i){const{text:r,...h}=s,u={...e,...h};U0(t,u);const c=t.context.measureText(r),p=B1(c),{baselineShift:l}=H0(u),f=p.height+Math.max(0,-l),m=Math.max(0,l);a.push({...p,baselineShift:l,bottom:m,height:f+m,top:f})}o.push(a)}return o}const D1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=M0(e.text),s=_1(e),r=q1(a,s,n),h=F1(r,e.lineSpacing),u=yt(Y({x:e.x,y:e.y}),e.anchor,h);let c=u.origin.x,p=u.origin.y,l=0,f=0;for(let m=0;m<a.length;m++){const x=a[m],M=r[m];if(x==null||M==null){console.error("Could not determine text units or sizes for line");continue}const S=M.reduce((O,B)=>O+B.width,0),L=M.length===0?f:M.reduce((O,B)=>Math.max(O,B.top),0),C=M.length===0?0:M.reduce((O,B)=>Math.max(O,B.bottom),0),E=L+C;switch(e.alignment){case dt.LEFT:c=u.origin.x;break;case dt.CENTER:c=u.origin.x+(u.size.width-S)/2;break;case dt.RIGHT:c=u.origin.x+(u.size.width-S);break;default:st(e.alignment);break}p+=f*(e.lineSpacing-1);const T=p+L;f=E;for(let O=0;O<x.length&&!(i!==null&&l>=i);O++){const B=x[O],Z=M[O];if(B==null||Z==null){console.error("Could not determine text unit or size for unit");continue}const{text:$,...G}=B;let lt;if(i!==null&&l+$.length>i){const tt=i-l;lt=$.slice(0,tt)}const ct=lt??$;l+=ct.length;const ut={...s,...G};U0(n,ut,o),n.context.fillText(ct,c,T+Z.baselineShift),c+=Z.width}p+=E}},z1={[j.ARROW]:y1,[j.CIRCLE]:w1,[j.GROUP]:b1,[j.IMAGE]:A1,[j.LINE]:L1,[j.MASK]:T1,[j.PATH]:C1,[j.POLYGON]:S1,[j.RECTANGLE]:I1,[j.SLIDE_OBJECT]:()=>{},[j.SVG]:O1,[j.TEXT]:D1};function j1(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 H1(n,e){if(n===null)return null;const t=yt(Y({x:e.x,y:e.y}),e.anchor,it({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 U1(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=u=>s(u),i.includes("</svg>")){const u=i.replace(/<\?xml[^?]*\?>\s*/g,""),c=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),p=URL.createObjectURL(c);r.src=p}else r.src=i}),o=Object.entries(n).map(async([i,a])=>{const s=await t(a);e[i]={type:St.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}class $1{constructor(e){this.navigator=null;const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:O0(),element:document.body,objectRenderers:{...z1,...t},cacheDurationMinutes:15,scale:W1(o),...i},this.state={...z0}}async present(){const{presentation:e,element:t,scale:o}=this.props,i=g1(e.size),a=j1(e.size);a.style.transformOrigin="center center",a.style.transform=`scale(${o})`,this.state={...z0,imageById:await U1({...e.resources.images,...l1(e)}),canvas:i,extrasContainer:a};const s=o1(e,t),r=_0(t),h=(c,p)=>{this.state.shortcutState.shortcuts.b={slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex},this.renderSlide(c??this.state.slideIndex,p)};S0(e,s,this.state.shortcutState,{onNext:c=>this.next(c),onPrevious:c=>this.previous(c),onRenderSlide:h,onShowNavigator:()=>{r&&(this.navigator=Qe({presentation:e,shortcutState:this.state.shortcutState,onNavigateToSlide:c=>this.renderSlide(c),onRenderSlide:h,onNext:c=>this.next(c),onPrevious:c=>this.previous(c)}),this.updateNavigator())}},{focusOnPointerDown:!r,keyEventTarget:r?window:s}),t.replaceChildren(),s.appendChild(i),s.appendChild(a),t.appendChild(s);const u=c1(e,this.props.cacheDurationMinutes);u!==null?this.renderSlide(u.slideIndex,u.buildIndex):this.renderSlide(0)}renderSlide(e,t=0,o=null){const{presentation:i}=this.props,{canvas:a}=this.state,s=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&u1({title:i.title,slideIndex:e,buildIndex:t});const r=i.slides[e];if(!(r===void 0||a===null)){if(s||this.state.mountedExtrasCleanups.length===0&&r.extras.length>0){for(const h of this.state.mountedExtrasCleanups)h();this.state.mountedExtrasCleanups=[];for(const h of r.extras){const u=H1(this.state.extrasContainer,h);u!==null&&this.state.mountedExtrasCleanups.push(u)}}this.renderCanvas(a,e,t,o,this.props.scale),o===null&&this.updateNavigator()}}renderCanvas(e,t,o=0,i=null,a=1){const{objectRenderers:s,presentation:r}=this.props,{imageById:h}=this.state;e.width=r.size.width,e.height=r.size.height;const u=e.getContext("2d");if(u===null)return;const c={type:Q.Browser,context:u};f1(e,c);const p=r.slides[t];if(p===void 0)return;const l=h1({slide:p,buildIndex:o,buildTime:i});c.context.fillStyle=Vt(r.backgroundColor),c.context.fillRect(0,0,e.width,e.height);function f(x,M){const S=s[x.objectType],L=l.get(x);S===void 0||L===void 0||S({ctx:c,imageById:h,object:L,opacity:M,renderObject:f,createPath2D:d1})}const m=a!==1;m&&(c.context.save(),c.context.translate(e.width*(1-a)/2,e.height*(1-a)/2),c.context.scale(a,a));for(const x of p.objects)f(x,1);m&&c.context.restore()}updateNavigator(){const{navigator:e}=this;if(e===null)return;if(!e.isOpen()){this.navigator=null;return}const{slideIndex:t,buildIndex:o}=this.state,i=this.getNextSlideBuild(t,o);e.update(t,o,i.slideIndex,i.buildIndex),this.renderCanvas(e.currentCanvas,t,o),i.slideIndex===null?this.renderEndCanvas(e.nextCanvas):this.renderCanvas(e.nextCanvas,i.slideIndex,i.buildIndex)}getNextSlideBuild(e,t){const{presentation:o}=this.props,i=o.slides[e];return i===void 0?{slideIndex:e,buildIndex:t}:t<i.animations.length?{slideIndex:e,buildIndex:t+1}:e+1<o.slides.length?{slideIndex:e+1,buildIndex:0}:{slideIndex:null,buildIndex:0}}renderEndCanvas(e){const{presentation:t}=this.props;e.width=t.size.width,e.height=t.size.height;const o=e.getContext("2d");o!==null&&(o.fillStyle="#000000",o.fillRect(0,0,e.width,e.height))}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(),u=i1(r),c=p=>{const l=p-h;l<u?(this.renderSlide(i,a+1,l),this.state.currentAnimationId=requestAnimationFrame(c)):this.renderSlide(i,a+1,null)};this.state.currentAnimationId=requestAnimationFrame(c)}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 W1(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 Y1(n=1e3){return{type:X.PAUSE,isKey:!1,duration:n,shortcut:null}}function X1(n=null){return{objects:[],animations:[],extras:[],isAllKey:!1,isEndKey:!0,isStartKey:!1,shortcut:null,title:"",...n}}function G1(n,e={}){return{...e,text:n}}function Z1(n=V.BLACK){return{...n,alpha:1}}function V1(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 K1(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 Q1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Jt,$0;function J1(){if($0)return Jt;$0=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(f){return f===10||f===13||f===8232||f===8233||f===32||f===9||f===11||f===12||f===160||f>=5760&&e.indexOf(f)>=0}function o(f){switch(f|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(f){return(f|32)===97}function a(f){return f>=48&&f<=57}function s(f){return f>=48&&f<=57||f===43||f===45||f===46}function r(f){this.index=0,this.path=f,this.max=f.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function h(f){for(;f.index<f.max&&t(f.path.charCodeAt(f.index));)f.index++}function u(f){var m=f.path.charCodeAt(f.index);if(m===48){f.param=0,f.index++;return}if(m===49){f.param=1,f.index++;return}f.err="SvgPath: arc flag can be 0 or 1 only (at pos "+f.index+")"}function c(f){var m=f.index,x=m,M=f.max,S=!1,L=!1,C=!1,E=!1,T;if(x>=M){f.err="SvgPath: missed param (at pos "+x+")";return}if(T=f.path.charCodeAt(x),(T===43||T===45)&&(x++,T=x<M?f.path.charCodeAt(x):0),!a(T)&&T!==46){f.err="SvgPath: param should start with 0..9 or `.` (at pos "+x+")";return}if(T!==46){if(S=T===48,x++,T=x<M?f.path.charCodeAt(x):0,S&&x<M&&T&&a(T)){f.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+m+")";return}for(;x<M&&a(f.path.charCodeAt(x));)x++,L=!0;T=x<M?f.path.charCodeAt(x):0}if(T===46){for(E=!0,x++;a(f.path.charCodeAt(x));)x++,C=!0;T=x<M?f.path.charCodeAt(x):0}if(T===101||T===69){if(E&&!L&&!C){f.err="SvgPath: invalid float exponent (at pos "+x+")";return}if(x++,T=x<M?f.path.charCodeAt(x):0,(T===43||T===45)&&x++,x<M&&a(f.path.charCodeAt(x)))for(;x<M&&a(f.path.charCodeAt(x));)x++;else{f.err="SvgPath: invalid float exponent (at pos "+x+")";return}}f.index=x,f.param=parseFloat(f.path.slice(m,x))+0}function p(f){var m,x;m=f.path[f.segmentStart],x=m.toLowerCase();var M=f.data;if(x==="m"&&M.length>2&&(f.result.push([m,M[0],M[1]]),M=M.slice(2),x="l",m=m==="m"?"l":"L"),x==="r")f.result.push([m].concat(M));else for(;M.length>=n[x]&&(f.result.push([m].concat(M.splice(0,n[x]))),!!n[x]););}function l(f){var m=f.max,x,M,S,L,C;if(f.segmentStart=f.index,x=f.path.charCodeAt(f.index),M=i(x),!o(x)){f.err="SvgPath: bad command "+f.path[f.index]+" (at pos "+f.index+")";return}if(L=n[f.path[f.index].toLowerCase()],f.index++,h(f),f.data=[],!L){p(f);return}for(S=!1;;){for(C=L;C>0;C--){if(M&&(C===3||C===4)?u(f):c(f),f.err.length){p(f);return}f.data.push(f.param),h(f),S=!1,f.index<m&&f.path.charCodeAt(f.index)===44&&(f.index++,h(f),S=!0)}if(!S&&(f.index>=f.max||!s(f.path.charCodeAt(f.index))))break}p(f)}return Jt=function(m){var x=new r(m),M=x.max;for(h(x);x.index<M&&!x.err.length;)l(x);return x.result.length&&("mM".indexOf(x.result[0][0])<0?(x.err="SvgPath: string should start with `M` or `m`",x.result=[]):x.result[0][0]="M"),{err:x.err,segments:x.result}},Jt}var t0,W0;function Y0(){if(W0)return t0;W0=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]},t0=e,t0}var e0,X0;function tn(){if(X0)return e0;X0=1;var n=Y0(),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 e0=function(a){var s=new n,r,h;return a.split(t).forEach(function(u){if(u.length){if(typeof e[u]<"u"){r=u;return}switch(h=u.split(o).map(function(c){return+c||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},e0}var n0,G0;function en(){if(G0)return n0;G0=1;var n=Math.PI*2;function e(i,a,s,r){var h=i*r-a*s<0?-1:1,u=i*s+a*r;return u>1&&(u=1),u<-1&&(u=-1),h*Math.acos(u)}function t(i,a,s,r,h,u,c,p,l,f){var m=f*(i-s)/2+l*(a-r)/2,x=-l*(i-s)/2+f*(a-r)/2,M=c*c,S=p*p,L=m*m,C=x*x,E=M*S-M*C-S*L;E<0&&(E=0),E/=M*C+S*L,E=Math.sqrt(E)*(h===u?-1:1);var T=E*c/p*x,O=E*-p/c*m,B=f*T-l*O+(i+s)/2,Z=l*T+f*O+(a+r)/2,$=(m-T)/c,G=(x-O)/p,lt=(-m-T)/c,ct=(-x-O)/p,ut=e(1,0,$,G),tt=e($,G,lt,ct);return u===0&&tt>0&&(tt-=n),u===1&&tt<0&&(tt+=n),[B,Z,ut,tt]}function o(i,a){var s=1.3333333333333333*Math.tan(a/4),r=Math.cos(i),h=Math.sin(i),u=Math.cos(i+a),c=Math.sin(i+a);return[r,h,r-h*s,h+r*s,u+c*s,c-u*s,u,c]}return n0=function(a,s,r,h,u,c,p,l,f){var m=Math.sin(f*n/360),x=Math.cos(f*n/360),M=x*(a-r)/2+m*(s-h)/2,S=-m*(a-r)/2+x*(s-h)/2;if(M===0&&S===0)return[];if(p===0||l===0)return[];p=Math.abs(p),l=Math.abs(l);var L=M*M/(p*p)+S*S/(l*l);L>1&&(p*=Math.sqrt(L),l*=Math.sqrt(L));var C=t(a,s,r,h,u,c,p,l,m,x),E=[],T=C[2],O=C[3],B=Math.max(Math.ceil(Math.abs(O)/(n/4)),1);O/=B;for(var Z=0;Z<B;Z++)E.push(o(T,O)),T+=O;return E.map(function($){for(var G=0;G<$.length;G+=2){var lt=$[G+0],ct=$[G+1];lt*=p,ct*=l;var ut=x*lt-m*ct,tt=m*lt+x*ct;$[G+0]=ut+C[0],$[G+1]=tt+C[1]}return $})},n0}var r0,Z0;function nn(){if(Z0)return r0;Z0=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],u=((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])),c=(r+h)/2;if(u<n*c)return this.rx=this.ry=Math.sqrt(c),this.ax=0,this;var p=s[0]*s[1]+s[2]*s[3];u=Math.sqrt(u);var l=c+u/2,f=c-u/2;return this.ax=Math.abs(p)<n&&Math.abs(l-h)<n?90:Math.atan(Math.abs(p)>Math.abs(l-h)?(l-r)/p:p/(l-h))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(f)):(this.ax+=90,this.rx=Math.sqrt(f),this.ry=Math.sqrt(l)),this},t.prototype.isDegenerate=function(){return this.rx<n*this.ry||this.ry<n*this.rx},r0=t,r0}var i0,V0;function rn(){if(V0)return i0;V0=1;var n=J1(),e=tn(),t=Y0(),o=en(),i=nn();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(u,c,p,l){var f,m,x,M;switch(u[0]){case"v":f=s.calc(0,u[1],!0),m=f[0]===0?["v",f[1]]:["l",f[0],f[1]];break;case"V":f=s.calc(p,u[1],!1),m=f[0]===s.calc(p,l,!1)[0]?["V",f[1]]:["L",f[0],f[1]];break;case"h":f=s.calc(u[1],0,!0),m=f[1]===0?["h",f[0]]:["l",f[0],f[1]];break;case"H":f=s.calc(u[1],l,!1),m=f[1]===s.calc(p,l,!1)[1]?["H",f[0]]:["L",f[0],f[1]];break;case"a":case"A":var S=s.toArray(),L=i(u[1],u[2],u[3]).transform(S);if(S[0]*S[3]-S[1]*S[2]<0&&(u[5]=u[5]?"0":"1"),f=s.calc(u[6],u[7],u[0]==="a"),u[0]==="A"&&u[6]===p&&u[7]===l||u[0]==="a"&&u[6]===0&&u[7]===0){m=[u[0]==="a"?"l":"L",f[0],f[1]];break}L.isDegenerate()?m=[u[0]==="a"?"l":"L",f[0],f[1]]:m=[u[0],L.rx,L.ry,L.ax,u[4],u[5],f[0],f[1]];break;case"m":M=c>0,f=s.calc(u[1],u[2],M),m=["m",f[0],f[1]];break;default:for(x=u[0],m=[x],M=x.toLowerCase()===x,h=1;h<u.length;h+=2)f=s.calc(u[h],u[h+1],M),m.push(f[0],f[1])}r.segments[c]=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 u=0,c=this.segments.length;u<c;u++){var p=this.segments[u],l=p[0];l!==r||l==="m"||l==="M"?(l==="m"&&r==="z"&&(s+=" "),s+=l,h=!1):h=!0;for(var f=1;f<p.length;f++){var m=p[f];f===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,u=0,c=0,p;return s=s||0,this.__evaluateStack(),this.segments.forEach(function(l){var f=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":f&&(l[1]+=u),u=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"V":case"v":f&&(l[1]+=c),c=l[1]-l[1].toFixed(s),l[1]=+l[1].toFixed(s);return;case"Z":case"z":u=r,c=h;return;case"M":case"m":f&&(l[1]+=u,l[2]+=c),u=l[1]-l[1].toFixed(s),c=l[2]-l[2].toFixed(s),r=u,h=c,l[1]=+l[1].toFixed(s),l[2]=+l[2].toFixed(s);return;case"A":case"a":f&&(l[6]+=u,l[7]+=c),u=l[6]-l[6].toFixed(s),c=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:p=l.length,f&&(l[p-2]+=u,l[p-1]+=c),u=l[p-2]-l[p-2].toFixed(s),c=l[p-1]-l[p-1].toFixed(s),l.forEach(function(m,x){x&&(l[x]=+l[x].toFixed(s))});return}}),this},a.prototype.iterate=function(s,r){var h=this.segments,u={},c=!1,p=0,l=0,f=0,m=0,x,M,S;if(r||this.__evaluateStack(),h.forEach(function(L,C){var E=s(L,C,p,l);Array.isArray(E)&&(u[C]=E,c=!0);var T=L[0]===L[0].toLowerCase();switch(L[0]){case"m":case"M":p=L[1]+(T?p:0),l=L[2]+(T?l:0),f=p,m=l;return;case"h":case"H":p=L[1]+(T?p:0);return;case"v":case"V":l=L[1]+(T?l:0);return;case"z":case"Z":p=f,l=m;return;default:p=L[L.length-2]+(T?p:0),l=L[L.length-1]+(T?l:0)}}),!c)return this;for(S=[],x=0;x<h.length;x++)if(typeof u[x]<"u")for(M=0;M<u[x].length;M++)S.push(u[x][M]);else S.push(h[x]);return this.segments=S,this},a.prototype.abs=function(){return this.iterate(function(s,r,h,u){var c=s[0],p=c.toUpperCase(),l;if(c!==p)switch(s[0]=p,c){case"v":s[1]+=u;return;case"a":s[6]+=h,s[7]+=u;return;default:for(l=1;l<s.length;l++)s[l]+=l%2?h:u}},!0),this},a.prototype.rel=function(){return this.iterate(function(s,r,h,u){var c=s[0],p=c.toLowerCase(),l;if(c!==p&&!(r===0&&c==="M"))switch(s[0]=p,c){case"V":s[1]-=u;return;case"A":s[6]-=h,s[7]-=u;return;default:for(l=1;l<s.length;l++)s[l]-=l%2?h:u}},!0),this},a.prototype.unarc=function(){return this.iterate(function(s,r,h,u){var c,p,l,f=[],m=s[0];return m!=="A"&&m!=="a"?null:(m==="a"?(p=h+s[6],l=u+s[7]):(p=s[6],l=s[7]),c=o(h,u,p,l,s[4],s[5],s[1],s[2],s[3]),c.length===0?[[s[0]==="a"?"l":"L",s[6],s[7]]]:(c.forEach(function(x){f.push(["C",x[2],x[3],x[4],x[5],x[6],x[7]])}),f))}),this},a.prototype.unshort=function(){var s=this.segments,r,h,u,c,p;return this.iterate(function(l,f,m,x){var M=l[0],S=M.toUpperCase(),L;f&&(S==="T"?(L=M==="t",u=s[f-1],u[0]==="Q"?(r=u[1]-m,h=u[2]-x):u[0]==="q"?(r=u[1]-u[3],h=u[2]-u[4]):(r=0,h=0),c=-r,p=-h,L||(c+=m,p+=x),s[f]=[L?"q":"Q",c,p,l[1],l[2]]):S==="S"&&(L=M==="s",u=s[f-1],u[0]==="C"?(r=u[3]-m,h=u[4]-x):u[0]==="c"?(r=u[3]-u[5],h=u[4]-u[6]):(r=0,h=0),c=-r,p=-h,L||(c+=m,p+=x),s[f]=[L?"c":"C",c,p,l[1],l[2],l[3],l[4]]))}),this},i0=a,i0}var o0,K0;function on(){return K0||(K0=1,o0=rn()),o0}var sn=on();const an=Q1(sn);var s0={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},hn=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function ln(n){var e=[];return n.replace(hn,function(t,o,i){var a=o.toLowerCase();for(i=un(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===s0[a])return i.unshift(o),e.push(i);if(i.length<s0[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,s0[a])))}}),e}var cn=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function un(n){var e=n.match(cn);return e?e.map(Number):[]}function at(n,e,t,o,i,a,s,r){return new a0(n,e,t,o,i,a,s,r)}function a0(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=bn,this.getPoint=dn,this.getDerivative=gn):(this.getArcLength=pn,this.getPoint=Q0,this.getDerivative=fn),this.init()}a0.prototype={constructor:a0,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=h0(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=h0(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=h0(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 fn(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 gn(n,e,t){var o=Q0([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 h0(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),u=t(o,i,s-r),c=Math.abs(n-h)/e,p=Math.abs(n-u)/e;c<a?(a=c,s+=r):p<a?(a=p,s-=r):r/=2}return s}function Q0(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 dn(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 pn(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),u=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 c=h/(2*r),p=u/r,l=t+c,f=p-c*c;return Math.sqrt(r)/2*(l*Math.sqrt(l*l+f)-c*Math.sqrt(c*c+f)+f*Math.log(Math.abs((l+Math.sqrt(l*l+f))/(c+Math.sqrt(c*c+f)))))}var yn=[[],[],[-.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]],xn=[[],[],[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]],vn=[[1],[1,1],[1,2,1],[1,3,3,1]];function wn(n,e){return vn[n][e]}function l0(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+=wn(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 l0(n-1,e,i)}}function mn(n,e,t){var o=l0(1,t,n),i=l0(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function bn(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*yn[r][a]+o,i+=xn[r][a]*mn(n,e,s);return o*i}var Et=Math.PI*2;function J0(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 An(n,e,t,o,i,a,s,r,h,u){var c=u*(n-t)/2+h*(e-o)/2,p=-h*(n-t)/2+u*(e-o)/2,l=s*s,f=r*r,m=c*c,x=p*p,M=l*f-l*x-f*m;M<0&&(M=0),M/=l*x+f*m,M=Math.sqrt(M)*(i===a?-1:1);var S=M*s/r*p,L=M*-r/s*c,C=u*S-h*L+(n+t)/2,E=h*S+u*L+(e+o)/2,T=(c-S)/s,O=(p-L)/r,B=(-c-S)/s,Z=(-p-L)/r,$=J0(1,0,T,O),G=J0(T,O,B,Z);return a===0&&G>0&&(G-=Et),a===1&&G<0&&(G+=Et),[C,E,$,G]}function Mn(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 Ln(n,e,t,o,i,a,s,r,h){var u=Math.sin(i*Et/360),c=Math.cos(i*Et/360),p=c*(n-r)/2+u*(e-h)/2,l=-u*(n-r)/2+c*(e-h)/2;if(p===0&&l===0)return[];if(t===0||o===0)return[];t=Math.abs(t),o=Math.abs(o);var f=p*p/(t*t)+l*l/(o*o);f>1&&(t*=Math.sqrt(f),o*=Math.sqrt(f));var m=An(n,e,r,h,a,s,t,o,u,c),x=[],M=m[2],S=m[3],L=Math.max(Math.ceil(Math.abs(S)/(Et/4)),1);S/=L;for(var C=0;C<L;C++)x.push(Mn(M,S)),M+=S;return x.map(function(E){for(var T=0;T<E.length;T+=2){var O=E[T+0],B=E[T+1];O*=t,B*=o;var Z=c*O-u*B,$=u*O+c*B;E[T+0]=Z+m[0],E[T+1]=$+m[1]}return E})}function te(n,e,t,o,i,a,s,r,h){return new c0(n,e,t,o,i,a,s,r,h)}function c0(n,e,t,o,i,a,s,r,h){var u=0,c=[],p=[],l=Ln(n,e,t,o,i,a,s,r,h);l.forEach(function(f){var m=new at(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]),x=m.getTotalLength();u+=x,c.push(x),p.push(m)}),this.length=u,this.partialLengths=c,this.curves=p}c0.prototype={constructor:c0,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 ht(n,e,t,o){return new kt(n,e,t,o)}function kt(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}kt.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},kt.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}},kt.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}},kt.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 Tn(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=ln(s),h=[0,0],u=[0,0],c,p,l=0;l<r.length;l++)r[l][0]==="M"?(h=[r[l][1],r[l][2]],p=[h[0],h[1]],o.push(null)):r[l][0]==="m"?(h=[r[l][1]+h[0],r[l][2]+h[1]],p=[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 ht(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 ht(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 ht(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 ht(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 ht(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 ht(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(p[0]-h[0],2)+Math.pow(p[1]-h[1],2)),o.push(new ht(h[0],p[0],h[1],p[1])),h=[p[0],p[1]]):r[l][0]==="C"?(c=new at(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4],r[l][5],r[l][6]),e=e+c.getTotalLength(),h=[r[l][5],r[l][6]],o.push(c)):r[l][0]==="c"?(c=new at(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+c.getTotalLength(),h=[r[l][5]+h[0],r[l][6]+h[1]],o.push(c)):r[l][0]==="S"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?c=new at(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]):c=new at(h[0],h[1],h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]),e=e+c.getTotalLength(),h=[r[l][3],r[l][4]],o.push(c)):r[l][0]==="s"?(l>0&&["C","c","S","s"].indexOf(r[l-1][0])>-1?c=new at(h[0],h[1],h[0]+c.d.x-c.c.x,h[1]+c.d.y-c.c.y,h[0]+r[l][1],h[1]+r[l][2],h[0]+r[l][3],h[1]+r[l][4]):c=new at(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+c.getTotalLength(),h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(c)):r[l][0]==="Q"?(h[0]!=r[l][1]&&h[1]!=r[l][2]?c=new at(h[0],h[1],r[l][1],r[l][2],r[l][3],r[l][4]):c=new ht(r[l][1],r[l][3],r[l][2],r[l][4]),e=e+c.getTotalLength(),o.push(c),h=[r[l][3],r[l][4]],u=[r[l][1],r[l][2]]):r[l][0]==="q"?(r[l][1]==0&&r[l][2]==0?c=new ht(h[0]+r[l][1],h[0]+r[l][3],h[1]+r[l][2],h[1]+r[l][4]):c=new at(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+c.getTotalLength(),u=[h[0]+r[l][1],h[1]+r[l][2]],h=[r[l][3]+h[0],r[l][4]+h[1]],o.push(c)):r[l][0]==="T"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?c=new at(h[0],h[1],2*h[0]-u[0],2*h[1]-u[1],r[l][1],r[l][2]):c=new ht(h[0],r[l][1],h[1],r[l][2]),o.push(c),e=e+c.getTotalLength(),u=[2*h[0]-u[0],2*h[1]-u[1]],h=[r[l][1],r[l][2]]):r[l][0]==="t"?(l>0&&["Q","q","T","t"].indexOf(r[l-1][0])>-1?c=new at(h[0],h[1],2*h[0]-u[0],2*h[1]-u[1],h[0]+r[l][1],h[1]+r[l][2]):c=new ht(h[0],h[0]+r[l][1],h[1],h[1]+r[l][2]),e=e+c.getTotalLength(),u=[2*h[0]-u[0],2*h[1]-u[1]],h=[r[l][1]+h[0],r[l][2]+h[0]],o.push(c)):r[l][0]==="A"?(c=new te(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+c.getTotalLength(),h=[r[l][6],r[l][7]],o.push(c)):r[l][0]==="a"&&(c=new te(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+c.getTotalLength(),h=[h[0]+r[l][6],h[1]+r[l][7]],o.push(c)),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 Bt(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function ee(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function Cn(n,e){return Bt(n,e)<1e-9}function Pn(n,e,t){let o=n.map((i,a)=>Sn(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?In(a):a}}function Sn(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function qt(n){return typeof n=="number"&&isFinite(n)}const u0=`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"
|
|
5
|
-
`;function Mn(n){return new tn(n).abs()}function Ln(n){return n.toString().split("M").map((e,t)=>(e=e.trim(),t&&e?"M"+e:e)).filter(e=>e)}function Tn(n){return"M"+n.join("L")+"Z"}function Cn(n,e){let t=Mn(n);return Pn(t)||Sn(t,e)}function Pn(n){let e=n.segments||[],t=[];if(!e.length||e[0][0]!=="M")return!1;for(let o=0;o<e.length;o++){let[i,a,s]=e[o];if(i==="M"&&o||i==="Z")break;if(i==="M"||i==="L")t.push([a,s]);else if(i==="H")t.push([a,t[t.length-1][1]]);else if(i==="V")t.push([t[t.length-1][0],a]);else return!1}return t.length?{ring:t}:!1}function Sn(n,e){let t=Ln(n)[0],o=[],i,a,s=3;if(!t)throw new TypeError(l0);a=En(t),i=a.getTotalLength(),e&&Bt(e)&&e>0&&(s=Math.max(s,Math.ceil(i/e)));for(let r=0;r<s;r++){let h=a.getPointAtLength(i*r/s);o.push([h.x,h.y])}return{ring:o,skipBisect:!0}}function En(n){if(typeof window<"u"&&window&&window.document)try{let e=window.document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"d",n),e}catch{}return wn(n)}function Z0(n,e){const t=n.length+e,o=$1(n)/e;let i=0,a=0,s=o/2;for(;n.length<t;){let r=n[i],h=n[(i+1)%n.length],c=Nt(r,h);if(s<=a+c){n.splice(i+1,0,c?W0(r,h,(s-a)/c):r.slice(0)),s+=o;continue}a+=c,i++}}function kn(n,e=1/0){for(let t=0;t<n.length;t++){let o=n[t],i=t===n.length-1?n[0]:n[t+1];for(;Nt(o,i)>e;)i=W0(o,i,.5),n.splice(t+1,0,i)}}function V0(n,e){let t,o,i;if(typeof n=="string"){let a=Cn(n,e);n=a.ring,i=a.skipBisect}else if(!Array.isArray(n))throw new TypeError(l0);if(t=n.slice(0),!In(t))throw new TypeError(l0);return t.length>1&&mn(t[0],t[t.length-1])&&t.pop(),o=Y1(t),o>0&&t.reverse(),!i&&e&&Bt(e)&&e>0&&kn(t,e),t}function In(n){return n.every(function(e){return Array.isArray(e)&&e.length>=2&&Bt(e[0])&&Bt(e[1])})}function On(n,e){let t=n.length,o=1/0,i,a,s;for(let r=0;r<t;r++)a=0,e.forEach(function(h,c){let f=Nt(n[(r+c)%t],h);a+=f*f}),a<o&&(o=a,i=r);i&&(s=n.splice(0,i),n.splice(n.length,0,...s))}function _n(n,e,{maxSegmentLength:t=10,string:o=!0}={}){let i=V0(n,t),a=V0(e,t),s=Fn(i,a,o);return!o||typeof n!="string"&&typeof e!="string"?s:r=>r<1e-4&&typeof n=="string"?n:1-r<1e-4&&typeof e=="string"?e:s(r)}function Fn(n,e,t){let o;return o=n.length-e.length,Z0(n,o<0?o*-1:0),Z0(e,o>0?o:0),On(n,e),bn(n,e,t)}var qt={exports:{}},K0;function Rn(){if(K0)return qt.exports;K0=1,qt.exports=n,qt.exports.default=n;function n(g,y,p){p=p||2;var v=y&&y.length,w=v?y[0]*p:g.length,b=e(g,0,w,p,!0),A=[];if(!b||b.next===b.prev)return A;var P,R,F,$,H,q,K;if(v&&(b=h(g,y,b,p)),g.length>80*p){P=F=g[0],R=$=g[1];for(var U=p;U<w;U+=p)H=g[U],q=g[U+1],H<P&&(P=H),q<R&&(R=q),H>F&&(F=H),q>$&&($=q);K=Math.max(F-P,$-R),K=K!==0?32767/K:0}return o(b,A,p,P,R,K,0),A}function e(g,y,p,v,w){var b,A;if(w===c0(g,y,p,v)>0)for(b=y;b<p;b+=v)A=ct(b,g[b],g[b+1],A);else for(b=p-v;b>=y;b-=v)A=ct(b,g[b],g[b+1],A);return A&&E(A,A.next)&&(ut(A),A=A.next),A}function t(g,y){if(!g)return g;y||(y=g);var p=g,v;do if(v=!1,!p.steiner&&(E(p,p.next)||C(p.prev,p,p.next)===0)){if(ut(p),p=y=p.prev,p===p.next)break;v=!0}else p=p.next;while(v||p!==y);return y}function o(g,y,p,v,w,b,A){if(g){!A&&b&&u(g,v,w,b);for(var P=g,R,F;g.prev!==g.next;){if(R=g.prev,F=g.next,b?a(g,v,w,b):i(g)){y.push(R.i/p|0),y.push(g.i/p|0),y.push(F.i/p|0),ut(g),g=F.next,P=F.next;continue}if(g=F,g===P){A?A===1?(g=s(t(g),y,p),o(g,y,p,v,w,b,2)):A===2&&r(g,y,p,v,w,b):o(t(g),y,p,v,w,b,1);break}}}}function i(g){var y=g.prev,p=g,v=g.next;if(C(y,p,v)>=0)return!1;for(var w=y.x,b=p.x,A=v.x,P=y.y,R=p.y,F=v.y,$=w<b?w<A?w:A:b<A?b:A,H=P<R?P<F?P:F:R<F?R:F,q=w>b?w>A?w:A:b>A?b:A,K=P>R?P>F?P:F:R>F?R:F,U=v.next;U!==y;){if(U.x>=$&&U.x<=q&&U.y>=H&&U.y<=K&&S(w,P,b,R,A,F,U.x,U.y)&&C(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function a(g,y,p,v){var w=g.prev,b=g,A=g.next;if(C(w,b,A)>=0)return!1;for(var P=w.x,R=b.x,F=A.x,$=w.y,H=b.y,q=A.y,K=P<R?P<F?P:F:R<F?R:F,U=$<H?$<q?$:q:H<q?H:q,It=P>R?P>F?P:F:R>F?R:F,Ot=$>H?$>q?$:q:H>q?H:q,J0=x(K,U,y,p,v),te=x(It,Ot,y,p,v),D=g.prevZ,z=g.nextZ;D&&D.z>=J0&&z&&z.z<=te;){if(D.x>=K&&D.x<=It&&D.y>=U&&D.y<=Ot&&D!==w&&D!==A&&S(P,$,R,H,F,q,D.x,D.y)&&C(D.prev,D,D.next)>=0||(D=D.prevZ,z.x>=K&&z.x<=It&&z.y>=U&&z.y<=Ot&&z!==w&&z!==A&&S(P,$,R,H,F,q,z.x,z.y)&&C(z.prev,z,z.next)>=0))return!1;z=z.nextZ}for(;D&&D.z>=J0;){if(D.x>=K&&D.x<=It&&D.y>=U&&D.y<=Ot&&D!==w&&D!==A&&S(P,$,R,H,F,q,D.x,D.y)&&C(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;z&&z.z<=te;){if(z.x>=K&&z.x<=It&&z.y>=U&&z.y<=Ot&&z!==w&&z!==A&&S(P,$,R,H,F,q,z.x,z.y)&&C(z.prev,z,z.next)>=0)return!1;z=z.nextZ}return!0}function s(g,y,p){var v=g;do{var w=v.prev,b=v.next.next;!E(w,b)&&T(w,v,v.next,b)&&Y(w,b)&&Y(b,w)&&(y.push(w.i/p|0),y.push(v.i/p|0),y.push(b.i/p|0),ut(v),ut(v.next),v=g=b),v=v.next}while(v!==g);return t(v)}function r(g,y,p,v,w,b){var A=g;do{for(var P=A.next.next;P!==A.prev;){if(A.i!==P.i&&L(A,P)){var R=lt(A,P);A=t(A,A.next),R=t(R,R.next),o(A,y,p,v,w,b,0),o(R,y,p,v,w,b,0);return}P=P.next}A=A.next}while(A!==g)}function h(g,y,p,v){var w=[],b,A,P,R,F;for(b=0,A=y.length;b<A;b++)P=y[b]*v,R=b<A-1?y[b+1]*v:g.length,F=e(g,P,R,v,!1),F===F.next&&(F.steiner=!0),w.push(M(F));for(w.sort(c),b=0;b<w.length;b++)p=f(w[b],p);return p}function c(g,y){return g.x-y.x}function f(g,y){var p=d(g,y);if(!p)return y;var v=lt(p,g);return t(v,v.next),t(p,p.next)}function d(g,y){var p=y,v=g.x,w=g.y,b=-1/0,A;do{if(w<=p.y&&w>=p.next.y&&p.next.y!==p.y){var P=p.x+(w-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(P<=v&&P>b&&(b=P,A=p.x<p.next.x?p:p.next,P===v))return A}p=p.next}while(p!==y);if(!A)return null;var R=A,F=A.x,$=A.y,H=1/0,q;p=A;do v>=p.x&&p.x>=F&&v!==p.x&&S(w<$?v:b,w,F,$,w<$?b:v,w,p.x,p.y)&&(q=Math.abs(w-p.y)/(v-p.x),Y(p,g)&&(q<H||q===H&&(p.x>A.x||p.x===A.x&&l(A,p)))&&(A=p,H=q)),p=p.next;while(p!==R);return A}function l(g,y){return C(g.prev,g,y.prev)<0&&C(y.next,g,g.next)<0}function u(g,y,p,v){var w=g;do w.z===0&&(w.z=x(w.x,w.y,y,p,v)),w.prevZ=w.prev,w.nextZ=w.next,w=w.next;while(w!==g);w.prevZ.nextZ=null,w.prevZ=null,m(w)}function m(g){var y,p,v,w,b,A,P,R,F=1;do{for(p=g,g=null,b=null,A=0;p;){for(A++,v=p,P=0,y=0;y<F&&(P++,v=v.nextZ,!!v);y++);for(R=F;P>0||R>0&&v;)P!==0&&(R===0||!v||p.z<=v.z)?(w=p,p=p.nextZ,P--):(w=v,v=v.nextZ,R--),b?b.nextZ=w:g=w,w.prevZ=b,b=w;p=v}b.nextZ=null,F*=2}while(A>1);return g}function x(g,y,p,v,w){return g=(g-p)*w|0,y=(y-v)*w|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,g|y<<1}function M(g){var y=g,p=g;do(y.x<p.x||y.x===p.x&&y.y<p.y)&&(p=y),y=y.next;while(y!==g);return p}function S(g,y,p,v,w,b,A,P){return(w-A)*(y-P)>=(g-A)*(b-P)&&(g-A)*(v-P)>=(p-A)*(y-P)&&(p-A)*(b-P)>=(w-A)*(v-P)}function L(g,y){return g.next.i!==y.i&&g.prev.i!==y.i&&!Z(g,y)&&(Y(g,y)&&Y(y,g)&&W(g,y)&&(C(g.prev,g,y.prev)||C(g,y.prev,y))||E(g,y)&&C(g.prev,g,g.next)>0&&C(y.prev,y,y.next)>0)}function C(g,y,p){return(y.y-g.y)*(p.x-y.x)-(y.x-g.x)*(p.y-y.y)}function E(g,y){return g.x===y.x&&g.y===y.y}function T(g,y,p,v){var w=B(C(g,y,p)),b=B(C(g,y,v)),A=B(C(p,v,g)),P=B(C(p,v,y));return!!(w!==b&&A!==P||w===0&&O(g,p,y)||b===0&&O(g,v,y)||A===0&&O(p,g,v)||P===0&&O(p,y,v))}function O(g,y,p){return y.x<=Math.max(g.x,p.x)&&y.x>=Math.min(g.x,p.x)&&y.y<=Math.max(g.y,p.y)&&y.y>=Math.min(g.y,p.y)}function B(g){return g>0?1:g<0?-1:0}function Z(g,y){var p=g;do{if(p.i!==g.i&&p.next.i!==g.i&&p.i!==y.i&&p.next.i!==y.i&&T(p,p.next,g,y))return!0;p=p.next}while(p!==g);return!1}function Y(g,y){return C(g.prev,g,g.next)<0?C(g,y,g.next)>=0&&C(g,g.prev,y)>=0:C(g,y,g.prev)<0||C(g,g.next,y)<0}function W(g,y){var p=g,v=!1,w=(g.x+y.x)/2,b=(g.y+y.y)/2;do p.y>b!=p.next.y>b&&p.next.y!==p.y&&w<(p.next.x-p.x)*(b-p.y)/(p.next.y-p.y)+p.x&&(v=!v),p=p.next;while(p!==g);return v}function lt(g,y){var p=new tt(g.i,g.x,g.y),v=new tt(y.i,y.x,y.y),w=g.next,b=y.prev;return g.next=y,y.prev=g,p.next=w,w.prev=p,v.next=p,p.prev=v,b.next=v,v.prev=b,v}function ct(g,y,p,v){var w=new tt(g,y,p);return v?(w.next=v.next,w.prev=v,v.next.prev=w,v.next=w):(w.prev=w,w.next=w),w}function ut(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function tt(g,y,p){this.i=g,this.x=y,this.y=p,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(g,y,p,v){var w=y&&y.length,b=w?y[0]*p:g.length,A=Math.abs(c0(g,0,b,p));if(w)for(var P=0,R=y.length;P<R;P++){var F=y[P]*p,$=P<R-1?y[P+1]*p:g.length;A-=Math.abs(c0(g,F,$,p))}var H=0;for(P=0;P<v.length;P+=3){var q=v[P]*p,K=v[P+1]*p,U=v[P+2]*p;H+=Math.abs((g[q]-g[U])*(g[K+1]-g[q+1])-(g[q]-g[K])*(g[U+1]-g[q+1]))}return A===0&&H===0?0:Math.abs((H-A)/A)};function c0(g,y,p,v){for(var w=0,b=y,A=p-v;b<p;b+=v)w+=(g[A]-g[b])*(g[b+1]+g[A+1]),A=b;return w}return n.flatten=function(g){for(var y=g[0][0].length,p={vertices:[],holes:[],dimensions:y},v=0,w=0;w<g.length;w++){for(var b=0;b<g[w].length;b++)for(var A=0;A<y;A++)p.vertices.push(g[w][b][A]);w>0&&(v+=g[w-1].length,p.holes.push(v))}return p},qt.exports}Rn();function Q0(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function Nn(n){return n.length===1&&(n=Bn(n)),{left:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)<0?o=a+1:i=a}return o},right:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)>0?i=a:o=a+1}return o}}}function Bn(n){return function(e,t){return Q0(n(e),t)}}Nn(Q0);function qn(n,e,t=3){const o=_n(n,e,{maxSegmentLength:t});return{check:i=>typeof i=="string",interpolate:(i,a,s)=>o(s)}}function Dn(n){const e=o=>n.width*o,t=o=>n.height*o;return{scaleX:e,scaleY:t,position:(o,i)=>X({x:e(o),y:t(i)})}}function zn(n){const e=[];if(n.isAllKey){for(let t=0;t<=n.animations.length;t++)e.push(t);return e}return n.isStartKey&&e.push(0),n.animations.forEach((t,o)=>{Array.isArray(t)?t.some(i=>i.isKey)&&e.push(o+1):t.isKey&&e.push(o+1)}),n.isEndKey&&e[e.length-1]!==n.animations.length&&e.push(n.animations.length),e}k.Alignment=pt,k.Anchor=et,k.Animate=Ft,k.Arrow=fe,k.BrowserCanvasRenderer=q1,k.Circle=pe,k.Color=V,k.Easing=_t,k.FadeIn=oe,k.FadeOut=se,k.FontStyle=w0,k.FontWeight=m0,k.Grid=de,k.Group=Ht,k.Hide=ae,k.IFrame=le,k.Image=ye,k.Line=xe,k.Mask=ve,k.ObjectType=j,k.Opaque=U1,k.Path=Be,k.Pause=z1,k.Polygon=qe,k.Position=X,k.Presentation=C0,k.Rectangle=De,k.SVG=ze,k.ScreenCapture=ue,k.Show=he,k.Size=it,k.Slide=j1,k.SlideObject=nt,k.SlideWebExtra=jt,k.Text=M0,k.TextUnit=H1,k.Transparent=v0,k.Update=zt,k.getKeySlideBuildIndices=zn,k.getSizingFunctions=Dn,k.getSmoothPathInterpolator=qn,k.getTextContentLength=A0,k.interpolateColor=S0,k.interpolateNumber=E0,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
5
|
+
`;function En(n){return new an(n).abs()}function kn(n){return n.toString().split("M").map((e,t)=>(e=e.trim(),t&&e?"M"+e:e)).filter(e=>e)}function In(n){return"M"+n.join("L")+"Z"}function On(n,e){let t=En(n);return _n(t)||Fn(t,e)}function _n(n){let e=n.segments||[],t=[];if(!e.length||e[0][0]!=="M")return!1;for(let o=0;o<e.length;o++){let[i,a,s]=e[o];if(i==="M"&&o||i==="Z")break;if(i==="M"||i==="L")t.push([a,s]);else if(i==="H")t.push([a,t[t.length-1][1]]);else if(i==="V")t.push([t[t.length-1][0],a]);else return!1}return t.length?{ring:t}:!1}function Fn(n,e){let t=kn(n)[0],o=[],i,a,s=3;if(!t)throw new TypeError(u0);a=Nn(t),i=a.getTotalLength(),e&&qt(e)&&e>0&&(s=Math.max(s,Math.ceil(i/e)));for(let r=0;r<s;r++){let h=a.getPointAtLength(i*r/s);o.push([h.x,h.y])}return{ring:o,skipBisect:!0}}function Nn(n){if(typeof window<"u"&&window&&window.document)try{let e=window.document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"d",n),e}catch{}return Tn(n)}function ne(n,e){const t=n.length+e,o=K1(n)/e;let i=0,a=0,s=o/2;for(;n.length<t;){let r=n[i],h=n[(i+1)%n.length],u=Bt(r,h);if(s<=a+u){n.splice(i+1,0,u?ee(r,h,(s-a)/u):r.slice(0)),s+=o;continue}a+=u,i++}}function Rn(n,e=1/0){for(let t=0;t<n.length;t++){let o=n[t],i=t===n.length-1?n[0]:n[t+1];for(;Bt(o,i)>e;)i=ee(o,i,.5),n.splice(t+1,0,i)}}function re(n,e){let t,o,i;if(typeof n=="string"){let a=On(n,e);n=a.ring,i=a.skipBisect}else if(!Array.isArray(n))throw new TypeError(u0);if(t=n.slice(0),!Bn(t))throw new TypeError(u0);return t.length>1&&Cn(t[0],t[t.length-1])&&t.pop(),o=V1(t),o>0&&t.reverse(),!i&&e&&qt(e)&&e>0&&Rn(t,e),t}function Bn(n){return n.every(function(e){return Array.isArray(e)&&e.length>=2&&qt(e[0])&&qt(e[1])})}function qn(n,e){let t=n.length,o=1/0,i,a,s;for(let r=0;r<t;r++)a=0,e.forEach(function(h,u){let c=Bt(n[(r+u)%t],h);a+=c*c}),a<o&&(o=a,i=r);i&&(s=n.splice(0,i),n.splice(n.length,0,...s))}function Dn(n,e,{maxSegmentLength:t=10,string:o=!0}={}){let i=re(n,t),a=re(e,t),s=zn(i,a,o);return!o||typeof n!="string"&&typeof e!="string"?s:r=>r<1e-4&&typeof n=="string"?n:1-r<1e-4&&typeof e=="string"?e:s(r)}function zn(n,e,t){let o;return o=n.length-e.length,ne(n,o<0?o*-1:0),ne(e,o>0?o:0),qn(n,e),Pn(n,e,t)}var Dt={exports:{}},ie;function jn(){if(ie)return Dt.exports;ie=1,Dt.exports=n,Dt.exports.default=n;function n(g,y,d){d=d||2;var v=y&&y.length,w=v?y[0]*d:g.length,b=e(g,0,w,d,!0),A=[];if(!b||b.next===b.prev)return A;var P,N,F,W,H,q,K;if(v&&(b=h(g,y,b,d)),g.length>80*d){P=F=g[0],N=W=g[1];for(var U=d;U<w;U+=d)H=g[U],q=g[U+1],H<P&&(P=H),q<N&&(N=q),H>F&&(F=H),q>W&&(W=q);K=Math.max(F-P,W-N),K=K!==0?32767/K:0}return o(b,A,d,P,N,K,0),A}function e(g,y,d,v,w){var b,A;if(w===f0(g,y,d,v)>0)for(b=y;b<d;b+=v)A=ct(b,g[b],g[b+1],A);else for(b=d-v;b>=y;b-=v)A=ct(b,g[b],g[b+1],A);return A&&E(A,A.next)&&(ut(A),A=A.next),A}function t(g,y){if(!g)return g;y||(y=g);var d=g,v;do if(v=!1,!d.steiner&&(E(d,d.next)||C(d.prev,d,d.next)===0)){if(ut(d),d=y=d.prev,d===d.next)break;v=!0}else d=d.next;while(v||d!==y);return y}function o(g,y,d,v,w,b,A){if(g){!A&&b&&f(g,v,w,b);for(var P=g,N,F;g.prev!==g.next;){if(N=g.prev,F=g.next,b?a(g,v,w,b):i(g)){y.push(N.i/d|0),y.push(g.i/d|0),y.push(F.i/d|0),ut(g),g=F.next,P=F.next;continue}if(g=F,g===P){A?A===1?(g=s(t(g),y,d),o(g,y,d,v,w,b,2)):A===2&&r(g,y,d,v,w,b):o(t(g),y,d,v,w,b,1);break}}}}function i(g){var y=g.prev,d=g,v=g.next;if(C(y,d,v)>=0)return!1;for(var w=y.x,b=d.x,A=v.x,P=y.y,N=d.y,F=v.y,W=w<b?w<A?w:A:b<A?b:A,H=P<N?P<F?P:F:N<F?N:F,q=w>b?w>A?w:A:b>A?b:A,K=P>N?P>F?P:F:N>F?N:F,U=v.next;U!==y;){if(U.x>=W&&U.x<=q&&U.y>=H&&U.y<=K&&S(w,P,b,N,A,F,U.x,U.y)&&C(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function a(g,y,d,v){var w=g.prev,b=g,A=g.next;if(C(w,b,A)>=0)return!1;for(var P=w.x,N=b.x,F=A.x,W=w.y,H=b.y,q=A.y,K=P<N?P<F?P:F:N<F?N:F,U=W<H?W<q?W:q:H<q?H:q,It=P>N?P>F?P:F:N>F?N:F,Ot=W>H?W>q?W:q:H>q?H:q,se=x(K,U,y,d,v),ae=x(It,Ot,y,d,v),D=g.prevZ,z=g.nextZ;D&&D.z>=se&&z&&z.z<=ae;){if(D.x>=K&&D.x<=It&&D.y>=U&&D.y<=Ot&&D!==w&&D!==A&&S(P,W,N,H,F,q,D.x,D.y)&&C(D.prev,D,D.next)>=0||(D=D.prevZ,z.x>=K&&z.x<=It&&z.y>=U&&z.y<=Ot&&z!==w&&z!==A&&S(P,W,N,H,F,q,z.x,z.y)&&C(z.prev,z,z.next)>=0))return!1;z=z.nextZ}for(;D&&D.z>=se;){if(D.x>=K&&D.x<=It&&D.y>=U&&D.y<=Ot&&D!==w&&D!==A&&S(P,W,N,H,F,q,D.x,D.y)&&C(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;z&&z.z<=ae;){if(z.x>=K&&z.x<=It&&z.y>=U&&z.y<=Ot&&z!==w&&z!==A&&S(P,W,N,H,F,q,z.x,z.y)&&C(z.prev,z,z.next)>=0)return!1;z=z.nextZ}return!0}function s(g,y,d){var v=g;do{var w=v.prev,b=v.next.next;!E(w,b)&&T(w,v,v.next,b)&&$(w,b)&&$(b,w)&&(y.push(w.i/d|0),y.push(v.i/d|0),y.push(b.i/d|0),ut(v),ut(v.next),v=g=b),v=v.next}while(v!==g);return t(v)}function r(g,y,d,v,w,b){var A=g;do{for(var P=A.next.next;P!==A.prev;){if(A.i!==P.i&&L(A,P)){var N=lt(A,P);A=t(A,A.next),N=t(N,N.next),o(A,y,d,v,w,b,0),o(N,y,d,v,w,b,0);return}P=P.next}A=A.next}while(A!==g)}function h(g,y,d,v){var w=[],b,A,P,N,F;for(b=0,A=y.length;b<A;b++)P=y[b]*v,N=b<A-1?y[b+1]*v:g.length,F=e(g,P,N,v,!1),F===F.next&&(F.steiner=!0),w.push(M(F));for(w.sort(u),b=0;b<w.length;b++)d=c(w[b],d);return d}function u(g,y){return g.x-y.x}function c(g,y){var d=p(g,y);if(!d)return y;var v=lt(d,g);return t(v,v.next),t(d,d.next)}function p(g,y){var d=y,v=g.x,w=g.y,b=-1/0,A;do{if(w<=d.y&&w>=d.next.y&&d.next.y!==d.y){var P=d.x+(w-d.y)*(d.next.x-d.x)/(d.next.y-d.y);if(P<=v&&P>b&&(b=P,A=d.x<d.next.x?d:d.next,P===v))return A}d=d.next}while(d!==y);if(!A)return null;var N=A,F=A.x,W=A.y,H=1/0,q;d=A;do v>=d.x&&d.x>=F&&v!==d.x&&S(w<W?v:b,w,F,W,w<W?b:v,w,d.x,d.y)&&(q=Math.abs(w-d.y)/(v-d.x),$(d,g)&&(q<H||q===H&&(d.x>A.x||d.x===A.x&&l(A,d)))&&(A=d,H=q)),d=d.next;while(d!==N);return A}function l(g,y){return C(g.prev,g,y.prev)<0&&C(y.next,g,g.next)<0}function f(g,y,d,v){var w=g;do w.z===0&&(w.z=x(w.x,w.y,y,d,v)),w.prevZ=w.prev,w.nextZ=w.next,w=w.next;while(w!==g);w.prevZ.nextZ=null,w.prevZ=null,m(w)}function m(g){var y,d,v,w,b,A,P,N,F=1;do{for(d=g,g=null,b=null,A=0;d;){for(A++,v=d,P=0,y=0;y<F&&(P++,v=v.nextZ,!!v);y++);for(N=F;P>0||N>0&&v;)P!==0&&(N===0||!v||d.z<=v.z)?(w=d,d=d.nextZ,P--):(w=v,v=v.nextZ,N--),b?b.nextZ=w:g=w,w.prevZ=b,b=w;d=v}b.nextZ=null,F*=2}while(A>1);return g}function x(g,y,d,v,w){return g=(g-d)*w|0,y=(y-v)*w|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,g|y<<1}function M(g){var y=g,d=g;do(y.x<d.x||y.x===d.x&&y.y<d.y)&&(d=y),y=y.next;while(y!==g);return d}function S(g,y,d,v,w,b,A,P){return(w-A)*(y-P)>=(g-A)*(b-P)&&(g-A)*(v-P)>=(d-A)*(y-P)&&(d-A)*(b-P)>=(w-A)*(v-P)}function L(g,y){return g.next.i!==y.i&&g.prev.i!==y.i&&!Z(g,y)&&($(g,y)&&$(y,g)&&G(g,y)&&(C(g.prev,g,y.prev)||C(g,y.prev,y))||E(g,y)&&C(g.prev,g,g.next)>0&&C(y.prev,y,y.next)>0)}function C(g,y,d){return(y.y-g.y)*(d.x-y.x)-(y.x-g.x)*(d.y-y.y)}function E(g,y){return g.x===y.x&&g.y===y.y}function T(g,y,d,v){var w=B(C(g,y,d)),b=B(C(g,y,v)),A=B(C(d,v,g)),P=B(C(d,v,y));return!!(w!==b&&A!==P||w===0&&O(g,d,y)||b===0&&O(g,v,y)||A===0&&O(d,g,v)||P===0&&O(d,y,v))}function O(g,y,d){return y.x<=Math.max(g.x,d.x)&&y.x>=Math.min(g.x,d.x)&&y.y<=Math.max(g.y,d.y)&&y.y>=Math.min(g.y,d.y)}function B(g){return g>0?1:g<0?-1:0}function Z(g,y){var d=g;do{if(d.i!==g.i&&d.next.i!==g.i&&d.i!==y.i&&d.next.i!==y.i&&T(d,d.next,g,y))return!0;d=d.next}while(d!==g);return!1}function $(g,y){return C(g.prev,g,g.next)<0?C(g,y,g.next)>=0&&C(g,g.prev,y)>=0:C(g,y,g.prev)<0||C(g,g.next,y)<0}function G(g,y){var d=g,v=!1,w=(g.x+y.x)/2,b=(g.y+y.y)/2;do d.y>b!=d.next.y>b&&d.next.y!==d.y&&w<(d.next.x-d.x)*(b-d.y)/(d.next.y-d.y)+d.x&&(v=!v),d=d.next;while(d!==g);return v}function lt(g,y){var d=new tt(g.i,g.x,g.y),v=new tt(y.i,y.x,y.y),w=g.next,b=y.prev;return g.next=y,y.prev=g,d.next=w,w.prev=d,v.next=d,d.prev=v,b.next=v,v.prev=b,v}function ct(g,y,d,v){var w=new tt(g,y,d);return v?(w.next=v.next,w.prev=v,v.next.prev=w,v.next=w):(w.prev=w,w.next=w),w}function ut(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function tt(g,y,d){this.i=g,this.x=y,this.y=d,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(g,y,d,v){var w=y&&y.length,b=w?y[0]*d:g.length,A=Math.abs(f0(g,0,b,d));if(w)for(var P=0,N=y.length;P<N;P++){var F=y[P]*d,W=P<N-1?y[P+1]*d:g.length;A-=Math.abs(f0(g,F,W,d))}var H=0;for(P=0;P<v.length;P+=3){var q=v[P]*d,K=v[P+1]*d,U=v[P+2]*d;H+=Math.abs((g[q]-g[U])*(g[K+1]-g[q+1])-(g[q]-g[K])*(g[U+1]-g[q+1]))}return A===0&&H===0?0:Math.abs((H-A)/A)};function f0(g,y,d,v){for(var w=0,b=y,A=d-v;b<d;b+=v)w+=(g[A]-g[b])*(g[b+1]+g[A+1]),A=b;return w}return n.flatten=function(g){for(var y=g[0][0].length,d={vertices:[],holes:[],dimensions:y},v=0,w=0;w<g.length;w++){for(var b=0;b<g[w].length;b++)for(var A=0;A<y;A++)d.vertices.push(g[w][b][A]);w>0&&(v+=g[w-1].length,d.holes.push(v))}return d},Dt.exports}jn();function oe(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function Hn(n){return n.length===1&&(n=Un(n)),{left:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)<0?o=a+1:i=a}return o},right:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)>0?i=a:o=a+1}return o}}}function Un(n){return function(e,t){return oe(n(e),t)}}Hn(oe);function $n(n,e,t=3){const o=Dn(n,e,{maxSegmentLength:t});return{check:i=>typeof i=="string",interpolate:(i,a,s)=>o(s)}}function Wn(n){const e=o=>n.width*o,t=o=>n.height*o;return{scaleX:e,scaleY:t,position:(o,i)=>Y({x:e(o),y:t(i)})}}function Yn(n){const e=[];if(n.isAllKey){for(let t=0;t<=n.animations.length;t++)e.push(t);return e}return n.isStartKey&&e.push(0),n.animations.forEach((t,o)=>{Array.isArray(t)?t.some(i=>i.isKey)&&e.push(o+1):t.isKey&&e.push(o+1)}),n.isEndKey&&e[e.length-1]!==n.animations.length&&e.push(n.animations.length),e}k.Alignment=dt,k.Anchor=et,k.Animate=Ft,k.Arrow=we,k.BrowserCanvasRenderer=$1,k.Circle=be,k.Color=V,k.Easing=_t,k.FadeIn=fe,k.FadeOut=ge,k.FontStyle=b0,k.FontWeight=A0,k.Grid=Ae,k.Group=Ut,k.Hide=de,k.IFrame=ye,k.Image=Me,k.Line=Le,k.Mask=Te,k.ObjectType=j,k.Opaque=Z1,k.Path=$e,k.Pause=Y1,k.Polygon=We,k.Position=Y,k.Presentation=O0,k.Rectangle=Ye,k.SVG=Xe,k.ScreenCapture=ve,k.Show=pe,k.Size=it,k.Slide=X1,k.SlideObject=nt,k.SlideWebExtra=Ht,k.Text=T0,k.TextUnit=G1,k.Transparent=m0,k.Update=jt,k.getKeySlideBuildIndices=Yn,k.getSizingFunctions=Wn,k.getSmoothPathInterpolator=$n,k.getTextContentLength=L0,k.interpolateColor=N0,k.interpolateNumber=R0,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
6
6
|
//# sourceMappingURL=presenter.js.map
|