@tsparticles/confetti 3.9.1 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1392.min.js +2 -0
- package/1392.min.js.LICENSE.txt +1 -0
- package/198.min.js +2 -0
- package/198.min.js.LICENSE.txt +1 -0
- package/2124.min.js +2 -0
- package/2124.min.js.LICENSE.txt +1 -0
- package/2164.min.js +2 -0
- package/2164.min.js.LICENSE.txt +1 -0
- package/2201.min.js +2 -0
- package/2201.min.js.LICENSE.txt +1 -0
- package/2422.min.js +2 -0
- package/2422.min.js.LICENSE.txt +1 -0
- package/2554.min.js +2 -0
- package/2554.min.js.LICENSE.txt +1 -0
- package/2636.min.js +2 -0
- package/2636.min.js.LICENSE.txt +1 -0
- package/2885.min.js +2 -0
- package/2885.min.js.LICENSE.txt +1 -0
- package/303.min.js +2 -0
- package/303.min.js.LICENSE.txt +1 -0
- package/3241.min.js +2 -0
- package/3241.min.js.LICENSE.txt +1 -0
- package/3309.min.js +2 -0
- package/3309.min.js.LICENSE.txt +1 -0
- package/3493.min.js +2 -0
- package/3493.min.js.LICENSE.txt +1 -0
- package/350.min.js +2 -0
- package/350.min.js.LICENSE.txt +1 -0
- package/3522.min.js +2 -0
- package/3522.min.js.LICENSE.txt +1 -0
- package/3561.min.js +2 -0
- package/3561.min.js.LICENSE.txt +1 -0
- package/3636.min.js +2 -0
- package/3636.min.js.LICENSE.txt +1 -0
- package/3658.min.js +2 -0
- package/3658.min.js.LICENSE.txt +1 -0
- package/3853.min.js +2 -0
- package/3853.min.js.LICENSE.txt +1 -0
- package/3897.min.js +2 -0
- package/3897.min.js.LICENSE.txt +1 -0
- package/4204.min.js +2 -0
- package/4204.min.js.LICENSE.txt +1 -0
- package/4231.min.js +2 -0
- package/4231.min.js.LICENSE.txt +1 -0
- package/4493.min.js +2 -0
- package/4493.min.js.LICENSE.txt +1 -0
- package/4565.min.js +2 -0
- package/4565.min.js.LICENSE.txt +1 -0
- package/4606.min.js +2 -0
- package/4606.min.js.LICENSE.txt +1 -0
- package/4620.min.js +2 -0
- package/4620.min.js.LICENSE.txt +1 -0
- package/4688.min.js +2 -0
- package/4688.min.js.LICENSE.txt +1 -0
- package/4743.min.js +2 -0
- package/4743.min.js.LICENSE.txt +1 -0
- package/4894.min.js +2 -0
- package/4894.min.js.LICENSE.txt +1 -0
- package/491.min.js +2 -0
- package/491.min.js.LICENSE.txt +1 -0
- package/5627.min.js +2 -0
- package/5627.min.js.LICENSE.txt +1 -0
- package/5689.min.js +2 -0
- package/5689.min.js.LICENSE.txt +1 -0
- package/5693.min.js +2 -0
- package/5693.min.js.LICENSE.txt +1 -0
- package/5711.min.js +2 -0
- package/5711.min.js.LICENSE.txt +1 -0
- package/582.min.js +2 -0
- package/582.min.js.LICENSE.txt +1 -0
- package/5885.min.js +2 -0
- package/5885.min.js.LICENSE.txt +1 -0
- package/6137.min.js +2 -0
- package/6137.min.js.LICENSE.txt +1 -0
- package/6315.min.js +2 -0
- package/6315.min.js.LICENSE.txt +1 -0
- package/6416.min.js +2 -0
- package/6416.min.js.LICENSE.txt +1 -0
- package/6606.min.js +2 -0
- package/6606.min.js.LICENSE.txt +1 -0
- package/6848.min.js +2 -0
- package/6848.min.js.LICENSE.txt +1 -0
- package/6866.min.js +2 -0
- package/6866.min.js.LICENSE.txt +1 -0
- package/704.min.js +2 -0
- package/704.min.js.LICENSE.txt +1 -0
- package/731.min.js +2 -0
- package/731.min.js.LICENSE.txt +1 -0
- package/7321.min.js +2 -0
- package/7321.min.js.LICENSE.txt +1 -0
- package/7358.min.js +2 -0
- package/7358.min.js.LICENSE.txt +1 -0
- package/7489.min.js +2 -0
- package/7489.min.js.LICENSE.txt +1 -0
- package/7571.min.js +2 -0
- package/7571.min.js.LICENSE.txt +1 -0
- package/8182.min.js +2 -0
- package/8182.min.js.LICENSE.txt +1 -0
- package/8204.min.js +2 -0
- package/8204.min.js.LICENSE.txt +1 -0
- package/8230.min.js +2 -0
- package/8230.min.js.LICENSE.txt +1 -0
- package/8420.min.js +2 -0
- package/8420.min.js.LICENSE.txt +1 -0
- package/8440.min.js +2 -0
- package/8440.min.js.LICENSE.txt +1 -0
- package/869.min.js +2 -0
- package/869.min.js.LICENSE.txt +1 -0
- package/8930.min.js +2 -0
- package/8930.min.js.LICENSE.txt +1 -0
- package/9287.min.js +2 -0
- package/9287.min.js.LICENSE.txt +1 -0
- package/9661.min.js +2 -0
- package/9661.min.js.LICENSE.txt +1 -0
- package/9754.min.js +2 -0
- package/9754.min.js.LICENSE.txt +1 -0
- package/9825.min.js +2 -0
- package/9825.min.js.LICENSE.txt +1 -0
- package/9907.min.js +2 -0
- package/9907.min.js.LICENSE.txt +1 -0
- package/basic_dist_browser_index_js.js +30 -0
- package/browser/bundle.js +1 -1
- package/browser/confetti.js +23 -41
- package/cjs/ConfettiOptions.js +12 -16
- package/cjs/IConfettiOptions.js +1 -2
- package/cjs/bundle.js +2 -18
- package/cjs/confetti.js +33 -54
- package/cjs/index.js +1 -17
- package/engine_dist_browser_Core_Container_js.js +100 -0
- package/esm/bundle.js +1 -1
- package/esm/confetti.js +23 -41
- package/move_base_dist_browser_BaseMover_js.js +40 -0
- package/move_base_dist_browser_index_js.js +30 -0
- package/package.json +19 -18
- package/plugins_colors_hex_dist_browser_HexColorManager_js.js +30 -0
- package/plugins_colors_hex_dist_browser_index_js.js +30 -0
- package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +30 -0
- package/plugins_colors_hsl_dist_browser_index_js.js +30 -0
- package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +30 -0
- package/plugins_colors_rgb_dist_browser_index_js.js +30 -0
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +110 -0
- package/plugins_emitters_dist_browser_ShapeManager_js.js +30 -0
- package/plugins_emitters_dist_browser_index_js.js +50 -0
- package/plugins_motion_dist_browser_MotionPlugin_js.js +60 -0
- package/plugins_motion_dist_browser_index_js.js +30 -0
- package/report.html +5 -4
- package/shapes_cards_dist_browser_clubs_ClubDrawer_js.js +40 -0
- package/shapes_cards_dist_browser_diamonds_DiamondDrawer_js.js +40 -0
- package/shapes_cards_dist_browser_hearts_HeartDrawer_js.js +40 -0
- package/shapes_cards_dist_browser_index_js.js +70 -0
- package/shapes_cards_dist_browser_spades_SpadeDrawer_js.js +40 -0
- package/shapes_circle_dist_browser_CircleDrawer_js.js +40 -0
- package/shapes_circle_dist_browser_index_js.js +30 -0
- package/shapes_emoji_dist_browser_EmojiDrawer_js.js +40 -0
- package/shapes_emoji_dist_browser_index_js.js +30 -0
- package/shapes_heart_dist_browser_HeartDrawer_js.js +40 -0
- package/shapes_heart_dist_browser_index_js.js +30 -0
- package/shapes_image_dist_browser_GifUtils_Utils_js.js +80 -0
- package/shapes_image_dist_browser_ImageDrawer_js.js +30 -0
- package/shapes_image_dist_browser_ImagePreloader_js.js +40 -0
- package/shapes_image_dist_browser_Utils_js.js +30 -0
- package/shapes_image_dist_browser_index_js.js +30 -0
- package/shapes_polygon_dist_browser_PolygonDrawer_js.js +50 -0
- package/shapes_polygon_dist_browser_TriangleDrawer_js.js +50 -0
- package/shapes_polygon_dist_browser_index_js.js +30 -0
- package/shapes_square_dist_browser_SquareDrawer_js.js +40 -0
- package/shapes_square_dist_browser_index_js.js +30 -0
- package/shapes_star_dist_browser_StarDrawer_js.js +40 -0
- package/shapes_star_dist_browser_index_js.js +30 -0
- package/tsparticles.confetti.bundle.js +555 -2594
- package/tsparticles.confetti.bundle.min.js +1 -1
- package/tsparticles.confetti.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.confetti.js +96 -72
- package/tsparticles.confetti.min.js +1 -1
- package/tsparticles.confetti.min.js.LICENSE.txt +1 -1
- package/types/bundle.d.ts +1 -1
- package/types/confetti.d.ts +5 -7
- package/umd/bundle.js +2 -2
- package/umd/confetti.js +57 -41
- package/updaters_color_dist_browser_ColorUpdater_js.js +30 -0
- package/updaters_color_dist_browser_index_js.js +30 -0
- package/updaters_life_dist_browser_LifeUpdater_js.js +70 -0
- package/updaters_life_dist_browser_index_js.js +30 -0
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
- package/updaters_opacity_dist_browser_index_js.js +30 -0
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +80 -0
- package/updaters_outModes_dist_browser_index_js.js +30 -0
- package/updaters_roll_dist_browser_RollUpdater_js.js +70 -0
- package/updaters_roll_dist_browser_index_js.js +30 -0
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +50 -0
- package/updaters_rotate_dist_browser_index_js.js +30 -0
- package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
- package/updaters_size_dist_browser_index_js.js +30 -0
- package/updaters_tilt_dist_browser_TiltUpdater_js.js +60 -0
- package/updaters_tilt_dist_browser_index_js.js +30 -0
- package/updaters_wobble_dist_browser_WobbleUpdater_js.js +60 -0
- package/updaters_wobble_dist_browser_index_js.js +30 -0
package/7571.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 7571.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[7571],{7571(t,i,e){e.d(i,{Container:()=>A});var s=e(4400),n=e(1546),o=e(3618),a=e(9470),r=e(4975);function h(t,i,e){const s=i[e];void 0!==s&&(t[e]=(t[e]??n.zs)*s)}function c(t,i,e=!1){if(!i)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const i=s.item(t);i&&n.add(i)}for(let t=0;t<i.length;t++){const e=i.item(t);e&&n.add(e)}for(const t of n){const n=i.getPropertyValue(t);n?s.setProperty(t,n,e?"important":""):s.removeProperty(t)}}class l{constructor(t,i){this.container=t,this._applyPostDrawUpdaters=t=>{for(const i of this._postDrawUpdaters)i.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,i,e,s,n,o)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(i,t,e,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(i);for(const i in t)h(o,t,i)}a.beforeDraw?.(i)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=(0,r.R5)(this._engine,s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=(0,r.R5)(this._engine,s.particleStrokeColor(t))),i&&e)break;return[i,e]},this._initStyle=()=>{const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const e in i.style){if(!e||!Object.prototype.hasOwnProperty.call(i.style,e))continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}},this._repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver((t=>{t.disconnect()})),this._initStyle(),this.initBackground();const i=this._pointerEvents;t.style.pointerEvents=i,t.setAttribute("pointer-events",i),this._safeMutationObserver((i=>{t instanceof Node&&i.observe(t,{attributes:!0})}))},this._resetOriginalStyle=()=>{const t=this.element,i=this._originalStyle;t&&i&&c(t,i,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&c(t,(0,a.hJ)(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=i,this._standardSize={height:0,width:0};const e=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*e,width:s.width*e},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._pointerEvents="none"}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}canvasClear(){this.container.actualOptions.clear&&this.draw((t=>{(0,o.IU)(t,this.size)}))}clear(){let t=!1;for(const i of this.container.plugins.values())!t&&i.canvasClear&&(t=i.canvasClear());t||this.canvasClear()}clearDrawPlugin(t,i){this.draw((e=>{(0,o.l7)(e,t,i)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const i=this._context;if(i)return t(i)}drawParticle(t,i){if(t.spawning||t.destroyed)return;const e=t.getRadius();if(e<=n.w2)return;const s=t.getFillColor(),a=t.getStrokeColor()??s;let[h,c]=this._getPluginParticleColors(t);if(h??=s,c??=a,!h&&!c)return;const l=this.container,d=t.options.zIndex,u=n.RV-t.zIndexFactor,p=u**d.opacityRate,f=t.bubble.opacity??t.opacity?.value??n.hv,_=t.strokeOpacity??f,g=f*p,v=_*p,m={},y={fill:(()=>{if(h)return(0,r.LC)(h,l.hdr,g)})()};y.stroke=c?(0,r.LC)(c,l.hdr,v):y.fill,this.draw((s=>{this._applyPreDrawUpdaters(s,t,e,g,y,m),(0,o.p0)({container:l,context:s,particle:t,delta:i,colorStyles:y,radius:e*u**d.sizeRate,opacity:g,transform:m})})),this._applyPostDrawUpdaters(t)}drawParticlePlugin(t,i,e){this.draw((s=>{(0,o.Wb)(s,t,i,e)}))}drawParticles(t){const{particles:i,plugins:e}=this.container;this.clear(),i.update(t);for(const i of e.values())this.drawPlugin(i,t);this.draw((()=>{i.drawParticles(t)}));for(const i of e.values())this.clearDrawPlugin(i,t)}drawPlugin(t,i){this.draw((e=>{(0,o.e_)(e,t,i)}))}init(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=(0,a.tG)((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const{container:t}=this,i=t.actualOptions.background,e=this.element;if(!e)return;const s=e.style,n=(0,r.BN)(this._engine,i.color);s.backgroundColor=n?(0,r.xx)(n,t.hdr,i.opacity):"",s.backgroundImage=i.image||"",s.backgroundPosition=i.position||"",s.backgroundRepeat=i.repeat||"",s.backgroundSize=i.size||""}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins.values())t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this.container;this._generated=n.eb in t.dataset?"true"===t.dataset[n.eb]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=(0,a.td)(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const s=this.container.retina.pixelRatio,o=this.size;t.height=o.height=e.height*s,t.width=o.width=e.width*s;const r=(0,a.lV)("(color-gamut: p3)");this._context=this.element.getContext("2d",{alpha:!0,colorSpace:r?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this._safeMutationObserver((t=>{t.disconnect()})),i.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){let t=!1;for(const i of this.container.plugins.values()){if(t)break;t=i.canvasPaint?.()??!1}t||this.paintBase()}paintBase(t){this.draw((i=>{(0,o.Sn)(i,this.size,t)}))}paintImage(t,i){this.draw((e=>{(0,o.Md)(e,this.size,t,i)}))}resize(){if(!this.element)return!1;const t=this.container,i=t.canvas._standardSize,e={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:e.width*s,height:e.height*s};if(e.height===i.height&&e.width===i.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const o={...i};i.height=e.height,i.width=e.width;const a=this.size;return this.element.width=a.width=n.width,this.element.height=a.height=n.height,this.container.started&&t.particles.setResizeFactor({width:i.width/o.width,height:i.height/o.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}stop(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=void 0,this.draw((t=>{(0,o.IU)(t,this.size)}))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}}var d=e(8980),u=e(998);function p(t,i,e,s,n){if(s){let s={passive:!0};(0,u.Lm)(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(i,e,s)}else{const s=n;t.removeEventListener(i,e,s)}}class f{constructor(t){this.container=t,this._canPush=!0,this._doMouseTouchClick=t=>{const i=this.container,e=i.actualOptions;if(this._canPush){const t=i.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=Date.now();const n=e.interactivity.events.onClick;(0,a.wJ)(n.mode,(t=>{this.container.handleClickMode(t)}))}"touchend"===t.type&&setTimeout((()=>{this._mouseTouchFinish()}),n.pH)},this._handleThemeChange=t=>{const i=t,e=this.container,s=e.options,n=s.defaultThemes,o=i.matches?n.dark:n.light,a=s.themes.find((t=>t.name===o));a?.default.auto&&e.loadTheme(o)},this._handleVisibilityChange=()=>{const t=this.container,i=t.actualOptions;this._mouseTouchFinish(),i.pauseOnBlur&&((0,a.T5)().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*n.Xu)},this._manageInteractivityListeners=(t,i)=>{const e=this._handlers,s=this.container,o=s.actualOptions,a=s.interactivity.element;if(!a)return;const r=a,h=s.canvas;h.setPointerEvents(r===h.element?"initial":"none"),(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(p(a,n.Rb,e.mouseMove,i),p(a,n.s7,e.touchStart,i),p(a,n.DG,e.touchMove,i),o.interactivity.events.onClick.enable?(p(a,n.Bp,e.touchEndClick,i),p(a,n.vo,e.mouseUp,i),p(a,n.ms,e.mouseDown,i)):p(a,n.Bp,e.touchEnd,i),p(a,t,e.mouseLeave,i),p(a,n.G3,e.touchCancel,i))},this._manageListeners=t=>{const i=this._handlers,e=this.container,s=e.actualOptions.interactivity.detectsOn,o=e.canvas.element;let a=n.Z0;s===d.h.window?(e.interactivity.element=window,a=n.sf):s===d.h.parent&&o?e.interactivity.element=o.parentElement??o.parentNode:e.interactivity.element=o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(a,t),p(document,n.nK,i.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const i=this._handlers;this._matchMedia&&p(this._matchMedia,"change",i.themeChange,t)},this._manageResize=t=>{const i=this._handlers,e=this.container;if(!e.actualOptions.interactivity.events.resize.enable)return;if("undefined"==typeof ResizeObserver)return void p(globalThis,n.NF,i.resize,t);const s=e.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container,{mouse:i}=t;i.clicking=!0,i.downPosition=i.position},this._mouseTouchClick=t=>{const i=this.container,e=i.actualOptions,{mouse:s}=i.interactivity;s.inside=!0;let n=!1;const o=s.position;if(o&&e.interactivity.events.onClick.enable){for(const t of i.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const{interactivity:t}=this.container,{mouse:i}=t;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=n.Z0,i.inside=!1,i.clicking=!1},this._mouseTouchMove=t=>{const i=this.container,e=i.actualOptions,s=i.interactivity,o=i.canvas.element;if(!s.element)return;let a;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const i=t;if(s.element===window){if(o){const t=o.getBoundingClientRect();a={x:i.clientX-t.left,y:i.clientY-t.top}}}else if(e.interactivity.detectsOn===d.h.parent){const t=i.target,e=i.currentTarget;if(o){const s=t.getBoundingClientRect(),r=e.getBoundingClientRect(),h=o.getBoundingClientRect();a={x:i.offsetX+n.gd*s.left-(r.left+h.left),y:i.offsetY+n.gd*s.top-(r.top+h.top)}}else a={x:i.offsetX,y:i.offsetY}}else i.target===o&&(a={x:i.offsetX,y:i.offsetY})}else if(this._canPush="touchmove"!==t.type,o){const i=t,e=i.touches[i.touches.length-n.K3],s=o.getBoundingClientRect();if(!e)return;a={x:e.clientX-s.left,y:e.clientY-s.top}}const r=i.retina.pixelRatio;a&&(a.x*=r,a.y*=r),s.mouse.position=a,s.status=n.Rb},this._touchEnd=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._matchMedia=(0,a.lV)("(prefers-color-scheme: dark)"),this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()},themeChange:t=>{this._handleThemeChange(t)},oldThemeChange:t=>{this._handleThemeChange(t)},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}var _=e(622),g=e(4805),v=e(4723);class m{constructor(t,i){this.container=i,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&i.interact(t)}handleClickMode(t){for(const i of this._externalInteractors)i.handleClickMode?.(t)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case v.e.external:this._externalInteractors.push(t);break;case v.e.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&e.interact(t,i)}reset(t){for(const i of this._externalInteractors)i.isEnabled()&&i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&i.reset(t)}}var y=e(5511),w=e(7023),b=e(5368),z=e(6657),P=e(1176),x=e(5608),C=e(1896);function k(t){if(!(0,a.hn)(t.outMode,t.checkModes))return;const i=t.radius*n.gd;t.coord>t.maxCoord-i?t.setCb(-t.radius):t.coord<i&&t.setCb(t.radius)}class M{constructor(t,i){this.container=i,this._calcPosition=(t,i,e,o=n.rq)=>{const a=t.plugins.values();for(const t of a){const s=t.particlePosition?.(i,this);if(s)return w.p.create(s.x,s.y,e)}const r=t.canvas.size,h=(0,s.Nx)({size:r,position:i}),c=w.p.create(h.x,h.y,e),l=this.getRadius(),d=this.options.move.outModes,u=i=>{k({outMode:i,checkModes:[P.Y.bounce],coord:c.x,maxCoord:t.canvas.size.width,setCb:t=>c.x+=t,radius:l})},p=i=>{k({outMode:i,checkModes:[P.Y.bounce],coord:c.y,maxCoord:t.canvas.size.height,setCb:t=>c.y+=t,radius:l})};u(d.left??d.default),u(d.right??d.default),p(d.top??d.default),p(d.bottom??d.default);let f=!0;for(const t of a)if(f=t.checkParticlePosition?.(this,c,o),!1===f)break;return f?c:this._calcPosition(t,void 0,e,o+n.Eo)},this._calculateVelocity=()=>{const t=(0,s.$m)(this.direction).copy(),i=this.options.move;if(i.direction===z.F.inside||i.direction===z.F.outside)return t;const e=(0,s.pu)((0,s.VG)(i.angle.value)),o=(0,s.pu)((0,s.VG)(i.angle.offset)),a={left:o-e*n.MX,right:o+e*n.MX};return i.straight||(t.angle+=(0,s.vE)((0,s.DT)(a.left,a.right))),i.random&&"number"==typeof i.speed&&(t.length*=(0,s.G0)()),t},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const i=this.roll.horizontal&&this.roll.vertical?n.gd*n.l:n.l,e=this.roll.horizontal?Math.PI*n.MX:n.dv;return Math.floor((this.roll.angle+e)/(Math.PI/i))%n.gd?this.backColor?this.backColor:this.roll.alter?(0,o.yx)(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const i=this.container,e=(0,s.VG)(this.options.zIndex.value);this.position=this._calcPosition(i,t,(0,s.qE)(e,n.X_,i.zLayers)),this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...(0,a.E9)(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=(0,s.JY)(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case z.F.inside:this.outType=x.x.inside;break;case z.F.outside:this.outType=x.x.outside}this.offset=w.M.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.container,e=this.pathGenerator,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const e of i.plugins.values())e.particleDestroyed?.(this,t);for(const e of i.particles.updaters)e.particleDestroyed?.(this,t);e?.reset(this),this._engine.dispatchEvent(_.B.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const i=this.container,e=i.canvas;for(const s of i.plugins.values())e.drawParticlePlugin(s,this,t);e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:n.tA)}getFillColor(){return this._getRollColor(this.bubble.color??(0,r.O_)(this.color))}getMass(){return this.getRadius()**n.dm*Math.PI*n.MX}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??(0,r.O_)(this.strokeColor))}init(t,i,e,o){const r=this.container,h=this._engine;this.id=t,this.group=o,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=x.x.normal,this.ignoresResizeRatio=!0;const c=r.retina.pixelRatio,l=r.actualOptions,d=(0,C.y)(this._engine,r,l.particles),u=d.reduceDuplicates,p=d.effect.type,f=d.shape.type;this.effect=(0,a.TA)(p,this.id,u),this.shape=(0,a.TA)(f,this.id,u);const _=d.effect,g=d.shape;if(e){if(e.effect?.type){const t=e.effect.type,i=(0,a.TA)(t,this.id,u);i&&(this.effect=i,_.load(e.effect))}if(e.shape?.type){const t=e.shape.type,i=(0,a.TA)(t,this.id,u);i&&(this.shape=i,g.load(e.shape))}}if(this.effect===n.mR){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor((0,s.G0)()*t.length)]}if(this.shape===n.mR){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor((0,s.G0)()*t.length)]}this.effectData=this.effect?function(t,i,e,s){const n=i.options[t];return(0,a.zw)({close:i.close,fill:i.fill},(0,a.TA)(n,e,s))}(this.effect,_,this.id,u):void 0,this.shapeData=this.shape?function(t,i,e,s){const n=i.options[t];return(0,a.zw)({close:i.close,fill:i.fill},(0,a.TA)(n,e,s))}(this.shape,g,this.id,u):void 0,d.load(e);const v=this.effectData;v&&d.load(v.particles);const m=this.shapeData;m&&d.load(m.particles);const y=new b.k(h,r);y.load(r.actualOptions.interactivity),y.load(d.interactivity),this.interactivity=y,this.effectFill=v?.fill??d.effect.fill,this.effectClose=v?.close??d.effect.close,this.shapeFill=m?.fill??d.shape.fill,this.shapeClose=m?.close??d.shape.close,this.options=d;const w=this.options.move.path;this.pathDelay=(0,s.VG)(w.delay.value)*n.Xu,w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&r.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(r)),r.retina.initParticle(this),this.size=(0,a.Xs)(this.options.size,c),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=n.WH-(0,s.VG)(this.options.move.decay);const z=r.particles;let P,k;z.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/r.zLayers,this.sides=24,this.effect&&(P=r.effectDrawers.get(this.effect),P||(P=this._engine.getEffectDrawer(this.effect),P&&r.effectDrawers.set(this.effect,P))),P?.loadEffect&&P.loadEffect(this),this.shape&&(k=r.shapeDrawers.get(this.shape),k||(k=this._engine.getShapeDrawer(this.shape),k&&r.shapeDrawers.set(this.shape,k))),k?.loadShape&&k.loadShape(this);const M=k?.getSidesCount;M&&(this.sides=M(this)),this.spawning=!1;for(const t of z.updaters)t.init(this);for(const t of z.movers)t.init(this);P?.particleInit?.(r,this),k?.particleInit?.(r,this);for(const t of r.plugins.values())t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size,e=this.position;return e.x>=-t&&e.y>=-t&&e.y<=i.height+t&&e.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}var O=e(1989),T=e(5189);class S{constructor(t,i){this.rectangle=t,this.capacity=i,this._subdivide=()=>{const{x:t,y:i}=this.rectangle.position,{width:e,height:s}=this.rectangle.size,{capacity:o}=this;for(let a=0;a<n.Pg;a++){const r=a%n.gd;this._subs.push(new S(new T.M_(t+e*n.MX*r,i+s*n.MX*(Math.round(a*n.MX)-r),e*n.MX,s*n.MX),o))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((i=>i.insert(t)))))}query(t,i){const e=[];if(!t.intersects(this.rectangle))return[];for(const n of this._points)!t.contains(n.position)&&(0,s.Yf)(t.position,n.position)>n.particle.getRadius()&&(!i||i(n.particle))||e.push(n.particle);if(this._divided)for(const s of this._subs)e.push(...s.query(t,i));return e}queryCircle(t,i,e){return this.query(new T.jl(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new T.M_(t.x,t.y,i.width,i.height),e)}}var D=e(7452);const R=t=>{const{height:i,width:e}=t;return new T.M_(n.un*e,n.un*i,n.Rh*e,n.Rh*i)};class I{constructor(t,i){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,i,e,s)=>{const o=t.number;if(!o.density.enable)return void(void 0===e?this._limit=o.limit.value:(s?.number.limit.value??o.limit.value)&&this._groupLimits.set(e,s?.number.limit.value??o.limit.value));const a=this._initDensityFactor(o.density),r=o.value,h=o.limit.value>n.ou?o.limit.value:r,c=Math.min(r,h)*a+i,l=Math.min(this.count,this.filter((t=>t.group===e)).length);void 0===e?this._limit=o.limit.value*a:this._groupLimits.set(e,o.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,e):l>c&&this.removeQuantity(l-c,e)},this._initDensityFactor=t=>{const i=this._container;if(!i.canvas.element||!t.enable)return n.lA;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.height*t.width*s**n.dm)},this._pushParticle=(t,i,e,s)=>{try{const n=this._pool.pop()??new M(this._engine,this._container);n.init(this._nextId,t,i,e);let o=!0;if(s&&(o=s(n)),!o)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(_.B.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){(0,D.t)().warning(`error adding particle: ${t}`)}},this._removeParticle=(t,i,e)=>{const s=this._array[t];if(!s)return!1;if(s.group!==i)return!1;const o=this._zArray.indexOf(s);return this._array.splice(t,n.LD),this._zArray.splice(o,n.LD),s.destroy(e),this._engine.dispatchEvent(_.B.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=i,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new m(t,i),this._pluginsInitialized=!1;const e=i.canvas.size;this.quadTree=new S(R(e),n.Kw),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((i=>this.addParticle(i.position?(0,a.E9)(i.position,t.canvas.size):void 0,i.options)))}addParticle(t,i,e,s){const o=this._container.actualOptions.particles.number.limit.mode,a=void 0===e?this._limit:this._groupLimits.get(e)??this._limit,r=this.count;if(a>n.ou)switch(o){case y.d.delete:{const t=r+n.nq-a;t>n.wM&&this.removeQuantity(t);break}case y.d.wait:if(r>=a)return}return this._pushParticle(t,i,e,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}drawParticles(t){for(const i of this._zArray)i.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,i=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let e=!1;for(const i of t.plugins.values())if(e=i.particlesInitialization?.()??e,e)break;if(this.addManualParticles(),!e){const t=i.particles,e=t.groups;for(const i in e){const s=e[i];if(s)for(let e=this.count,n=0;n<s.number.value&&e<t.number.value;e++,n++)this.addParticle(void 0,s,i)}for(let i=this.count;i<t.number.value;i++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const i of t.pathGenerators.values())i.init(t)}push(t,i,e,s){for(let n=0;n<t;n++)this.addParticle(i?.position,e,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.drawParticles({value:0,factor:0})}remove(t,i,e){this.removeAt(this._array.indexOf(t),void 0,i,e)}removeAt(t,i=n.xd,e,s){if(t<n.z9||t>this.count)return;let o=0;for(let n=t;o<i&&n<this.count;n++)this._removeParticle(n,e,s)&&(n--,o++)}removeQuantity(t,i){this.removeAt(n.z9,t,i)}setDensity(){const t=this._container.actualOptions,i=t.particles.groups,e=t.manualParticles.length;for(const t in i){const s=i[t];if(!s)continue;const n=(0,C.y)(this._engine,this._container,s);this._applyDensity(n,e,t)}this._applyDensity(t.particles,e)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const i=this._container,e=new Set;this.quadTree=new S(R(i.canvas.size),n.Kw);for(const t of i.pathGenerators.values())t.update();for(const e of i.plugins.values())e.update?.(t);const s=this._resizeFactor;for(const i of this._array){s&&!i.ignoresResizeRatio&&(i.position.x*=s.width,i.position.y*=s.height,i.initialPosition.x*=s.width,i.initialPosition.y*=s.height),i.ignoresResizeRatio=!1,this._interactionManager.reset(i);for(const e of this._container.plugins.values()){if(i.destroyed)break;e.particleUpdate?.(i,t)}for(const e of this.movers)e.isEnabled(i)&&e.move(i,t);i.destroyed?e.add(i):this.quadTree.insert(new O.b(i.getPosition(),i))}if(e.size){const t=t=>!e.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of e)this._engine.dispatchEvent(_.B.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...e)}this._interactionManager.externalInteract(t);for(const i of this._array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||this._interactionManager.particlesInteract(i,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id));const i=t[t.length-n.K3];if(!i)return;this._lastZIndex=i.position.z,this._needsSort=!1}}}class E{constructor(t){this.container=t,this.pixelRatio=n.$x,this.reduceFactor=n.Zp}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=i.detectRetina?devicePixelRatio:n.$x,this.reduceFactor=n.Zp;const e=this.pixelRatio,o=t.canvas;if(o.element){const t=o.element;o.size.width=t.offsetWidth*e,o.size.height=t.offsetHeight*e}const a=i.particles,r=a.move;this.maxSpeed=(0,s.VG)(r.gravity.maxSpeed)*e,this.sizeAnimationSpeed=(0,s.VG)(a.size.animation.speed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,n=i.move,o=n.distance,a=t.retina;a.moveDrift=(0,s.VG)(n.drift)*e,a.moveSpeed=(0,s.VG)(n.speed)*e,a.sizeAnimationSpeed=(0,s.VG)(i.size.animation.speed)*e;const r=a.maxDistance;r.horizontal=void 0!==o.horizontal?o.horizontal*e:void 0,r.vertical=void 0!==o.vertical?o.vertical*e:void 0,a.maxSpeed=(0,s.VG)(n.gravity.maxSpeed)*e}}function F(t){return!t.destroyed}function L(t,i,...e){const s=new g.J(t,i);return(0,C.Z)(s,...e),s}class A{constructor(t,i,e){this._intersectionManager=t=>{if(F(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+n.Xu/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const i=function(t,i=n.z$,e=!1){return{value:t,factor:e?n.z$/i:n.z$*t/n.Xu}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(i.value),this._lastFrameTime=t,i.value>n.Xu)return void this.draw(!1);if(this.canvas.drawParticles(i),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){(0,D.t)().error("error in animation loop",t)}},this._engine=t,this.id=Symbol(i),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new E(this),this.canvas=new l(this,this._engine),this.particles=new I(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=L(this._engine,this),this.actualOptions=L(this._engine,this),this._eventListeners=new f(this),this._intersectionObserver=(0,a.BR)((t=>{this._intersectionManager(t)})),this._engine.dispatchEvent(_.B.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&F(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!F(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!F(this))return;const n=this.retina.pixelRatio,o={x:e.x*n,y:e.y*n},a=this.particles.quadTree.queryCircle(o,s*n);t(i,a)};let s=!1,o=!1;this._clickHandlers.set("click",(t=>{if(!F(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,n.FS)})),this._clickHandlers.set("touchstart",(()=>{F(this)&&(s=!0,o=!1)})),this._clickHandlers.set("touchmove",(()=>{F(this)&&(o=!0)})),this._clickHandlers.set("touchend",(t=>{if(F(this)){if(s&&!o){const i=t,s=i.touches[i.touches.length-n.KZ];if(!s)return;const o=this.canvas.element,a=o?o.getBoundingClientRect():void 0,r={x:s.clientX-(a?a.left:n.TL),y:s.clientY-(a?a.top:n.TL)};e(t,r,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),this._clickHandlers.set("touchcancel",(()=>{F(this)&&(s=!1,o=!1)}));for(const[t,e]of this._clickHandlers)i.addEventListener(t,e)}addLifeTime(t){this._lifeTime+=t}addPath(t,i,e=!1){return!(!F(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,i),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(F(this)){for(const[t,i]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,i);this._clickHandlers.clear()}}destroy(t=!0){if(F(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);for(const t of this.shapeDrawers.values())t.destroy?.(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);if(this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,i=t.findIndex((t=>t===this));i>=n.vF&&t.splice(i,n.JC)}this._engine.dispatchEvent(_.B.containerDestroyed,{container:this})}}draw(t){if(!F(this))return;let i=t;const e=t=>{i&&(this._lastFrameTime=void 0,i=!1),this._nextFrame(t)};this._drawAnimationFrame=(0,s.i0)((t=>{e(t)}))}async export(t,i={}){for(const e of this.plugins.values()){if(!e.export)continue;const s=await e.export(t,i);if(s.supported)return s.blob}(0,D.t)().error(`Export plugin with type ${t} not found`)}handleClickMode(t){if(F(this)){this.particles.handleClickMode(t);for(const i of this.plugins.values())i.handleClickMode?.(t)}}async init(){if(!F(this))return;const t=this._engine.getSupportedEffects();for(const i of t){const t=this._engine.getEffectDrawer(i);t&&this.effectDrawers.set(i,t)}const i=this._engine.getSupportedShapes();for(const t of i){const i=this._engine.getShapeDrawer(t);i&&this.shapeDrawers.set(t,i)}await this.particles.initPlugins(),this._options=L(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=L(this._engine,this,this._options);const e=await this._engine.getAvailablePlugins(this);for(const[t,i]of e)this.plugins.set(t,i);this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:o,duration:a,fpsLimit:r,hdr:h,smooth:c,zLayers:l}=this.actualOptions;this.hdr=h,this.zLayers=l,this._duration=(0,s.VG)(a)*n.Xu,this._delay=(0,s.VG)(o)*n.Xu,this._lifeTime=0,this.fpsLimit=r>n.DN?r:n.i8,this._smooth=c;for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));for(const t of this.plugins.values())await(t.init?.());this._engine.dispatchEvent(_.B.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(_.B.particlesSetup,{container:this})}async loadTheme(t){F(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(F(this)&&(void 0!==this._drawAnimationFrame&&((0,s.px)(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(_.B.containerPaused,{container:this})}}play(t){if(!F(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(_.B.containerPlay,{container:this}),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(F(this))return this.stop(),this.start()}async reset(t){if(F(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=L(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=L(this._engine,this,this._options),this.refresh()}async start(){F(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const i=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values())await(t.start?.());this._engine.dispatchEvent(_.B.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{i()}),this._delay)})))}stop(){if(F(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const t of this.plugins.values())t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(_.B.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8182.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8182.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8182],{8182(e,a,n){function t(e){e.checkVersion("4.0.0-alpha.1"),e.register((async e=>{const{HexColorManager:a}=await n.e(7321).then(n.bind(n,7321));e.addColorManager(new a)}))}n.d(a,{loadHexColorPlugin:()=>t})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8204.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8204.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8204],{8204(e,t,i){i.d(t,{MotionPlugin:()=>s});var o=i(6474);class a{constructor(){this.factor=4,this.value=!0}load(e){(0,o.kZJ)(e)||(void 0!==e.factor&&(this.factor=e.factor),void 0!==e.value&&(this.value=e.value))}}class n{constructor(){this.disable=!0,this.reduce=new a}load(e){(0,o.kZJ)(e)||(void 0!==e.disable&&(this.disable=e.disable),this.reduce.load(e.reduce))}}class r{constructor(e){this._handleMotionChange=e=>{const t=this._container,i=t.actualOptions.motion;i&&(e.matches?i.disable?t.retina.reduceFactor=0:t.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:t.retina.reduceFactor=1)},this._container=e}async init(){const e=this._container,t=e.actualOptions.motion;if(!t||!t.disable&&!t.reduce.value)return void(e.retina.reduceFactor=1);const i=(0,o.lVH)("(prefers-reduced-motion: reduce)");if(!i)return void(e.retina.reduceFactor=1);this._handleMotionChange(i);i.addEventListener("change",(()=>{(async()=>{this._handleMotionChange(i);try{await e.refresh()}catch{}})()})),await Promise.resolve()}}class s{constructor(){this.id="motion"}getPlugin(e){return Promise.resolve(new r(e))}loadOptions(e,t){if(!this.needsPlugin())return;let i=e.motion;i?.load||(e.motion=i=new n),i.load(t?.motion)}needsPlugin(){return!0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8230.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8230.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8230],{8230(e,t,r){r.d(t,{d:()=>s,downloadSvgImage:()=>i,loadImage:()=>a});var n=r(6474);const o=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function a(e){return new Promise((t=>{e.loading=!0;const r=new Image;e.element=r,r.addEventListener("load",(()=>{e.loading=!1,t()})),r.addEventListener("error",(()=>{e.element=void 0,e.error=!0,e.loading=!1,(0,n.tZQ)().error(`Error loading image: ${e.source}`),t()})),r.src=e.source}))}async function i(e){if("svg"!==e.type)return void await a(e);e.loading=!0;const t=await fetch(e.source);t.ok?e.svgData=await t.text():((0,n.tZQ)().error("Image not found"),e.error=!0),e.loading=!1}function s(e,t,r,i,s=!1){const c=function(e,t,r,a=!1){const{svgData:i}=e;if(!i)return"";const s=(0,n.LCf)(t,a,r);if(i.includes("fill"))return i.replace(o,(()=>s));const c=i.indexOf(">");return`${i.substring(0,c)} fill="${s}"${i.substring(c)}`}(e,r,i.opacity?.value??1,s),d={color:r,gif:t.gif,data:{...e,svgData:c},loaded:!1,ratio:t.width/t.height,replaceColor:t.replaceColor,source:t.src};return new Promise((t=>{const r=new Blob([c],{type:"image/svg+xml"}),n=URL.createObjectURL(r),o=new Image;o.addEventListener("load",(()=>{d.loaded=!0,d.element=o,t(d),URL.revokeObjectURL(n)}));o.addEventListener("error",(()=>{(async()=>{URL.revokeObjectURL(n);const r={...e,error:!1,loading:!0};await a(r),d.loaded=!0,d.element=r.element,t(d)})()})),o.src=n}))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8420.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8420.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8420],{8420(e,t,a){function s(e){e.checkVersion("4.0.0-alpha.1"),e.register((e=>{e.addMover("base",(async()=>{const{BaseMover:e}=await a.e(4606).then(a.bind(a,4606));return new e}))}))}a.d(t,{loadBaseMover:()=>s})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8440.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8440.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8440],{8440(e,t,a){function c(e){e.checkVersion("4.0.0-alpha.1"),e.register((async e=>{const{CircleDrawer:t}=await a.e(704).then(a.bind(a,704));e.addShape(new t)}))}a.d(t,{loadCircleShape:()=>c})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/869.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 869.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[869],{869(o,t,e){e.d(t,{ColorUpdater:()=>n});var i=e(6474);class n{constructor(o,t){this._container=t,this._engine=o}init(o){const t=(0,i.R5R)(this._engine,o.options.color,o.id,o.options.reduceDuplicates);t&&(o.color=(0,i.pzy)(t,o.options.color.animation,this._container.retina.reduceFactor))}isEnabled(o){const{h:t,s:e,l:i}=o.options.color.animation,{color:n}=o;return!o.destroyed&&!o.spawning&&(void 0!==n?.h.value&&t.enable||void 0!==n?.s.value&&e.enable||void 0!==n?.l.value&&i.enable)}update(o,t){(0,i.JvX)(o.color,t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/8930.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8930.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[8930],{8930(t,i,s){s.d(i,{EmittersPlugin:()=>m});var e=s(6474);class o{constructor(){this.wait=!1}load(t){(0,e.kZJ)(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=(0,e.DT4)(t.delay)),void 0!==t.duration&&(this.duration=(0,e.DT4)(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class n{constructor(){this.quantity=1,this.delay=.1}load(t){(0,e.kZJ)(t)||(void 0!==t.quantity&&(this.quantity=(0,e.DT4)(t.quantity)),void 0!==t.delay&&(this.delay=(0,e.DT4)(t.delay)))}}class a{constructor(){this.color=!1,this.opacity=!1}load(t){(0,e.kZJ)(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class r{constructor(){this.options={},this.replace=new a,this.type="square"}load(t){(0,e.kZJ)(t)||(void 0!==t.options&&(this.options=(0,e.zwS)({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class h{constructor(){this.mode=e.qiC.percent,this.height=0,this.width=0}load(t){(0,e.kZJ)(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class l{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new o,this.rate=new n,this.shape=new r,this.startCount=0}load(t){(0,e.kZJ)(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size??=new h,this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=(0,e.wJ2)(t.particles,(t=>(0,e.zwS)({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=(0,e.DT4)(t.position.x)),void 0!==t.position.y&&(this.position.y=(0,e.DT4)(t.position.y))),void 0!==t.spawnColor&&(this.spawnColor??=new e.A9e,this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var c=s(739);function d(t,i){t.color?t.color.value=i:t.color={value:i}}class p{constructor(t,i,s,o,n){this.emitters=i,this.container=s,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life.duration?(0,e.VGA)(this.options.life.duration):void 0;(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*e.XuV)},this._setColorAnimation=(t,i,s,o=1)=>{const n=this.container;if(!t.enable)return i;const a=(0,e.vEz)(t.offset),r=(0,e.VGA)(this.options.rate.delay),h=n.retina.reduceFactor?r*e.XuV/n.retina.reduceFactor:1/0;return(i+(0,e.VGA)(t.speed)*n.fpsLimit/h+a*o)%s},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,o instanceof l?this.options=o:(this.options=new l,this.options.load(o)),this._spawnDelay=s.retina.reduceFactor?(0,e.VGA)(this.options.life.delay??0)*e.XuV/s.retina.reduceFactor:1/0,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;const a=(0,e.zwS)({},this.options.particles);if(a.move??={},a.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=(0,e.R5R)(this._engine,this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=a,this._size=this._calcSize(),this.size=(0,e.YCE)(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=(0,e.T5G)().getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const r=this.options.shape,h=this._engine.emitterShapeManager?.getShapeGenerator(r.type);h&&(this._shape=h.generate(this.position,this.size,this.fill,r.options)),this._engine.dispatchEvent("emitterCreated",{container:s,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(this._paused)return;if(!(this._lifeCount>0||this._immortal)&&this.options.life.count||!(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0)))return;const t=this.container;if(void 0===this._emitDelay){const i=(0,e.VGA)(this.options.rate.delay);this._emitDelay=t.retina.reduceFactor?i*e.XuV/t.retina.reduceFactor:1/0}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}resize(){const t=this._initialPosition,i=this.container;this.position=t&&(0,e.Tj8)(t,i.canvas.size,e.Miz.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=(0,e.YCE)(this._size,i.canvas.size),this._shape?.resize(this.position,this.size)}update(t){if(this._paused)return;const i=this.container;this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=i.retina.reduceFactor?(0,e.VGA)(this.options.life.delay??0)*e.XuV/i.retina.reduceFactor:1/0):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay))}_calcPosition(){const t=this.container;if(this.options.domId){const i=(0,e.T5G)().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect(),o=t.retina.pixelRatio;return{x:(s.x+s.width*e.MXx)*o,y:(s.y+s.height*e.MXx)*o}}}return(0,e.l1q)({size:t.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const i=(0,e.T5G)().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*t.retina.pixelRatio,height:s.height*t.retina.pixelRatio,mode:e.qiC.precise}}}return this.options.size??(()=>{const t=new h;return t.load({height:0,mode:e.qiC.percent,width:0}),t})()}_emit(){if(this._paused)return;const t=(0,e.VGA)(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const i=(0,e.TA3)(this._particlesOptions),s=this.container.retina.reduceFactor;for(let o=0;o<t*s;o++){const t=(0,e.zwS)({},i);if(this.spawnColor){const i=this.options.spawnColor?.animation;if(i){const t={h:e.vSh,s:e.euA,l:e.$_c},s=3.6;this.spawnColor.h=this._setColorAnimation(i.h,this.spawnColor.h,t.h,s),this.spawnColor.s=this._setColorAnimation(i.s,this.spawnColor.s,t.s),this.spawnColor.l=this._setColorAnimation(i.l,this.spawnColor.l,t.l)}d(t,this.spawnColor)}const s=this.options.shape;let o=this.position;if(this._shape){const i=this._shape.randomPosition();if(i){o=i.position;const e=s.replace;e.color&&i.color&&d(t,i.color),e.opacity&&(t.opacity?t.opacity.value=i.opacity:t.opacity={value:i.opacity})}else o=null}o&&this.container.particles.addParticle(o,t)}}}class u{constructor(t,i){this.container=i,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]};i.getEmitter=t=>void 0===t||(0,e.EtT)(t)?this.array[t??0]:this.array.find((i=>i.name===t)),i.addEmitter=async(t,i)=>this.addEmitter(t,i),i.removeEmitter=t=>{const s=i.getEmitter(t);s&&this.removeEmitter(s)},i.playEmitter=t=>{const s=i.getEmitter(t);s&&s.externalPlay()},i.pauseEmitter=t=>{const s=i.getEmitter(t);s&&s.externalPause()}}async addEmitter(t,i){const s=new l;s.load(t);const e=new p(this._engine,this,this.container,s,i);return await e.init(),this.array.push(e),e}handleClickMode(t){const i=this.interactivityEmitters;if(t!==c.c.emitter)return;let s;if((0,e.cyL)(i.value)){const t=0;if(i.value.length>t&&i.random.enable){s=[];const t=[];for(let o=0;o<i.random.count;o++){const n=(0,e.n02)(i.value);if(t.includes(n)&&t.length<i.value.length){o--;continue}t.push(n);const a=(0,e.Vh1)(i.value,n);a&&s.push(a)}}else s=i.value}else s=i.value;const o=s,n=this.container.interactivity.mouse.clickPosition;(0,e.wJ2)(o,(async t=>{await this.addEmitter(t,n)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,(0,e.cyL)(this.emitters))for(const t of this.emitters)await this.addEmitter(t);else await this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}update(t){for(const i of this.array)i.update(t)}}class m{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return Promise.resolve(new u(this._engine,t))}loadOptions(t,i){if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;i?.emitters&&(t.emitters=(0,e.wJ2)(i.emitters,(t=>{const i=new l;return i.load(t),i})));const s=i?.interactivity?.modes?.emitters;if(s)if((0,e.cyL)(s))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:s.map((t=>{const i=new l;return i.load(t),i}))};else{const i=s;if((0,e.cyL)(i.value))t.interactivity.modes.emitters={random:{count:i.random.count,enable:i.random.enable},value:i.value.map((t=>{const i=new l;return i.load(t),i}))};else{const s=new l;s.load(i.value),t.interactivity.modes.emitters={random:{count:i.random.count,enable:i.random.enable},value:s}}}}needsPlugin(t){if(!t)return!1;const i=t.emitters;return(0,e.cyL)(i)&&!!i.length||void 0!==i||!!t.interactivity?.events?.onClick?.mode&&(0,e.hnD)(c.c.emitter,t.interactivity.events.onClick.mode)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/9287.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9287.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[9287],{9287(e,t,n){n.d(t,{WobbleUpdater:()=>d});var s=n(6474);class a{constructor(){this.angle=50,this.move=10}load(e){(0,s.kZJ)(e)||(void 0!==e.angle&&(this.angle=(0,s.DT4)(e.angle)),void 0!==e.move&&(this.move=(0,s.DT4)(e.move)))}}class o{constructor(){this.distance=5,this.enable=!1,this.speed=new a}load(e){if(!(0,s.kZJ)(e)&&(void 0!==e.distance&&(this.distance=(0,s.DT4)(e.distance)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed))if((0,s.EtT)(e.speed))this.speed.load({angle:e.speed});else{const t=e.speed;Object.hasOwn(t,"min")?this.speed.load({angle:t}):this.speed.load(e.speed)}}}const i=2*Math.PI;const l=2*Math.PI;class d{constructor(e){this.container=e}init(e){const t=e.options.wobble;e.wobble=t?.enable?{angle:(0,s.G0i)()*l,angleSpeed:(0,s.VGA)(t.speed.angle)/360,moveSpeed:(0,s.VGA)(t.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},e.retina.wobbleDistance=(0,s.VGA)(t?.distance??0)*this.container.retina.pixelRatio}isEnabled(e){return!e.destroyed&&!e.spawning&&!!e.options.wobble?.enable}loadOptions(e,...t){e.wobble??=new o;for(const n of t)e.wobble.load(n?.wobble)}update(e,t){this.isEnabled(e)&&function(e,t){const{wobble:n}=e.options,{container:a,wobble:o}=e;if(!n?.enable||!o)return;const l=a.retina.reduceFactor,d=o.angleSpeed*t.factor*l,c=o.moveSpeed*t.factor*l*(e.retina.wobbleDistance??0)/(s.XuV/60),b=i,{position:p}=e;o.angle+=d,o.angle>b&&(o.angle-=b),p.x+=c*Math.cos(o.angle),p.y+=c*Math.abs(Math.sin(o.angle))}(e,t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/9661.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9661.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[9661],{739(e,t,a){var n;a.d(t,{c:()=>n}),function(e){e.emitter="emitter"}(n||(n={}))},9661(e,t,a){a.d(t,{loadEmittersPlugin:()=>n});a(739);function n(e){e.checkVersion("4.0.0-alpha.1"),e.register((async e=>{const{ShapeManager:t}=await a.e(5885).then(a.bind(a,5885)),{EmittersPlugin:n}=await a.e(8930).then(a.bind(a,8930));e.emitterShapeManager??=new t,e.addEmitterShapeGenerator??=(t,a)=>{e.emitterShapeManager?.addShapeGenerator(t,a)};const i=new n(e);e.addPlugin(i)}))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/9754.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9754.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[9754],{9754(t,s,e){e.d(s,{SquareDrawer:()=>r});const c=Math.sqrt(2);class r{constructor(){this.validTypes=["edge","square"]}draw(t){!function(t){const{context:s,radius:e}=t,r=e/c,a=2*r;s.rect(-r,-r,a,a)}(t)}getSidesCount(){return 4}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/9825.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9825.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[9825],{2348(t,e,n){n.d(e,{L:()=>r});var o=n(6474);const s=0,a=0;class r{draw(t){const{particle:e,radius:n}=t;!function(t,e,n){const{context:r}=t,i=n.count.numerator*n.count.denominator,c=n.count.numerator/n.count.denominator,u=180*(c-2)/c,d=Math.PI-(0,o.puj)(u);r.beginPath(),r.translate(e.x,e.y),r.moveTo(s,a);for(let t=0;t<i;t++)r.lineTo(n.length,a),r.translate(n.length,a),r.rotate(d)}(t,this.getCenter(e,n),this.getSidesData(e,n))}getSidesCount(t){const e=t.shapeData;return Math.round((0,o.VGA)(e?.sides??5))}}},9825(t,e,n){n.d(e,{PolygonDrawer:()=>s});var o=n(2348);class s extends o.L{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const n=t.sides;return{count:{denominator:1,numerator:n},length:2.66*e/(n/3)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
package/9907.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9907.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).push([[9907],{9907(t,a,e){function c(t){t.checkVersion("4.0.0-alpha.1"),t.register((t=>{t.addParticleUpdater("opacity",(async t=>{const{OpacityUpdater:a}=await e.e(2885).then(e.bind(e,2885));return new a(t)}))}))}e.d(a,{loadOpacityUpdater:()=>c})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Confetti v4.0.0-alpha.1 by Matteo Bruni */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.1
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["basic_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../basic/dist/browser/index.js"
|
|
21
|
+
/*!**************************************!*\
|
|
22
|
+
!*** ../basic/dist/browser/index.js ***!
|
|
23
|
+
\**************************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadBasic: () => (/* binding */ loadBasic)\n/* harmony export */ });\nfunction loadBasic(engine) {\n engine.checkVersion(\"4.0.0-alpha.1\");\n engine.register(async e => {\n const {\n loadHexColorPlugin\n } = await __webpack_require__.e(/*! import() */ \"plugins_colors_hex_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-hex-color */ \"../../plugins/colors/hex/dist/browser/index.js\")),\n {\n loadHslColorPlugin\n } = await __webpack_require__.e(/*! import() */ \"plugins_colors_hsl_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-hsl-color */ \"../../plugins/colors/hsl/dist/browser/index.js\")),\n {\n loadRgbColorPlugin\n } = await __webpack_require__.e(/*! import() */ \"plugins_colors_rgb_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-rgb-color */ \"../../plugins/colors/rgb/dist/browser/index.js\")),\n {\n loadBaseMover\n } = await __webpack_require__.e(/*! import() */ \"move_base_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/move-base */ \"../../move/base/dist/browser/index.js\")),\n {\n loadCircleShape\n } = await __webpack_require__.e(/*! import() */ \"shapes_circle_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/shape-circle */ \"../../shapes/circle/dist/browser/index.js\")),\n {\n loadColorUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_color_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-color */ \"../../updaters/color/dist/browser/index.js\")),\n {\n loadOpacityUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_opacity_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-opacity */ \"../../updaters/opacity/dist/browser/index.js\")),\n {\n loadOutModesUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-out-modes */ \"../../updaters/outModes/dist/browser/index.js\")),\n {\n loadSizeUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_size_dist_browser_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-size */ \"../../updaters/size/dist/browser/index.js\"));\n loadHexColorPlugin(e);\n loadHslColorPlugin(e);\n loadRgbColorPlugin(e);\n loadBaseMover(e);\n loadCircleShape(e);\n loadColorUpdater(e);\n loadOpacityUpdater(e);\n loadOutModesUpdater(e);\n loadSizeUpdater(e);\n });\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../basic/dist/browser/index.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ }
|
|
29
|
+
|
|
30
|
+
}]);
|
package/browser/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from ".";
|
|
1
|
+
export * from "./index.js";
|
|
2
2
|
export * from "@tsparticles/engine";
|
package/browser/confetti.js
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
|
|
1
|
+
import { isString, millisecondsToSeconds, tsParticles, } from "@tsparticles/engine";
|
|
3
2
|
import { ConfettiOptions } from "./ConfettiOptions.js";
|
|
4
|
-
import { loadBasic } from "@tsparticles/basic";
|
|
5
|
-
import { loadCardsShape } from "@tsparticles/shape-cards";
|
|
6
|
-
import { loadEmojiShape } from "@tsparticles/shape-emoji";
|
|
7
|
-
import { loadHeartShape } from "@tsparticles/shape-heart";
|
|
8
|
-
import { loadImageShape } from "@tsparticles/shape-image";
|
|
9
|
-
import { loadLifeUpdater } from "@tsparticles/updater-life";
|
|
10
|
-
import { loadMotionPlugin } from "@tsparticles/plugin-motion";
|
|
11
|
-
import { loadPolygonShape } from "@tsparticles/shape-polygon";
|
|
12
|
-
import { loadRollUpdater } from "@tsparticles/updater-roll";
|
|
13
|
-
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
|
|
14
|
-
import { loadSquareShape } from "@tsparticles/shape-square";
|
|
15
|
-
import { loadStarShape } from "@tsparticles/shape-star";
|
|
16
|
-
import { loadTiltUpdater } from "@tsparticles/updater-tilt";
|
|
17
|
-
import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
|
|
18
3
|
const defaultGravity = 9.81, sizeFactor = 5, speedFactor = 3, decayOffset = 1, disableRotate = 0, disableTilt = 0;
|
|
19
4
|
let initialized = false;
|
|
20
5
|
let initializing = false;
|
|
@@ -35,22 +20,25 @@ async function initPlugins(engine) {
|
|
|
35
20
|
});
|
|
36
21
|
}
|
|
37
22
|
initializing = true;
|
|
38
|
-
engine.checkVersion("
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
engine.checkVersion("4.0.0-alpha.1");
|
|
24
|
+
engine.register(async (e) => {
|
|
25
|
+
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadMotionPlugin } = await import("@tsparticles/plugin-motion"), { loadCardsShape } = await import("@tsparticles/shape-cards"), { loadHeartShape } = await import("@tsparticles/shape-heart"), { loadImageShape } = await import("@tsparticles/shape-image"), { loadPolygonShape } = await import("@tsparticles/shape-polygon"), { loadSquareShape } = await import("@tsparticles/shape-square"), { loadStarShape } = await import("@tsparticles/shape-star"), { loadEmojiShape } = await import("@tsparticles/shape-emoji"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadRollUpdater } = await import("@tsparticles/updater-roll"), { loadTiltUpdater } = await import("@tsparticles/updater-tilt"), { loadWobbleUpdater } = await import("@tsparticles/updater-wobble"), { loadBasic } = await import("@tsparticles/basic");
|
|
26
|
+
loadEmittersPlugin(e);
|
|
27
|
+
loadMotionPlugin(e);
|
|
28
|
+
loadCardsShape(e);
|
|
29
|
+
loadHeartShape(e);
|
|
30
|
+
loadImageShape(e);
|
|
31
|
+
loadPolygonShape(e);
|
|
32
|
+
loadSquareShape(e);
|
|
33
|
+
loadStarShape(e);
|
|
34
|
+
loadEmojiShape(e);
|
|
35
|
+
loadRotateUpdater(e);
|
|
36
|
+
loadLifeUpdater(e);
|
|
37
|
+
loadRollUpdater(e);
|
|
38
|
+
loadTiltUpdater(e);
|
|
39
|
+
loadWobbleUpdater(e);
|
|
40
|
+
loadBasic(e);
|
|
41
|
+
});
|
|
54
42
|
initializing = false;
|
|
55
43
|
initialized = true;
|
|
56
44
|
}
|
|
@@ -63,7 +51,7 @@ async function setConfetti(params) {
|
|
|
63
51
|
container = ids.get(params.id);
|
|
64
52
|
if (container && !container.destroyed) {
|
|
65
53
|
const alias = container;
|
|
66
|
-
if (alias
|
|
54
|
+
if (Object.hasOwn(alias, "addEmitter")) {
|
|
67
55
|
await alias.addEmitter({
|
|
68
56
|
startCount: actualOptions.count,
|
|
69
57
|
position: actualOptions.position,
|
|
@@ -278,7 +266,6 @@ async function setConfetti(params) {
|
|
|
278
266
|
},
|
|
279
267
|
},
|
|
280
268
|
},
|
|
281
|
-
detectRetina: true,
|
|
282
269
|
motion: {
|
|
283
270
|
disable: actualOptions.disableForReducedMotion,
|
|
284
271
|
},
|
|
@@ -322,9 +309,6 @@ export async function confetti(idOrOptions, confettiOptions) {
|
|
|
322
309
|
});
|
|
323
310
|
}
|
|
324
311
|
confetti.create = async (canvas, options) => {
|
|
325
|
-
if (!canvas) {
|
|
326
|
-
return confetti;
|
|
327
|
-
}
|
|
328
312
|
await initPlugins(tsParticles);
|
|
329
313
|
const id = canvas.getAttribute("id") ?? "confetti";
|
|
330
314
|
canvas.setAttribute("id", id);
|
|
@@ -349,7 +333,5 @@ confetti.create = async (canvas, options) => {
|
|
|
349
333
|
confetti.init = async () => {
|
|
350
334
|
await initPlugins(tsParticles);
|
|
351
335
|
};
|
|
352
|
-
confetti.version = "
|
|
353
|
-
|
|
354
|
-
window.confetti = confetti;
|
|
355
|
-
}
|
|
336
|
+
confetti.version = "4.0.0-alpha.1";
|
|
337
|
+
globalThis.confetti = confetti;
|
package/cjs/ConfettiOptions.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ConfettiOptions = void 0;
|
|
4
|
-
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
class ConfettiOptions {
|
|
1
|
+
import { deepExtend, isArray, isNull, percentDenominator, } from "@tsparticles/engine";
|
|
2
|
+
export class ConfettiOptions {
|
|
6
3
|
constructor() {
|
|
7
4
|
this.angle = 90;
|
|
8
5
|
this.count = 50;
|
|
@@ -26,13 +23,13 @@ class ConfettiOptions {
|
|
|
26
23
|
}
|
|
27
24
|
get origin() {
|
|
28
25
|
return {
|
|
29
|
-
x: this.position.x /
|
|
30
|
-
y: this.position.y /
|
|
26
|
+
x: this.position.x / percentDenominator,
|
|
27
|
+
y: this.position.y / percentDenominator,
|
|
31
28
|
};
|
|
32
29
|
}
|
|
33
30
|
set origin(value) {
|
|
34
|
-
this.position.x = value.x *
|
|
35
|
-
this.position.y = value.y *
|
|
31
|
+
this.position.x = value.x * percentDenominator;
|
|
32
|
+
this.position.y = value.y * percentDenominator;
|
|
36
33
|
}
|
|
37
34
|
get particleCount() {
|
|
38
35
|
return this.count;
|
|
@@ -41,7 +38,7 @@ class ConfettiOptions {
|
|
|
41
38
|
this.count = value;
|
|
42
39
|
}
|
|
43
40
|
load(data) {
|
|
44
|
-
if (
|
|
41
|
+
if (isNull(data)) {
|
|
45
42
|
return;
|
|
46
43
|
}
|
|
47
44
|
if (data.angle !== undefined) {
|
|
@@ -75,8 +72,8 @@ class ConfettiOptions {
|
|
|
75
72
|
const origin = data.origin;
|
|
76
73
|
if (origin && !data.position) {
|
|
77
74
|
data.position = {
|
|
78
|
-
x: origin.x !== undefined ? origin.x *
|
|
79
|
-
y: origin.y !== undefined ? origin.y *
|
|
75
|
+
x: origin.x !== undefined ? origin.x * percentDenominator : undefined,
|
|
76
|
+
y: origin.y !== undefined ? origin.y * percentDenominator : undefined,
|
|
80
77
|
};
|
|
81
78
|
}
|
|
82
79
|
const position = data.position;
|
|
@@ -89,7 +86,7 @@ class ConfettiOptions {
|
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
88
|
if (data.colors !== undefined) {
|
|
92
|
-
if (
|
|
89
|
+
if (isArray(data.colors)) {
|
|
93
90
|
this.colors = [...data.colors];
|
|
94
91
|
}
|
|
95
92
|
else {
|
|
@@ -101,12 +98,12 @@ class ConfettiOptions {
|
|
|
101
98
|
for (const shape in options) {
|
|
102
99
|
const item = options[shape];
|
|
103
100
|
if (item) {
|
|
104
|
-
this.shapeOptions[shape] =
|
|
101
|
+
this.shapeOptions[shape] = deepExtend(this.shapeOptions[shape] ?? {}, item);
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
105
|
if (data.shapes !== undefined) {
|
|
109
|
-
if (
|
|
106
|
+
if (isArray(data.shapes)) {
|
|
110
107
|
this.shapes = [...data.shapes];
|
|
111
108
|
}
|
|
112
109
|
else {
|
|
@@ -124,4 +121,3 @@ class ConfettiOptions {
|
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
}
|
|
127
|
-
exports.ConfettiOptions = ConfettiOptions;
|
package/cjs/IConfettiOptions.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/cjs/bundle.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("."), exports);
|
|
18
|
-
__exportStar(require("@tsparticles/engine"), exports);
|
|
1
|
+
export * from "./index.js";
|
|
2
|
+
export * from "@tsparticles/engine";
|
package/cjs/confetti.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.confetti = confetti;
|
|
4
|
-
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
6
|
-
const ConfettiOptions_js_1 = require("./ConfettiOptions.js");
|
|
7
|
-
const basic_1 = require("@tsparticles/basic");
|
|
8
|
-
const shape_cards_1 = require("@tsparticles/shape-cards");
|
|
9
|
-
const shape_emoji_1 = require("@tsparticles/shape-emoji");
|
|
10
|
-
const shape_heart_1 = require("@tsparticles/shape-heart");
|
|
11
|
-
const shape_image_1 = require("@tsparticles/shape-image");
|
|
12
|
-
const updater_life_1 = require("@tsparticles/updater-life");
|
|
13
|
-
const plugin_motion_1 = require("@tsparticles/plugin-motion");
|
|
14
|
-
const shape_polygon_1 = require("@tsparticles/shape-polygon");
|
|
15
|
-
const updater_roll_1 = require("@tsparticles/updater-roll");
|
|
16
|
-
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
17
|
-
const shape_square_1 = require("@tsparticles/shape-square");
|
|
18
|
-
const shape_star_1 = require("@tsparticles/shape-star");
|
|
19
|
-
const updater_tilt_1 = require("@tsparticles/updater-tilt");
|
|
20
|
-
const updater_wobble_1 = require("@tsparticles/updater-wobble");
|
|
1
|
+
import { isString, millisecondsToSeconds, tsParticles, } from "@tsparticles/engine";
|
|
2
|
+
import { ConfettiOptions } from "./ConfettiOptions.js";
|
|
21
3
|
const defaultGravity = 9.81, sizeFactor = 5, speedFactor = 3, decayOffset = 1, disableRotate = 0, disableTilt = 0;
|
|
22
4
|
let initialized = false;
|
|
23
5
|
let initializing = false;
|
|
@@ -38,35 +20,38 @@ async function initPlugins(engine) {
|
|
|
38
20
|
});
|
|
39
21
|
}
|
|
40
22
|
initializing = true;
|
|
41
|
-
engine.checkVersion("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
23
|
+
engine.checkVersion("4.0.0-alpha.1");
|
|
24
|
+
engine.register(async (e) => {
|
|
25
|
+
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadMotionPlugin } = await import("@tsparticles/plugin-motion"), { loadCardsShape } = await import("@tsparticles/shape-cards"), { loadHeartShape } = await import("@tsparticles/shape-heart"), { loadImageShape } = await import("@tsparticles/shape-image"), { loadPolygonShape } = await import("@tsparticles/shape-polygon"), { loadSquareShape } = await import("@tsparticles/shape-square"), { loadStarShape } = await import("@tsparticles/shape-star"), { loadEmojiShape } = await import("@tsparticles/shape-emoji"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadRollUpdater } = await import("@tsparticles/updater-roll"), { loadTiltUpdater } = await import("@tsparticles/updater-tilt"), { loadWobbleUpdater } = await import("@tsparticles/updater-wobble"), { loadBasic } = await import("@tsparticles/basic");
|
|
26
|
+
loadEmittersPlugin(e);
|
|
27
|
+
loadMotionPlugin(e);
|
|
28
|
+
loadCardsShape(e);
|
|
29
|
+
loadHeartShape(e);
|
|
30
|
+
loadImageShape(e);
|
|
31
|
+
loadPolygonShape(e);
|
|
32
|
+
loadSquareShape(e);
|
|
33
|
+
loadStarShape(e);
|
|
34
|
+
loadEmojiShape(e);
|
|
35
|
+
loadRotateUpdater(e);
|
|
36
|
+
loadLifeUpdater(e);
|
|
37
|
+
loadRollUpdater(e);
|
|
38
|
+
loadTiltUpdater(e);
|
|
39
|
+
loadWobbleUpdater(e);
|
|
40
|
+
loadBasic(e);
|
|
41
|
+
});
|
|
57
42
|
initializing = false;
|
|
58
43
|
initialized = true;
|
|
59
44
|
}
|
|
60
45
|
async function setConfetti(params) {
|
|
61
|
-
const actualOptions = new
|
|
46
|
+
const actualOptions = new ConfettiOptions();
|
|
62
47
|
actualOptions.load(params.options);
|
|
63
48
|
let container;
|
|
64
|
-
const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (actualOptions.ticks *
|
|
49
|
+
const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (actualOptions.ticks * millisecondsToSeconds) / (fpsLimitFactor * millisecondsToSeconds * fpsLimit);
|
|
65
50
|
if (ids.has(params.id)) {
|
|
66
51
|
container = ids.get(params.id);
|
|
67
52
|
if (container && !container.destroyed) {
|
|
68
53
|
const alias = container;
|
|
69
|
-
if (alias
|
|
54
|
+
if (Object.hasOwn(alias, "addEmitter")) {
|
|
70
55
|
await alias.addEmitter({
|
|
71
56
|
startCount: actualOptions.count,
|
|
72
57
|
position: actualOptions.position,
|
|
@@ -281,7 +266,6 @@ async function setConfetti(params) {
|
|
|
281
266
|
},
|
|
282
267
|
},
|
|
283
268
|
},
|
|
284
|
-
detectRetina: true,
|
|
285
269
|
motion: {
|
|
286
270
|
disable: actualOptions.disableForReducedMotion,
|
|
287
271
|
},
|
|
@@ -303,15 +287,15 @@ async function setConfetti(params) {
|
|
|
303
287
|
},
|
|
304
288
|
},
|
|
305
289
|
};
|
|
306
|
-
container = await
|
|
290
|
+
container = await tsParticles.load({ id: params.id, element: params.canvas, options: particlesOptions });
|
|
307
291
|
ids.set(params.id, container);
|
|
308
292
|
return container;
|
|
309
293
|
}
|
|
310
|
-
async function confetti(idOrOptions, confettiOptions) {
|
|
311
|
-
await initPlugins(
|
|
294
|
+
export async function confetti(idOrOptions, confettiOptions) {
|
|
295
|
+
await initPlugins(tsParticles);
|
|
312
296
|
let options;
|
|
313
297
|
let id;
|
|
314
|
-
if (
|
|
298
|
+
if (isString(idOrOptions)) {
|
|
315
299
|
id = idOrOptions;
|
|
316
300
|
options = confettiOptions ?? {};
|
|
317
301
|
}
|
|
@@ -325,16 +309,13 @@ async function confetti(idOrOptions, confettiOptions) {
|
|
|
325
309
|
});
|
|
326
310
|
}
|
|
327
311
|
confetti.create = async (canvas, options) => {
|
|
328
|
-
|
|
329
|
-
return confetti;
|
|
330
|
-
}
|
|
331
|
-
await initPlugins(engine_1.tsParticles);
|
|
312
|
+
await initPlugins(tsParticles);
|
|
332
313
|
const id = canvas.getAttribute("id") ?? "confetti";
|
|
333
314
|
canvas.setAttribute("id", id);
|
|
334
315
|
return async (idOrOptions, confettiOptions) => {
|
|
335
316
|
let subOptions;
|
|
336
317
|
let subId;
|
|
337
|
-
if (
|
|
318
|
+
if (isString(idOrOptions)) {
|
|
338
319
|
subId = idOrOptions;
|
|
339
320
|
subOptions = confettiOptions ?? options;
|
|
340
321
|
}
|
|
@@ -350,9 +331,7 @@ confetti.create = async (canvas, options) => {
|
|
|
350
331
|
};
|
|
351
332
|
};
|
|
352
333
|
confetti.init = async () => {
|
|
353
|
-
await initPlugins(
|
|
334
|
+
await initPlugins(tsParticles);
|
|
354
335
|
};
|
|
355
|
-
confetti.version = "
|
|
356
|
-
|
|
357
|
-
window.confetti = confetti;
|
|
358
|
-
}
|
|
336
|
+
confetti.version = "4.0.0-alpha.1";
|
|
337
|
+
globalThis.confetti = confetti;
|