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
2 lines
22 KiB
4 years ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{1334:function(e,t,n){var i={"./":[200,9],"./ICanvasEffect":[734,7,5],"./ICanvasEffect.ts":[734,7,5],"./confetti":[355,9,0],"./confetti/":[355,9,0],"./confetti/index":[355,9,0],"./confetti/index.ts":[355,9,0],"./fireworks":[356,9,1],"./fireworks/":[356,9,1],"./fireworks/index":[356,9,1],"./fireworks/index.ts":[356,9,1],"./index":[200,9],"./index.ts":[200,9],"./snowfall":[357,9,2],"./snowfall/":[357,9,2],"./snowfall/index":[357,9,2],"./snowfall/index.ts":[357,9,2],"./utils":[295,9],"./utils.ts":[295,9]};function o(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],o=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(o,t[1])}))}o.keys=function(){return Object.keys(i)},o.id=1334,e.exports=o},1367:function(e,t,n){"use strict";t.a=n.p+"i18n/languages.069acdb.json"},1368:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(83),o=n.n(i);function s(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?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(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={}){o()(this,"browser",{ff:void 0!==window.InstallTrigger,opera:!!window.opera||navigator.userAgent.includes("Opera")}),o()(this,"params",void 0),o()(this,"canvas",void 0),o()(this,"baseImage",void 0),o()(this,"context",void 0),o()(this,"icons",void 0),o()(this,"isReady",!1),o()(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 o=!1;2===i.len?(i.x=i.x-.4*i.w,i.w=1.4*i.w,o=!0):i.len>=3&&(i.x=i.x-.65*i.w,i.w=1.65*i.w,o=!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 s=Math.floor(i.h*(i.n>99?.85:1))+"px";if(this.context.font=`${n.fontWeight} ${s} ${n.fontFamily}`,this.context.textAlign="center",o?(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.x+i.w,i.y+i.h,i.x+i.w-i.h/2,i.y+i.h),this.context.lineTo(i.x+i.h/2,i.y+i.h),this.context.quadraticCurveTo(i.x,i.y+i.h,i.x,i.y+i.h-i.h/2),this.context.lineTo(i.x,i.y+i.h/2),this.context.quadraticCurveTo(i.x,i.y,i.x+i
|
||
|
//# sourceMappingURL=init.js.map
|