You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
22 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1018:function(e,t){},1030:function(e,t){},1366:function(e,t,n){var i={"./":[211,9],"./ICanvasEffect":[768,7,6],"./ICanvasEffect.ts":[768,7,6],"./confetti":[368,9,0],"./confetti/":[368,9,0],"./confetti/index":[368,9,0],"./confetti/index.ts":[368,9,0],"./effect":[769,7,7],"./effect.ts":[769,7,7],"./fireworks":[369,9,1],"./fireworks/":[369,9,1],"./fireworks/index":[369,9,1],"./fireworks/index.ts":[369,9,1],"./index":[211,9],"./index.ts":[211,9],"./snowfall":[370,9,2],"./snowfall/":[370,9,2],"./snowfall/index":[370,9,2],"./snowfall/index.ts":[370,9,2],"./spaceinvaders":[371,9,3],"./spaceinvaders/":[371,9,3],"./spaceinvaders/index":[371,9,3],"./spaceinvaders/index.ts":[371,9,3],"./utils":[306,9],"./utils.ts":[306,9]};function s(e){if(!n.o(i,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],s=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(s,t[1])}))}s.keys=function(){return Object.keys(i)},s.id=1366,e.exports=s},1397:function(e,t,n){"use strict";t.a=n.p+"i18n/languages.7742306.json"},1398:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(18),s=n.n(i);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const r={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontWeight:"bold",isUp:!1,isLeft:!1};class c{constructor(e={}){s()(this,"browser",{ff:void 0!==window.InstallTrigger,opera:!!window.opera||navigator.userAgent.includes("Opera")}),s()(this,"params",void 0),s()(this,"canvas",void 0),s()(this,"baseImage",void 0),s()(this,"context",void 0),s()(this,"icons",void 0),s()(this,"isReady",!1),s()(this,"readyCb",()=>{}),this.params=a(a({},r),e),this.icons=c.getIcons(),this.canvas=document.createElement("canvas"),this.baseImage=document.createElement("img");const t=this.icons[this.icons.length-1];t.hasAttribute("href")?(this.baseImage.setAttribute("crossOrigin","anonymous"),this.baseImage.onload=()=>{this.canvas.height=this.baseImage.height>0?this.baseImage.height:32,this.canvas.width=this.baseImage.width>0?this.baseImage.width:32,this.context=this.canvas.getContext("2d"),this.ready()},this.baseImage.setAttribute("src",t.getAttribute("href"))):(this.canvas.height=this.baseImage.height=32,this.canvas.width=this.baseImage.width=32,this.context=this.canvas.getContext("2d"),this.ready())}reset(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.drawImage(this.baseImage,0,0,this.canvas.width,this.canvas.height)}options(e,t){const n={n:"number"==typeof e?Math.abs(e):e,len:(""+e).length,x:.4,y:.4,w:.6,h:.6};return t.isUp&&(n.y<.6?n.y=n.y-.4:n.y=n.y-2*n.y+(1-n.w)),t.isLeft&&(n.x<.6?n.x=n.x-.4:n.x=n.x-2*n.x+(1-n.h)),n.x=this.canvas.width*n.x,n.y=this.canvas.height*n.y,n.w=this.canvas.width*n.w,n.h=this.canvas.height*n.h,n}circle(e,t){const n=a(a({},this.params),t),i=this.options(e,n);let s=!1;2===i.len?(i.x=i.x-.4*i.w,i.w=1.4*i.w,s=!0):i.len>=3&&(i.x=i.x-.65*i.w,i.w=1.65*i.w,s=!0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.drawImage(this.baseImage,0,0,this.canvas.width,this.canvas.height),this.context.beginPath();const o=Math.floor(i.h*(i.n>99?.85:1))+"px";if(this.context.font=`${n.fontWeight} ${o} ${n.fontFamily}`,this.context.textAlign="center",s?(this.context.moveTo(i.x+i.w/2,i.y),this.context.lineTo(i.x+i.w-i.h/2,i.y),this.context.quadraticCurveTo(i.x+i.w,i.y,i.x+i.w,i.y+i.h/2),this.context.lineTo(i.x+i.w,i.y+i.h-i.h/2),this.context.quadraticCurveTo(i.
//# sourceMappingURL=init.js.map