presenter 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/354.js +2 -0
  2. package/dist/354.js.LICENSE.txt +20 -0
  3. package/dist/661.js +1 -0
  4. package/dist/838.js +2 -0
  5. package/dist/838.js.LICENSE.txt +1 -0
  6. package/dist/jest.config.d.ts +13 -0
  7. package/dist/presenter-code.js +1 -0
  8. package/dist/presenter-export.js +2 -0
  9. package/dist/presenter-export.js.LICENSE.txt +313 -0
  10. package/dist/presenter-morph.js +1 -0
  11. package/dist/presenter.js +1 -0
  12. package/dist/src/code/codeBlock.d.ts +83 -0
  13. package/dist/src/code/index.d.ts +1 -0
  14. package/dist/src/export/index.d.ts +24 -0
  15. package/dist/src/export/util.d.ts +4 -0
  16. package/dist/src/index.d.ts +24 -0
  17. package/dist/src/library/bullets.d.ts +15 -0
  18. package/dist/src/library/mainTitle.d.ts +4 -0
  19. package/dist/src/library/slideTitle.d.ts +4 -0
  20. package/dist/src/morph/index.d.ts +34 -0
  21. package/dist/src/objects/arrow.d.ts +62 -0
  22. package/dist/src/objects/circle.d.ts +12 -0
  23. package/dist/src/objects/grid.d.ts +17 -0
  24. package/dist/src/objects/group.d.ts +22 -0
  25. package/dist/src/objects/iframe.d.ts +16 -0
  26. package/dist/src/objects/image.d.ts +20 -0
  27. package/dist/src/objects/line.d.ts +19 -0
  28. package/dist/src/objects/paragraph.d.ts +21 -0
  29. package/dist/src/objects/path.d.ts +27 -0
  30. package/dist/src/objects/polygon.d.ts +13 -0
  31. package/dist/src/objects/rectangle.d.ts +14 -0
  32. package/dist/src/objects/screenCapture.d.ts +17 -0
  33. package/dist/src/objects/text.d.ts +63 -0
  34. package/dist/src/objects/text.test.d.ts +1 -0
  35. package/dist/src/objects/vectorGraphic.d.ts +48 -0
  36. package/dist/src/presentation/object.d.ts +131 -0
  37. package/dist/src/presentation/presentation.d.ts +153 -0
  38. package/dist/src/presentation/presentation.test.d.ts +1 -0
  39. package/dist/src/presentation/slide.d.ts +43 -0
  40. package/dist/src/presentation/storage.d.ts +9 -0
  41. package/dist/src/util/animation.d.ts +60 -0
  42. package/dist/src/util/easing.d.ts +12 -0
  43. package/dist/src/util/easing.test.d.ts +1 -0
  44. package/dist/src/util/position.d.ts +11 -0
  45. package/dist/src/util/richText.d.ts +18 -0
  46. package/dist/webpack.config.d.ts +70 -0
  47. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>Mt,BoundingBox:()=>e,Bullets:()=>dn,Circle:()=>Bt,Grid:()=>Ht,Group:()=>Dt,IFrame:()=>qt,Image:()=>Gt,Line:()=>Ot,MainTitle:()=>vn,Paragraph:()=>Xt,Path:()=>jt,Polygon:()=>kt,Presentation:()=>a,Rectangle:()=>sn,ScreenCapture:()=>Zt,Slide:()=>vt,SlideObject:()=>bt,SlideTitle:()=>wn,Text:()=>rn,VectorGraphic:()=>cn,animateStateChange:()=>ft,anime:()=>st,clamp:()=>xn,easeCubic:()=>Sn,easeLinear:()=>On,generateTextNodes:()=>tn,performAnimation:()=>pt,preserveLeadingSpaces:()=>Jt,skipAnimation:()=>ht});var e=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r="presenterState";function o(t){var n=t.presentationState.currentSlide,e=t.slides[n],o=null!==e?e.animationIndex:0;localStorage.setItem(r,JSON.stringify({title:t.title,slide:n,animation:o,timestamp:Date.now()}))}var i=function(){return i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},i.apply(this,arguments)},a=function(){function t(t,n,r,o){void 0===o&&(o={});var a=this;if(null===this.element)throw new Error("Presentation cannot be mounted to null element.");if(0===n.length)throw new Error("Presentation requires at least one slide");this.title=t,this.element=r,this.slides=n,this.options=i({width:3840,height:2160,backgroundColor:"#ffffff",fonts:[],stateCacheTTL:15},o),this.presentationState={currentSlide:0},this.boundingBox=new e({x:0,y:0},this.options.width,this.options.height),this.container=null,this.svg=null,this.shadow=null,this.background=null,this.additionalElementContainer=null,this.textCommand={active:!1,command:""},this.slideCleanupHandlers=[],this.shortcuts={s:{slideIndex:0,animationIndex:0},c:{slideIndex:null,animationIndex:0},e:{slideIndex:n.length-1,animationIndex:n[n.length-1].animations.length}};for(var s=0;s<n.length;s++)this.shortcuts[(s+1).toString()]={slideIndex:s,animationIndex:0};n.forEach((function(t,n){t.props.shortcuts.forEach((function(t){var e="string"==typeof t?t:t[0],r="string"==typeof t?0:t[1];a.shortcuts[e]={slideIndex:n,animationIndex:r}}))}))}return t.prototype.present=function(){var t=this;this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.aspectRatio="".concat(this.options.width," / ").concat(this.options.height),this.container.style.position="relative",this.container.style.top="50%",this.container.style.transform="translateY(-50%)",this.container.style.marginLeft="auto",this.container.style.marginRight="auto",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.backgroundColor="transparent",this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",this.background=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.background.style.backgroundColor=this.options.backgroundColor,this.additionalElementContainer=document.createElement("div"),this.additionalElementContainer.style.width="100%",this.additionalElementContainer.style.height="100%",this.additionalElementContainer.style.position="absolute",[this.svg,this.shadow,this.background].forEach((function(n){n.setAttribute("width","100%"),n.setAttribute("viewBox","0 0 ".concat(t.options.width," ").concat(t.options.height)),n.style.position="absolute"})),this.isFullBodyPresentation()&&(document.title=this.title,document.documentElement.style.height="100%",document.body.style.height="100%",document.body.style.width="100%",document.body.style.margin="0",document.body.style.backgroundColor="#000000",window.matchMedia("(min-aspect-ratio: ".concat(this.options.width," / ").concat(this.options.height,")")).addEventListener("change",this.updateSVGContainerSize.bind(this)),this.updateSVGContainerSize()),this.navigatorContainer=document.createElement("div"),this.navigatorContainer.style.position="absolute",this.navigatorContainer.style.height="100%",this.navigatorContainer.style.width="200px",this.navigatorContainer.style.backgroundColor="#e6e6e6",this.navigatorContainer.style.overflow="scroll",this.navigatorContainer.style.display="none",this.slides.forEach((function(n,e){var r=document.createElement("button");r.style.display="block",r.style.margin="10px",r.style.padding="10px",r.style.width="calc(100% - 20px)",r.style.textAlign="left",r.style.backgroundColor="transparent",r.style.border="none",r.style.cursor="pointer",r.innerHTML="".concat(e+1),null!==n.props.title&&(r.innerHTML+=": ".concat(n.props.title)),r.addEventListener("click",(function(){t.navigatorContainer.style.display="none",t.renderSlide(e)})),t.navigatorContainer.appendChild(r)})),this.container.appendChild(this.shadow),this.container.appendChild(this.background),this.container.appendChild(this.additionalElementContainer),this.container.appendChild(this.svg),this.container.appendChild(this.navigatorContainer),this.element.appendChild(this.container),function(t,n){var e,o=localStorage.getItem(r);if(null===o)return!1;if(null===n)return localStorage.removeItem(r),!1;try{e=JSON.parse(o)}catch(t){return localStorage.removeItem(r),!1}var i=e.title,a=e.slide,s=e.animation,u=e.timestamp;if(i!==t.title)return localStorage.removeItem(r),!1;if(Date.now()-u>6e4*n)return localStorage.removeItem(r),!1;a>t.slides.length-1&&(a=t.slides.length-1);var l=t.slides[a];return void 0===l?(localStorage.removeItem(r),!1):(s>l.animations.length&&(s=l.animations.length),t.renderSlide(a,s),!0)}(this,this.options.stateCacheTTL)||this.renderSlide(0)},t.prototype.renderSlide=function(t,n){void 0===n&&(n=0);var e=this.slides[t];void 0!==e&&(this.presentationState.currentSlide=t,e.render(this,"last"===n?e.animations.length:n),o(this))},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.container;n.addEventListener("keyup",this.handleKeyboardEvent.bind(this)),n.addEventListener("mousemove",(function(){t.svg.style.cursor="auto"}))},t.prototype.handleKeyboardEvent=function(t){if("Escape"!==t.key){if("ArrowRight"===t.key||" "===t.key)return this.resetTextCommand(),void this.next(!t.shiftKey);if("ArrowLeft"===t.key)return this.resetTextCommand(),void this.previous(!t.shiftKey);if(this.textCommand.active){if("Enter"===t.key){var n=this.textCommand.command;this.resetTextCommand();var e=this.shortcuts[n];if(void 0===e)return;var r=this.slides[this.presentationState.currentSlide];this.shortcuts.b={slideIndex:this.presentationState.currentSlide,animationIndex:r.animationIndex};var o=null!==e.slideIndex?e.slideIndex:this.presentationState.currentSlide;return void this.renderSlide(o,e.animationIndex)}"Backspace"===t.key?this.textCommand.command=this.textCommand.command.slice(0,-1):this.textCommand.command+=t.key}else if("g"===t.key)this.textCommand.active=!0,this.textCommand.command="";else if("`"===t.key){var i="block"===this.navigatorContainer.style.display;this.navigatorContainer.style.display=i?"none":"block"}}else this.resetTextCommand()},t.prototype.resetTextCommand=function(){this.textCommand.active=!1,this.textCommand.command=""},t.prototype.updateSVGContainerSize=function(){window.innerHeight/window.innerWidth>this.options.height/this.options.width?(this.container.style.width="100%",this.container.style.height="auto"):(this.container.style.width="auto",this.container.style.height="100%")},t.prototype.next=function(t){return n=this,e=void 0,i=function(){var n;return function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(e){switch(e.label){case 0:return this.svg.style.cursor="none",void 0===(n=this.slides[this.presentationState.currentSlide])?[2]:t?[4,n.nextAnimation()]:[3,2];case 1:if(e.sent())return o(this),[2];e.label=2;case 2:return this.renderSlide(this.presentationState.currentSlide+1),[2]}}))},new((r=void 0)||(r=Promise))((function(t,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((i=i.apply(n,e||[])).next())}));var n,e,r,i},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.presentationState.currentSlide,e=this.slides[n];t&&e.animationIndex>0?this.renderSlide(n,e.animationIndex-1):t&&0===this.presentationState.currentSlide||this.renderSlide(n-1,t?"last":0)},t.prototype.isFullBodyPresentation=function(){return this.element===document.body},t.prototype.computeRenderedBoundingBox=function(t,n){if(void 0===n&&(n=null),null===n&&this.svg.contains(t))return e.fromElement(t);var r=t.cloneNode(!0);if(null!==n){r.innerHTML="";for(var o=0,i=n;o<i.length;o++){var a=i[o];r.appendChild(a.cloneNode(!0))}}this.shadow.appendChild(r);var s=e.fromElement(r);return this.shadow.removeChild(r),s},t}(),s={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},u={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},l=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],c={CSS:{},springs:{}};function p(t,n,e){return Math.min(Math.max(t,n),e)}function h(t,n){return t.indexOf(n)>-1}function f(t,n){return t.apply(null,n)}var d={arr:function(t){return Array.isArray(t)},obj:function(t){return h(Object.prototype.toString.call(t),"Object")},pth:function(t){return d.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||d.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return d.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return d.hex(t)||d.rgb(t)||d.hsl(t)},key:function(t){return!s.hasOwnProperty(t)&&!u.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function y(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function g(t,n){var e=y(t),r=p(d.und(e[0])?1:e[0],.1,100),o=p(d.und(e[1])?100:e[1],.1,100),i=p(d.und(e[2])?10:e[2],.1,100),a=p(d.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),u=i/(2*Math.sqrt(o*r)),l=u<1?s*Math.sqrt(1-u*u):0,h=u<1?(u*s-a)/l:-a+s;function f(t){var e=n?n*t/1e3:t;return e=u<1?Math.exp(-e*u*s)*(1*Math.cos(l*e)+h*Math.sin(l*e)):(1+h*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?f:function(){var n=c.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===f(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return c.springs[t]=i,i}}function v(t){return void 0===t&&(t=10),function(n){return Math.ceil(p(n,1e-6,1)*t)*(1/t)}}var m,b,w=function(){var t=.1;function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function o(t,o,i){return((n(o,i)*t+e(o,i))*t+r(o))*t}function i(t,o,i){return 3*n(o,i)*t*t+2*e(o,i)*t+r(o)}return function(n,e,r,a){if(0<=n&&n<=1&&0<=r&&r<=1){var s=new Float32Array(11);if(n!==e||r!==a)for(var u=0;u<11;++u)s[u]=o(u*t,n,r);return function(u){return n===e&&r===a||0===u||1===u?u:o(function(e){for(var a=0,u=1;10!==u&&s[u]<=e;++u)a+=t;--u;var l=a+(e-s[u])/(s[u+1]-s[u])*t,c=i(l,n,r);return c>=.001?function(t,n,e,r){for(var a=0;a<4;++a){var s=i(n,e,r);if(0===s)return n;n-=(o(n,e,r)-t)/s}return n}(e,l,n,r):0===c?l:function(t,n,e,r,i){var a,s,u=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++u<10);return s}(e,a,a+t,n,r)}(u),e,a)}}}}(),x=(m={linear:function(){return function(t){return t}}},b={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}},Elastic:function(t,n){void 0===t&&(t=1),void 0===n&&(n=.5);var e=p(t,1,10),r=p(n,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,n){b[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(b).forEach((function(t){var n=b[t];m["easeIn"+t]=n,m["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},m["easeInOut"+t]=function(t,e){return function(r){return r<.5?n(t,e)(2*r)/2:1-n(t,e)(-2*r+2)/2}},m["easeOutIn"+t]=function(t,e){return function(r){return r<.5?(1-n(t,e)(1-2*r))/2:(n(t,e)(2*r-1)+1)/2}}})),m);function O(t,n){if(d.fnc(t))return t;var e=t.split("(")[0],r=x[e],o=y(t);switch(e){case"spring":return g(t,n);case"cubicBezier":return f(w,o);case"steps":return f(v,o);default:return f(r,o)}}function S(t){try{return document.querySelectorAll(t)}catch(t){return}}function _(t,n){for(var e=t.length,r=arguments.length>=2?arguments[1]:void 0,o=[],i=0;i<e;i++)if(i in t){var a=t[i];n.call(r,a,i,t)&&o.push(a)}return o}function j(t){return t.reduce((function(t,n){return t.concat(d.arr(n)?j(n):n)}),[])}function C(t){return d.arr(t)?t:(d.str(t)&&(t=S(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function P(t,n){return t.some((function(t){return t===n}))}function k(t){var n={};for(var e in t)n[e]=t[e];return n}function A(t,n){var e=k(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function E(t,n){var e=k(t);for(var r in n)e[r]=d.und(t[r])?n[r]:t[r];return e}function M(t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(n)return n[1]}function I(t,n){return d.fnc(t)?t(n.target,n.id,n.total):t}function T(t,n){return t.getAttribute(n)}function B(t,n,e){if(P([e,"deg","rad","turn"],M(n)))return n;var r=c.CSS[n+e];if(!d.und(r))return r;var o=document.createElement(t.tagName),i=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;i.appendChild(o),o.style.position="absolute",o.style.width=100+e;var a=100/o.offsetWidth;i.removeChild(o);var s=a*parseFloat(n);return c.CSS[n+e]=s,s}function L(t,n,e){if(n in t.style){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[n]||getComputedStyle(t).getPropertyValue(r)||"0";return e?B(t,o,e):o}}function N(t,n){return d.dom(t)&&!d.inp(t)&&(!d.nil(T(t,n))||d.svg(t)&&t[n])?"attribute":d.dom(t)&&P(l,n)?"transform":d.dom(t)&&"transform"!==n&&L(t,n)?"css":null!=t[n]?"object":void 0}function D(t){if(d.dom(t)){for(var n,e=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,o=new Map;n=r.exec(e);)o.set(n[1],n[2]);return o}}function F(t,n,e,r){switch(N(t,n)){case"transform":return function(t,n,e,r){var o=h(n,"scale")?1:0+function(t){return h(t,"translate")||"perspective"===t?"px":h(t,"rotate")||h(t,"skew")?"deg":void 0}(n),i=D(t).get(n)||o;return e&&(e.transforms.list.set(n,i),e.transforms.last=n),r?B(t,i,r):i}(t,n,r,e);case"css":return L(t,n,e);case"attribute":return T(t,n);default:return t[n]||0}}function H(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=M(t)||0,o=parseFloat(n),i=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}function z(t,n){if(d.col(t))return function(t){return d.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:d.hex(t)?function(t){var n=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,n,e,r){return n+n+e+e+r+r})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):d.hsl(t)?function(t){var n,e,r,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),i=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,u=o[4]||1;function l(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(0==a)n=e=r=s;else{var c=s<.5?s*(1+a):s+a-s*a,p=2*s-c;n=l(p,c,i+1/3),e=l(p,c,i),r=l(p,c,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+u+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=M(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function W(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function q(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=W(n,i)),n=i}return r}function R(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*T(t,"r")}(t);case"rect":return function(t){return 2*T(t,"width")+2*T(t,"height")}(t);case"line":return function(t){return W({x:T(t,"x1"),y:T(t,"y1")},{x:T(t,"x2"),y:T(t,"y2")})}(t);case"polyline":return q(t);case"polygon":return function(t){var n=t.points;return q(t)+W(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function V(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;d.svg(n)&&d.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=T(r,"viewBox"),a=o.width,s=o.height,u=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function G(t,n,e){function r(e){void 0===e&&(e=0);var r=n+e>=1?n+e:0;return t.el.getPointAtLength(r)}var o=V(t.el,t.svg),i=r(),a=r(-1),s=r(1),u=e?1:o.w/o.vW,l=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*u;case"y":return(i.y-o.y)*l;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function Y(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=z(d.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:d.str(t)||n?r.split(e):[]}}function K(t){return _(t?j(d.arr(t)?t.map(C):C(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function X(t){var n=K(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:D(t)}}}))}function $(t,n){var e=k(n);if(/^spring/.test(e.easing)&&(e.duration=g(e.easing)),d.arr(t)){var r=t.length;2!==r||d.obj(t[0])?d.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=d.arr(t)?t:[t];return o.map((function(t,e){var r=d.obj(t)&&!d.pth(t)?t:{value:t};return d.und(r.delay)&&(r.delay=e?0:n.delay),d.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return E(t,e)}))}var U={css:function(t,n,e){return t.style[n]=e},attribute:function(t,n,e){return t.setAttribute(n,e)},object:function(t,n,e){return t[n]=e},transform:function(t,n,e,r,o){if(r.list.set(n,e),n===r.last||o){var i="";r.list.forEach((function(t,n){i+=n+"("+t+") "})),t.style.transform=i}}};function Z(t,n){X(t).forEach((function(t){for(var e in n){var r=I(n[e],t),o=t.target,i=M(r),a=F(o,e,i,t),s=H(z(r,i||M(a)),a),u=N(o,e);U[u](o,e,s,t.transforms,!0)}}))}function Q(t,n){return _(j(t.map((function(t){return n.map((function(n){return function(t,n){var e=N(t.target,n.name);if(e){var r=function(t,n){var e;return t.tweens.map((function(r){var o=function(t,n){var e={};for(var r in t){var o=I(t[r],n);d.arr(o)&&1===(o=o.map((function(t){return I(t,n)}))).length&&(o=o[0]),e[r]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(r,n),i=o.value,a=d.arr(i)?i[1]:i,s=M(a),u=F(n.target,t.name,s,n),l=e?e.to.original:u,c=d.arr(i)?i[0]:l,p=M(c)||M(u),h=s||p;return d.und(a)&&(a=l),o.from=Y(c,h),o.to=Y(H(a,c),h),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=O(o.easing,o.duration),o.isPath=d.pth(i),o.isPathTargetInsideSVG=o.isPath&&d.svg(n.target),o.isColor=d.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(n,t),o=r[r.length-1];return{type:e,property:n.name,animatable:t,tweens:r,duration:o.end,delay:r[0].delay,endDelay:o.endDelay}}}(t,n)}))}))),(function(t){return!d.und(t)}))}function J(t,n){var e=t.length,r=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return r(t)+t.duration}))):n.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return r(t)+t.delay}))):n.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return r(t)+t.duration-t.endDelay}))):n.endDelay,o}var tt=0,nt=[],et=function(){var t;function n(e){for(var r=nt.length,o=0;o<r;){var i=nt[o];i.paused?(nt.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){ot.suspendWhenDocumentHidden&&(rt()?t=cancelAnimationFrame(t):(nt.forEach((function(t){return t._onDocumentVisibility()})),et()))})),function(){t||rt()&&ot.suspendWhenDocumentHidden||!(nt.length>0)||(t=requestAnimationFrame(n))}}();function rt(){return!!document&&document.hidden}function ot(t){void 0===t&&(t={});var n,e=0,r=0,o=0,i=0,a=null;function l(t){var n=window.Promise&&new Promise((function(t){return a=t}));return t.finished=n,n}var c=function(t){var n=A(s,t),e=A(u,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=E(function(t){for(var n=_(j(t.map((function(t){return Object.keys(t)}))),(function(t){return d.key(t)})).reduce((function(t,n){return t.indexOf(n)<0&&t.push(n),t}),[]),e={},r=function(r){var o=n[r];e[o]=t.map((function(t){var n={};for(var e in t)d.key(e)?e==o&&(n.value=t[e]):n[e]=t[e];return n}))},o=0;o<n.length;o++)r(o);return e}(r),n)),n)d.key(o)&&e.push({name:o,tweens:$(n[o],t)});return e}(e,t),o=X(t.targets),i=Q(o,r),a=J(i,e),l=tt;return tt++,E(n,{id:l,children:[],animatables:o,animations:i,duration:a.duration,delay:a.delay,endDelay:a.endDelay})}(t);function h(){var t=c.direction;"alternate"!==t&&(c.direction="normal"!==t?"normal":"reverse"),c.reversed=!c.reversed,n.forEach((function(t){return t.reversed=c.reversed}))}function f(t){return c.reversed?c.duration-t:t}function y(){e=0,r=f(c.currentTime)*(1/ot.speed)}function g(t,n){n&&n.seek(t-n.timelineOffset)}function v(t){for(var n=0,e=c.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,u=a[s];s&&(u=_(a,(function(n){return t<n.end}))[0]||u);for(var l=p(t-u.start-u.delay,0,u.duration)/u.duration,h=isNaN(l)?1:u.easing(l),f=u.to.strings,d=u.round,y=[],g=u.to.numbers.length,v=void 0,m=0;m<g;m++){var b=void 0,w=u.to.numbers[m],x=u.from.numbers[m]||0;b=u.isPath?G(u.value,h*w,u.isPathTargetInsideSVG):x+h*(w-x),d&&(u.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var O=f.length;if(O){v=f[0];for(var S=0;S<O;S++){f[S];var j=f[S+1],C=y[S];isNaN(C)||(v+=j?C+j:C+" ")}}else v=y[0];U[o.type](i.target,o.property,v,i.transforms),o.currentValue=v,n++}}function m(t){c[t]&&!c.passThrough&&c[t](c)}function b(t){var s=c.duration,u=c.delay,d=s-c.endDelay,y=f(t);c.progress=p(y/s*100,0,100),c.reversePlayback=y<c.currentTime,n&&function(t){if(c.reversePlayback)for(var e=i;e--;)g(t,n[e]);else for(var r=0;r<i;r++)g(t,n[r])}(y),!c.began&&c.currentTime>0&&(c.began=!0,m("begin")),!c.loopBegan&&c.currentTime>0&&(c.loopBegan=!0,m("loopBegin")),y<=u&&0!==c.currentTime&&v(0),(y>=d&&c.currentTime!==s||!s)&&v(s),y>u&&y<d?(c.changeBegan||(c.changeBegan=!0,c.changeCompleted=!1,m("changeBegin")),m("change"),v(y)):c.changeBegan&&(c.changeCompleted=!0,c.changeBegan=!1,m("changeComplete")),c.currentTime=p(y,0,s),c.began&&m("update"),t>=s&&(r=0,c.remaining&&!0!==c.remaining&&c.remaining--,c.remaining?(e=o,m("loopComplete"),c.loopBegan=!1,"alternate"===c.direction&&h()):(c.paused=!0,c.completed||(c.completed=!0,m("loopComplete"),m("complete"),!c.passThrough&&"Promise"in window&&(a(),l(c)))))}return l(c),c.reset=function(){var t=c.direction;c.passThrough=!1,c.currentTime=0,c.progress=0,c.paused=!0,c.began=!1,c.loopBegan=!1,c.changeBegan=!1,c.completed=!1,c.changeCompleted=!1,c.reversePlayback=!1,c.reversed="reverse"===t,c.remaining=c.loop,n=c.children;for(var e=i=n.length;e--;)c.children[e].reset();(c.reversed&&!0!==c.loop||"alternate"===t&&1===c.loop)&&c.remaining++,v(c.reversed?c.duration:0)},c._onDocumentVisibility=y,c.set=function(t,n){return Z(t,n),c},c.tick=function(t){o=t,e||(e=o),b((o+(r-e))*ot.speed)},c.seek=function(t){b(f(t))},c.pause=function(){c.paused=!0,y()},c.play=function(){c.paused&&(c.completed&&c.reset(),c.paused=!1,nt.push(c),y(),et())},c.reverse=function(){h(),c.completed=!c.reversed,y()},c.restart=function(){c.reset(),c.play()},c.remove=function(t){at(K(t),c)},c.reset(),c.autoplay&&c.play(),c}function it(t,n){for(var e=n.length;e--;)P(t,n[e].animatable.target)&&n.splice(e,1)}function at(t,n){var e=n.animations,r=n.children;it(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;it(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}ot.version="3.2.1",ot.speed=1,ot.suspendWhenDocumentHidden=!0,ot.running=nt,ot.remove=function(t){for(var n=K(t),e=nt.length;e--;)at(n,nt[e])},ot.get=F,ot.set=Z,ot.convertPx=B,ot.path=function(t,n){var e=d.str(t)?S(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:V(e),totalLength:R(e)*(r/100)}}},ot.setDashoffset=function(t){var n=R(t);return t.setAttribute("stroke-dasharray",n),n},ot.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?O(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,u="center"===a,l="last"===a,c=d.arr(t),p=c?parseFloat(t[0]):parseFloat(t),h=c?parseFloat(t[1]):0,f=M(c?t[1]:t)||0,y=n.start||0+(c?p:0),g=[],v=0;return function(t,n,d){if(s&&(a=0),u&&(a=(d-1)/2),l&&(a=d-1),!g.length){for(var m=0;m<d;m++){if(o){var b=u?(o[0]-1)/2:a%o[0],w=u?(o[1]-1)/2:Math.floor(a/o[0]),x=b-m%o[0],O=w-Math.floor(m/o[0]),S=Math.sqrt(x*x+O*O);"x"===i&&(S=-x),"y"===i&&(S=-O),g.push(S)}else g.push(Math.abs(a-m));v=Math.max.apply(Math,g)}r&&(g=g.map((function(t){return r(t/v)*v}))),"reverse"===e&&(g=g.map((function(t){return i?t<0?-1*t:-t:Math.abs(v-t)})))}return y+(c?(h-p)/v:p)*(Math.round(100*g[n])/100)+f}},ot.timeline=function(t){void 0===t&&(t={});var n=ot(t);return n.duration=0,n.add=function(e,r){var o=nt.indexOf(n),i=n.children;function a(t){t.passThrough=!0}o>-1&&nt.splice(o,1);for(var s=0;s<i.length;s++)a(i[s]);var l=E(e,A(u,t));l.targets=l.targets||t.targets;var c=n.duration;l.autoplay=!1,l.direction=n.direction,l.timelineOffset=d.und(r)?c:H(r,c),a(n),n.seek(l.timelineOffset);var p=ot(l);a(p),i.push(p);var h=J(i,t);return n.delay=h.delay,n.endDelay=h.endDelay,n.duration=h.duration,n.seek(0),n.reset(),n.autoplay&&n.play(),n},n},ot.easing=O,ot.penner=x,ot.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const st=ot;var ut=function(){return ut=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ut.apply(this,arguments)},lt=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}))},ct=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},pt=function(t){return lt(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ct(this,(function(u){switch(u.label){case 0:Array.isArray(t)||(t=[t]),n=function(t){var n,e,r;return ct(this,(function(o){switch(o.label){case 0:return void 0===t.delay?[3,2]:[4,new Promise((function(n){return setTimeout(n,t.delay)}))];case 1:o.sent(),o.label=2;case 2:if(!1===t.animate)return ht(t),[2,"continue"];if(void 0!==t.animateCallback&&t.animateCallback(),void 0!==t.element&&(st(ut(ut(ut({targets:t.element},null!==(i=t.attributes)&&void 0!==i?i:{}),null!==(a=t.styles)&&void 0!==a?a:{}),null!==(s=t.animationParams)&&void 0!==s?s:{})),t.children))for(t.element.innerHTML="",n=0,e=t.children;n<e.length;n++)r=e[n],t.element.appendChild(r);return[2]}}))},e=0,r=t,u.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},ht=function(t){return lt(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,u,l,c,p,h,f,d,y;return ct(this,(function(g){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if((r=e[n]).updateCallback&&r.updateCallback(),o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],h=s[1],o.setAttribute(p,h);if(r.styles)for(u=0,l=Object.entries(r.styles);u<l.length;u++)c=l[u],p=c[0],h=c[1],o.style[p]=h;if(r.children)for(o.innerHTML="",f=0,d=r.children;f<d.length;f++)y=d[f],o.appendChild(y)}return[2]}))}))};function ft(t,n,e){void 0===e&&(e=500);var r=Object.keys(n),o=null,i=null;function a(s){null===o&&(o=s),null===i&&(i=ut({},t.state));for(var u=s-o,l=Math.min(u/e,1),c=0,p=r;c<p.length;c++){var h=p[c];if("number"==typeof n[h]){var f=i[h],d=n[h];t.state[h]=f+l*(d-f)}else 1==l&&(t.state[h]=n[h])}l<1&&requestAnimationFrame(a)}return function(e){return e({animate:!0,animateCallback:function(){o=null,i=null,requestAnimationFrame(a)},updateCallback:function(){for(var e=0,o=r;e<o.length;e++){var i=o[e];t.state[i]=n[i]}}})}}var dt,yt=function(){return yt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},yt.apply(this,arguments)},gt=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},vt=function(){function t(t,n,e){void 0===n&&(n=[]),void 0===e&&(e={}),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.keyBuilds="last",this.props=yt({additionalElement:null,shortcuts:[],title:null},e)}return t.prototype.render=function(t,n){void 0===n&&(n=0),this.animationIndex=n;for(var e=0,r=t.slideCleanupHandlers;e<r.length;e++)(0,r[e])();if(t.slideCleanupHandlers=[],this.objects.forEach((function(n){n.generate(t)})),t.additionalElementContainer.innerHTML="",null!==this.props.additionalElement){var o="function"==typeof this.props.additionalElement?this.props.additionalElement():this.props.additionalElement;o.style.width="100%",o.style.height="auto",t.additionalElementContainer.appendChild(o)}for(var i=0;i<this.animationIndex;i++){var a=this.animations[i];if(a)if(Array.isArray(a))for(var s=0,u=a;s<u.length;s++){var l=u[s];"number"!=typeof l&&l(ht)}else a(ht)}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(){return t=this,n=void 0,r=function(){var t,n,e,r,o;return gt(this,(function(i){switch(i.label){case 0:if(!(t=this.animations[this.animationIndex]))return[3,7];if(!Array.isArray(t))return[3,5];n=function(t){return gt(this,(function(n){switch(n.label){case 0:return"number"!=typeof t?[3,2]:[4,new Promise((function(n){return setTimeout(n,t)}))];case 1:return n.sent(),[2,"continue"];case 2:return t(pt),[2]}}))},e=0,r=t,i.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return e++,[3,1];case 4:return[3,6];case 5:t(pt),i.label=6;case 6:return this.animationIndex++,[2,!0];case 7:return[2,!1]}}))},new((e=void 0)||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}));var t,n,e,r},t.prototype.getKeyBuilds=function(){var t=this;return"first"===this.keyBuilds?[0]:"last"===this.keyBuilds?[this.animations.length]:"all"===this.keyBuilds?Array.from({length:this.animations.length+1},(function(t,n){return n})):"none"===this.keyBuilds?[]:Array.isArray(this.keyBuilds)?this.keyBuilds.filter((function(n){return n>=0&&n<=t.animations.length})):[0]},t}(),mt=function(){return mt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},mt.apply(this,arguments)},bt=function(){function t(t){this.props=mt({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=mt({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return mt({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),r=n.x,o=n.y,i=this.anchorBoundingBox(new e({x:r,y:o},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=mt({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,r=Object.entries(this.attributes());e<r.length;e++){var o=r[e],i=o[0],a=o[1];n.setAttribute(i,a)}for(var s=0,u=Object.entries(this.styles());s<u.length;s++){var l=u[s],c=l[0];a=l[1],n.style.setProperty(c,a)}this._children=this.children();for(var p=0,h=this._children;p<h.length;p++){var f=h[p];n.appendChild(f)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var g=y[d];i=g[0],a=g[1],n.setAttribute(i,a)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animate=function(t,n,e,r){var o=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),function(i){if(null===o._presentation)throw new Error("Cannot animate object without presentation");var a=o.requiresChildrenUpdate(t);o.props=mt(mt({},o.props),t),a&&(o._children=o.children());var s=o.attributes(),u=o.styles(),l=o.additionalAttributes(),c=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),p=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),h=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));i(mt(mt(mt({animate:r,element:o.element(),attributes:mt(mt({},c),h),styles:p},null!==e?{delay:e}:{}),a?{children:o._children}:{}),{animationParams:mt(mt({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,r=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),r<=1&&r>=-1&&(r*=n.boundingBox.height),{x:e,y:r}},t.prototype.anchorBoundingBox=function(t){var n=this,r=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),o=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new e({x:o,y:r},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var r=this._presentation.computeRenderedBoundingBox(t,n);return new e({x:this.props.position.x,y:this.props.position.y},r.width,r.height)},t}(),wt=(dt=function(t,n){return dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},dt(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}dt(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),xt=function(){return xt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},xt.apply(this,arguments)},Ot=function(t){function n(n){return void 0===n&&(n={}),t.call(this,xt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10,linecap:null,drawn:!0},n))||this}return wt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.drawn,o=n.width,i=n.linecap,a=this.positionInPresentation(this.props.start),s=this.positionInPresentation(this.props.end),u=a.x.toString(),l=a.y.toString(),c=s.x.toString(),p=s.y.toString();return r||(c=u,p=l),xt(xt(xt({},t.prototype.attributes.call(this)),{x1:u,y1:l,x2:c,y2:p,stroke:e,"stroke-width":o.toString()}),null!==i?{"stroke-linecap":i}:{})},n}(bt),St=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_t=function(){return _t=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},_t.apply(this,arguments)},jt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,_t({points:[],color:"#000000",fill:"none",width:10,linecap:null,drawn:!0},n))||this}return St(n,t),n.prototype.tagName=function(){return"path"},n.prototype.attributes=function(){var n=this,e=this.props,r=e.color,o=e.drawn,i=e.fill,a=e.width,s=e.linecap,u=this.props.points.map((function(t){return n.positionInPresentation(t)})).map((function(t,n){var e=0===n?"M":"L",r=t.x,o=t.y;return"".concat(e," ").concat(r," ").concat(o)})).join(" ");return _t(_t(_t({},t.prototype.attributes.call(this)),{d:u,fill:o?i:"none",stroke:r,"stroke-width":o?a.toString():"0"}),null!==s?{"stroke-linecap":s}:{})},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.drawn,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var a,u,l;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(u=e.duration)&&void 0!==u?u:1e3,easing:null!==(l=e.easing)&&void 0!==l?l:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var r,o,i,a;n.props.drawn=!0;var s=n.element(),u=s.getTotalLength(),l=null!==(r=t.drawDuration)&&void 0!==r?r:1e3;s.setAttribute("stroke-dashoffset","".concat(u)),s.setAttribute("stroke-dasharray","".concat(u)),s.setAttribute("stroke-width","".concat(n.props.width)),e({animate:!0,element:s,attributes:{"stroke-dashoffset":"0"},animationParams:{drawing:l,easing:null!==(o=t.easing)&&void 0!==o?o:"linear"}}),"none"!==n.props.fill&&e({animate:!0,delay:l,element:s,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:1e3,easing:null!==(a=t.easing)&&void 0!==a?a:"linear"}})}},n}(bt),Ct=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Pt=function(){return Pt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Pt.apply(this,arguments)},kt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Pt({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return Ct(n,t),n.prototype.tagName=function(){return"polygon"},n.prototype.attributes=function(){var n=this.props,e=n.points,r=n.fill,o=n.borderWidth,i=n.borderColor,a=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ");return Pt(Pt(Pt({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(bt),At=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Et=function(){return Et=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Et.apply(this,arguments)},Mt=function(t){function n(n){void 0===n&&(n={});var e,r,o,i=this,a=null!==(e=n.width)&&void 0!==e?e:10,s=null!==(r=n.arrowSize)&&void 0!==r?r:4*a,u=null!==(o=n.opacity)&&void 0!==o?o:!1===n.drawn?0:1;return(i=t.call(this,Et({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:a,arrowSize:s,opacity:u,filledHead:!0,doubledHead:!1,drawn:!0,padStart:{x:0,y:0},padEnd:{x:0,y:0}},n))||this).line=null,i.arrowhead=null,i}return At(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){var n,e,r,o,i=t.arrowSize,a=t.drawn,s=t.doubledHead,u=t.filledHead,l=t.growFromCenter,c=this.positionInPresentation(t.start),p=this.positionInPresentation(t.end);c.x+=null!==(n=t.padStart.x)&&void 0!==n?n:0,c.y+=null!==(e=t.padStart.y)&&void 0!==e?e:0,p.x+=null!==(r=t.padEnd.x)&&void 0!==r?r:0,p.y+=null!==(o=t.padEnd.y)&&void 0!==o?o:0;var h=Math.atan2(p.y-c.y,p.x-c.x),f={x:(c.x+p.x)/2,y:(c.y+p.y)/2},d=l?f:c,y=a?p:{x:d.x+i*Math.cos(h),y:d.y+i*Math.sin(h)},g=u?Math.PI/6:Math.PI/4.5,v={x:y.x-i*Math.cos(h-g),y:y.y-i*Math.sin(h-g)},m={x:y.x-i*Math.cos(h+g),y:y.y-i*Math.sin(h+g)},b=t.filledHead?2*i/3:0,w=a?{x:p.x-b*Math.cos(h),y:p.y-b*Math.sin(h)}:{x:d.x+.8*i*Math.cos(h),y:d.y+.8*i*Math.sin(h)},x=[];if(s){var O=a?c:d,S={x:O.x+i*Math.cos(h-g),y:O.y+i*Math.sin(h-g)},_={x:O.x+i*Math.cos(h+g),y:O.y+i*Math.sin(h+g)};x.push(S,O,_),u&&(c={x:c.x+b*Math.cos(h),y:c.y+b*Math.sin(h)})}return{line:{start:!a&&l?{x:d.x+b*Math.cos(h),y:d.y+b*Math.sin(h)}:c,end:w},arrowhead:[v,y,m],doubledArrowhead:x}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=t.filledHead,o=t.doubledHead,i=this.calculateShapes(this.props);return this.line=new Ot({start:i.line.start,end:i.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=r?new kt(i.arrowhead,{fill:n,borderWidth:0,borderColor:n}):new jt({points:i.arrowhead,color:n,width:e}),this.arrowhead.generate(this._presentation),o&&(this.doubledArrowhead=r?new kt(i.doubledArrowhead,{fill:n,borderWidth:0,borderColor:n}):new jt({points:i.doubledArrowhead,color:n,width:e}),this.doubledArrowhead.generate(this._presentation)),function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([this.line.element(),this.arrowhead.element()],this.doubledArrowhead?[this.doubledArrowhead.element()]:[],!0)},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.start,s=n.end,u=n.drawn,l=n.color,c=n.width,p=n.arrowSize,h=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["start","end","drawn","color","width","arrowSize"]),f=Object.fromEntries(Object.entries({start:a,end:s,drawn:u,color:l,width:c,arrowSize:p}).filter((function(t){return t[0],void 0!==t[1]})));return function(n){u&&!("opacity"in h)&&0===i.props.opacity&&i.set({opacity:1})(n),0!==Object.keys(h).length&&t.prototype.animate.call(i,h,e,r,o)(n),0!==Object.keys(f).length&&i.animateArrow(f,e,r,o)(n)}},n.prototype.draw=function(t){return void 0===t&&(t={}),this.animate({drawn:!0},t)},n.prototype.animateArrow=function(t,n,e,r){var o=this;void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0);var i=Et(Et({},this.props),t),a=this.calculateShapes(i);return function(e){var r=o.line.animate(Et(Et({start:a.line.start,end:a.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),i=o.arrowhead.animate(Et({points:a.arrowhead},t.color?{fill:t.color}:{}),n),s=o.doubledArrowhead?o.doubledArrowhead.animate(Et({points:a.doubledArrowhead},t.color?{fill:t.color}:{}),n):function(){};r(e),i(e),s(e)}},n}(bt),It=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Tt=function(){return Tt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Tt.apply(this,arguments)},Bt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Tt({fill:"#000000",radius:100,borderWidth:0,borderColor:"#000000"},n))||this}return It(n,t),n.prototype.tagName=function(){return"circle"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.radius,i=n.fill,a=n.borderWidth,s=n.borderColor,u=this.positionAttributes(new e(r,2*o,2*o)),l=u.x,c=u.y;return Tt(Tt(Tt({},t.prototype.attributes.call(this)),{fill:i,r:o.toString(),cx:(l+o).toString(),cy:(c+o).toString()}),a>0?{"stroke-width":a.toString(),stroke:s}:{})},n}(bt),Lt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nt=function(){return Nt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Nt.apply(this,arguments)},Dt=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,Nt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r,rotation:0,rotationOrigin:{x:0,y:0},scale:1,skewX:0,skewY:0},e))||this}return Lt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return Nt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props,n=t.rotation,r=t.rotationOrigin,o=t.scale,i=t.skewX,a=t.skewY,s="rotate(".concat(n,", ").concat(r.x,", ").concat(r.y,")"),u="scale(".concat(o,")"),l="".concat(0!==i?"skewX(".concat(i,")"):""," ").concat(0!==a?"skewY(".concat(a,")"):"");if(!this.props.positioned){var c=this.positionInPresentation(this.props.position),p=c.x,h=c.y;return{transform:"translate(".concat(p,", ").concat(h,") ").concat(s," ").concat(u," ").concat(l)}}var f=this._presentation.computeRenderedBoundingBox(this._element);f.width*=o,f.height*=o;var d=this.positionInPresentation(this.props.position),y=d.x,g=d.y,v=this.anchorBoundingBox(new e({x:y,y:g},f.width,f.height)),m=v.origin.x-f.origin.x,b=v.origin.y-f.origin.y;return{transform:"translate(".concat(m,", ").concat(b,") ").concat(s," ").concat(u," ").concat(l)}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(bt),Ft=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ht=function(t){function n(n){var e=this,r=n.rows,o=void 0===r?1:r,i=n.cols,a=void 0===i?1:i,s=n.spacing,u=void 0===s?{x:0,y:0}:s,l=n.origin,c=void 0===l?{x:0,y:0}:l,p=n.objects,h=void 0===p?function(){return null}:p,f=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["rows","cols","spacing","origin","objects"]);void 0===u.x&&(u.x=0),void 0===u.y&&(u.y=0);for(var d=[],y=0;y<o;y++){for(var g=[],v=0;v<a;v++){var m=h(y,v);null!==m&&(m.props.position.x=c.x+u.x*v,m.props.position.y=c.y+u.y*y),g.push(m)}d.push(g)}return e=t.call(this,function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([],d.flat().filter((function(t){return null!==t})),!0),f)||this,e.objects=d,e}return Ft(n,t),n}(Dt),zt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wt=function(){return Wt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Wt.apply(this,arguments)},qt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Wt({url:"https://wikipedia.org/",width:2500,height:1500,scale:3,backgroundColor:"#ffffff",pointerEvents:"auto"},n))||this}return zt(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return Wt(Wt({},t.prototype.attributes.call(this)),{x:s.toString(),y:u.toString(),width:o.toString(),height:i.toString()})},n.prototype.styles=function(){return Wt(Wt(Wt({},t.prototype.styles.call(this)),{"background-color":this.props.backgroundColor,"pointer-events":this.props.pointerEvents}),0===this.props.opacity?{"pointer-events":"none"}:{})},n.prototype.children=function(){var t=document.createElement("iframe");t.src=this.props.url;var n=(100/this.props.scale).toFixed(2)+"%";return t.style.width=n,t.style.height=n,t.style.transform="scale(".concat(this.props.scale,")"),t.style.transformOrigin="top left",[t]},n}(bt),Rt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vt=function(){return Vt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Vt.apply(this,arguments)},Gt=function(t){function n(e,r){return void 0===r&&(r={}),n.prefetch(e),t.call(this,Vt({href:e,width:100,height:100,rounding:0},r))||this}return Rt(n,t),n.prototype.tagName=function(){return"image"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.href,i=n.width,a=n.height,s=this.positionAttributes(new e(r,i,a)),u=s.x,l=s.y;return Vt(Vt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:u.toString(),y:l.toString()})},n.prototype.styles=function(){var n=this.props.rounding;return Vt(Vt({},t.prototype.styles.call(this)),0!==n?{"clip-path":"inset(0px round ".concat(n,"px)")}:{})},n.prefetch=function(t){var n=function(){var n=document.createElement("img");n.src=t,n.style.display="none",document.body.appendChild(n),n.addEventListener("load",(function(){n.remove()}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()},n}(bt),Yt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Kt=function(){return Kt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Kt.apply(this,arguments)},Xt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Kt({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal",align:"left",lineHeight:null,color:"#000000"},e))||this}return Yt(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height;return Kt(Kt({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:r.toString(),height:o.toString()})},n.prototype.children=function(){for(var t=this.props,n=t.content,e=t.fontStyle,r=t.fontWeight,o=t.align,i=t.lineHeight,a=document.createElement("div"),s=Kt(Kt(Kt(Kt(Kt({"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px")},"normal"!==e?{"font-style":e}:{}),"normal"!==r?{"font-weight":r.toString()}:{}),"left"!==o?{"text-align":o}:{}),null!==i?{"line-height":i.toString()}:{}),{color:this.props.color}),u=0,l=Object.entries(s);u<l.length;u++){var c=l[u],p=c[0],h=c[1];void 0!==h&&a.style.setProperty(p,h.toString())}if("string"==typeof n)a.textContent=n;else for(var f=0,d=n;f<d.length;f++){var y=d[f],g=document.createElement("p");g.textContent=y,a.appendChild(g)}return[a]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Kt(Kt({},t.prototype.additionalAttributes.call(this)),{x:r.toString(),y:o.toString()})},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(bt),$t=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ut=function(){return Ut=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ut.apply(this,arguments)},Zt=function(t){function n(n){void 0===n&&(n={});var e=t.call(this,Ut({width:null,height:null,scale:1,align:"left"},n))||this;return e.videoElement=null,e}return $t(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height,i=this._presentation.options.width,a=this._presentation.options.height;return Ut(Ut({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:(null===r?i:r).toString(),height:(null===o?a:o).toString()})},n.prototype.styles=function(){var n=this.props.align;return Ut(Ut({},t.prototype.styles.call(this)),{"text-align":n})},n.prototype.children=function(){var t=this,n=this.props,e=n.scale,r=n.align,o=document.createElement("video");return this.videoElement=o,o.autoplay=!0,o.style.transform="scale(".concat(e,")"),o.style.transformOrigin="left"===r?"top left":"center"===r?"top center":"top right",navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"window"},audio:!1}).then((function(n){n.getVideoTracks()[0].onended=function(){o.style.display="none"},o.srcObject=n,o.play(),t._presentation.slideCleanupHandlers.push((function(){o.srcObject.getTracks().forEach((function(t){return t.stop()})),o.style.display="none",o.srcObject=null}))})).catch((function(t){console.error("Could not start screen capture -",t)})),[o]},n}(bt);function Qt(t){return t.replace(/^\s+/g,(function(t){return t.replace(/ /g," ")}))}function Jt(t){if("string"==typeof t)return Qt(t);for(var n=[],e=0,r=t;e<r.length;e++){var o=r[e];if("string"!=typeof o)if(0!==o.length){var i=Array.from(o),a=i[0];i[0]="string"==typeof a?Qt(a):[Qt(a[0]),i[0][1]],n.push(i)}else n.push(o);else n.push(Qt(o))}return n}function tn(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var r=[],o=0,i=0,a=t;i<a.length;i++){var s=a[i];o++;var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(u.setAttribute("x","0"),u.setAttribute("text-anchor",e),o>1&&u.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])u.appendChild(document.createTextNode(" ")),r.push(u);else if("string"!=typeof s){for(var l=0,c=s;l<c.length;l++){var p=c[l];if("string"==typeof p)u.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var y={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},g=0,v=Object.entries(y);g<v.length;g++){var m=v[g],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle};!0===f.superscript?(w["baseline-shift"]="super",void 0===w["font-size"]&&(w["font-size"]="50%")):!0===f.subscript&&(w["baseline-shift"]="sub",void 0===w["font-size"]&&(w["font-size"]="50%"));for(var x=0,O=Object.entries(w);x<O.length;x++){var S,_=O[x];b=_[0],void 0!==(S=_[1])&&d.style.setProperty(b,S.toString())}u.appendChild(d)}}r.push(u)}else u.appendChild(document.createTextNode(s)),r.push(u)}return r}var nn=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),en=function(){return en=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},en.apply(this,arguments)},rn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,en({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return nn(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.textDecoration;return en(en(en({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),r=e.x,o=e.y;return this.isRichText()&&("center"===this.props.align?r+=n.width/2:"right"===this.props.align&&(r+=n.width)),o-=this.props.fontSize*this.props.baselineHeight,en(en({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(1)).height.toString()}:{x:r.toString(),y:(o+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight,a=n.ligatures;return en(en(en(en(en({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(){return"string"==typeof this.props.content?this.props.content.length:this.props.content.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var r="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return tn(n,this.props.lineSpacing,r);for(var o=t,i=[],a=0,s=n;a<s.length;a++){var u=s[a];if("string"==typeof u)u.length<=o?(i.push(u),o-=u.length):(i.push(u.slice(0,o)),o=0);else{for(var l=[],c=0,p=u;c<p.length;c++){var h=p[c];if("string"==typeof h?h.length<=o?(l.push(h),o-=h.length):(l.push(h.slice(0,o)),o=0):h[0].length<=o?(l.push(h),o-=h[0].length):(l.push([h[0].slice(0,o),h[1]]),o=0),0===o)break}i.push(l)}if(0===o)break}return tn(i,this.props.lineSpacing,r)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.length,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var u;i.writeOn(a,null!==(u=e.duration)&&void 0!==u?u:1e3,o)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.writeOn=function(t,n,e){var r=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var o=null,i=null,a=null,s=function(e){var u;null===a&&(a=e),null===o&&(o=null!==(u=r.props.length)&&void 0!==u?u:r.contentLength()),null===i&&(i=null!=t?t:r.contentLength());var l=e-a,c=Math.min(l/n,1);r.props.length=Math.floor(o+(i-o)*c),r.regenerateChildren(),c<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,o=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,o=null,i=null,r.props.length=t,r.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var r=e[n],o=r[0],i=r[1];t.setAttribute(o,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var u=s[a];o=u[0],i=u[1],t.setAttribute(o,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var r=null,o=function(i){null===r&&(r=i);var a=i-r,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(o)};return function(n){return n({animate:!0,animateCallback:function(){r=null,requestAnimationFrame(o)},updateCallback:function(){r=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(bt),on=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),an=function(){return an=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},an.apply(this,arguments)},sn=function(t){function n(n){return void 0===n&&(n={}),t.call(this,an({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return on(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=n.fill,s=n.rounding,u=n.borderWidth,l=n.borderColor,c=this.positionAttributes(new e(r,o,i)),p=c.x,h=c.y;return an(an(an({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:p.toString(),y:h.toString()}),u>0?{"stroke-width":u.toString(),stroke:l}:{})},n}(bt),un=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ln=function(){return ln=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ln.apply(this,arguments)},cn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,ln({svg:n,width:100,height:100},e))||this}return un(n,t),n.svgNode=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement},n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=this.constructor.svgNode(this.props.svg);return this.parsedChildren=Array.from(t.childNodes),t.innerHTML="",t},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return ln(ln({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:u.toString()})},n.prototype.children=function(){return this.parsedChildren},n.prototype.animatePath=function(t,n,e,r){var o=this;return void 0===e&&(e=500),void 0===r&&(r=!0),function(i){var a,s=o.element().querySelector(t);i(ln(ln({animate:r,element:s},n),{animationParams:ln({duration:e,easing:"linear"},null!==(a=n.animationParams)&&void 0!==a?a:{})}))}},n.prototype.setPath=function(t,n){return this.animatePath(t,n,0,!1)},n.prototype.drawOn=function(t,n){var e=this;void 0===n&&(n={});var r=ln({color:"#000000",strokeWidth:5,fill:!0,fillColor:null,drawDuration:1e3,fillDuration:1e3,easing:"linear",endWithoutStroke:!0},n),o=r.color,i=r.strokeWidth,a=r.fill,s=r.fillColor,u=r.drawDuration,l=r.fillDuration,c=r.easing,p=r.endWithoutStroke;return function(r){var h,f=e.element().querySelector(t);if(!f)throw new Error("Path element with selector ".concat(t," not found"));var d=null!==(h=n.pathLength)&&void 0!==h?h:f.getTotalLength();f.setAttribute("stroke-dashoffset","".concat(d)),f.setAttribute("stroke-dasharray","".concat(d)),f.setAttribute("stroke-width","".concat(i)),f.setAttribute("stroke",o),r({animate:!0,element:f,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:u,easing:c}}),a&&r({animate:!0,delay:u,element:f,attributes:ln({fill:null!=s?s:o,"stroke-dasharray":"none"},p?{"stroke-width":"0"}:{}),animationParams:{duration:l,easing:c}})}},n}(bt),pn=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),hn=function(){return hn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},hn.apply(this,arguments)},fn=function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))},dn=function(t){function n(n,e,r){var o,i,a;void 0===e&&(e={}),void 0===r&&(r={});var s=hn({showBullets:!0,bulletSize:35,bulletColor:"#000000",lineSpacing:90,bulletOffset:75,textOffset:75},e),u=s.showBullets,l=s.bulletSize,c=s.bulletColor,p=s.lineSpacing,h=s.bulletOffset,f=s.textOffset,d=null!==(o=r.fontSize)&&void 0!==o?o:150,y=null!==(i=e.lineHeight)&&void 0!==i?i:d,g=null!==(a=e.bulletVerticalOffset)&&void 0!==a?a:y/3,v=0,m=n.map((function(t){var n=t instanceof Array,e=new Bt({radius:l,fill:c,position:{x:0,y:g},anchor:"topleft"}),o=new rn(t,hn({position:{x:2*l+f,y:0},anchor:"topleft",fontSize:d},r)),i=new Dt(fn(fn([],u?[e]:[],!0),[o],!1),{position:{x:0,y:v}}),a=n?t.length:1;return v+=a*y+p,i}));return t.call(this,m,hn({position:{x:h,y:.6},anchor:"left"},e))||this}return pn(n,t),n}(Dt),yn=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gn=function(){return gn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},gn.apply(this,arguments)},vn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,n,gn({position:{x:.5,y:.5},anchor:"center",fontSize:250,fontWeight:700},e))||this}return yn(n,t),n}(rn),mn=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bn=function(){return bn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},bn.apply(this,arguments)},wn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,n,bn({position:{x:.02,y:.04},anchor:"topleft",fontSize:200,fontWeight:700},e))||this}return mn(n,t),n}(rn);function xn(t,n,e){return Math.min(Math.max(t,n),e)}function On(t){return xn(t,0,1)}function Sn(t){var n=xn(t,0,1);return Math.pow(n,2)*(3-2*n)}return n})()));
@@ -0,0 +1,83 @@
1
+ import { Group, GroupProps } from "../objects/group";
2
+ import { Rectangle, RectangleProps } from "../objects/rectangle";
3
+ import { Text, TextContent, TextProps } from "../objects/text";
4
+ import { Anchor } from "../presentation/object";
5
+ import { Presentation } from "../presentation/presentation";
6
+ import { BuildFunction } from "../util/animation";
7
+ import { Position } from "../util/position";
8
+ /**
9
+ * Region for syntax highlighting.
10
+ *
11
+ * The `presenter-syntax-highlight` script can be used to generate a list of
12
+ * highlight regions for each line of code. This allows code to be
13
+ * syntax-highlighted on the slide.
14
+ */
15
+ export interface CodeHighlightRegion {
16
+ start: number;
17
+ end: number;
18
+ color: string;
19
+ bold: boolean;
20
+ }
21
+ export interface CodeBlockProps {
22
+ code: string;
23
+ highlights: CodeHighlightRegion[][] | null;
24
+ length: number | null;
25
+ fontFamily: string;
26
+ fontSize: number;
27
+ textColor: string;
28
+ backgroundColor: string | null;
29
+ backgroundRounding: number;
30
+ padding: number;
31
+ lineHeight: number;
32
+ characterWidth: number;
33
+ focusColor: string;
34
+ focusOpacity: number;
35
+ focusRounding: number;
36
+ focusLineStart: number;
37
+ focusLineEnd: number;
38
+ focusColStart: number;
39
+ focusColEnd: number;
40
+ focusPaddingX: number;
41
+ focusOffsetX: number;
42
+ focusPaddingY: number;
43
+ focusOffsetY: number;
44
+ position: Position;
45
+ anchor: Anchor;
46
+ }
47
+ export declare class CodeBlock extends Group {
48
+ codeBlockProps: CodeBlockProps;
49
+ background: Rectangle;
50
+ focus: Rectangle;
51
+ text: Text;
52
+ constructor(props?: Partial<CodeBlockProps>);
53
+ /**
54
+ * Animation of code block. Since a code block is made up of multiple
55
+ * elements (background, focus, text), we animate each element separately.
56
+ */
57
+ animate(props: Partial<CodeBlockProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
58
+ /**
59
+ * Given properties for the entire code block, compute properties for individual text elements.
60
+ */
61
+ static getComponentProps(props: CodeBlockProps): {
62
+ group: Partial<GroupProps>;
63
+ background: Partial<RectangleProps>;
64
+ focus: Partial<RectangleProps>;
65
+ text: Partial<TextProps>;
66
+ };
67
+ static buildTextContent(code: string, highlights: CodeHighlightRegion[][] | null): TextContent;
68
+ /**
69
+ * Given text properties, calculates the character width and line height for the font at that size.
70
+ * Can be pre-computed, then be used as input to a new CodeBlock.
71
+ *
72
+ * Sample usage in a presentation to determine text properties:
73
+ *
74
+ * console.log(CodeBlock.computePropsForText(presentation, {
75
+ * fontFamily: "Menlo",
76
+ * fontSize: 130,
77
+ * }));
78
+ */
79
+ static computePropsForText(presentation: Presentation, textProps: Partial<TextProps>): {
80
+ lineHeight: number;
81
+ characterWidth: number;
82
+ };
83
+ }
@@ -0,0 +1 @@
1
+ export * from "./codeBlock";
@@ -0,0 +1,24 @@
1
+ import "svg2pdf.js";
2
+ import { Presentation } from "../presentation/presentation";
3
+ /**
4
+ * Renders the SVG content of a single slide of a presentation to a PNG image.
5
+ */
6
+ export declare function renderCurrentSlide(presentation: Presentation, filename: string): Promise<void>;
7
+ /**
8
+ * Renders the SVG content of all slides in a presentation as PNG images.
9
+ */
10
+ export declare function renderPresentationAsImages(presentation: Presentation): Promise<void>;
11
+ /**
12
+ * Renders whole slide container (background, additional element canvas, svg)
13
+ * and sends to a server endpoint.
14
+ *
15
+ * When rendering all componenst of the slide container, the server endpoint
16
+ * is requried to perform additional image compositing to generate the
17
+ * render.
18
+ */
19
+ export declare function exportCurrentSlideContainer(presentation: Presentation, filename: string, serverEndpoint: string): Promise<void>;
20
+ /**
21
+ * Exports the whole slide content of all slides and sends to a server endpoint.
22
+ */
23
+ export declare function exportAllSlides(presentation: Presentation, serverEndpoint: string): Promise<void>;
24
+ export declare function exportToPDF(presentation: Presentation, promptForConfirmation?: boolean): Promise<void>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Converts a binary blob to base64 string.
3
+ */
4
+ export declare function blobToBase64(blob: Blob): Promise<string>;
@@ -0,0 +1,24 @@
1
+ export * from "./presentation/presentation";
2
+ export * from "./presentation/slide";
3
+ export * from "./presentation/object";
4
+ export * from "./objects/arrow";
5
+ export * from "./objects/circle";
6
+ export * from "./objects/grid";
7
+ export * from "./objects/group";
8
+ export * from "./objects/iframe";
9
+ export * from "./objects/image";
10
+ export * from "./objects/line";
11
+ export * from "./objects/paragraph";
12
+ export * from "./objects/polygon";
13
+ export * from "./objects/path";
14
+ export * from "./objects/screenCapture";
15
+ export * from "./objects/text";
16
+ export * from "./objects/rectangle";
17
+ export * from "./objects/vectorGraphic";
18
+ export * from "./library/bullets";
19
+ export * from "./library/mainTitle";
20
+ export * from "./library/slideTitle";
21
+ export * from "./util/animation";
22
+ export * from "./util/easing";
23
+ export * from "./util/position";
24
+ export * from "./util/richText";
@@ -0,0 +1,15 @@
1
+ import { Group, GroupProps } from "../objects/group";
2
+ import { TextContent, TextProps } from "../objects/text";
3
+ export interface BulletsProps extends GroupProps {
4
+ showBullets: boolean;
5
+ bulletSize: number;
6
+ bulletColor: string;
7
+ lineSpacing: number;
8
+ lineHeight: number | null;
9
+ bulletOffset: number;
10
+ textOffset: number;
11
+ bulletVerticalOffset: number;
12
+ }
13
+ export declare class Bullets extends Group {
14
+ constructor(items: TextContent[], props?: Partial<BulletsProps>, textProps?: Partial<TextProps>);
15
+ }
@@ -0,0 +1,4 @@
1
+ import { Text, TextProps } from "../objects/text";
2
+ export declare class MainTitle extends Text {
3
+ constructor(text: string, props?: Partial<TextProps>);
4
+ }
@@ -0,0 +1,4 @@
1
+ import { Text, TextProps } from "../objects/text";
2
+ export declare class SlideTitle extends Text {
3
+ constructor(text: string, props?: Partial<TextProps>);
4
+ }
@@ -0,0 +1,34 @@
1
+ import { BuildFunction } from "../util/animation";
2
+ export interface MorphParams {
3
+ duration: number;
4
+ /**
5
+ * For smooth morph, we can define a maximum size for segments to use in
6
+ * interpolated animation. Lower values result in smoother animations, but
7
+ * are potentially less performant.
8
+ *
9
+ * Default is 10.
10
+ */
11
+ maxSegmentLength: number;
12
+ /**
13
+ * For simple morph, easing is meant to be a string.
14
+ * For smooth morph, easing is meant to be a function over [0, 1].
15
+ */
16
+ easing: string | ((value: number) => number);
17
+ }
18
+ /**
19
+ * Generates an animation that morphs one path into another, given a path
20
+ * interpolation function that computes intermediate path values.
21
+ */
22
+ export declare function morphPath(sourceElement: Element | (() => Element), targetPath: string, pathInterpolator: (source: string, target: string) => (t: number) => string, morphParams: Partial<MorphParams>): BuildFunction;
23
+ /**
24
+ * Smoothly morphs one path into another. Attempts to intelligently
25
+ * interpolate between shapes smoothly, even if shapes don't correspond to
26
+ * each other closely or don't have the same number of points.
27
+ */
28
+ export declare function morphPathSmooth(sourceElement: Element | (() => Element), targetPath: string, morphParams?: Partial<MorphParams>): BuildFunction;
29
+ /**
30
+ * Simply morphs one path into another. Points are translated directly, and
31
+ * both paths must have the same number of points for the animation to look
32
+ * correct. Works best if two paths correspond to each other closely.
33
+ */
34
+ export declare function morphPathSimple(sourceElement: Element | (() => Element), targetPath: string, morphParams?: Partial<MorphParams>): BuildFunction;
@@ -0,0 +1,62 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ import { BuildFunction } from "../util/animation";
3
+ import { Position } from "../util/position";
4
+ import { Line } from "./line";
5
+ import { Path } from "./path";
6
+ import { Polygon } from "./polygon";
7
+ export interface ArrowProps extends ObjectProps {
8
+ start: Position;
9
+ end: Position;
10
+ color: string;
11
+ width: number;
12
+ arrowSize: number;
13
+ filledHead: boolean;
14
+ doubledHead: boolean;
15
+ growFromCenter: boolean;
16
+ /**
17
+ * Property describing whether the arrow has been fully drawn.
18
+ * If an arrow hasn't been drawn, it can be animated to draw in.
19
+ */
20
+ drawn: boolean;
21
+ /**
22
+ * The start and end points can have "padding".
23
+ * This is equivalent to adding (x, y) values to the start and end points.
24
+ *
25
+ * This can be useful when drawing an arrow from an object at a particular
26
+ * location. The arrow's start/end point can match the object's, with some
27
+ * added padding so that the arrow doesn't overlap the object.
28
+ *
29
+ * It can also be useful if multiple arrows start or end at the same place,
30
+ * and you want to adjust their endpoints slightly to avoid overlap.
31
+ */
32
+ padStart: Partial<Position>;
33
+ padEnd: Partial<Position>;
34
+ }
35
+ export declare class Arrow extends SlideObject<ArrowProps> {
36
+ line: Line | null;
37
+ arrowhead: Polygon | Path | null;
38
+ doubledArrowhead: Polygon | Path | null;
39
+ constructor(props?: Partial<ArrowProps>);
40
+ tagName(): string;
41
+ /**
42
+ * Computes coordinates for the line and arrowhead of the arrow.
43
+ */
44
+ calculateShapes(props: ArrowProps): {
45
+ line: {
46
+ start: Position;
47
+ end: {
48
+ x: number;
49
+ y: number;
50
+ };
51
+ };
52
+ arrowhead: Position[];
53
+ doubledArrowhead: Position[];
54
+ };
55
+ children(): Node[];
56
+ animate(props: Partial<ArrowProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
57
+ draw(animationParams?: anime.AnimeParams): BuildFunction;
58
+ /**
59
+ * Returns animations for changes in arrowhead.
60
+ */
61
+ animateArrow(arrowProps: Partial<ArrowProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
62
+ }
@@ -0,0 +1,12 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ export interface CircleProps extends ObjectProps {
3
+ fill: string;
4
+ radius: number;
5
+ borderWidth: number;
6
+ borderColor: string;
7
+ }
8
+ export declare class Circle extends SlideObject<CircleProps> {
9
+ constructor(props?: Partial<CircleProps>);
10
+ tagName(): string;
11
+ attributes(): Partial<Record<string, string>>;
12
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A grid of identical or similar objects.
3
+ */
4
+ import { SlideObject } from "../presentation/object";
5
+ import { Position } from "../util/position";
6
+ import { Group, GroupProps } from "./group";
7
+ export interface GridProps extends Omit<GroupProps, "objects"> {
8
+ origin: Position;
9
+ spacing: Partial<Position>;
10
+ rows: number;
11
+ cols: number;
12
+ objects: (row: number, col: number) => SlideObject<any> | null;
13
+ }
14
+ export declare class Grid extends Group {
15
+ objects: (SlideObject<any> | null)[][];
16
+ constructor(props: Partial<GridProps>);
17
+ }
@@ -0,0 +1,22 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ import { Position } from "../util/position";
3
+ export interface GroupProps extends ObjectProps {
4
+ /**
5
+ * A positioned group places the group's anchor at a particular coordinate.
6
+ * A non-positioned group uses the position as an offset for its children.
7
+ */
8
+ positioned: boolean;
9
+ objects: SlideObject<any>[];
10
+ rotation: number;
11
+ rotationOrigin: Position;
12
+ scale: number;
13
+ skewX: number;
14
+ skewY: number;
15
+ }
16
+ export declare class Group extends SlideObject<GroupProps> {
17
+ constructor(objects: SlideObject<any>[], props?: Partial<GroupProps>, positioned?: boolean | null);
18
+ tagName(): string;
19
+ attributes(): Partial<Record<string, string>>;
20
+ additionalAttributes(): Partial<Record<string, string>>;
21
+ children(): Node[];
22
+ }
@@ -0,0 +1,16 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ export interface IFrameProps extends ObjectProps {
3
+ url: string;
4
+ width: number;
5
+ height: number;
6
+ backgroundColor: string;
7
+ pointerEvents: string;
8
+ scale: number;
9
+ }
10
+ export declare class IFrame extends SlideObject<IFrameProps> {
11
+ constructor(props?: Partial<IFrameProps>);
12
+ tagName(): string;
13
+ attributes(): Partial<Record<string, string>>;
14
+ styles(): Partial<Record<string, string>>;
15
+ children(): Node[];
16
+ }
@@ -0,0 +1,20 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ export interface ImageProps extends ObjectProps {
3
+ href: string;
4
+ width: number;
5
+ height: number;
6
+ rounding: number;
7
+ }
8
+ export declare class Image extends SlideObject<ImageProps> {
9
+ constructor(href: string, props?: Partial<ImageProps>);
10
+ tagName(): string;
11
+ attributes(): Partial<Record<string, string>>;
12
+ styles(): Partial<Record<string, string>>;
13
+ /**
14
+ * By default, browsers might not fetch an image until the image element is
15
+ * added to the DOM. Pre-fetching them when the image object is created
16
+ * means the image will be fetched before the slide is rendered, so there's
17
+ * no delay between the slide appearing and the image loading.
18
+ */
19
+ static prefetch(href: string): void;
20
+ }
@@ -0,0 +1,19 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ import { Position } from "../util/position";
3
+ export interface LineProps extends ObjectProps {
4
+ start: Position;
5
+ end: Position;
6
+ color: string;
7
+ width: number;
8
+ linecap: "butt" | "round" | "square" | null;
9
+ /**
10
+ * Property describing whether the line has been fully drawn.
11
+ * If a line hasn't been drawn, it can be animated to draw in.
12
+ */
13
+ drawn: boolean;
14
+ }
15
+ export declare class Line extends SlideObject<LineProps> {
16
+ constructor(props?: Partial<LineProps>);
17
+ tagName(): string;
18
+ attributes(): Partial<Record<string, string>>;
19
+ }
@@ -0,0 +1,21 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ export interface ParagraphProps extends ObjectProps {
3
+ content: string | string[];
4
+ width: number;
5
+ height: number;
6
+ fontStyle: string;
7
+ fontWeight: string | number;
8
+ fontSize: number;
9
+ fontFamily: string;
10
+ color: string;
11
+ align: "left" | "center" | "right";
12
+ lineHeight: number | string | null;
13
+ }
14
+ export declare class Paragraph extends SlideObject<ParagraphProps> {
15
+ constructor(content: string | string[], props?: Partial<ParagraphProps>);
16
+ tagName(): string;
17
+ attributes(): Partial<Record<string, string>>;
18
+ children(): Node[];
19
+ additionalAttributes(): Partial<Record<string, string>>;
20
+ requiresChildrenUpdate(props: Partial<ParagraphProps>): boolean;
21
+ }
@@ -0,0 +1,27 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ import { BuildFunction } from "../util/animation";
3
+ import { Position } from "../util/position";
4
+ export interface PathProps extends ObjectProps {
5
+ points: Position[];
6
+ color: string;
7
+ fill: string;
8
+ width: number;
9
+ linecap: "butt" | "round" | "square" | null;
10
+ drawn: boolean;
11
+ }
12
+ interface PathDrawOnProps {
13
+ drawDuration: number;
14
+ fillDuration: number;
15
+ easing: string;
16
+ }
17
+ export declare class Path extends SlideObject<PathProps> {
18
+ constructor(props?: Partial<PathProps>);
19
+ tagName(): string;
20
+ attributes(): Partial<Record<string, string>>;
21
+ animate(props: Partial<PathProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
22
+ /**
23
+ * Animates drawing of SVG path.
24
+ */
25
+ drawOn(props?: Partial<PathDrawOnProps>): BuildFunction;
26
+ }
27
+ export {};