diff --git a/babel.config.js b/babel.config.js index 2883d88..675e52a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -3,26 +3,34 @@ // plugins.push("transform-remove-console") // } module.exports = { + // presets: [ + // // '@vue/cli-plugin-babel/preset', + // [ + // // '@vue/cli-plugin-babel/preset', + // // '@vue/babel-preset-app', + // "@vue/app", + // { + // "useBuiltIns": "entry", + // corejs: 3, + // "targets": { + // "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] + // }, + // polyfills: [ + // 'es.promise', + // 'es.symbol' + // ] + // } + // ] + // ], + // plugins: [ + // "@babel/plugin-transform-runtime" + // ] presets: [ - // '@vue/cli-plugin-babel/preset', - [ - // '@vue/cli-plugin-babel/preset', - // '@vue/babel-preset-app', - "@vue/app", - { - "useBuiltIns": "entry", - corejs: 3, - "targets": { - "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] - }, - polyfills: [ - 'es.promise', - 'es.symbol' - ] - } - ] + '@vue/cli-plugin-babel/preset' ], plugins: [ - "@babel/plugin-transform-runtime" + ["@babel/plugin-transform-modules-commonjs", { + "allowTopLevelThis": true + }] ] } diff --git a/src/assets/css/global.less b/src/assets/css/global.less index f951b88..50771f5 100644 --- a/src/assets/css/global.less +++ b/src/assets/css/global.less @@ -139,12 +139,12 @@ // } @font-face { font-family: 'iconfont'; /* Project id 3110299 */ - src: url('//at.alicdn.com/t/font_3110299_cqiu2pftora.eot?t=1644904387545'); /* IE9 */ - src: url('//at.alicdn.com/t/font_3110299_cqiu2pftora.eot?t=1644904387545#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAyMAAsAAAAAFTwAAAw/AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDYAqcNJcjATYCJAMoCxYABCAFhGcHgRQb0xEzo/ZykPKR/VcFdhv5FQzdriy+Q1iUCD2BeUGJjzwiXVyJIT2KUqa+5ni7rWNwS54HwdM31v7M7rk3QS1C4hqiTUQjjUSi5AsRy4QoFj1k3g7gttqYQRjDCqxB26RFbQNjmKANKFYhF114lXhfl5X8VQEyzq1Ccj2/zam1/bHxUwGSCUt/8ckVR3aUIXtfg6VcPxMYmN5QWykkDitHgpyasJCk4sa8rp35Iiutr1nEdy9uSPXxvXf/b02z2SKp2MKUUCiWeib8ZzcFnqRE7OpaXVlXWbWbEm4Z707R88fCqLPujrW5g1WQVmNj5M/dBAGCdDOEDuMjM/jsmc8OCMNC5gu4HWWveXMZ8i0Dm+Ip+JO9qrtaGjgTD+ilngGuzN8vf/TaAIrHAETOxEZtjQM/PoNmpAvMG1Jd3RC0ugIewADtmmXJWrp5AciGdpMPxpnd6MXUQvHnOCetQq23N3jxsQAebDLo7R9PvADhw2B7TgMjpuGh8MJnhsIHnxUKP3wutaqwgRIWDlDUhAZKceECpVphQDuLKntXSAMDYO/B2wExjphRIygGixciso91reeonBybHUnk7c9jnDm7nDttJ3Hq8MrbTHnVgfI6hrHTz+pgTnGp3X7A1ri7y/YVZAUVxBDDbMQs45Gh164yihQ+AmWJcSlIA+ywGPvj963rV2v5YfV1uAUanoi/NLzmejncqa+G3zLEcnVeliKIs8RQlKyP4RYOWnwNHBPJS2BSRgjHsYRWMRzke9+qR6H1cimSLEB22MMNxRoUXFmSQNNUlPtS0iKGPtYFJyVe5xM6GPrhEASOLBFdAFswI2W/gryun5SSyzCUSLQsJRBMk30OBZkGxEAacsWrcj+p/pwQvRrHdpS41iDGjh+jcqCK7wYaSSEF25X8JbU75xXIqvhOEGp6M5qXn8LESlmm5QinaexI0YlQrMAXrZTDtDsi+sO57mxNqHRL9Gdc7sIneEFlWZWA9Ms8Q3OM+JrGq37618Z440V98gQB+0/l50dZL6tWq0QnDLJeq0PjLUlkLCkhn5e93W0SUJ/V9HPm3blS3k91WRL11CBGqWM8kbNVt0gk3plIdaREzfuODbLs4/XoMHuOjeZ7cfCk5/Sc2W7+caUmdK2OSeSZBZyv5rzRxHjKfBwXqjndpyTyME+rhixVnbxU6K51N9Lx3GnuJtHuuy/akTbV3QHna/C1cDEuO2g6yqFlwj8Yb5T9QS93vMPKV6P0YJhb06UhD0swuSC4R/gHFLc/yJqCCv1PUcie6z9XScMwJjFAlT4U36t79N5swdKZf3C+5rIJ+bu8/hJ2yzCwdB2aJg6sESKjY7kuTWrrCQsHpvn0HfC10VrBJMNAVgybVtU1pS6mmuHmn/6MA/HKypxn3Bsry8Lks3D2ps6Tf1hDzBulV48ThkE2zU0oLqc9A4s35W5YVvnvJnGY1Fu6FFlWcXPx5Io3DEgr+y1iTqf8dmtILhBavaA+qr+y0MqehbquH0F5AuSXKLkJ4huEntSZJrCs9oCwDoknjURrHoh8BsxofAp6uVRIvFH+ihC85wgCnsnlheTNNLajo7dIJ7pzfLE2P3b7sJQhHHu0eie4QJKzyERNM0FZxKDAvCz2oi7TD9XrEExKqFDGpEt1ColmvOYIAWUpz5ehAfUrYParrGlCnafP6JjGDGNNqcOzddmusyQaOD8Smyi4Ih6v4K7gryKXzXojUxuu9BPwXL3aHGUvtweqKI6BKBGSSuI4SJ0n7ehs4iUjfoaAYSlCohp98FUCRkFMSXZECnes/e+f+fefe1We6rvb1PdT1CTVTsmLebDtu9WRbefOit3UP/9Qu9v3UJ7FRerSxUmbrdz60F7qh0Thp70dnzmWNu/xfDa7wf+3ueT4rOPTp3t7J5+hDo8Of85h3ObI6CHKmOzt7feW3yvPN/XtX9C7d0Wft4d5ZEfPhmxU+oCYRjp104od/hRUbyiB+2A9kYYdRipZr8ZgB1yCYtM1CnZhsF6YmkkyZHN1OBUUO9Sj7ym5pATeDePWfaCBjBr08Wr0zMCXq3lwuUJRDs8SF0v3WfT9YjujW7KqT1Obc3KaqXtq5LdVPXrLPumd5HBUTDcFoqGRTTXsSta0aaxKds0Fhg3sLF7JqmFfiBH3GHN1RJu8JTOzRd72B2OMMfbO/OchHh3m6NoEHi8H4raRDiGJLaIUYE2Op8PzDteah0t9wES2IXGuSplLQ2i8ebdm2wJsYkull/+DdZ3AaetM1zDQh8svxyu5ADbAAW+VzgG+Aff6LhTcC6AIZ51ibKbO1IdGnfn//4g0mDoB6E96D9JP5OmBnABIiA2TmtDdy2nc7+zcIwpT1jA7T3Zw2fGjvkOf9V8PHTzoDF2Ue9+nbgw7f0JnSSDulyKfwgPHqS5I1sgZFdxaoTU4qD0JM2eVwflaN7q0CnOXkkmFtLgGX9KbgszKv7Pb+mOMVd9GdQRoBE+BqYi/7xQ4Am84lBJyBrOZ/TkNJnUZs8QYWRxZ++PUIRAZ95PUfM/vaDtaEKgG14jnbIjJss4L+ZmcSgoLPb550lzDfgvitekEaFohGMtqD20Hgb2dMXI3yk0urIvTDQJ1+aa5fsZp3ylg+OXlo2phEMOdYwfZqhoq3leGKPwZXU6TbaM24DU/z/rBC8oFMDzHOvT4dYvGDBJA9p4C2qFXtDlJjeKSFFjcf5cPmdOA1CS3ZaORQeOpRdsKk7xjvT1YIMj5s3A0HGTfC7jfXmIpmYrPKlavkvWZqWApe/0On5ReKtanzRquBtAJDb9WgqP9+2PTGDa2x6XxdTZ4QHxTOsFSGRVMZU4MF85nqQilqKsmf4yyGOOgHLaaixeRHb4OslYzaJBmFsYgW5ue1FyWO8I8VHfM9MGilwxUF3FwjlotHr0DOykgmArjEyVrkYL1KZ+lIFTSHovuLiZB9y4paKQpvPu05laJHO+PYf2nYppsPX1gdkRwdN7UmlJCxfpsZKlaDsZ+fAE0zHN95BDzstKC+E6+ML5Kh5pjVLhbD5E1FNJ49D7YSXYvQLSxmIKvFhS4b+pkluuELemx4XXpRUVpv6OFBl0VQ/tEBiRHle8nTYgyhhbhXJTNRrn4asbYalT3jNV4f3M5+GokwUZRNs4tlGkHQ+5MzWADZvY8ffDMMWDFQboKMhFknLFBqjQx7cAFmA70PtZQKBAlq9Qf74/2kU4dccNUtkV/9METsp0sFlZUisSeo/oRPQU5fF62gOy4f4m2smxJlUhEtvvayfxcPloOCD8Yu5NsPZqgi0GaniRbVxRxJWpw1GVdlJ2hu2x3uUJwXzM2RNr5AzIGMxyM4Z7zA0UjpS+pF4mXvaKRgWs9RkQ6GHOFMpNEarJKjSap1Sg1DFaPiFEiHZxAxAvyqhhGKZX2MRuKiaFhlN303RTE5/KEJ60MTzrmVRpIKyXL7wKQ0V8mcorS3QI5tSsbnq9s5loC0rlFSRx0nKdWNDBkTyVALgcS56RmPLfieN2/RRHaqes9bOoZosFZWIccCx7i5Td5ymIkYjb2btPQ+1e0cQHOwLO8M4HO8FuLwznhi2+Fz0SbBNzh3Q2gk0LVNJ2MGfhIvROImp/hnQFGXARIM9fcXA11mU1cNxICXVBbAUbyK7YDAMXQzR1voPp2rocSzNqZpYea4uiltHauFTkbqjr4rcafTO82o2/GZzLt/7DiXpJTbaqrtdJnBOI/sKmV1Ye65c3ZzeXAzt7KIGj/ELR8tnP+KfuuupBvUEREqN4IrQAHKUzyUXVK6lDBBL9Pc0WKjxIy+Clz1rYVeQjRi7z4GURB2qhBCK99BIRYCgCNXAAS4tSREuUaGeI8cNb2EXnI8oW8xPlHQW7834vhCQ6heguEiUYYdmBlRbPkZC71m0xeMURV/VOIDBXQ1W2w4YuEQhlbxGL6lDToYDf4vJyO1tWCC3YmleopJXduGh23Ra3sdngTEJRk0BEw2GMyxRJ65uT/+74RI1uhoMj9syBiFVo60FHTKnBfvCiNqEn3qDB6EmIacAgINtv4+WFkpbUW4OJXmhElqZkKVDtnGjSTVuXr5o3botb9q45CvpUBw7Rcbo/tdXzcWthklBuVQ6HbwWoUcxsndiw3O0qkZ0Mx5UDVhDI+YxWBaTOFfHfhjJZmfsWqhEsW9pN8FsZsN+LEhwM=') format('woff2'), - url('//at.alicdn.com/t/font_3110299_cqiu2pftora.woff?t=1644904387545') format('woff'), - url('//at.alicdn.com/t/font_3110299_cqiu2pftora.ttf?t=1644904387545') format('truetype'), - url('//at.alicdn.com/t/font_3110299_cqiu2pftora.svg?t=1644904387545#iconfont') format('svg'); + src: url('//at.alicdn.com/t/font_3110299_2rqgsifmfel.eot?t=1645077129221'); /* IE9 */ + src: url('//at.alicdn.com/t/font_3110299_2rqgsifmfel.eot?t=1645077129221#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAA9IAAsAAAAAGgwAAA76AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDbgqlaJ4wATYCJAMsCxgABCAFhGcHgRwbehUjA8HGAQRC3kv2Fwm8IfXmDBFh0c+QCWae1ujnBsxhE8WrIpx9uRIP/63xu29m1r+IoBahcTqeNJmF9iMkaMFTJ3sm7+Wy5Vu1FBVhvkpqV9Xv5Ta5/blLbpLNFwtOYRwOIXFYjGIYoG12B30HckeaWHCEumGjC+rAJI3p9AWcw+kaWTGXzaLcvowFfuKqZFEusl314G/2JpuTzZEz7/WZKIWZSPhNfo3Xbt4z0xdCAgJk/u9aaWeO2VKO3QnFUieZmff2JzmY4+xhdo+piKqy5wqy7mTVpIT4fNn4Cqlrbff9zUg6k1JcMwj42+ft7kWgd86R6tWrh2cxfAFsxa46uTwIFsYLMiDa5yalIDm0dXXVc5bJ+KgivU/LAB+cXx//pESbpMrk5Vx7dJmKz5/p55APRuQfLItuIzx2QoWMU8xa4lFxx0M1D045vM/qqLskWAH1cxhHKyRZvCXNSXZ6+A+vUmRJEDXJJyD8HevnzDZKafiZS2n5WUrp+FlZVUUNjCMaYIpEC0wT0QFDJXpguhADOGtKvXOyRLhM1G+FaP6TtbccXWNSkhW1BrCBda56gaaXRqHqIxCgCMJgoiaMHsZjISQWkaF5o+XmIbw4MTtOxuMx9b+FgwhjmEw2I5Gczqht277aGgHAwgrWP62I7u21axvTf2WaEtLxWpyq47y6GNFooPKkyUyO6q7CzPdYjcUt1VuAOYUGWCn1hZijOgmhRIg6rSgAyfApHSmdOlsIwsxuZZBe/B7bFrXMZQ0W500VR5XgyGpKk8c+QMI5FcqaFay729VVrSj2Zl1eYma3ukCqDtQSpQtm0voKcVh8Jy4UJoASBBIOdbjEJSi8PQiFw7D/5p/trRqrC+ExKJGwg53kwEkZf0XFWwO1iWlj2A8BgGucC+knaeKkOkznE5NV7MtOD3OjJ+07s3k60xYBJAJciLphc9lPzufNoLf3M7E9ETRRy7rbFEcbkaq+ZXFc/xJh2EodbjmwT/hN//83Ojtd7Z4QH5DRYOt9/++t76feqd+nbtV/bHvlKJfhBurEfl3aZX1DRmGwM7PVsRpyWwAe9uqbQc6sJhjkpT/+jCHXSHHMPGKfCJnHyx0TqTI1IG2i9rdbY+k7rJZAhF3ltijwHYFLMCCNfToWjJJhPPIzcZXSsnAqirKoH8dZgae1/IF4lhv4MZemsmntJ6pe9xqnm8EDWma2+k1dnc8+QwR8OJDoWcrBQ9hPzz78zLvEFvDBoK7r1UyXvQz8l9keoQt0ZbLxbF1TfqaxgtWbYYOfrc8JRxKJ4KifHQ7MMfdNsVR6g5jvuJbpWP770l3C6f9sa942rs5txCs50puX12inbVEljH2k1k7HexmfFtHoOq/LpO3FA9og6hLTT9MNc3Dun8kRRA8mqMWT1r2GgcoFRP2ls21723yZ/vQJYtubdxpP2IN2Y14aBvcP9l3We/T/U4m6maTVkqvznUxiKNpu3SvNOE5dou8wT5HgXXvtSJU9EwVhdbjNbM5Z5lWwGS6/9SSVS71q4GS2ZnY6TU55kBwvw2RG9ljzNpatTTtde+M80fhFB9mu9pJEUuxpsxbCGf4OHmZrbe0Jkr15EnvwyGCFSeoBtoDxMaiV5MbnqwXXD3ztcJc3NHGXXfU2WIgiQCmiNQzik8awAlITizr7bAwDrV+5SBhIMYqjiMYZsy4IIaXVjK7w9O/+goE/dXPNm1ZOt3WEc6+RS/PKRf/HU8yj1ofPGFGEujbPGpPuq6T5VGcujsv+0zLqnJqZ4owJqDdPuz8XgVv6b8pe+9gnvSG1wOv1QdUp9e5G63uNKMWPYKdH3C1KzsJ/gDeSMa2DOO6P8oiAoWmIcsyMehsA7GWSdtoS3tvYz4bXNGgYpD/HNbXz7eABHQvoabrUtVmndy6+iIeNp77R4QeDMYRWUfpSOtncSnG+bAS8xWXXFz4bVduqEYQBPJHkiK74yEsGYbjO5yED8XOgjwhba6Jcs1+B8Okous2TcCQ5sn8A0aNDJ5vO5k/5PcWOeMF+0DWvhHGpbpd0g6gVmrtDvqKHnx9MaaNQ7VP8UEL3DwhO+XcnzJy3/e/7Zfy1DZq7YfJGeJ7kfG8XNNc/pb3S4904ecO7qMF0IScWvlS4PDZKS7eq6d+S1nnXp8LRufOn+R56N2phYfk8reOOxL89hrC2EXIJCvAa9CEUyYuBLxrbdG4ArIOjOHHnzy55hm2O0BzRqnVuslpI8AfO/1CMM+CjwudpahsstVCYFEuKAhAxBftmkuVBzb2GVT35Hni/hVxGlXFaZmAtHSOBIGHXEEWrNthhITf+XO7SY7Snmb5EqJkxhSXrtIRYpolCnGcbaNKg5q57TnS47//3b1KbI3vnh5QGRnZ3Trw9Bg1f/D8pDxrJsbZosObmkXc74xtbu6SzLRYJ/BBCRjAI2jNMNYUFU/cHbz0Iy337GG41IGJZmSvJCQHN3e+HveFR0tCL82pibLLH3wRd9UdS+WKgzLsFafHUH00RiENcw2QDQwt0A9kPKj2+PvNnuPKjN2mDLQ4Mfsh5A8UcAtRkjM4fAe+HpFTHEoKCKKJ1CFZQcyvjzyE84I5rdbKlHTP4gWZn953xt2ehYb7/yVa42ozULr7rOCsa2mOT1tphdYjhR5x9cIw1yE2knaX9kQpjnRamY591Dm+b3sHYN4acQN5/D0i1fuLsun7thHg11vUSna1HcTQFtW5tNfCyC9v4kkWMJ6PXrqHkFAq6urAQ7dyHMxhx7qtuQuf8HTlamTomxDjrRHHx7t1FxTdmGUPGpI6uVCrxX9Bydd+xAkAwS6UuQy/gSmV2U9yJuPCtH/AbN9Lfb90NXXbMEqIHQsfE1qJQ4M9tHDpeUlqMtCMlUo/47RCtRKdH/EgxLvwX6fqjRErSCpsJpeXi/d0GPQJPan9ACxQjOxExux0speGlJdkWPmXgw4EwpFytLkcWZxQp99SUjIobHlPf95fjUF1+fh20q0p1TdtQUrNHeT05As/QTwnEECcPqpJUYAsWYBWSqtMK29g/dAVWJTmd4U2ZdmHSEFV9nz71qiE/BBZY4PDuf1y9Y8L9IwLg4TggfgshiJpN6SlAWz7VT71uOM6lpd4Wi7aI4n/WU5bBIli+/OoSD9djnlbD4NxePxw47vb97IX4nT+OV1d8GnQh3Bea7jEs7s3205abXHraYq1MB+QrCYvuev1vRCmAZgGjYea4ktnyEiC/DTRmlM4ZhO/8A5Z9lhQcUDv6TmiSZ3X+fvggq/Hh6A3ETk532OqCWyEDpknMs4YX8wzsFNU8OThDezqzTSXsL6tOcwv4QxV6Z98yxJxLQpWVerKSRrDC8S4W4XlEn4p/8oaM1gtbPk2x3JzEB8B8EYc1D4k0uIIpoV16j5MjdTl0ZeJie1RRVPWXY2WgaMZXQt1N9sGhuIWnA9sylm6M7eteHvo1OZUQHna4Y86y0r01IkbgCOj4M3E6NjRsKAjkxFgViX5FED5COhIEPlSBZWz7gs90MOLcH1OqEVBv6J6+8VS6+r+qCFVzhCO6HZ6/crnPEgrdbxjEAkAP5rsbD1+qyXGCRiCPYoGDA3PzFbUZxSlIxugdITSpS1SVPCQPj+LPhGxbrApmHJOCgaD0x6o3hN+0GyAfM2Iasfq9Flujwd6L1ZhmTTTqnSZFi707lesCFzXmJFRnGvDRo/ULFLbPbFAmDfAgY5IG9TJiWrtarKmJ4ZbNmNaoSR9RZZ6mKdJLcalEJzPYaH6Wn5abM25czmKB4bJzeynqygomORtNhxxvakoyx+psUoNUpzMf+zD90USjWG2/r8FWq7F3Zkxt1Cobakw39Jn47l8ttbCa2Z7rHJypMozW60fP1zM5/cKxeZGCmML5Vf2MWuy9HdP2HOzj+AxgPXVD1Hjn7/0sScMT0pIqTbgzVmsgNRj7NhJzKGtub6eRLaLcOL06QZdoIQeGi8tNafW94iIG9LLZsr/HpJWaKDYeE5mQNq05SrrwFDbaDDJcIsFlhlYlJTqce1OrYbztUkMraiQ4LjHIrFm5Xmj35Xht8I280eubA1nENxE0i0TzjG1C6Rc3AUcQ+7Dmehy1WqTB+nEMo/Exsvkz7puvTjMav32f1kTLSOtfkZ5BndXXSE3MT5DnJdL8t87CzWW/Vqan05pYTbSEggS8HEh7Yx+p8DTk8M/wcxoUnhHRxvPR3uhzpugmoemcN/W8UfZMuDEqcikbhV6hXziRuoKXPln5BDoDPVG6l8hbR5kU5RcuS8tyZCodbqXdoXTblbbPHfKwZyq9PYxJiYWVCmN9hXeVriJjYzh9J7qTLgo5p6PCZQbFIUa/mNuPZn0TQBb6pKfU1ovEk1Y3ux4118lquL1kNoUUn0HNTR8buqsCoMUBPZem9n7kNhgG/GeLzJ2/geLRLUr39tUPU+kF4xnsufPWiiKX6F8GGm+dz43ndvNOyLt43RFX10ZII9ZejfDhKbjX5Te4KCFMB5uyxLxrw3Uezu6SdwGTbgNSSxISNgDAz2XEVuIIZ8rPPJkI/oTRAxJQmxw1tgIAiniE8ByGr+UNxB7OqI9UQhyUxTqL5v38k7iEWPmfzLFEW1mhws7q/Z4G/7oZuJm6lO5YtCElwcNopTyIJ/2/5fDuluJ/pNw+N0HRXLZ+BdnGHuMYENjpJVgNc4f4ZJLSQ68PMJI9c36wfv5PvgxtxD6hpLGOstaeWcJPoMrgAqq1rqDeSZdTB/NKNYguXdcR74DCjA+UTPmOshlfZgn/RpUlv6g24w/17sTg0gZHQp17BMZUJhtJylmt6thZ6SOamINPG3pFHwgG5Gw8jU9co0XfxmnC0syZtdTeFfLqeH2Y506W3i1Q8ThjLvcmE511mrFyhTjnIcBW0ZSU2JQlimPp3XP0z3uEjCgHfEXzVXpBUFy5NDM2rWBec1tps0xWDZaMOUapSQM8QuHVXj0lyvVRRyqzj7aAFDaWNRgu7Zng7nRVPu6+ttjY3LbbovzahkiRo0QVdTTRRhd9DDGhekY2oWZKJoJtqOiX2EycBmuaIaOSbGMDNmDfYODocZSBTfswSsH6NAXUWlPJIy1oC0ZLv46WoqTeEdLoCiQmIQAA') format('woff2'), + url('//at.alicdn.com/t/font_3110299_2rqgsifmfel.woff?t=1645077129221') format('woff'), + url('//at.alicdn.com/t/font_3110299_2rqgsifmfel.ttf?t=1645077129221') format('truetype'), + url('//at.alicdn.com/t/font_3110299_2rqgsifmfel.svg?t=1645077129221#iconfont') format('svg'); } .iconfont { font-family: "iconfont" !important; diff --git a/src/assets/css/package.json b/src/assets/css/package.json new file mode 100644 index 0000000..8fccbac --- /dev/null +++ b/src/assets/css/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "easeljs": "^1.0.2" + } +} diff --git a/src/assets/images/loading/bg.jpg b/src/assets/images/loading/bg.jpg new file mode 100644 index 0000000..97c5ea6 Binary files /dev/null and b/src/assets/images/loading/bg.jpg differ diff --git a/src/assets/images/loading/loadingSprite.json b/src/assets/images/loading/loadingSprite.json new file mode 100644 index 0000000..5645b28 --- /dev/null +++ b/src/assets/images/loading/loadingSprite.json @@ -0,0 +1,83 @@ +{ + +"images": [ + "loadingSprite.png" +], + +"framerate": 20, +"frames": [ + [1, 1, 645, 32, 0, 0, 0], + [648, 1, 359, 419, 0, 0, 0], + [1, 422, 395, 520, 0, 0, 0], + [398, 35, 246, 84, 0, 0, 0], + [1, 35, 392, 334, 0, 0, 0], + [398, 121, 243, 28, 0, 0, 0], + [643, 121, 3, 3, 0, 0, 0], + [643, 126, 3, 3, 0, 0, 0], + [1, 371, 37, 41, 0, 0, 0], + [1, 414, 4, 3, 0, 0, 0], + [7, 414, 4, 3, 0, 0, 0], + [40, 371, 402, 32, 0, 0, 0], + [40, 405, 15, 15, 0, 0, 0], + [57, 405, 14, 14, 0, 0, 0], + [73, 405, 10, 12, 0, 0, 0], + [85, 405, 11, 11, 0, 0, 0], + [98, 405, 10, 10, 0, 0, 0], + [110, 405, 10, 10, 0, 0, 0], + [122, 405, 7, 8, 0, 0, 0], + [131, 405, 7, 8, 0, 0, 0], + [140, 405, 10, 7, 0, 0, 0], + [152, 405, 8, 7, 0, 0, 0], + [1, 944, 30, 30, 0, 0, 0], + [1, 976, 26, 25, 0, 0, 0], + [29, 976, 21, 23, 0, 0, 0], + [33, 944, 385, 28, 0, 0, 0], + [52, 974, 328, 28, 0, 0, 0], + [382, 974, 23, 22, 0, 0, 0], + [407, 974, 19, 19, 0, 0, 0], + [444, 151, 171, 167, 0, 0, 0], + [398, 422, 392, 334, 0, 0, 0], + [428, 758, 306, 244, 0, 0, 0] +], + +"animations": { + "loading_text2_en": { "frames": [0] }, + "arrow": { "frames": [1] }, + "person": { "frames": [2] }, + "start": { "frames": [3] }, + "light": { "frames": [4] }, + "loading_text3": { "frames": [5] }, + "snow_19": { "frames": [6] }, + "snow_9": { "frames": [7] }, + "snow_1": { "frames": [8] }, + "snow_10": { "frames": [9] }, + "snow_20": { "frames": [10] }, + "loading_text3_en": { "frames": [11] }, + "snow_2": { "frames": [12] }, + "snow_8": { "frames": [13] }, + "snow_11": { "frames": [14] }, + "snow_13": { "frames": [15] }, + "snow_17": { "frames": [16] }, + "snow_6": { "frames": [17] }, + "snow_14": { "frames": [18] }, + "snow_7": { "frames": [19] }, + "snow_16": { "frames": [20] }, + "snow_15": { "frames": [21] }, + "snow_3": { "frames": [22] }, + "snow_12": { "frames": [23] }, + "snow_18": { "frames": [24] }, + "loading_text": { "frames": [25] }, + "loading_text2": { "frames": [26] }, + "snow_4": { "frames": [27] }, + "snow_5": { "frames": [28] }, + "snow": { "frames": [29] }, + "light_2": { "frames": [30] }, + "box": { "frames": [31] } +}, + +"texturepacker": [ + "SmartUpdateHash: $TexturePacker:SmartUpdate:3da48f21b4a69792ffd2babe708727d0:90dbaba88b2a904ae79170eb342a1a0d:e0f80f5f67f3e04854c93f0048518df1$", + "Created with TexturePacker (https://www.codeandweb.com/texturepacker) for EaselJS" +] + +} diff --git a/src/assets/images/loading/loadingSprite.png b/src/assets/images/loading/loadingSprite.png new file mode 100644 index 0000000..a0bfd9b Binary files /dev/null and b/src/assets/images/loading/loadingSprite.png differ diff --git a/src/assets/images/loading/snowSprite.json b/src/assets/images/loading/snowSprite.json new file mode 100644 index 0000000..00b6b34 --- /dev/null +++ b/src/assets/images/loading/snowSprite.json @@ -0,0 +1,26 @@ +{ + +"images": [ + "snowSprite.png" +], + +"framerate": 20, +"frames": [ + [1, 1, 77, 82, 0, 0, 0], + [1, 85, 57, 55, 0, 0, 0], + [1, 142, 46, 45, 0, 0, 0], + [49, 142, 15, 15, 0, 0, 0], + [60, 85, 8, 12, 0, 0, 0], + [60, 99, 6, 6, 0, 0, 0] +], + +"animations": { + "snow": { "frames": [0, 1, 2, 3, 5, 4] } +}, + +"texturepacker": [ + "SmartUpdateHash: $TexturePacker:SmartUpdate:5282c6d67fd56100f124116392fa0dda:00bfe33730c22fc59892c575329c8865:784870e134e9ba9b2fa4be9322fa91d0$", + "Created with TexturePacker (https://www.codeandweb.com/texturepacker) for EaselJS" +] + +} diff --git a/src/assets/images/loading/snowSprite.png b/src/assets/images/loading/snowSprite.png new file mode 100644 index 0000000..1cb9ccb Binary files /dev/null and b/src/assets/images/loading/snowSprite.png differ diff --git a/src/assets/images/suggbg.png b/src/assets/images/suggbg.png deleted file mode 100644 index 651c2e7..0000000 Binary files a/src/assets/images/suggbg.png and /dev/null differ diff --git a/src/assets/images/suggbg2.png b/src/assets/images/suggbg2.png deleted file mode 100644 index eee712e..0000000 Binary files a/src/assets/images/suggbg2.png and /dev/null differ diff --git a/src/page/index/Home/index.vue b/src/page/index/Home/index.vue index a0b3b4e..6da2648 100644 --- a/src/page/index/Home/index.vue +++ b/src/page/index/Home/index.vue @@ -110,6 +110,12 @@ export default { name: "颜色归类", active: false, }, + { + fontIconCode: "", + target: "PushCoin", + name: "推币游戏", + active: false, + }, ], }; }, diff --git a/src/page/index/PushCoinGame/game/animation.js b/src/page/index/PushCoinGame/game/animation.js new file mode 100644 index 0000000..a97474f --- /dev/null +++ b/src/page/index/PushCoinGame/game/animation.js @@ -0,0 +1,668 @@ +import 'gsap'; + +class animation { + /** + * @Author rucky + * @DateTime 2018-05-16 + * @param {Object} game [game object] + * @param {Object} view [view object] + * @param {Object} ani [animations object] + * @return + */ + constructor(game,view,ani) { + this.game = game; + this.view = view; + this.ani = ani; + + this.init(); + } + init(){ + + } + + commonBtnAni(target,callbacks,onStart){ + if(this.game.buttonDisabled) return + this.game.buttonDisabled = !this.game.buttonDisabled; + let timeline = new TimelineMax({ + onStart:()=>{ + onStart &&onStart(); + // !this.game.mute && createjs.Sound.play('button'); + }, + onComplete:()=>{ + timeline.kill(); + callbacks&&callbacks(); + this.game.buttonDisabled = !this.game.buttonDisabled; + }}); + + timeline + .to(target,.4,{scaleX:target.scaleX*.9,scaleY:target.scaleY*.9}) + .to(target,.2,{scaleX:target.scaleX,scaleY:target.scaleY}) + } + /** + * @Author rucky + * @DateTime 2018-05-16 + * @param {Object} argument [many prama] + * { + * now: null, // + * next: null, + * effect: 'fade', //scale | translate | fade + * translateOut: false, + * translateIn: false, + * scaleOut: false, + * scaleIn: false, + * direction: 'x', + * } + * @return {null} + */ + changePage(argument){ + let _default = { + now: null, + next: null, + effect: 'fade', //scale | translate | fade + translateOut: false, + translateIn: false, + scaleOut: false, + scaleIn: false, + direction: 'x', + onStart: function(){}, + callbacks: function(){}, + } + + let opts = Object.assign({}, _default, argument ); + + let timeLine = new TimelineMax({ + onStart:()=>{ + opts.onStart && opts.onStart(); + // !this.game.mute && this.game.soundLoader && this.game.soundLoader.getResult('open') &&createjs.sound.play('open') + }, + onComplete:()=>{ + opts.callbacks && opts.callbacks(); + timeLine.kill(); + } + }) + let hideData = {alpha:0,autoAlpha:0}; + let showStartData = {alpha:0,x:0,y:0,autoAlpha:0}; + let showEndData = {alpha:1,autoAlpha:1}; + + + if(opts.effect == 'scale'){ + hideData.scaleX = .99; + hideData.scaleY = .99; + showStartData.scaleX = .99; + showStartData.scaleY = .99; + showEndData.scaleX = 1; + showEndData.scaleY = 1; + } + if(opts.effect == 'translate'){ + if(opts.direction == 'x') + hideData.x = -750; + else + hideData.y = -1450; + + if(opts.direction == 'x'){ + showStartData.x = 750; + showEndData.x = 0; + } + else{ + showStartData.y = 1450; + showEndData.y = 0; + } + } + + if(opts.effect == 'translate' && opts.direction == 'y'){ + timeLine + .to(opts.now,.6,hideData,'start') + .fromTo(opts.next,.6,showStartData,showEndData,'start') + // .to(this.game.gameView.interfaceBackground,.3,{y:-30},'start') + // .to(this.game.gameView.interfaceBackground,.5,{y:0},'start+=.3') + }else{ + timeLine + .to(opts.now,.6,hideData,'start') + .fromTo(opts.next,.6,showStartData,showEndData,'start') + } + } + + loadingAnimations(){ + let A = {}; + let view = this.game.loadingView; + //progress animation + let progress = {value : 0}; + + A.overProgress = TweenMax.to(progress,.5,{value:100,ease:Linear.easeNone,paused:true, + onUpdate:()=>{ + view.loading_progress_text.text = Math.floor(progress.value)+'%'; + view.loading_progress_bar.graphics.command.w = progress.value/100 * 376; + }, + onComplete:()=>{ + this.game.loadingAniEnding = true; + } + }) + + // console.log(view.loading_progress_bar.graphics) + TweenMax.to(progress,4,{value:86,ease:Linear.easeNone, + onUpdate:()=>{ + view.loading_progress_text.text = Math.floor(progress.value)+'%'; + view.loading_progress_bar.graphics.command.w = progress.value/100 * 376; + }, + onComplete:()=>{ + // this.game.loadingAniEnding = true; + if(this.game.mainResourceLoaded === true){ + A.overProgress.play(); + }else{ + this.watch(this.game,'mainResourceLoaded',()=>{ + if(this.game.mainResourceLoaded === true){ + A.overProgress.play(); + } + }) + } + } + }) + + A.flashEye = new TimelineMax({repeat:-1,repeatDelay:1.5}) + .fromTo([view.loading_eye_1,view.loading_eye_2],.6,{scaleY:1,alpha:1},{scaleY:.1,alpha:.5}) + .to([view.loading_eye_1,view.loading_eye_2],.3,{scaleY:1,alpha:1}) + + // console.log(view.loading_bingo.parent.mask.x) + + A.drawAni = new TimelineMax() + .fromTo(view.loading_pen,.6, + {x:view.loading_pen.ox,y:view.loading_pen.oy}, + {x:view.loading_pen.ox+12,y:view.loading_pen.oy-8,ease:Linear.easeNone + },'start') + .fromTo(view.loading_bingo.parent.mask,.6,{x:-100},{x:-91,ease:Linear.easeNone},'start+=.2') + + .to(view.loading_pen,.6, + {x:view.loading_pen.ox+36,y:view.loading_pen.oy+32,ease:Linear.easeNone} + ,'start2') + .to(view.loading_bingo.parent.mask,.6, + {x:-54,ease:Linear.easeNone} + ,'start2+=.15') + + .to(view.loading_pen,.6, + {x:view.loading_pen.ox+96,y:view.loading_pen.oy-33,ease:Linear.easeNone} + ,'start3') + .to(view.loading_bingo.parent.mask,.6, + {x:0,ease:Linear.easeNone} + ,'start3') + .timeScale(.5) + + + return A + } + + indexAnimations(){ + let A = {}; + let gameView = this.game.gameView; + + //wait ani + A.waitLine = new TimelineMax({ + paused:true, + repeat:-1, + yoyo:true + }) + + for(let i = 1; i < 10; i++){ + A.waitLine + + .fromTo(gameView[`index_text_${i}`],Math.random() * 2 + 1, + {rotation:0}, + {rotation:(Math.random()>.5?1:-1) * Math.random() * 10+5,ease:Linear.easeNone}, + `start` + ) + .to(gameView[`index_text_${i}`],Math.random() * 1 + 1, + {rotation:0,ease:Linear.easeNone}, + `start2` + ) + } + + //show ani + A.textTimeLine = new TimelineMax({ + paused:true + }) + + let speArr = [1,2,4,5], + speArr2= [6,7,8,9] + for(let i = 1; i < 10; i++){ + let timelineSpan = new TimelineMax() + //text + .fromTo(gameView[`index_text_${i}`],1, + {y:gameView[`index_text_${i}`].oy-700,x:gameView[`index_text_${i}`].ox-200}, + {y:gameView[`index_text_${i}`].oy,x:gameView[`index_text_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + //line + .fromTo(gameView[`index_line_${i}`],1, + {y:gameView[`index_line_${i}`].oy-700,x:gameView[`index_line_${i}`].ox-200}, + {y:gameView[`index_line_${i}`].oy,x:gameView[`index_line_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + .fromTo(gameView[`index_text_${i}`],.5, + {rotation:0}, + {rotation:-25}, + `text_${i}+=.4` + ) + .to(gameView[`index_text_${i}`],.6, + {rotation:0}, + `text_${i}+=1` + ) + .timeScale(2.2) + // if(speArr.indexOf(i) > -1){ + // let index = speArr2[speArr.indexOf(i)]; + + // timelineSpan + + // .fromTo(gameView[`index_text_${index}`],1, + // {y:gameView[`index_text_${index}`].oy-700}, + // {y:gameView[`index_text_${index}`].oy,ease:Back.easeOut.config(1.2)}, + // `text_${i}` + // ) + // //line + // .fromTo(gameView[`index_line_${index}`],1, + // {y:gameView[`index_line_${index}`].oy-700}, + // {y:gameView[`index_line_${index}`].oy,ease:Back.easeOut.config(1.2)}, + // `text_${i}` + // ) + // .fromTo(gameView[`index_text_${index}`],.5, + // {rotation:0}, + // {rotation:-25}, + // `text_${i}+=.4` + // ) + // .to(gameView[`index_text_${index}`],.6, + // {rotation:0}, + // `text_${i}+=1` + // ) + // // timelineSpan.add(otherLine,'same_${i}') + // } + + + A.textTimeLine.add(timelineSpan,`-=${i == 1 ? 0 : .6}`) + A.textTimeLine.timeScale(1.2) + } + + //other show animations + A.textTimeLine + .fromTo( + gameView.index_robot, + .7, + {y:gameView.index_robot.oy-1400}, + {y:gameView.index_robot.oy,ease:Back.easeOut.config(1.2), + onStart:()=>{ + A.waitLine.play(); + }, + onComplete:()=>{ + A.robotFloat = TweenMax.to(gameView.index_robot,1,{y:gameView.index_robot.oy+20,yoyo:true,repeat:-1}) + A.askFloat = TweenMax.to(gameView.index_ask,1,{y:gameView.index_ask.oy+20,yoyo:true,repeat:-1}) + } + }, + 'robot-=.3' + ) + .fromTo( + gameView.index_ask, + .7, + {x:gameView.index_ask.ox-150,alpha:0}, + {x:gameView.index_ask.ox,alpha:1,ease:Back.easeOut.config(1.2)}, + 'robot+=.2' + ) + .fromTo( + gameView.index_btn, + .7, + {y:gameView.index_btn.oy-1400+122/2}, + {y:gameView.index_btn.oy+122/2,ease:Back.easeOut.config(1.2), + onComplete:()=>{ + A.robotFloat = TweenMax.to(gameView.index_btn,1,{scaleX:.95,scaleY:.95,ease:Elastic.easeOut.config(1, 0.3),yoyo:true,repeat:-1}) + } + }, + 'robot-=.3' + ) + .fromTo( + gameView.index_pipe, + .7, + {y:-800}, + {y:gameView.index_pipe.oy,ease:Back.easeOut.config(1.2)}, + 'robot-=.3' + ) + .fromTo( + [gameView.index_title,gameView.index_desc], + .7, + {alpha:0}, + {alpha:1}, + 'robot+=.3' + ) + .fromTo( + [gameView.index_stars_1], + .7, + {x:gameView.index_stars_1.ox+300,alpha:0}, + {x:gameView.index_stars_1.ox,alpha:1}, + 'robot+=.3' + ) + .fromTo( + [gameView.index_stars_2], + .7, + {x:gameView.index_stars_2.ox-300,alpha:0}, + {x:gameView.index_stars_2.ox,alpha:1}, + 'robot+=.55' + ) + .fromTo( + [gameView.index_stars_3], + .7, + {x:gameView.index_stars_3.ox-300,alpha:0}, + {x:gameView.index_stars_3.ox,alpha:1}, + 'robot+=.625' + ) + .fromTo( + [gameView.index_star_2], + .7, + {x:gameView.index_star_2.ox-300,alpha:0}, + {x:gameView.index_star_2.ox,alpha:1}, + 'robot+=.7' + ) + .fromTo( + [gameView.index_leida], + .7, + {x:gameView.index_leida.ox+300,alpha:0}, + {x:gameView.index_leida.ox,alpha:1}, + 'robot+=.8' + ) + .fromTo( + [gameView.index_star_1], + .7, + {x:gameView.index_star_1.ox+300,alpha:0}, + {x:gameView.index_star_1.ox,alpha:1}, + 'robot+=.9' + ) + + + + + // 暂停 + A.pause = function(){ + A.textTimeLine.pause(); + } + + // 开始 + A.play = function(){ + A.textTimeLine.play(); + } + + + return A + } + + createAnimations(){ + let A = {}, + gameView = this.game.gameView; + + A.showTimeLine = new TimelineMax({ + paused:true + }) + + for(let i = 1; i < 7; i++){ + + // console.log(gameView[`create_text_${i}`]) + let timelineSpan = new TimelineMax() + //text + .fromTo(gameView[`create_text_${i}`],1, + {y:gameView[`create_text_${i}`].oy-100,x:gameView[`create_text_${i}`].ox-600}, + {y:gameView[`create_text_${i}`].oy,x:gameView[`create_text_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + //line + .fromTo(gameView[`create_line_${i}`],1, + {y:gameView[`create_line_${i}`].oy-100,x:gameView[`create_line_${i}`].ox-600}, + {y:gameView[`create_line_${i}`].oy,x:gameView[`create_line_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + .fromTo(gameView[`create_text_${i}`],.5, + {rotation:0}, + {rotation:-25}, + `text_${i}+=.4` + ) + .to(gameView[`create_text_${i}`],.6, + {rotation:0}, + `text_${i}+=1` + ) + .timeScale(2) + + A.showTimeLine.add(timelineSpan,`-=${i == 1? 0 : .55}`) + } + + + // 暂停 + A.pause = function(){ + A.showTimeLine.pause(); + } + + // 开始 + A.play = function(){ + A.showTimeLine.play(); + } + + + return A + } + + questionAnimations(target){ + const A = {}; + + A.topAni = TweenMax.fromTo(target.topCartoon,2,{y:target.topCartoon.oy-16},{y:target.topCartoon.oy,yoyo:true,repeat:-1}); + + A.ld = TweenMax.fromTo(target.d_2,2,{x:target.d_2.ox-16},{x:target.d_2.ox,yoyo:true,repeat:-1}); + + A.star = TweenMax.fromTo(target.star,2,{rotation:0},{rotation:360,repeat:-1,ease:Linear.easeNone}); + + if(target.index == 1) + A.d_3 = TweenMax.fromTo(target.d_3,1.5,{y:target.d_3.oy-10,scaleX:1,scaleY:1},{y:target.d_3.oy,scaleX:.9,scaleY:.9,yoyo:true,repeat:-1}); + + if(target.index == 5) + A.d_4 = TweenMax.fromTo(target.d_4,1.5,{y:target.d_4.oy-10,scaleX:1,scaleY:1},{y:target.d_4.oy,scaleX:.9,scaleY:.9,yoyo:true,repeat:-1}); + + return A + } + + showAnswerAnimation(target){ + const A = {}; + + //ballLine + A.ballLine = new TimelineMax({paused:true,repeat:-1}) + .to(target.ball_1,.5,{alpha:1}) + .fromTo(target.ball_1,2,{x:302+12},{x:302+12+256,ease:SlowMo.ease.config(0.05, 0.7, true)},'start') + .fromTo(target.square,.4,{rotation:90},{rotation:90+360,ease:SlowMo.ease.config(0.05, 0.7, true)},'start+=.9') + .to(target.ball_1,.5,{alpha:0},'start+=1.9') + .fromTo(target.ball_2,.25,{alpha:0},{alpha:1},'start+=2.2') + .fromTo(target.ball_2,2,{x:302+12},{x:302+12+256,ease:SlowMo.ease.config(0.05, 0.7, true)},'start+=2.6') + .fromTo(target.square,.4,{rotation:90},{rotation:90+360},'start+=3.5') + .to(target.ball_2,.5,{alpha:0}) + + + + //show answer timeline + A.timeline = new TimelineMax({ + onStart:()=>{ + TweenMax.set(target.ball_2,{alpha:0}) + }, + onComplete:()=>{ + A.ballLine.play(); + A.float_1 = TweenMax.fromTo(target.star_1,2,{y:836},{y:836+10,yoyo:true,ease:Linear.easeNone,repeat:-1}); + A.float_2 = TweenMax.fromTo(target.star_2,2,{y:441},{y:441+20,yoyo:true,ease:Linear.easeNone,repeat:-1,delay:1}); + A.float_3 = TweenMax.fromTo(target.ld,2,{x:560},{x:560+15,yoyo:true,ease:Linear.easeNone,repeat:-1,delay:1.5}); + A.btn = TweenMax.to(target.btn,1,{scaleX:.95,scaleY:.95,ease:Elastic.easeOut.config(1, 0.3),yoyo:true,repeat:-1,delay:2}) + } + }) + .fromTo(this.game.gameView.answerContainer,.4,{alpha:0},{alpha:1}) + .fromTo(target.box,.45,{alpha:0,y:654},{alpha:1,y:354,ease:Back.easeOut.config(1.2)},'shown_1') + .fromTo(target.answer,.45,{alpha:0,y:363+98/2-200,scaleX:2,scaleY:2},{alpha:1,y:363+98/2,ease:Back.easeOut.config(1.2),scaleX:1,scaleY:1},'shown_1+=.2') + .fromTo(target.pipe,.55,{alpha:0,/*x:469-100,*/y:959-300},{alpha:1/*,x:469*/,y:959,ease:Back.easeOut.config(1.1)},'shown_2') + .fromTo(target.btn,.55,{alpha:0,/*x:221+318/2-100,*/y:1070+122/2-300},{alpha:1/*,x:221+318/2*/,y:1070+122/2,ease:Back.easeOut.config(1.1)},'shown_2') + .fromTo(target.answer_text,.55,{alpha:0,y:571+100},{alpha:1,y:571,ease:Back.easeOut.config(0)},'shown_3-=.3') + .fromTo(target.ld,.55,{alpha:0,x:560+200},{alpha:1,x:560,ease:Back.easeOut.config(1.1)},'shown_3-=.2') + .fromTo(target.star_1,.55,{alpha:0,x:96-200},{alpha:1,x:96,ease:Back.easeOut.config(1.1)},'shown_3-=.2') + .fromTo(target.star_2,.55,{alpha:0,x:491+100},{alpha:1,x:491,ease:Back.easeOut.config(1.1)},'shown_3-=.2') + .staggerFromTo([target.ball_1,target.ball_2,target.ban,target.square],.45,{alpha:0,scaleX:1.4,scaleY:1.4},{scaleX:1,scaleY:1,alpha:1,ease:Back.easeOut.config(1.1)},.1,'shown_3-=.1') + + + return A + } + + //zhane result page ani + zhaneResultAnimations(){ + let A = {}; + let gameView = this.game.gameView; + + //wait ani + A.waitLine = new TimelineMax({ + paused:true, + repeat:-1, + yoyo:true + }) + + for(let i = 1; i < 10; i++){ + A.waitLine + + .fromTo(gameView[`zhane_index_text_${i}`],Math.random() * 2 + 1, + {rotation:0}, + {rotation:(Math.random()>.5?1:-1) * Math.random() * 10+5,ease:Linear.easeNone}, + `start` + ) + .to(gameView[`zhane_index_text_${i}`],Math.random() * 1 + 1, + {rotation:0,ease:Linear.easeNone}, + `start2` + ) + } + + //show ani + A.textTimeLine = new TimelineMax({ + paused:false, + delay: 1 + }) + + .fromTo( + [gameView.zhane_index_title], + .7, + {x:0,alpha:0}, + {x:gameView.zhane_index_title.ox+399/2,alpha:1,onComplete:()=>{ + A.flash = TweenMax.to(gameView.zhane_index_title,.6,{scaleX:1.1,scaleY:1.1,ease:Back.easeOut.config(1.2),yoyo:true,repeat:-1}) + }}, + 'start1' + ) + .fromTo( + gameView.zhane_index_btn, + .7, + {y:gameView.zhane_index_btn.oy+500+122/2}, + {y:gameView.zhane_index_btn.oy+122/2,ease:Back.easeOut.config(1.2), + onStart:()=>{ + // A.waitLine.play(); + }, + onComplete:()=>{ + A.robotFloat = TweenMax.to(gameView.zhane_index_btn,1,{scaleX:.95,scaleY:.95,ease:Elastic.easeOut.config(1, 0.3),yoyo:true,repeat:-1}) + } + }, + 'start1+=.4' + ) + + let speArr = [1,2,4,5], + speArr2= [6,7,8,9] + for(let i = 1; i < 10; i++){ + let timelineSpan = new TimelineMax() + //text + .fromTo(gameView[`zhane_index_text_${i}`],1, + {y:gameView[`zhane_index_text_${i}`].oy-700,x:gameView[`zhane_index_text_${i}`].ox-200}, + {y:gameView[`zhane_index_text_${i}`].oy,x:gameView[`zhane_index_text_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + //line + .fromTo(gameView[`zhane_index_line_${i}`],1, + {y:gameView[`zhane_index_line_${i}`].oy-700,x:gameView[`zhane_index_line_${i}`].ox-200}, + {y:gameView[`zhane_index_line_${i}`].oy,x:gameView[`zhane_index_line_${i}`].ox,ease:i > 5 ? Back.easeOut.config(0) : Back.easeOut.config(1.2)}, + `text_${i}` + ) + .fromTo(gameView[`zhane_index_text_${i}`],.5, + {rotation:0}, + {rotation:-25}, + `text_${i}+=.4` + ) + .to(gameView[`zhane_index_text_${i}`],.6, + {rotation:0}, + `text_${i}+=1` + ) + .timeScale(2.2) + + + A.textTimeLine.add(timelineSpan,`-=${i == 1 ? 0 : .6}`) + A.textTimeLine.timeScale(1.2) + } + + //other show animations + A.textTimeLine + + + // .fromTo( + // gameView.index_pipe, + // .7, + // {y:-800}, + // {y:gameView.index_pipe.oy,ease:Back.easeOut.config(1.2)}, + // 'robot-=.3' + // ) + + .fromTo( + [gameView.zhane_index_stars_1], + .7, + {x:gameView.zhane_index_stars_1.ox+300,alpha:0}, + {x:gameView.zhane_index_stars_1.ox,alpha:1,onComplete:()=>{ + A.waitLine.play(); + }}, + 'robot+=.3' + ) + .fromTo( + [gameView.zhane_index_stars_2], + .7, + {x:gameView.zhane_index_stars_2.ox-300,alpha:0}, + {x:gameView.zhane_index_stars_2.ox,alpha:1}, + 'robot+=.55' + ) + .fromTo( + [gameView.zhane_index_stars_3], + .7, + {x:gameView.zhane_index_stars_3.ox-300,alpha:0}, + {x:gameView.zhane_index_stars_3.ox,alpha:1}, + 'robot+=.625' + ) + .fromTo( + [gameView.zhane_index_star_2], + .7, + {x:gameView.zhane_index_star_2.ox-300,alpha:0}, + {x:gameView.zhane_index_star_2.ox,alpha:1}, + 'robot+=.7' + ) + .fromTo( + [gameView.zhane_index_leida], + .7, + {x:gameView.zhane_index_leida.ox+300,alpha:0}, + {x:gameView.zhane_index_leida.ox,alpha:1}, + 'robot+=.8' + ) + .fromTo( + [gameView.zhane_index_star_1], + .7, + {x:gameView.zhane_index_star_1.ox+300,alpha:0}, + {x:gameView.zhane_index_star_1.ox,alpha:1}, + 'robot+=.9' + ) + + + + + // 暂停 + A.pause = function(){ + A.textTimeLine.pause(); + } + + // 开始 + A.play = function(){ + A.textTimeLine.play(); + } + + + return A + } +} +module.exports = animation; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/createView.js b/src/page/index/PushCoinGame/game/createView.js new file mode 100644 index 0000000..83faa38 --- /dev/null +++ b/src/page/index/PushCoinGame/game/createView.js @@ -0,0 +1,496 @@ +import frameData from './frameData'; +import maskCreater from './maskCreater'; //mask creater + +/** + * + * @method + * @desc - a creater for game view + * @param argument{ + * @param {Object} game - find game object + * @param {Object} loader - find game loader + * @param {Object} layout - find layout object + * @param {Boolean} sprite - is sprite ? + * @param {Object} circle - draw circle param + * @param {String} layId - layout id + * @param {String} imgId - img id + * @param {Number} x - obj x-pos + * @param {Number} y - obj y-pos + * @param {Number} width - createjs rect width + * @param {Number} height - createjs rect height + * @param {String} bg - createjs rect background + * @param {Number} regX - animation orgin x + * @param {Number} regY - animation orgin y + * @param {Number} scaleX - obj scale x + * @param {Number} scaleY - obj scale y + * @param {Number} moved - obj can move or no + * @param {Number} vx - obj x move speed + * @param {Number} alpha - obj alpha + * @param {Number} type - obj type --- 1 normal / 2 ding / 3 break / 4 word-1 / 5 word -2 + * @param {Boolean} visible - obj visible + * @param {Number} framesName - sprite frames name + * @param {String} aniName - sprite name + * @param {String} ani_1 - sprite aniamtions name - 1 + * @param {String} container - addchild container + * @param {String} textBaseline - text base line + * @param {String} textAlign - text align + * @param {String} textColor - text color + * @param {String} textSize - text size + * @param {Boolean} shadow - show text shadow true or false + * @param {Boolean} shadowColor - text shadow color + * @param {Boolean} shadowOffsetX- text shadow offsetX + * @param {Boolean} shadowOffsetY- text shadow offsetY + * @param {Boolean} shadowBlur - text shadow blur + * @param {Number} cacheX - cache Text X + * @param {Number} cacheY - cache Text Y + * @param {Number} cacheW - cache Text width + * @param {Number} cacheH - cache Text height + * } + * + */ + + +const creater = function (argument) { + let _default = { + game: null, + loader: null, + layout: null, + sprite: false, + single: false, + empty: false, + layId: '', + imgId: '', + name: '', + ox: 0, + oy: 0, + x: 0, + y: 0, + width: 750, + height: 1334, + rotation: 0, + bg: 'rgba(255,255,255,1)', + regX: 0, + regY: 0, + visible: true, + hide: false, + moved: 0, + vx: 1, + circle: { + visible: false, + sector: false, + startAngle: 0, + endAngle: Math.PI * 2, + }, + circleLine: { + visible: false, + borderWidth: 2, + color: '#ffffff', + }, + mask: { + visible: false, + x: 0, + y: 0, + r: 0, + p: null, + debug: false + }, + scaleX: 1, + scaleY: 1, + alpha: 1, + type: 0, + framesName: '', + defaultAni: 'default', + container: '', + rect: { + x: 0, + y: 0, + borderWidth: 1, + p: null, + blurFilter: false + }, + text: { + visible: false, + word: "", + baseline: "alphabetic", + align: "center", + color: "#ffffff", + size: "26px fzzt", + lineHeight: "30" + }, + singleSprite: { + visible: false, + parent: {}, + name: '' + }, + shadow: false, + shadowColor: '#dddddd', + roCenter: false, + shadowOffsetX: 0, + shadowOffsetY: 0, + shadowBlur: 2, + cacheX: 0, + cacheY: 0, + cacheW: 750, + cacheH: 1334, + return: false, + mouseEnabled: true, + compositeOperation: '' + } + + let maskObj = Object.assign({}, _default.mask, argument.mask); + let textObj = Object.assign({}, _default.text, argument.text); + let rectObj = Object.assign({}, _default.rect, argument.rect); + let circleObj = Object.assign({}, _default.circle, argument.circle); + let singleSpriteObj = Object.assign({}, _default.singleSprite, argument.singleSprite); + let circleLineObj = Object.assign({}, _default.circleLine, argument.circleLine); + + + let opts = Object.assign({}, _default, argument); + opts.mask = maskObj; + opts.text = textObj; + opts.rect = rectObj; + opts.circle = circleObj; + opts.circleLine = circleLineObj; + opts.singleSprit = singleSpriteObj; + + // console.log(opts.layId,opts.imgId) + //雪碧图单帧 + if (opts.singleSprite.visible) { + // console.log(opts.singleSprite.parent,opts.singleSprite.name) + opts.layout[opts.layId] = new createjs.Sprite(opts.singleSprite.parent.spriteSheet, opts.singleSprite.name).set({ + x: opts.x + (opts.roCenter ? opts.width / 2 : 0), + y: opts.y + (opts.roCenter ? opts.height / 2 : 0), + ox: opts.ox ? opts.ox : opts.x + (opts.roCenter ? opts.width / 2 : 0), + oy: opts.oy ? opts.oy : opts.y + (opts.roCenter ? opts.height / 2 : 0), + regX: opts.regX + (opts.roCenter ? opts.width / 2 : 0), + regY: opts.regY + (opts.roCenter ? opts.height / 2 : 0), + type: opts.type, + tindex: opts.tindex, + hide: opts.hide, + state: opts.state, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + rotation: opts.rotation, + width: opts.width, + height: opts.height, + name: opts.name || opts.layId, + moved: opts.moved, + vx: opts.vx, + sp: opts.sp, + hs: opts.hs, + alpha: opts.alpha, + visible: opts.visible, + mask: opts.mask.visible ? shape : null, + mouseEnabled: opts.mouseEnabled + }); + if (opts.maskAnimation) { + opts.maskContainer = new createjs.Container(); + + if (opts.transform) + opts.layout[opts.layId].setTransform(...opts.transform); + + + opts.maskContainer.mask = new maskCreater(opts.mask.name, opts.mask.type, opts.mask.transform); + opts.maskContainer.compositeOperation = opts.compositeOperation; + opts.maskContainer.addChild(opts.layout[opts.layId]); + } + } + //帧动画 + else if (opts.sprite) { + let img = opts.loader.getResult(opts.imgId); + var spriteSheet = new createjs.SpriteSheet({ + images: [img], + frames: frameData[opts.framesName].frames, + animations: opts.animations + }); + + opts.layout[opts.layId] = new createjs.Sprite(spriteSheet, opts.defaultAni).set({ + x: opts.x + (opts.roCenter ? opts.width / 2 : 0), + y: opts.y + (opts.roCenter ? opts.height / 2 : 0), + // width: frameData[opts.framesName].sourceW, + // height: frameData[opts.framesName].sourceH, + ox: opts.ox ? opts.ox : opts.x + (opts.roCenter ? opts.width / 2 : 0), + oy: opts.oy ? opts.oy : opts.y + (opts.roCenter ? opts.height / 2 : 0), + regX: opts.regX + (opts.roCenter ? opts.width / 2 : 0), + regY: opts.regY + (opts.roCenter ? opts.height / 2 : 0), + type: opts.type, + state: opts.state, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + name: opts.name || opts.layId, + compositeOperation: opts.compositeOperation, + alpha: opts.alpha + }); + } else if (opts.maskAnimation) { + //遮罩动画 + opts.maskContainer = new createjs.Container(); + let img = opts.loader.getResult(opts.imgId); + + opts.layout[opts.layId] = new createjs.Bitmap(img).setTransform(...opts.transform).set({ + alpha: opts.alpha, + ox: opts.ox, + oy: opts.oy + }); + + opts.maskContainer.mask = new maskCreater(opts.mask.name, opts.mask.type, opts.mask.transform); + opts.maskContainer.compositeOperation = opts.compositeOperation; + opts.maskContainer.addChild(opts.layout[opts.layId]); + + } else if (opts.text.visible) { + //文字 + let shape; + if (opts.mask.visible) { + let g = new createjs.Graphics(); + shape = new createjs.Shape().set({ + graphics: g.drawRect(opts.mask.x, opts.mask.y, opts.mask.width, opts.mask.height), + x: opts.mask.x, + y: opts.mask.y, + }); + } + let shadow = opts.shadow ? new createjs.Shadow(opts.shadowColor, opts.shadowOffsetX, opts.shadowOffsetY, opts.shadowBlur) : null; + + opts.layout[opts.layId] = new createjs.Text(opts.text.word, opts.text.size, opts.text.color).set({ + x: opts.x, + y: opts.y, + ox: opts.ox ? opts.ox : opts.x, + oy: opts.oy ? opts.oy : opts.y, + regX: opts.regX, + regY: opts.regY, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + alpha: opts.alpha, + shadow: shadow, + name: opts.name || opts.layId, + mask: opts.mask.visible ? shape : null, + lineHeight: opts.text.lineHeight, + textBaseline: opts.text.baseline, + textAlign: opts.text.align, + mouseEnabled: opts.mouseEnabled + }) + // console.log(opts.layout[opts.layId]) + opts.game.webGL && opts.cacheContainer.addChild(opts.layout[opts.layId]) + opts.game.webGL && opts.cacheContainer.cache(opts.cacheX, opts.cacheY, opts.cacheW, opts.cacheH); + } else if (opts.rect.visible) { + //Graphics rect + let g = new createjs.Graphics(); + + // if (opts.mask.visible) { + // let g2 = new createjs.Graphics(); + // shape = new createjs.Shape().set({ + // graphics: opts.mask.p ? g2.p(opts.mask.p) : g2.drawRect(opts.mask.x, opts.mask.y, opts.mask.width, opts.mask.height), + // x: opts.x, + // y: opts.y, + // }); + // } + + let graphics; + if (opts.rect.blurFilter) { + graphics = g.beginBitmapFill(opts.loader.getResult(opts.imgId), 'no-repeat') + .drawRect(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height) + + } else { + // console.log(opts.rect) + if (opts.rect.round && opts.rect.roundLine) + graphics = g.setStrokeStyle(opts.rect.borderWidth).f(opts.bg).s(opts.rect.bg).drawRoundRect(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height, opts.rect.r).es(); + else if (opts.rect.round) + graphics = g.f(opts.bg).drawRoundRect(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height, opts.rect.r) + else if (opts.rect.roundLine) + graphics = g.setStrokeStyle(opts.rect.borderWidth).f(opts.bg).s(opts.rect.bg).drawRect(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height).es(); + else if (opts.rect.p) + graphics = g.p(opts.rect.p); + else + graphics = g.f(opts.bg).drawRect(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height); + } + + //create shape + opts.layout[opts.layId] = new createjs.Shape().set({ + graphics: graphics, + x: opts.x, + y: opts.y, + regX: opts.regX, + regY: opts.regY, + alpha: opts.alpha, + name: opts.name || opts.layId, + mouseEnabled: opts.mouseEnabled + }); + + opts.layout[opts.layId].mask = new maskCreater(opts.mask.name, opts.mask.type, opts.mask.transform); + + if (opts.rect.blurFilter) { + let blurFilter = new createjs.BlurFilter(10, 10, 10); + opts.layout[opts.layId].filters = [blurFilter]; + opts.layout[opts.layId].cache(opts.rect.x, opts.rect.y, opts.rect.width, opts.rect.height); + } + + opts.game.webGL && opts.cacheContainer.addChild(opts.layout[opts.layId]) + opts.game.webGL && opts.cacheContainer.cache(opts.cacheX, opts.cacheY, opts.cacheW, opts.cacheH); + } + else if (opts.circle.visible) { + //Graphics circle + let g = new createjs.Graphics(); + let angle, startAngle, endAngle, x1 = 0, y1 = 0; + if (opts.circle.sector) { //画扇形 + angle = (Math.abs(opts.circle.angle) > 360) ? 360 : opts.circle.angle; + startAngle = opts.circle.startAngle * Math.PI / 180; + endAngle = opts.circle.startAngle + angle * Math.PI / 180; + x1 = opts.circle.x + opts.circle.r * Math.cos(startAngle); + y1 = opts.circle.x + opts.circle.r * Math.sin(startAngle); + } + + opts.layout[opts.layId] = new createjs.Shape().set({ + graphics: g.f(opts.bg).moveTo(opts.circle.x, opts.circle.y).arc(opts.circle.x, opts.circle.y, opts.circle.r, startAngle ? startAngle : 0, endAngle ? endAngle : Math.PI * 2).endFill(), + x: opts.x + (opts.roCenter ? opts.circle.r : 0), + y: opts.y + (opts.roCenter ? opts.circle.r : 0), + regX: opts.regX + (opts.roCenter ? opts.circle.r : 0), + regY: opts.regY + (opts.roCenter ? opts.circle.r : 0), + rotation: opts.rotation, + alpha: opts.alpha, + name: opts.name || opts.layId, + mouseEnabled: opts.mouseEnabled + }); + // opts.game.webGL && opts.cacheContainer.addChild(opts.layout[opts.layId]) + // opts.game.webGL && opts.cacheContainer.cache(opts.cacheX,opts.cacheY,opts.cacheW,opts.cacheH); + } + else if (opts.circleLine.visible) { + //circle line + let g = new createjs.Graphics(); + + opts.layout[opts.layId] = new createjs.Shape().set({ + graphics: g.setStrokeStyle(opts.circleLine.borderWidth).s(opts.circleLine.color).arc(opts.circleLine.x, opts.circleLine.y, opts.circleLine.r, opts.circleLine.startAngle, opts.circleLine.endAngle).endFill(), + x: opts.x + (opts.roCenter ? opts.circleLine.r : 0), + y: opts.y + (opts.roCenter ? opts.circleLine.r : 0), + regX: opts.regX + (opts.roCenter ? opts.circleLine.r : 0), + regY: opts.regY + (opts.roCenter ? opts.circleLine.r : 0), + rotation: opts.rotation, + alpha: opts.alpha, + name: opts.name || opts.layId, + mouseEnabled: opts.mouseEnabled + }); + + // opts.game.webGL && opts.cacheContainer.addChild(opts.layout[opts.layId]) + // opts.game.webGL && opts.cacheContainer.cache(opts.cacheX,opts.cacheY,opts.cacheW,opts.cacheH); + } + else if (opts.bitmapShap) { + let g = new createjs.Graphics(); + let img = opts.loader.getResult(opts.imgId); + opts.layout[opts.layId] = new createjs.Shape().set({ + graphics: g.beginBitmapFill(img, "no-repeat").drawRect(0, 0, opts.width, opts.height), + x: opts.x, + y: opts.y, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + alpha: opts.alpha, + name: opts.name || opts.layId, + mouseEnabled: false + }); + // (opts.game.webGL || opts.game.needCache) && opts.cacheContainer.cache(opts.cacheX,opts.cacheY,opts.cacheW,opts.cacheH); + } + else if (opts.bitmapCircle) { + let g = new createjs.Graphics(); + let img; + if (typeof (opts.imgId) == 'object') { + if (opts.imgId.other) { + img = opts.game.friend.loadedPhoto; + } + else if (opts.imgId.fighter) { + img = opts.imgId.fighter + } + else { + img = opts.game.userinfo.loadedPhoto + } + } else { + img = opts.loader.getResult(opts.imgId) + } + opts.layout[opts.layId] = new createjs.Shape().set({ + graphics: g.beginBitmapFill(img, "no-repeat").drawCircle(opts.circle.x, opts.circle.y, opts.circle.r), + x: opts.x, + y: opts.y, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + alpha: opts.alpha, + name: opts.name || opts.layId, + mouseEnabled: false + }); + // (opts.game.webGL || opts.game.needCache) && opts.cacheContainer.cache(opts.cacheX,opts.cacheY,opts.cacheW,opts.cacheH); + } + else { + //图 + let img = opts.loader.getResult(opts.imgId); + //taikohui userphoto + let shape; + if (opts.mask.visible) { + let g = new createjs.Graphics(); + shape = new createjs.Shape().set({ + graphics: g.drawRect(opts.mask.x, opts.mask.y, opts.mask.width, opts.mask.height), + x: opts.x, + y: opts.y, + }); + } + opts.layout[opts.layId] = new createjs.Bitmap(img).set({ + x: opts.x + (opts.roCenter ? opts.width / 2 : 0), + y: opts.y + (opts.roCenter ? opts.height / 2 : 0), + ox: opts.ox ? opts.ox : opts.x, + oy: opts.oy ? opts.oy : opts.y, + width: opts.width ? opts.width : img.width, + height: opts.height ? opts.height : img.height, + regX: opts.regX + (opts.roCenter ? opts.width / 2 : 0), + regY: opts.regY + (opts.roCenter ? opts.height / 2 : 0), + rotation: opts.rotation, + visible: opts.visible, + scaleX: opts.scaleX, + scaleY: opts.scaleY, + type: opts.type, + moved: opts.moved, + name: opts.name || opts.layId, + vx: opts.vx, + hide: opts.hide, + state: opts.state, + mask: opts.mask.visible ? shape : null, + alpha: opts.alpha, + mouseEnabled: opts.mouseEnabled + }); + } + + if (opts.mask.visible) { + let shape; + let g = new createjs.Graphics(); + if (opts.mask.graph == 'rect') { + shape = new createjs.Shape().set({ + graphics: g.drawRect(opts.mask.x, opts.mask.y, opts.mask.width, opts.mask.height), + // x : opts.mask.x, + // y : opts.mask.y, + }); + } + else if (opts.mask.graph == 'rectRound') { + shape = new createjs.Shape().set({ + graphics: g.drawRoundRect(opts.mask.x, opts.mask.y, opts.mask.width, opts.mask.height, opts.mask.r) + }); + } + else { + shape = new createjs.Shape().set({ + graphics: g.drawCircle(0, 0, opts.mask.r), + x: opts.mask.x, + y: opts.mask.y, + }); + } + + opts.layout[opts.layId].mask = shape; + } + + if (!opts.return) { + let target = opts.layout[opts.layId]; + + if ((opts.text.visible || opts.rect.visible) && opts.game.webGL) { + target = opts.cacheContainer + } else { + opts.maskContainer + } + + opts.container.addChild(target) + // opts.container.addChild(opts.text.visible || opts.rect.visible ? opts.cacheContainer : opts.maskAnimation ? opts.maskContainer : opts.layout[opts.layId]) + } + + + + return opts.layout[opts.layId] +} +module.exports = creater; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/frameData.js b/src/page/index/PushCoinGame/game/frameData.js new file mode 100644 index 0000000..1424127 --- /dev/null +++ b/src/page/index/PushCoinGame/game/frameData.js @@ -0,0 +1,44 @@ +/*================================*/ +/*============= 帧数据 ============*/ +/*================================*/ +const framesData = { + 'loading': { + "sourceW": 1506, + "sourceH": 1837, + "frames": [ + [1, 1, 645, 32, 0, 0, 0], + [648, 1, 359, 419, 0, 0, 0], + [1, 422, 395, 520, 0, 0, 0], + [398, 35, 246, 84, 0, 0, 0], + [1, 35, 392, 334, 0, 0, 0], + [398, 121, 243, 28, 0, 0, 0], + [643, 121, 3, 3, 0, 0, 0], + [643, 126, 3, 3, 0, 0, 0], + [1, 371, 37, 41, 0, 0, 0], + [1, 414, 4, 3, 0, 0, 0], + [7, 414, 4, 3, 0, 0, 0], + [40, 371, 402, 32, 0, 0, 0], + [40, 405, 15, 15, 0, 0, 0], + [57, 405, 14, 14, 0, 0, 0], + [73, 405, 10, 12, 0, 0, 0], + [85, 405, 11, 11, 0, 0, 0], + [98, 405, 10, 10, 0, 0, 0], + [110, 405, 10, 10, 0, 0, 0], + [122, 405, 7, 8, 0, 0, 0], + [131, 405, 7, 8, 0, 0, 0], + [140, 405, 10, 7, 0, 0, 0], + [152, 405, 8, 7, 0, 0, 0], + [1, 944, 30, 30, 0, 0, 0], + [1, 976, 26, 25, 0, 0, 0], + [29, 976, 21, 23, 0, 0, 0], + [33, 944, 385, 28, 0, 0, 0], + [52, 974, 328, 28, 0, 0, 0], + [382, 974, 23, 22, 0, 0, 0], + [407, 974, 19, 19, 0, 0, 0], + [444, 151, 171, 167, 0, 0, 0], + [398, 422, 392, 334, 0, 0, 0], + [428, 758, 306, 244, 0, 0, 0] + ], + } +} +module.exports = framesData; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/index.js b/src/page/index/PushCoinGame/game/index.js new file mode 100644 index 0000000..3960fa8 --- /dev/null +++ b/src/page/index/PushCoinGame/game/index.js @@ -0,0 +1,303 @@ +import STAGE from "./stage"; +import LAYOUT from "./view"; +import { gsap } from "gsap"; +import Resource from "./preload"; +import utils from '@/utils/index.js'; + + +class game { + // 构造器 + constructor() { + // 开始debug + this.debug = process.env.NODE_ENV === "development" ? true : false; // process.env !== "production", // 游戏测试模式是否开启 + // 需要显示的页面 + this.showPageIndex = 0; // 0 loading | 1 story | 2 rule | 3 game index | 4 result | 5 poster + this.needUpdate = true; + + this.scene = 1; // 1 - loading | 2 - index + + this.webGL = true;//window.deviceInfo.system == 'IOS' ? true : false; // 是否开启webGL + + this.momentFPS = []; + + this.averageFPS = 60; //平均帧率 + + this.nowPlayingAnimation = null; // 当前正在播放的动画 + + this.playingSound = null; // 当前正在播放的声音 + + this.afterResLoadedStatus = false; // 语言资源全部加载完毕状态 + + this.otherLoadedStatus = false; // 对应语言剩余资源全部加载完毕状态 + + this.langConfig = { id: 2 }; //语言配置 默认为普通话 + + this.playingSounds = []; // 将播放过的音频推入数据记录 + + // 选择语言后的后置资源加载 + this.afterLoaderArr = []; + + // 备用资源加载 更多反应资源加载 + this.otherLoaderArr = []; + + this.utils = utils; + } + + // 初始化 + init(pointer) { + this.vue = pointer; + // 初始化画布 + this.stage = new STAGE().createStage(this); + //实例化layout + this.VIEW = new LAYOUT(this); + + // 保存帧率 + this.saveMomentFPS = setInterval(() => { + if (this.FPS > 30) + this.momentFPS.push(this.FPS) + // console.log(this.momentFPS.length) + if (this.momentFPS.length > 20) + this.momentFPS.shift(); + }, 10); + + + // 绑定事件 + // this.bindEvents(); + + + // 初始化主资源加载器 + this.loadingRes(); + + } + + // 开发debug模式 + devDebugMode() { + + } + + loadingRes() { + this.loadingLoader = utils.preload({ + imgList: Resource.before.imgList, + // audioList: Resource.main.audioList, + loadStart: () => { + // console.log(this.VIEW.loading_progress_bar.graphics.command.w) + }, + progressCallBack: (progress) => { + // progress; // 0.99 + + + }, + completeCallBack: (result) => { + // all loaded triger + // 初始化 loading 界面 + this.gameView = this.VIEW.loading(this); + this.VIEW.createLoadingParticle(); + this.scene = 1; + // this.loadMainRes(); + }, + }); + } + + // 主资源 + loadMainRes() { + this.mainLoader = utils.preload({ + imgList: Resource.main.imgList, + // audioList: Resource.main.audioList, + loadStart: () => { + // console.log(this.VIEW.loading_progress_bar.graphics.command.w) + }, + progressCallBack: (progress) => { + // progress; // 0.99 + gsap.to(this.VIEW.loading_progress_bar.graphics.command, { + w: 30 + 432 * progress, + duration: 0.1, + onUpdate: () => { + + } + }); + + this.VIEW.loading_progress_text.text = + Math.floor(progress * 100) + "%"; + + this.webGL && this.VIEW.loadingCacheContainer.updateCache(); + }, + completeCallBack: (result) => { + // all loaded triger + this.VIEW.hideLoading() + // this.mainResLoaded(); + }, + }); + } + + // 主资源加载完毕 显示首页 + mainResLoaded() { + gsap.to([this.gameView.loading_progress_bg, this.gameView.loading_progress_bar, this.gameView.loading_text, this.gameView.loading_progress_text,], { + alpha: 0, + onUpdate: () => { + this.webGL && this.VIEW.loadingCacheContainer.updateCache(); + } + }) + gsap.fromTo(this.gameView.loading_start, { alpha: 0, scaleX: 0.95, scaleY: 0.95 }, { alpha: 1, scaleX: 1, scaleY: 1, ease: "elastic.out(1, 0.3)" }) + } + + + // 求数组平均数 + getArrAverage(arr) { + return arr.reduce((num, item, index) => { + if (index != arr.length - 1) { + return num + item; + } else { + return (num + item) / arr.length; + } + }); + } + + // 获取平均fps + getAverageFPS() { + // 计算平均帧率 + this.saveMomentFPS && clearInterval(this.saveMomentFPS) + this.averageFPS = this.getArrAverage(this.momentFPS); + if (this.averageFPS <= 50) { + console.log('低等性能手机,刷新率为', this.averageFPS) + } + else if (this.averageFPS > 50 && this.averageFPS < 70) { + console.log('中等性能手机,刷新率为', this.averageFPS) + } + else if (this.averageFPS >= 70) { + console.log('高性能手机,高刷新率为', this.averageFPS) + } + + // 计算出全局speed + this.globalSpeed = 60 / this.averageFPS; + console.log(this.globalSpeed) + } + + //debug mode destroyed + + //game model + model() { + let M = {}; + return M + } + + //game viewer + view() { + let V = {}; + let A = {}; + + this.adaptY = _stage.adaptScreen(); + + this.gameView = _layout.init(this, V, A); + + V.checkIPhoneX = () => { + let windowW = window.innerWidth; + let windowH = window.innerHeight; + if (windowH < 1130) { + + } + + if (windowW / windowH < 0.56) { // ios phone X 640*1386 wechat(640*1277) || 750*1624 wechat(750*1496) + this.phoneX = true; + } else { // ios other + this.phoneX = false; + } + } + V.checkIPhoneX(); + + A.commonBtnAni = (target, callbacks) => { + let timeline = new TimelineMax({ + onComplete: () => { + timeline.kill(); + callbacks && callbacks(); + } + }); + timeline + .to(target, .4, { scaleX: .9, scaleY: .9 }) + .to(target, .2, { scaleX: 1, scaleY: 1 }) + } + + return { + layout: V, + ani: A + }; + } + + // 静音音频 + silenceSoundInit() { + var audioTag = document.createElement("audio"); + audioTag.controls = false; + audioTag.preload = "auto"; + audioTag.loop = false; // looping this seems to cause clicking on older iOS devices + audioTag.src = silenceDataURI; + document.addEventListener("visibilitychange", function () { + if (document.visibilityState == 'visible') audioTag.play(); + }); + + this.silenceAudio = audioTag; + } + + // 播放音效 + playSound(musicId, spe) { + // 移除所有声音 + // createjs.Sound.removeAllSounds(); + // 暂停上一个音频 + // console.log(this.playingSound) + if (this.playingSound) { + console.log('准备暂停音频=>', this.playingSound.name) + this.playingSound.paused = true; + this.playingSound.destroy(); + } + + + console.log('准备播放音频=>', musicId) + // let props = new createjs.PlayPropsConfig().set({ + // interrupt: createjs.Sound.INTERRUPT_ANY, + // loop: 0, + // volume: 1 + // }); + this.playingSound = createjs.Sound.play(('sound-' + musicId)); //如果声音的最大实例数已经在播放,如何中断同一源的任何当前播放的音频实例。值在Sound类上被定义为INTERRUPT_TYPE常量 + this.playingSound.name = musicId + // return sound + } + + // 绑定事件 + bindEvents() { + this.gameView.loading_start + .on('mousedown', (e) => { + this.silenceAudio.play(); + // createjs.Sound.play('sound-silence', { loop: -1 }); + console.log(this.vue.$BGM.paused, this.vue.$BGM.mute) + // 如果存在背景音乐 如果音乐被暂停同时用户未静音的话 + if (this.vue.$BGM && this.vue.$BGM.paused && !this.vue.$BGM.mute) { + console.log('playing bgm music') + this.vue.$BGM.play(); + } + this.gameView.loading_start.mouseEnabled = false; + // console.log('点击了开始') + // 埋点 + this.vue.$Utils.addTrackEvent("用户点击了开始", '用户loading页点击了开始'); + this.vue.$Utils.btnTouched(e.currentTarget, () => { + + + // 将canvas设置为不可交互 + let style = this.stage.stage.canvas.className; + this.stage.stage.canvas.className = 'none' + + // 初始化 view + this.VIEW.init(); + + // 隐藏loading + this.VIEW.hideLoading(); + // 播放guide动画 + this.changeSpriteAnimation('guide'); + // 播放声音 + this.playSound('guide'); + // 显示按钮动画 + this.vue.showLangBtnAni(); + }) + }) + } + +} + +export default game \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/layout.js b/src/page/index/PushCoinGame/game/layout.js new file mode 100644 index 0000000..b558526 --- /dev/null +++ b/src/page/index/PushCoinGame/game/layout.js @@ -0,0 +1,292 @@ +const layoutData = { + loading: [ + { + sprite: true, + framesName: 'loading', + layId: 'loadingSprite', + imgId: 'loadingSprite', + x: 750, + "animations": { + "loading_text2_en": { "frames": [0] }, + "arrow": { "frames": [1] }, + "person": { "frames": [2] }, + "start": { "frames": [3] }, + "light": { "frames": [4] }, + "loading_text3": { "frames": [5] }, + "snow_19": { "frames": [6] }, + "snow_9": { "frames": [7] }, + "snow_1": { "frames": [8] }, + "snow_10": { "frames": [9] }, + "snow_20": { "frames": [10] }, + "loading_text3_en": { "frames": [11] }, + "snow_2": { "frames": [12] }, + "snow_8": { "frames": [13] }, + "snow_11": { "frames": [14] }, + "snow_13": { "frames": [15] }, + "snow_17": { "frames": [16] }, + "snow_6": { "frames": [17] }, + "snow_14": { "frames": [18] }, + "snow_7": { "frames": [19] }, + "snow_16": { "frames": [20] }, + "snow_15": { "frames": [21] }, + "snow_3": { "frames": [22] }, + "snow_12": { "frames": [23] }, + "snow_18": { "frames": [24] }, + "loading_text": { "frames": [25] }, + "loading_text2": { "frames": [26] }, + "snow_4": { "frames": [27] }, + "snow_5": { "frames": [28] }, + "snow": { "frames": [29] }, + "light_2": { "frames": [30] }, + "box": { "frames": [31] } + }, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + //bg + { + layId: 'loading_bg', + imgId: 'bg', + x: 0, + y: 0, + scaleX: 1, + scaleY: 1, + alpha: 1 + }, + // imgId: 'snow', + { + layId: 'loading_snow', + singleSprite: { + visible: true, + name: 'snow' + }, + x: 290, + y: 504, + width: 171, + height: 167, + roCenter: true, + scaleX: 1, + scaleY: 1, + alpha: 1 + }, + // tips-1 + { + layId: 'loading_text', + singleSprite: { + visible: true, + name: 'loading_text' + }, + x: 182, + y: 820, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_text2', + singleSprite: { + visible: true, + name: 'loading_text2' + }, + x: 211, + y: 1157, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_text2_en', + singleSprite: { + visible: true, + name: 'loading_text2_en' + }, + x: 54, + y: 1160, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_text3', + singleSprite: { + visible: true, + name: 'loading_text3' + }, + x: 253, + y: 1157, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_text3_en', + singleSprite: { + visible: true, + name: 'loading_text3_en' + }, + x: 174, + y: 1160, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_box', + singleSprite: { + visible: true, + name: 'box' + }, + x: 232, + y: 869, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + // { + // layId: 'loading_box2', + // singleSprite: { + // visible: true, + // name: 'box' + // }, + // x: 232, + // y: 869, + // scaleX: 1, + // scaleY: 1, + // alpha: 0 + // }, + { + layId: 'loading_person', + singleSprite: { + visible: true, + name: 'person' + }, + x: 178, + y: 313, + width: 395, + height: 520, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_arrow', + singleSprite: { + visible: true, + name: 'arrow' + }, + x: 195, + y: 438, + width: 359, + height: 419, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_light', + singleSprite: { + visible: true, + name: 'light' + }, + x: 176, + y: 673, + width: 392, + height: 334, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + { + layId: 'loading_light2', + singleSprite: { + visible: true, + name: 'light_2' + }, + x: 176, + y: 673, + width: 392, + height: 334, + scaleX: 1, + scaleY: 1, + alpha: 0 + }, + // progress_bg + { + layId: 'loading_progress_bg', + rect: { + visible: true, + round: true, + x: 0, + y: 0, + r: 15, + roundLine: 4, + width: 462, + height: 30, + bg: '#0b3046' + }, + bg: '#23669c', + x: 139, + y: 760, + ox: 0, + oy: 0, + scaleX: 1, + scaleY: 1, + alpha: 1 + }, + // progress_bar + { + layId: 'loading_progress_bar', + rect: { + visible: true, + round: true, + x: 0, + y: 0, + r: 15, + width: 30, //462/2 + height: 30 + }, + bg: '#caf0f6', + x: 139, + y: 760, + ox: 0, + oy: 0, + scaleX: 1, + scaleY: 1, + alpha: 1 + }, + // progress text + { + layId: 'loading_progress_text', + x: 375, + y: 910, + text: { + visible: true, + word: '0%', + size: '46px hycm', + color: '#ffffff', + align: 'center', + lineHeight: 40 + }, + scaleX: 1, + scaleY: 1, + alpha: 1 + }, + { + layId: 'loading_start', + singleSprite: { + visible: true, + name: 'start' + }, + x: 252, + y: 800, + width: 248, + height: 84, + roCenter: true, + scaleX: 1, + scaleY: 1, + alpha: 0, + }, + ], +} +module.exports = layoutData \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/maskCreater.js b/src/page/index/PushCoinGame/game/maskCreater.js new file mode 100644 index 0000000..12f9756 --- /dev/null +++ b/src/page/index/PushCoinGame/game/maskCreater.js @@ -0,0 +1,26 @@ +import base64Str from './pathCodes' + +/*create mask*/ +class maskCreater { + + constructor(pname, type, param, debug) { + let mask = new createjs.Shape(); + + if (type == 'code') + mask.graphics.p(base64Str[pname]); + + if (type == 'func') + // ;(new Function('',base64Str[pname]))(); + // eval(base64Str[pname]) + base64Str[pname](mask) + + + if (param) + mask.setTransform(...param) + // console.log(mask) + + return mask; + } +} + +module.exports = maskCreater; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/pathCodes.js b/src/page/index/PushCoinGame/game/pathCodes.js new file mode 100644 index 0000000..ea048f7 --- /dev/null +++ b/src/page/index/PushCoinGame/game/pathCodes.js @@ -0,0 +1,9 @@ +module.exports = { + "rect": (mask) => { + return mask.graphics.f('#000000').drawRoundRect(0, 0, 559, 10, 0).es() + }, + + "cardMask": "mask.graphics.f('#000000').drawRoundRect(177,439,400,550,0).es()", + + "upload_mask": "mask.graphics.f('#000000').drawRoundRect(140,444,477,647,0).es()" +} \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/preload.js b/src/page/index/PushCoinGame/game/preload.js new file mode 100644 index 0000000..2284eba --- /dev/null +++ b/src/page/index/PushCoinGame/game/preload.js @@ -0,0 +1,43 @@ +export default { + before: { + imgList: [ + { + id: 'loadingSprite', + src: require("@/assets/images/loading/loadingSprite.png") + }, + { + id: 'bg', + src: require("@/assets/images/loading/bg.jpg") + }, + { + id: 'snowSprite', + src: require("@/assets/images/loading/snowSprite.png") + }, + ], + audioList: [ + // { + // id: 'sound-silence', + // src: require("@/assets/media/silence.mp3") + // } + ] + }, + main: { + imgList: [ + { + id: 'logo', + src: require("@/assets/images/logo.png") + }, + { + id: 'logo', + src: require("@/assets/images/logo.png") + } + ], + audioList: [ + ] + }, + // 剩余资源 + after: { + imgList: [], + audioList: [] + }, +} \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/question.js b/src/page/index/PushCoinGame/game/question.js new file mode 100644 index 0000000..7547545 --- /dev/null +++ b/src/page/index/PushCoinGame/game/question.js @@ -0,0 +1,1630 @@ +//中文题 +export const chinese = [ + // 类型一 冬奥历史 + [ + // 第1题 + { + + introduction: "展现动静之美、取舍之智慧的冰壶运动于1998年列入冬奥会正式比赛项目。北京冬奥会冰壶项目比赛将于2022年2月2日开始在国家游泳中心举行。", + question: "你知道冰壶的起源地在哪里吗?", + answer: [ + { + right: true, + word: "苏格兰" + }, + { + word: "爱尔兰" + }, + { + word: "不知道" + } + ] + }, + // 第2题 + { + + introduction: "1972年在亚洲举办的第十一届冬季奥运会是冬奥会第一次在欧洲和美国以外的地区举办。", + question: "你知道第十一届冬季奥运会是在亚洲哪个国家举办的吗?", + answer: [ + { + right: true, + word: "日本" + }, + { + word: "韩国" + }, + { + word: "不知道" + } + ] + }, + // 第3题 + { + + introduction: "瑞典、挪威、丹麦被称为“斯堪迪纳维亚国家”,第六届冬季奥运会便是在斯堪迪纳维亚国家中举办的,并且它还是第一个在首都举办冬奥会的国家。", + question: "你知道第一个举办冬奥会的“斯堪迪纳维亚国家”是谁吗?", + answer: [ + { + right: true, + word: "挪威" + }, + { + word: "丹麦" + }, + { + word: "不知道" + } + ] + }, + // 第4题 + { + + introduction: "截至2021年,中国共参加了11届冬季奥运会。2022年北京冬奥会是第一次在中国举办。", + question: "你知道中国第一次参加冬奥会是哪一年吗?", + answer: [ + { + right: true, + word: "1980年" + }, + { + word: "1983年" + }, + { + word: "不知道" + } + ] + }, + // 第5题 + { + + introduction: "速度滑冰简称速滑,是滑冰运动中历史最悠久、开展最广泛的项目。", + question: "你知道世界上第一个举办速滑比赛的是哪个国家吗?", + answer: [ + { + right: true, + word: "英国" + }, + { + word: "荷兰" + }, + { + word: "不知道" + } + ] + }, + // 第6题 + { + + introduction: "花样滑冰起源于18世纪,1872年奥地利首次举办花样滑冰比赛,1924年被列为首届冬奥会比赛项目。", + question: "你知道冬奥会比赛项目花样滑冰起源于哪个国家吗?", + answer: [ + { + right: true, + word: "英国" + }, + { + word: "加拿大" + }, + { + word: "不知道" + } + ] + }, + // 第7题 + { + + introduction: "雪橇起源于北欧。据记载,早在1480年挪威就已出现雪橇。", + question: "你知道世界上第一次雪橇比赛是在哪个国家举行的吗?", + answer: [ + { + right: true, + word: "瑞士" + }, + { + word: "挪威" + }, + { + word: "不知道" + } + ] + }, + // 第8题 + { + + introduction: "第十九届冬季奥运会于2002年2月8日至2月24日在美国举行。这一届奥运会的参赛选手数量创下新高,有18个国家的运动员获得金牌,金牌数量刷新此前纪录。", + question: "你知道第十九届冬季奥运会是在美国哪个城市举办的吗?", + answer: [ + { + right: true, + word: "盐湖城" + }, + { + word: "芝加哥" + }, + { + word: "不知道" + } + ] + }, + // 第9题 + { + + introduction: "第十六届冬季奥运会是最后一次与夏季奥运会在同年举行的冬奥会,这也是冬奥会有史以来场地最分散的一届。", + question: "你知道最后一次与夏季奥运会同年举行的冬季奥运会是在哪个国家举办的吗?", + answer: [ + { + right: true, + word: "法国" + }, + { + word: "日本" + }, + { + word: "不知道" + } + ] + }, + // 第10题 + { + introduction: "截至2022年北京冬奥会,冬奥会举办会期最多的为17天。", + question: "你知道冬奥会举办会期最短的是几天吗?", + answer: [ + { + right: true, + word: "9天" //(第一届、第二届冬奥会都是9天) + }, + { + word: "7天" + }, + { + word: "不知道" + } + ] + }, + // 第11题 + { + introduction: "2026年第二十五届冬季奥运会将在意大利米兰和科尔蒂纳丹佩佐两地举办,这并不是意大利第一次举办冬奥会。", + question: "你知道意大利举办过几届冬奥会吗?", + answer: [ + { + right: true, + word: "四届" + }, + { + word: "三届" + }, + { + word: "不知道" + } + ] + }, + ], + // 类型二 冬奥项目 + [ + // 第1题 + { + introduction: "有一项冬奥会运动项目由远古时代的滑雪狩猎演变而来,它将越野滑雪和射击两种特点不同的竞技运动结合在一起。", + question: "你知道把越野滑雪和射击结合在一起的运动项目是什么吗?", + answer: [ + { + right: true, + word: "冬季两项" + }, + { + word: "北欧两项" + }, + { + word: "不知道" + } + ] + }, + // 第2题 + { + introduction: "这是一种以团队为单位,在冰上进行投掷竞赛的体育项目,也被人们称为“冰上国际象棋”。", + question: "你知道这种以团队为单位,在冰上进行投掷竞赛的冬奥会项目是什么吗?", + answer: [ + { + right: true, + word: "冰壶" + }, + { + word: "冰球" + }, + { + word: "不知道" + } + ] + }, + // 第3题 + { + introduction: "北欧两项起源于北欧,在挪威、瑞典流传已久,自20世纪初开始向世界推广,1924年被列为首届冬季奥运会比赛项目。", + question: "你知道北欧两项是由越野滑雪和哪一项运动组成的竞赛项目吗?", + answer: [ + { + right: true, + word: "跳台滑雪冰壶" + }, + { + word: "高山滑雪" + }, + { + word: "不知道" + } + ] + }, + // 第4题 + { + introduction: "冬季两项起源于斯堪的纳维亚半岛,由远古时代的滑雪狩猎演变而来,1960年被列为冬奥会比赛项目。", + question: "你知道冬季两项是由越野滑雪和哪一项运动结合而成的竞赛项目吗?", + answer: [ + { + right: true, + word: "射击" + }, + { + word: "射箭" + }, + { + word: "不知道" + } + ] + }, + // 第5题 + { + introduction: "冰球结合了多变的滑冰技艺和敏捷娴熟的曲棍球技艺,是对抗性较强的集体冰上运动项目之一。冰球运动员穿着冰鞋,手握冰杆滑行拼抢击球,用冰杆将球击入对方球门,进球多者为胜。", + question: "你知道冰球还被称为什么项目吗?", + answer: [ + { + right: true, + word: "冰上曲棍球" + }, + { + word: "冰上追打球" + }, + { + word: "不知道" + } + ] + }, + // 第6题 + { + introduction: "2014年索契冬残奥会高山滑雪共有五个分项,每个分项有三个类别,除了站姿和视障外,还有一种分项类别。", + question: "你知道冬残奥会高山滑雪的第三个分项类别是哪一项吗?", + answer: [ + { + right: true, + word: "坐姿" + }, + { + word: "卧姿" + }, + { + word: "不知道" + } + ] + }, + // 第7题 + { + introduction: "残奥冬季两项项目总比赛距离在6-15km之间,每圈2.0-2.5km,采用自由式技术滑雪3-5圈。其间,运动员须击中10m远的射击靶,每脱靶一次将被延长总的路线时间。", + question: "残奥冬季两项的视障运动员是通过哪种辅助方式完成射击的?", + answer: [ + { + right: true, + word: "声音信号辅助" + }, + { + word: "人工辅助" + }, + { + word: "不知道" + } + ] + }, + // 第8题 + { + introduction: "冬残奥会越野滑雪的参赛运动员为肢体残疾或盲人/视障运动员。男女运动员采用传统技术或自由式技术通过短距离、中距离和长距离(2.5km至20km)进行个人比赛或团队接力。", + question: "你知道参加冬残奥会越野滑雪的非视障运动员可以采用哪种姿势进行滑雪吗?", + answer: [ + { + right: true, + word: "站姿及坐姿" + }, + { + word: "卧姿及坐姿" + }, + { + word: "不知道" + } + ] + }, + // 第9题 + { + introduction: "冬残奥会冰球混合团体项目相当于冬奥运会中的冰球项目。参加这项运动的为下肢残疾运动员。比赛时,双方上场队员各6人,比赛分3局进行,每局15分钟,中间休息15分钟,每进一球得1分,得分多者为胜。", + question: "你知道参加冬残奥会冰球比赛的运动员是用什么工具代替冰鞋进行比赛吗?", + answer: [ + { + right: true, + word: "冰橇" + }, + { + word: "滑雪板" + }, + { + word: "不知道" + } + ] + }, + // 第10题 + { + introduction: "冬残奥会中,轮椅冰壶运动员使用的冰壶石与普通冰壶比赛使用的冰壶石是一样的,冰壶场地和比赛规则也相同,只是轮椅冰壶比赛允许不使用刷子,而选择使用有传石和稳定轮椅作用的手杖(棍)。", + question: "你知道轮椅冰壶赛每场比赛要比几局吗?", + answer: [ + { + right: true, + word: "8局" + }, + { + word: "6局" + }, + { + word: "不知道" + } + ] + }, + // 第11题 + { + introduction: "2022年北京冬季残奥会共设6个大项,78个小项,北京承办所有冰上项目,延庆和张家口承办所有的雪上项目。", + question: "以下哪一项不是冬季残奥会6个大项中的比赛项目?", + answer: [ + { + right: true, + word: "残奥双板滑雪" + }, + { + word: "残奥单板滑雪" + }, + { + word: "不知道" + } + ] + }, + ], + // 类型三 项目知识 + [ + // 第1题 + { + + introduction: "冬奥会项目“雪车”起源于瑞士。雪车用金属制成,形如小舟,因此也被称为“雪地之舟”。", + question: "你知道雪车还有一个名称是什么吗?", + answer: [ + { + right: true, + word: "集体雪橇" + }, + { + word: "钢架雪车" + }, + { + word: "不知道" + } + ] + }, + // 第2题 + { + + introduction: "雪上竞速运动项目高山滑雪是在越野滑雪的基础上逐步形成的,1936年起被列为冬奥会比赛项目。", + question: "冬奥会中的高山滑雪项目起源于哪一个地区?", + answer: [ + { + right: true, + word: "阿尔卑斯地区" + }, + { + word: "斯堪的纳维亚半岛" + }, + { + word: "不知道" + } + ] + }, + // 第3题 + { + + introduction: "钢架雪车在19世纪发源于瑞士山区的小城圣莫里茨,2002年被列为冬奥会正式比赛项目。", + question: "钢架雪车又被称为什么?", + answer: [ + { + right: true, + word: "无舵雪车" + }, + { + word: "有舵雪橇" + }, + { + word: "不知道" + } + ] + }, + // 第4题 + { + + introduction: "1998年冰壶项目被列入冬奥会正式比赛项目,它以冰壶距离营垒圆心的远近决定胜负,两队轮流掷球。", + question: "你知道冰壶队参赛队员的人数是多少吗?", + answer: [ + { + right: true, + word: "4人" + }, + { + word: "6人" + }, + { + word: "不知道" + } + ] + }, + // 第5题 + { + + introduction: "1860年挪威德拉门地区的两位农民在奥斯陆举行的首届全国滑雪比赛上表演了飞跃动作,此后逐渐发展成为独立项目并得到广泛开展。", + question: "由两位挪威农民在滑雪比赛上的飞跃动作所衍生的冬奥会比赛项目,是哪一个项目? ", + answer: [ + { + right: true, + word: "跳台滑雪" + }, + { + word: "越野滑雪" + }, + { + word: "不知道" + } + ] + }, + // 第6题 + { + + introduction: "20世纪60年代在美国诞生了一项冰雪运动,它结合了滑板和冲浪运动,并在1998年首次进入冬奥会。", + question: "结合了滑板和冲浪运动的冰雪比赛项目是什么?", + answer: [ + { + right: true, + word: "单板滑雪" + }, + { + word: "自由式滑雪" + }, + { + word: "不知道" + } + ] + }, + // 第7题 + { + + introduction: "2022年北京冬奥会女性运动员的参赛比例进一步提高,参赛运动员男女比例更趋于平衡。迄今为止,在冬奥会比赛项目中仍有一项是只有男性运动员可以参加的。", + question: "只有男性运动员参加的冬奥会比赛项目是什么?", + answer: [ + { + right: true, + word: "北欧两项" + }, + { + word: "冬季两项" + }, + { + word: "不知道" + } + ] + }, + // 第8题 + { + + introduction: "钢架雪车在19世纪发源于瑞士山区的小城圣莫里兹,于2002年盐湖城冬奥会被列为冬奥会正式比赛项目。", + question: "你知道钢架雪车因其运动姿势又被称为什么项目吗?", + answer: [ + { + right: true, + word: "俯式冰撬" + }, + { + word: "仰式冰撬" + }, + { + word: "不知道" + } + ] + }, + // 第9题 + { + + introduction: "速度滑冰、单板滑雪、跳台滑雪、短道速滑等项目都有严格的最低年龄限制。", + question: "短道速滑的最低参赛年龄是多少岁?", + answer: [ + { + right: true, + word: "16岁" + }, + { + word: "18岁" + }, + { + word: "不知道" + } + ] + }, + // 第10题 + { + introduction: "速度滑冰个人赛和团体赛有不同的胜负标准,一个是以时间为评判标准,另一个是以计时+计分的方式评判。", + question: "速度滑冰个人赛的胜负评判标准是什么?", + answer: [ + { + right: true, + word: "以时间为评判标准" + }, + { + word: "同时计时和计分" + }, + { + word: "不知道" + } + ] + }, + // 第11题 + { + introduction: "冰壶项目运动员的比赛鞋分为“蹬冰脚鞋”和“滑动脚鞋”,它们的底部材质不同。", + question: "冰壶运动员“蹬冰脚鞋” 底部是用什么材质制作的?", + answer: [ + { + right: true, + word: "橡胶" + }, + { + word: "塑料" + }, + { + word: "不知道" + } + ] + }, + // 第12题 + { + introduction: "花样滑冰对选手比赛着装有严格的要求和标准,男选手必须穿长裤,不能穿紧身裤;女选手不得穿上下分开的服装,裙子前后长度也要合规。", + question: "女性花样滑冰选手的裙子前后长度不能超过身体的什么部位?", + answer: [ + { + right: true, + word: "臀部" + }, + { + word: "膝盖" + }, + { + word: "不知道" + } + ] + }, + // 第13题 + { + introduction: "在速度滑冰项目里,为避免运动员冲撞,外道选手拥有换道优先权,如果发生冲撞,内道选手在特定情况下会失去比赛资格。", + question: "你知道在什么情况下发生冲撞的内道选手会失去比赛资格吗?", + answer: [ + { + right: true, + word: "换道" + }, + { + word: "冲刺" + }, + { + word: "不知道" + } + ] + } + ], + // 类型四 本届知识 + [ + // 第1题 + { + introduction: "国家速滑馆是2022年北京冬奥会北京主赛区标志性场馆之一,也是这届冬奥会赛事唯一新建冰上竞赛场馆,与“鸟巢”“水立方”共同组成“双奥”之城的标志性建筑群。", + question: "国家速滑馆还有个可爱的别称是什么?", + answer: [ + { + right: true, + word: "冰丝带" + }, + { + word: "冰如意" + }, + { + word: "不知道" + } + ] + }, + // 第2题 + { + introduction: "高山滑雪比赛惊险刺激,是冬奥会最具观赏性的项目之一。", + question: "2022年北京冬奥会高山滑雪比赛将在哪一个赛区进行?", + answer: [ + { + right: true, + word: "北京冬奥会延庆赛区" + }, + { + word: "北京冬奥会张家口赛区" + }, + { + word: "不知道" + } + ] + }, + // 第3题 + { + introduction: "首钢滑雪大跳台是北京冬奥会北京赛区内第一个完工的新建场馆,也是唯一的雪上比赛场地,它的设计理念源自中国敦煌壁画。", + question: "首钢滑雪大跳台还有一个好听的名字是什么?", + answer: [ + { + right: true, + word: "雪飞天" + }, + { + word: "雪飞燕" + }, + { + word: "不知道" + } + ] + }, + // 第4题 + { + introduction: "与2018年平昌冬奥会相比,北京冬奥会将新增7个项目,包括短道速滑混合团体接力、跳台滑雪混合团体、自由式滑雪大跳台(男子、女子)、自由式滑雪空中技巧混合团体、单板滑雪障碍追逐混合团体赛。", + question: "以下哪个选项也是北京冬奥会新增项目?", + answer: [ + { + right: true, + word: "女子单人雪车" + }, + { + word: "男子单人雪车" + }, + { + word: "不知道" + } + ] + }, + // 第5题 + { + introduction: "每届冬奥会都有一句大会主题语,如2018年平昌冬奥会的主题语为“激情同在”,2014年索契冬奥会主题语是“激情冰火属于你”。", + question: "你知道2022年北京冬奥会的主题语是什么吗?", + answer: [ + { + right: true, + word: "一起向未来" + }, + { + word: "奔向新世界" + }, + { + word: "不知道" + } + ] + }, + // 第6题 + { + introduction: "国家跳台滑雪中心是中国首座跳台滑雪场馆,滑道分为HS140大跳台和HS106标准跳台。HS140大跳台长度110米,落差135米;HS106标准跳台长度106米,落差115米。", + question: "你知道国家跳台滑雪中心的别名是什么吗?", + answer: [ + { + right: true, + word: "雪如意" + }, + { + word: "雪玉带" + }, + { + word: "不知道" + } + ] + }, + ], + // 类型五 运动员 + [ + // 第1题 + { + introduction: "自由式滑雪始于20世纪60年代,在高山滑雪基础上发展而成。1971年在美国新罕布什尔州举行了世界首次自由式滑雪比赛,1992年被列为冬奥会正式比赛项目。", + question: "以下哪一位不是自由式滑雪的代表人物?", + answer: [ + { + right: true, + word: "王春丽" + }, + { + word: "徐梦桃" + }, + { + word: "不知道" + } + ] + }, + // 第2题 + { + introduction: "2022年北京冬奥会的形象大使是六位中国著名的运动员,他们担负着向世界宣传推介冬奥会承办城市北京和张家口的使命。", + question: "除了姚明、申雪、赵宏博、张虹之外,还有两位北京冬奥会形象大使是谁?", + answer: [ + { + right: true, + word: "李妮娜、侯斌" + }, + { + word: "杨扬、谷爱凌" + }, + { + word: "不知道" + } + ] + }, + // 第3题 + // { + // introduction: "作为中国奥运事业的好朋友,萨马兰奇先生、罗格先生均已卸任奥委会职务。这届冬奥会主席于2013年当选第九任国际奥委会主席,任期八年,成为首位当选国际奥委会主席的奥运冠军,并于2021年成功连任第十任国际奥委会主席。", + // question: "你知道这一届冬奥会主席是谁吗?", + // answer: [ + // { + // right: true, + // word: "托马斯·巴赫" + // }, + // { + // word: "胡安·安东尼奥·萨马兰奇" + // }, + // { + // word: "不知道" + // } + // ] + // }, + ], +] + +// 英文题 +export const english = [ + // 类型一 冬奥历史 + [ + // 第1题 暂删 + // { + // introduction: "Curling, which shows dynamic and static beauty and the wisdom of choice, was officially included in Olympic Winter Games in 1998. The curling events of Beijing 2022 will start on February 2, 2022 at the National Aquatics Center.", + // question: "Do you know where curling was originated from?", + // answer: [ + // "Scotland ", + // "Ireland", + // "No idea" + // ], + // id: 'Y-1-1', + // rightIndex: 0 + // }, + // 第2题 + { + introduction: "The 11th Olympic Winter Games, held in Asia in 1972, were the first Olympic Winter Games hosted outside Europe and the USA.", + question: "Do you know which Asian country hosted the 11th Olympic Winter Games?", + answer: [ + { + right: true, + word: "Japan" + }, + { + word: "Korea" + }, + { + word: "No idea" + } + ], + id: 'Y-1-2' + }, + // 第3题 + { + introduction: "Sweden, Norway and Denmark are known as “Scandinavian countries”. The 6th Olympic Winter Games were held in one of the three countries, which was the first country that hosted the Olympic Winter Games in its capital.", + question: "Do you know which Scandinavian country was the first to host the Olympic Winter Games?", + answer: [ + { + right: true, + word: "Norway" + }, + { + word: "Denmark" + }, + { + word: "No idea" + } + ], + id: 'Y-1-3' + }, + // 第4题 暂删 + // { + // introduction: "By 2021, China had taken part in 11 Olympic Winter Games. Beijing 2022 will be the first Olympic Winter Games held in China.", + // question: "Do you know in which year China participated in the Olympic Winter Games for the first time?", + // answer: [ + // "1980 ", + // "1983", + // "No idea" + // ], + // id: 'Y-1-4', + // rightIndex: 0 + // }, + // 第5题 + { + introduction: "Speed skating is the most popular skating sport with the longest history.", + question: "Do you know which country was the first to host a speed skating competition?", + answer: [ + { + right: true, + word: "UK" + }, + { + word: "Netherlands" + }, + { + word: "No idea" + } + ], + id: 'Y-1-5' + }, + // 第6题 暂删 + // { + // introduction: "Figure skating originated from the 18th century. The first figure skating competition was held in Austria in 1872. In 1924, it was included as a discipline in the first Olympic Winter Games.", + // question: "Do you know which of the following countries was figure skating, a discipline in Olympic Winter Games, originated from?", + // answer: [ + // "UK ", + // "Canada", + // "No idea" + // ], + // id: 'Y-1-6', + // rightIndex: 0 + // }, + // 第7题 + { + introduction: "Luge originated from Northern Europe.According to records,it appeared in Norway as early as 1480.", + question: "Do you know which country held the first luge competition?", + answer: [ + { + right: true, + word: "Switzerland" + }, + { + word: "Norway" + }, + { + word: "No idea" + } + ], + id: 'Y-1-7' + }, + // 第8题 暂删 + // { + // introduction: "The 19th Olympic Winter Games were held in the USA from February 8 to 24, 2002. The number of countries with gold medalists in the Olympic Games was 18, a record high.", + // question: "Do you know which city hosted the 19th Olympic Winter Games?", + // answer: [ + // "Salt Lake City", + // "Chicago", + // "No idea" + // ], + // id: 'Y-1-8', + // rightIndex: 0 + // }, + // 第9题 暂删 + // { + // introduction: "The 16th Olympic Winter Games were the last held in the same year as the Olympic Summer Games. It also had the most scattered venues in history.", + // question: "Do you know where the Olympic Winter Games were held in the same year as the Olympic Summer Games for the last time?", + // answer: [ + // "France", + // "Japan", + // "No idea" + // ], + // id: 'Y-1-9', + // rightIndex: 0 + // }, + // 第10题 暂删 + // { + // introduction: "Up to Beijing 2022, the longest Olympic Winter Games were held for 17 days.", + // question: "Do you know how many days the shortest Olympic Winter Games lasted?", + // answer: [ + // "9 days (both the first and second Olympic Winter Games)", + // "7 days", + // "No idea" + // ], + // id: 'Y-1-10', + // rightIndex: 0 + // }, + // 第11题 + { + introduction: "The 25th Olympic Winter Games will be held in Milan and Cortina d’Ampezzo in 2026. This is not the first time that Italy hosts Olympic Winter Games.", + question: "Do you know the number of Olympic Winter Games Italy has hosted?", + answer: [ + { + right: true, + word: "4" + }, + { + word: "3" + }, + { + word: "No idea" + } + ], + id: 'Y-1-11', + rightIndex: 0 + }, + ], + // 类型二 冬奥项目 + [ + // 第1题 暂删 + // { + // introduction: "There is a sport in Olympic Winter Games that evolved from skiing and hunting in ancient times. It is a sport that combines skiing and shooting.", + // question: "Do you know the name of the event that combines skiing and shooting?", + // answer: [ + // "Biathlon", + // "Nordic combined", + // "No idea" + // ], + // id: 'Y-2-1', + // rightIndex: 0 + // }, + // 第2题 + // { + // introduction: "There is a sport played on ice in which two teams compete in throwing, also known as “ice chess”.", + // question: "Do you know the name of the team sport on ice?", + // answer: [ + // "Curling", + // "Ice hockey", + // "No idea" + // ], + // id: 'Y-2-2', + // rightIndex: 0 + // }, + // 第3题 + // { + // introduction: "Nordic combined originated from the Nordic countries and had been popular for a long time in Norway and Sweden before being spread to all over the world at the beginning of the 20th century. It was listed as a discipline in the first Olympic Winter Games in 1924.", + // question: "Do you know which of the following event is included in Nordic combined besides cross-country skiing?", + // answer: [ + // "Ski jumping", + // "Alpine skiing", + // "No idea" + // ], + // id: 'Y-2-3', + // rightIndex: 0 + // }, + // 第4题 + // { + // introduction: "Biathlon originated from Scandinavia and evolved from skiing and hunting in ancient times. It was listed as a discipline in the Olympic Winter Games in 1960.", + // question: "Do you know which of the following event is included in biathlon besides cross-country skiing?", + // answer: [ + // "Shooting", + // "Archery", + // "No idea" + // ], + // id: 'Y-2-4', + // rightIndex: 0 + // }, + // 第5题 + { + introduction: "Ice hockey is a combination of multiple skating skills and agile hockey skills, and is one of the most competitive team ice sports. Players wear ice skates and strive for the puck with ice-hockey sticks in their hands, and score goals by shooting a puck into the opponents’ cage.", + question: "Do you know what ice hockey is also called?", + answer: [ + { + right: true, + word: "Hockey" + }, + { + word: "Ice puck chasing" + }, + { + word: "No idea" + } + ], + id: 'Y-2-5' + }, + // 第6题 + { + introduction: "There are five events of alpine skiing in Sochi 2014 Paralympic Winter Games, each includes three categories, Standing, Visually Impaired and another one.", + question: "Do you know which of the following the third category was?", + answer: [ + { + right: true, + word: "Sitting" + }, + { + word: "Prone" + }, + { + word: "No idea" + } + ], + id: 'Y-2-6' + }, + // 第7题 + { + introduction: "In para biathlon, the total distance is 6-15 km, 2.0-2.5 km per lap, and free techniques for 3-5 laps. In the meantime, the athletes must hit the target at a distance of 10 m, and each miss will increase the total time as a penalty.", + question: "Which of the following methods assists the visually impaired athletes to shoot in para biathlon?", + answer: [ + { + right: true, + word: "Sound signal assistance" + }, + { + word: "Human assistance" + }, + { + word: "No idea" + } + ], + id: 'Y-2-7' + }, + // 第8题 暂删 + // { + // introduction: "Athletes participating in para cross-country skiing are physically disabled or blind/visually impaired. Male and female athletes compete or participate in team relays in short, medium and long distances (2.5-20 km) using classic or free techniques.", + // question: "Do you know which of the following can be chosen by non-visually impaired athletes in para cross-country skiing?", + // answer: [ + // "Standing and sitting", + // "Prone and sitting", + // "No idea" + // ], + // id: 'Y-2-8', + // rightIndex: 0 + // }, + // 第9题 暂删 + // { + // introduction: "The para ice hockey mixed team event is equivalent to the ice hockey events in Olympic Winter Games. The athletes all have leg disabilities. In a competition, there are six players from each side, and three periods of 15 minutes each and 15-minute breaks in between. The team that scores more goals wins.", + // question: "Do you know what tools the Paralympic ice hockey players use instead of skates?", + // answer: [ + // "Sledge", + // "Snowboard", + // "No idea" + // ], + // id: 'Y-2-9', + // rightIndex: 0 + // }, + // 第10题 + { + introduction: "The curling stones used by wheelchair curling athletes are the same as in ordinary curling competitions. They also use the same ice sheets and follow the same rules of competition.But there is no sweeping in wheelchair curling competitions. Players are allowed to use sticks to deliver stones and to stabilize wheelchairs.", + question: "Do you know how many ends there are in a wheelchair curling competition?", + answer: [ + { + right: true, + word: "8" + }, + { + word: "6" + }, + { + word: "No idea" + } + ], + id: 'Y-2-10' + }, + // 第11题 + { + introduction: "There are 6 sports and 78 events in Beijing 2022 Paralympic Winter Games. Beijing will host all the ice sports. Yanqing and Zhangjiakou will host all the snow sports.", + question: "Which of the following is not one of the six sports in the Paralympic Winter Games?", + answer: [ + { + right: true, + word: "Para skiing" + }, + { + word: "Para snowboarding" + }, + { + word: "No idea" + } + ], + id: 'Y-2-11' + }, + ], + // 类型三 项目知识 + [ + // 第1题 + { + introduction: "The Olympic Winter Games sport “Bobsleigh” originated from Switzerland. A bob is made of metal and in the shape of a boat, hence also known as “Snow Boat”.", + question: "Do you know what bobsleigh is also called?", + answer: [ + { + right: true, + word: "Bobsled" + }, + { + word: "Skeleton" + }, + { + word: "No idea" + } + ], + id: 'Y-3-1' + }, + // 第2题 暂删 + // { + // introduction: "The speed snow sport “alpine skiing” was gradually evolved from cross-country skiing and was listed as a discipline in Olympic Winter Games in 1936.", + // question: "Where was the origin of alpine skiing?", + // answer: [ + // "Alps", + // "Scandinavia", + // "No idea" + // ], + // id: 'Y-3-2', + // rightIndex: 0 + // }, + // 第3题 + { + introduction: "Skeleton originated from the Swiss mountain town of St. Moritz in the 19th century and was listed as an official discipline of the Olympic Winter Games in 2002.", + question: "What skeleton is also called?", + answer: [ + { + right: true, + word: "Tobogganing" + }, + { + word: "Bobsleigh" + }, + { + word: "No idea" + } + ], + id: 'Y-3-3' + }, + // 第4题 + { + introduction: "Curling was officially included in the Olympic Winter Games in 1998. Two teams take turns to deliver stones. The team scores a point for each stone that is closer to the center of the circles than the opponents’ best stone.", + question: "Do you know how many players there are in a curling team?", + answer: [ + { + right: true, + word: "4" + }, + { + word: "6" + }, + { + word: "No idea" + } + ], + id: 'Y-3-4' + }, + // 第5题 + // { + // introduction: "In 1860, two farmers from Drammen of Norway performed leaps at the first national ski competition in Oslo. The leaps gradually evolved into an independent discipline and became popular.", + // question: "Which of the following discipline was originated from the leaps performed by the two Norwegian farmers?", + // answer: [ + // "Ski jumping", + // "Cross-country skiing", + // "No idea" + // ], + // id: 'Y-3-5', + // rightIndex: 0 + // }, + // 第6题 + { + introduction: "A winter sport born in the USA in the 1960s combines skateboarding and surfing, and was included in the Olympic Winter Games for the first time in 1998.", + question: "What is the winter sport that combines skateboarding and surfing?", + answer: [ + { + right: true, + word: "Snowboarding" + }, + { + word: "Freestyle skiing" + }, + { + word: "No idea" + } + ], + id: 'Y-3-6' + }, + // 第7题 + { + introduction: "The proportion of female athletes participating in Beijing 2022 Olympic Winter Games will further increase. The ratio of male-to-female athletes will be more balanced. However, there is still one discipline that only men can take part in.", + question: "What is the discipline exclusive to male athletes?", + answer: [ + { + right: true, + word: "Nordic combined" + }, + { + word: "Biathlon" + }, + { + word: "No idea" + } + ], + id: 'Y-3-7' + }, + // 第8题 + { + introduction: "Skeleton originated from the Swiss mountain town of St. Moritz in the 19th century, and was listed as an official discipline in Salt Lake City 2002 Olympic Winter Games.", + question: "Do you know the other name of Skeleton for the posture?", + answer: [ + { + right: true, + word: "Sled (prone)" + }, + { + word: "Sled (supine)" + }, + { + word: "No idea" + } + ], + id: 'Y-3-8' + }, + // 第9题 + { + introduction: "There is a strict minimum age limit for speed skating, snowboarding, ski jumping, short-track speed skating, etc.", + question: "What is the minimum age for participants in short-track speed skating?", + answer: [ + { + right: true, + word: "16 years old" + }, + { + word: "18 years old" + }, + { + word: "No idea" + } + ], + id: 'Y-3-9' + }, + // 第10题 + { + introduction: "There are different criteria in individual and team speed skating competitions, judged by “time” or by “time plus score”.", + question: "What is the judging criterion for individual speed skating competitions?", + answer: [ + { + right: true, + word: "Judged by time" + }, + { + word: "Judged by time plus score" + }, + { + word: "No idea" + } + ], + id: 'Y-3-10' + }, + // 第11题 暂删 + // { + // introduction: "There are different criteria in individual and team speed skating competitions, by time or by time + score.", + // question: "What is the judging criterion for individual speed skating competitions?", + // answer: [ + // "Judged by time", + // "Judged by time + score", + // "No idea" + // ], + // id: 'Y-3-11', + // rightIndex: 0 + // }, + // 第12题 暂删 + // { + // introduction: "The shoes for curling athletes include a “grippy shoe” and a “sliding shoe”, with different soles.", + // question: "What is the sole of “grippy shoe” made of?", + // answer: [ + // "Rubber", + // "Plastic", + // "No idea" + // ], + // id: 'Y-3-12', + // rightIndex: 0 + // }, + // 第13题 + { + introduction: "In speed skating, players on the outer lane have priority in changing lanes in order to avoid collision. In the event of a collision, players on the inner lane will be disqualified under certain circumstances.", + question: "Do you know under which situation a player who causes a crash in the inner lane will be disqualified in the competition?", + answer: [ + { + right: true, + word: "Changing lane" + }, + { + word: "Sprinting" + }, + { + word: "No idea" + } + ], + id: 'Y-3-13' + }, + ], + // 类型四 本届知识 + [ + // 第1题 + { + introduction: "The National Speed Skating Oval is one of the landmark venues in Beijing Competition Zone of Beijing 2022, and is also the only new ice competition venue. The National Speed Skating Oval, the Bird’s Nest and the Water Cube constitute the landmark cluster of the “Dual Olympic City”.", + question: "What is the nick name of the National Speed Skating Oval?", + answer: [ + { + right: true, + word: "Ice Ribbon" + }, + { + word: "Ice Ruyi Scepter" + }, + { + word: "No idea" + } + ], + id: 'Y-4-1' + }, + // 第2题 + { + introduction: "Alpine skiing is a thrilling and one of the most spectacular disciplines in the Olympic Winter Games.", + question: "Which of the following zones will host the alpine skiing competitions of Beijing 2022 Olympic Winter Games?", + answer: [ + { + right: true, + word: "Yanqing Competition Zone" + }, + { + word: "Zhangjiakou Competition Zone" + }, + { + word: "No idea" + } + ], + id: 'Y-4-2' + }, + // 第3题 暂删 + // { + // introduction: "Big Air Shougang is the first constructed new venue and the only snow sport venue in the Beijing Zone. The design was inspired by the Dunhuang frescos in China.", + // question: "What is another nice name of Big Air Shougang?", + // answer: [ + // "Snow Apsaras", + // "Snow Swallow", + // "No idea" + // ], + // id: 'Y-4-3', + // rightIndex: 0 + // }, + // 第4题 暂删 + // { + // introduction: "Compared with Pyeongchang 2018 Olympic Winter Games, there will be seven new events in Beijing, including short-track speed skating mixed team relay, ski jumping mixed team, freestyle ski jumping, freestyle skiing aerials mixed team and snowboard cross mixed team.", + // question: "Which of the following is a new event of the Beijing 2022 Olympic Winter Games?", + // answer: [ + // "Bobsleigh (women’s singles)", + // "Bobsleigh (men’s singles)", + // "No idea" + // ], + // id: 'Y-4-4', + // rightIndex: 0 + // }, + // 第5题 暂删 + // { + // introduction: "Olympic Winter Games have slogans. For example, the slogan of Sochi 2014 was “Hot. Cool. Yours”; and the slogan of Pyeongchang 2018 was “Passion. Connected”. ", + // question: "Do you know the slogan of Beijing 2022?", + // answer: [ + // "Together for a Shared Future", + // "Toward a New World", + // "No idea" + // ], + // id: 'Y-4-5', + // rightIndex: 0 + // }, + // 第6题 + { + introduction: "The National Ski jumping Center is the first ski jumping venue in China. The hills are divided into HS140 (length 110 m, drop 135 m) and HS106 (length 106 m, drop 115 m). ", + question: "What is the nick name of the National Ski Jumping Center?", + answer: [ + { + right: true, + word: "Snow Ruyi Scepter" + }, + { + word: "Snow Jade Belt" + }, + { + word: "No idea" + } + ], + id: 'Y-4-6' + }, + ], + // 类型五 运动员 + [ + // 第1题 + { + introduction: "Freestyle skiing originated from the 1960s on the basis of alpine skiing. The world’s first formal freestyle skiing competition was held in New Hampshire in 1971. It was officially listed as a Winter Olympic discipline in 1992.", + question: "Which one of the following is not a representative of freestyle skiing?", + answer: [ + { + right: true, + word: "Wang Chunli" + }, + { + word: "Xu Mengtao" + }, + { + word: "No idea" + } + ], + id: 'Y-5-1' + }, + // 第2题 + { + introduction: "The six Ambassadors of Beijing 2022 are famous Chinese athletes responsible for publicizing and promoting the joint bid of Beijing and Zhangjiakou to host the Olympic Winter Games to the world.", + question: "Apart from Yao Ming, Shen Xue, Zhao Hongbo, and Zhang Hong, who are the other two Ambassadors for the Beijing 2022 Olympic Winter Games?", + answer: [ + { + right: true, + word: "Li Nina, Hou Bin" + }, + { + word: "Yang Yang, Gu Ailing" + }, + { + word: "No idea" + } + ], + id: 'Y-5-2' + }, + // // 第3题 + // { + // introduction: "Mr. Samaranch and Mr. Rogge, good friends of the Chinese people and promoters of China’s Olympic cause, successively resigned from the International Olympic Committee (IOC). The current President of the Olympic Winter Games was elected as the 9th President of the IOC in 2013 for a term of eight years, and was successfully re-elected as the 10th President of the IOC in 2021.", + // question: "Do you know who the President of the Olympic Winter Games is?", + // answer: [ + // "Thomas Bach", + // "Juan Antonio Samaranch", + // "No idea" + // ], + // id: 'Y-5-3' + // }, + ], +] + +// 反馈 +export const reaction = [ + // 东北话反应 + { + right: [ + { + id: 'D-R-1', + word: '你这有两把刷子啊' + }, + { + id: 'D-R-2', + word: '哎哟哦 可以啊' + }, + { + id: 'D-R-3', + word: '哦了妥妥的' + }, + { + id: 'D-R-4', + word: '你这老厉害了啊' + }, + { + id: 'D-R-5', + word: '这脑瓜子杠杠滴' + }, + ], + wrong: [ + { + id: 'D-W-1', + word: '可长点心吧!选错了都' + }, + { + id: 'D-W-2', + word: '拉倒吧,选错了都' + }, + { + id: 'D-W-3', + word: '你在寻思寻思呗' + }, + ], + noIdea: [ + { + id: 'D-N-1', + word: '多大点事儿啊~一会就告诉你' + }, + { + id: 'D-N-2', + word: '小case!一会就给你整明白' + }, + { + id: 'D-N-3', + word: '麻捏儿滴,一会跟我学吧' + }, + { + id: 'D-N-4', + word: '这老简单了,你咋能不会呢' + }, + ] + }, + // 普通 话反应 + { + right: [ + { + id: 'P-R-1', + word: '答对了,不愧是你!' + }, + { + id: 'P-R-2', + word: '厉害了,这都没难住你' + }, + { + id: 'P-R-3', + word: '太棒了!你可真厉害!' + }, + ], + wrong: [ + { + id: 'P-W-1', + word: '阿哦,答错了!' + }, + { + id: 'P-W-2', + word: '再仔细想想?' + }, + { + id: 'P-W-3', + word: '嗯?是这样的吗?' + }, + ], + noIdea: [ + { + id: 'P-N-1', + word: '这都不是事,答案马上揭晓哦' + }, + { + id: 'P-N-2', + word: '别气馁,继续和我学习吧' + }, + { + id: 'P-N-3', + word: '没关系,聪明的我一会告诉你哟' + }, + ] + }, + // 英语 话反应 + { + right: [ + { + id: 'Y-R-1', + word: 'Awesome!Good job.' + }, + { + id: 'Y-R-2', + word: 'Perfect! Way to go!' + }, + { + id: 'Y-R-3', + word: 'You are something else.' + }, + { + id: 'Y-R-4', + word: 'You Rock.' + }, + ], + wrong: [ + { + id: 'Y-W-1', + word: 'No No No~' + }, + { + id: 'Y-W-2', + word: 'Hey!chin up!' + }, + { + id: 'Y-W-3', + word: "A ou~ you've got that wrong~" + }, + ], + noIdea: [ + { + id: 'Y-N-1', + word: 'Keep learning! Continue' + }, + { + id: 'Y-N-2', + word: 'Keep pushing!you are the best.' + }, + { + id: 'Y-N-3', + word: 'Go get them! You can do it' + }, + ] + } +] \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/stage.js b/src/page/index/PushCoinGame/game/stage.js new file mode 100755 index 0000000..ee14b82 --- /dev/null +++ b/src/page/index/PushCoinGame/game/stage.js @@ -0,0 +1,177 @@ +// import 'createjs'; +// import '../plugins/easeljs-0.8.2.min'; +import '@/utils/plugins/easeljs-1.0.0.min'; +import Stats from '@/utils/plugins/stats-2d'; //frame rate +import Stats3d from '@/utils/plugins/stats-3d.min'; //frame rate +import { gsap } from 'gsap' //动画插件 +import utils from '@/utils/index.js' + +class creater { + constructor() { + this.FPS = 60; + window.createjs = createjs; + } + + createStage(APP) { + this.app = APP; + let that = this; + let stage = document.createElement('canvas'); + // stage.width = 750; + // stage.height = 1450; + stage.id = 'stageCanvas'; + let container = document.getElementById('container'); + container.appendChild(stage); + if (this.app.webGL) { + this.stage = new createjs.StageGL(stage, { transparent: true, antialias: true }); + this.stage.setTextureParams = function (gl, isPOT) { + if (this._antialias) { + //non POT linear works in some devices, but performance is NOT good, investigate + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + } else { + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); + } + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + }; + console.log('开启了webgl') + } else { + this.stage = new createjs.Stage(stage); + console.log('未开启webgl,canvas2d模式') + } + this.setStage(); + + //add stage frame rate stats + // if (this.app.debug) { + Stats.startFPS(this.stage, { x: 0, y: 200 }, this.app) + // } + + // 3d stats + if (this.app.debug) { + this.stats = new Stats3d(); + container.appendChild(this.stats.domElement); + } + + createjs.Ticker.timingMode = createjs.Ticker.RAF//TIMEOUT || RAF_SYNCHED || RAF + createjs.Ticker.framerate = this.FPS; + + let count = 0; + + createjs.Ticker.on("tick", function handleTicker(event) { + that.stage.update(); + that.app.FPS = Stats.FPS; + // 3d states + that.app.debug && that.stats.update(); + // count++; + // if (count % 100 == 0) { + // console.log("Paused:", event.delta); + // } + if (APP.status == 2 && !APP.paused) APP.update() + if (APP.needUpdate && APP.gameView) { + APP.gameView.update(); + } + }); + + return this + } + + //屏幕自适应 + adaptScreen() { + if (this.app.needAdaptScreen === false) return + this.currentStageWidth = window.innerWidth; + this.currentStageHeight = 1624 / 750 * window.innerWidth; + this.currentWidthHeightScale = this.currentStageWidth / this.currentStageHeight; + + if (this.currentStageWidth > this.currentStageHeight) { + if (this.initWidthHeightScale < this.currentWidthHeightScale) + this.stageCanvas.scaleX = this.stageCanvas.scaleY = this.currentStageWidth / this.initStageWidth; + else + this.stageCanvas.scaleX = this.stageCanvas.scaleY = this.currentStageHeight / this.initStageHeight; + } + else { + if (this.initWidthHeightScale < this.currentWidthHeightScale) + this.stageCanvas.scaleX = this.stageCanvas.scaleY = this.currentStageWidth / this.initStageWidth; + else + this.stageCanvas.scaleX = this.stageCanvas.scaleY = this.currentStageHeight / this.initStageHeight; + } + this.stage.x = 0//(this.currentStageWidth - this.initStageWidth) * this.stageCanvas.scaleX / 2; + this.stage.y = 0//(window.innerHeight - this.currentStageHeight) * this.stageCanvas.scaleY / 2; + + this.offsetTop = (window.innerHeight - this.currentStageHeight) * this.stageCanvas.scaleY; + + if (window.innerHeight < this.currentStageHeight) + gsap.set(this.stageCanvas, { y: this.offsetTop }); //+ (window.deviceInfo.screenSize <= 2 ? 20 : 0) + else + gsap.set(this.stageCanvas, { y: 0 }); + + // console.log(this.stageCanvas.scaleX,this.stageCanvas.scaleY,window.devicePixelRatio) + // console.log(this.stageContainer.x,this.stageContainer.y,this.currentStageHeight,this.offsetTop) + + if (!this.ratio) { + this.ratio = /*appPlugins.isAndriod() ? 1 :*/ 2 //window.devicePixelRatio //appPlugins.getDevicePixelRatio(this.stageCanvas.getContext("3d")); + } + this.stageCanvas.width = this.currentStageWidth * this.ratio; + this.stageCanvas.height = this.currentStageHeight * this.ratio; + this.stageCanvas.style.width = this.currentStageWidth + "px"; + this.stageCanvas.style.height = this.currentStageHeight + "px"; + this.stage.scaleX = this.ratio * this.stageCanvas.scaleX; + this.stage.scaleY = this.ratio * this.stageCanvas.scaleY; + this.stageRenderWidth = 750; + this.stageRenderHeight = this.currentStageHeight / this.currentStageWidth * this.stageRenderWidth; + + // console.log(this.stageRenderWidth,this.stageCanvas.height) + + if (this.app.webGL) { + this.stage.updateViewport(this.stageCanvas.width, this.stageCanvas.height) + } + // this.stage.updateViewport(this.stageCanvas.width,this.stageCanvas.height) + // + return (this.currentStageHeight - this.initStageHeight) * this.stageCanvas.scaleY / 2 + } + + setStage() { + var initWidth = 750; + var initHeight = 1624; + + this.stageCanvas = this.stage.canvas; + this.stageCanvas.width = initHeight; + this.stageCanvas.height = initHeight; + this.initStageWidth = initWidth; + this.initStageHeight = initHeight; + this.initWidthHeightScale = initWidth / initHeight; + + + // this.backgroundContainer = new createjs.Container();//加载层 + this.loadingContainer = new createjs.Container(); //加载层 + this.mainContainer = new createjs.Container().set({ alpha: 0 }); //游戏层 + + // this.mission_success_Container = new createjs.Container().set({alpha:0}); //通关层 + // this.timeCount_Container = new createjs.Container().set({alpha:0}); //timeCount层 + + // this.resultContainer = new createjs.Container(); //游戏结果页 + this.stageContainer = new createjs.Container(); //我的 最外层 + // this.panelContainer = new createjs.Container().set({alpha:0}); + + this.stageContainer.addChild(this.loadingContainer, this.mainContainer); + + this.stage.addChild(this.stageContainer); + // this.app.webGL && this.stage.setClearColor("#051e56"); + + createjs.Touch.enable(this.stage); + // console.log(this.stage) + this.stage.enableMouseOver(10); + this.stage.mouseMoveOutside = true; + + this.adaptScreen(); + + window.addEventListener("resize", (event) => { + utils.sleep(300).then(() => { + this.adaptScreen(); + }) + }); + } + +} + +module.exports = creater; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/game/view.js b/src/page/index/PushCoinGame/game/view.js new file mode 100644 index 0000000..4bb6de8 --- /dev/null +++ b/src/page/index/PushCoinGame/game/view.js @@ -0,0 +1,539 @@ +// import frameData from './frameData'; +import layoutData from './layout'; +import createLayout from './createView'; +// import maskCreater from './maskCreater'; //mask creater +import { gsap } from "gsap"; +// import utils from '@/utils/index.js' +// import { MotionPathPlugin } from "gsap/MotionPathPlugin.js"; +// import Soul from './plugins/ScrollContainer'; //app scroll plugin module + +class layout { + constructor() { + this.filterMatrix = new createjs.ColorMatrix().adjustSaturation(-200); + + // 注册路径插件 + // gsap.registerPlugin(MotionPathPlugin); + } + + init() { + + + //update btns position by viewport + // this.updatePosByViewport(); + + return this + } + + upgrate(GAME, VIEW, ANI) { + this.game = GAME; + this.view = VIEW; + this.ani = ANI; + + return this + } + + //根据页面更新适配内容 + updatePosByViewport() { + // console.log(this.game.scene.oHeight) + if (this.game.oHeight <= 1181 / 2) { + if (this.game.scene.oHeight > 1110 / 2) { + //iphone 5 5s + console.log('iphone 5 5s') + this.game_score_text.y += 140; + this.game_time_bar.y += 140; + this.game_score_bar.y += 140; + this.game_time_text.y += 140; + + } else { + //suitable huawei + console.log('suitable huawei') + this.game_score_text.y += 220; + this.game_time_bar.y += 220; + this.game_score_bar.y += 220; + this.game_time_text.y += 220; + + } + } else if (this.game.scene.oHeight <= 673) { + console.log('iphone8p') + this.game_score_text.y += 120; + this.game_time_bar.y += 120; + this.game_score_bar.y += 120; + this.game_time_text.y += 120; + + } else { + console.log('适配机型x') + } + } + + createBitmap(spriteSheet, name) { + return new createjs.Sprite(spriteSheet, name); + } + + //创建loading页 + loading(GAME) { + this.game = GAME; + this.loadingCacheContainer = new createjs.Container(); + this.loadingAnimation = {}; + //create layout + for (let i in layoutData['loading']) { + let item = layoutData['loading'][i]; + item.layout = this; + item.game = this.game; + item.loader = this.game.loadingLoader; + item.container = this.game.stage.loadingContainer; + item.cacheContainer = this.loadingCacheContainer; + + if (item.singleSprite && item.singleSprite.visible) { + item.singleSprite.parent = this.loadingSprite; + } + + createLayout(item); + } + + gsap.to(this.loading_snow, { rotation: 360, ease: 'none', repeat: -1, duration: 5 }) + + // 创建粒子动画 + this.createLoadingParticle(); + + return this + } + + //隐藏loading页面 + hideLoading(step = 1) { + //create story index + this.game.scene = 2; + gsap.to(this.game.stage.loadingContainer, { + alpha: 0, duration: 0.65, delay: step == 3 ? 1 : 0, onComplete: () => { + // 将loading重置ui显示 为二次加载资源做显示 + this.changeLoadingLayout(step); + } + }) + gsap.to(this.game.stage.mainContainer, { alpha: 1, duration: 0.65 }); + } + + // 准备下一次loading + changeLoadingLayout(step) { + if (step == 1) { + // 进度归零 + this.loading_progress_text.text = '0%'; + // 隐藏元素 + gsap.set([this.loading_start, this.loading_progress_bg, this.loading_progress_bar, this.loading_snow, this.loading_text], { alpha: 0 }) + // 显示元素 + gsap.set([this.loading_text2, this.loading_box, this.loading_light, this.loading_person], { alpha: 1 }) + gsap.set(this.loading_progress_text, { alpha: 1, y: 1260 }) + // 准备动画 + this.readyLangLoaderAni(); + } else if (step == 2) { + // 隐藏元素 + gsap.set([this.loading_text2, this.loading_light, this.loading_person], { alpha: 0 }) + gsap.set(this.loading_progress_text, { alpha: 0 }) + // 显示元素 + gsap.set([this.loading_text3, this.loading_light2, this.loading_arrow], { alpha: 1 }) + // 如果是英文 显示英文文案 + if (this.game.langConfig.id == 3) { + gsap.set([this.loading_text2_en, this.loading_text3], { alpha: 0 }) + gsap.set([this.loading_text3_en], { alpha: 1 }) + } + // 准备动画 + this.readyPosterLoaderAni(); + } + } + + // 准备语言加载动画 + readyLangLoaderAni() { + this.langLoaderAni = []; + let ani1 = new gsap.timeline({ repeat: -1, paused: true }) + .to([this.loading_light, this.loading_person], { alpha: 0.86, duration: 0.2 }) + .to([this.loading_light, this.loading_person], { alpha: 1, duration: 0.15 }) + .to([this.loading_light, this.loading_person], { alpha: 0.6, duration: 0.2 }) + .to([this.loading_light, this.loading_person], { alpha: 1, duration: 0.1 }) + + let ani2 = gsap.to([this.loading_person, this.loading_box], { y: '+=15', yoyo: true, repeat: -1, duration: 1.5 }) + + + this.langLoaderAni.push(ani1, ani2) + } + + // 播放语言加载时动画 + playLangLoaderAni() { + this.langLoaderAni.forEach((item) => { + item.restart(); + }) + } + + // 暂停语言加载时动画 + pauseLangLoaderAni() { + this.langLoaderAni.forEach((item) => { + item.pause(); + }) + } + + // 准备语言加载动画 + readyPosterLoaderAni() { + this.posterLoaderAni = []; + let ani1 = new gsap.timeline({ repeat: -1, paused: true }) + .to(this.loading_light2, { alpha: 0.86, duration: 0.2 }) + .to(this.loading_light2, { alpha: 1, duration: 0.15 }) + .to(this.loading_light2, { alpha: 0.6, duration: 0.2 }) + .to(this.loading_light2, { alpha: 1, duration: 0.1 }) + + let ani2 = gsap.to([this.loading_box], { y: '+=15', yoyo: true, repeat: -1, duration: 1.5 }) + + let ani3 = gsap.to([this.loading_arrow], { y: '+=15', scaleX: 0.95, yoyo: true, repeat: -1, duration: 1.5 }) + + + this.posterLoaderAni.push(ani1, ani2, ani3) + } + + // 播放语言加载时动画 + playPosterLoaderAni() { + this.posterLoaderAni.forEach((item) => { + item.restart(); + }) + } + + // 暂停语言加载时动画 + pausePosterLoaderAni() { + this.posterLoaderAni.forEach((item) => { + item.pause(); + }) + } + + + // 帧生成动画 + framePlayer(config) { + // 图像资源 + // 容器 + // const container = new createjs.Container(); + + // loader + const loader = this.game[config.name]; + + // images + const images = []; + config.imgIds.forEach((item) => { + images.push(loader.getResult(item)); + }) + + // handle speed + Object.keys(config.sprite.animations).forEach((key) => { + // console.log('speed=', this.game.globalSpeed * 0.18) + config.sprite.animations[key].speed = this.game.globalSpeed * 0.18; + config.sprite.animations[key].next = 'wait' + }); + + // animation config + const aniData = { + images, + frames: config.sprite.frames, + animations: config.sprite.animations + } + + const spriteSheet = new createjs.SpriteSheet(aniData); + const animation = new createjs.Sprite(spriteSheet); + + // default setting + if (config.name === 'guide' || config.name === 'wait') { + animation.set({ + name: config.name, + x: 390, + y: 280 + 512, + scaleX: 1.25, + scaleY: 1.25, + regX: 750 * 0.85 / 2, + regY: 1624 * 0.85 / 2, + alpha: 0 + }) + } else { + animation.set({ + name: config.name, + x: 220, + y: 565 + 512, + scaleX: 1, + scaleY: 1, + regX: 750 * 1 / 2, + regY: 1624 * 1 / 2, + alpha: 0 + }) + } + + + + + + return animation + } + + // 生成海报 + createPoster(nickname = '', level = 1) { + this.posterContainer = new createjs.Container().set({ alpha: 1, name: 'posterContainer' }); + // this.game.stage.mainContainer.addChild(this.posterContainer); + + // 海报图片 + let posterImg = this.game.posterLoader.getResult('poster_bg'); + // 海报对象 + let poster = new createjs.Bitmap(posterImg); + + // nickname + let nt; + if (nickname) { + nt = this.game.vue.$Utils.cutString(nickname, 20, true); + } + let nicknameText = new createjs.Text(nt, "38px Helvetica, Arial, sans-serif", "#31425b").set({ + x: 375, + y: 1086, + textAlign: 'center' + }); + + let levelImg = this.game.posterLoader.getResult(`word_${level}`); + let posConfig = [ + { + x: 50, + y: 239 + }, + { + x: 70, + y: 242 + }, + { + x: 54, + y: 243 + }, + { + x: 57, + y: 224 + }, + { + x: 50, + y: 243 + } + ] + // 等级称号 + let levelTitle = new createjs.Bitmap(levelImg).set( + this.game.langConfig.id == 3 ? posConfig[Number(level) - 1] : posConfig[4] + ); + + + let personImg = this.game.posterLoader.getResult('person'); + // 王冰冰 + let person = new createjs.Bitmap(personImg).set({ + x: this.game.langConfig.id == 3 ? 76 : 86, + y: this.game.langConfig.id == 3 ? 381 : 256 + }); + + // 根据版本选择不同的二维码 目前全部选用微信版本二维码 + let codeName = 'qrcode'; + // switch (process.env.VUE_APP_CURRENTMODE) { + // case 'ysprod': + // codeName = 'ys_qrcode'; + // break; + // case 'wbprod': + // codeName = 'wb_qrcode'; + // break; + // default: + // codeName = 'qrcode'; + // break; + // } + let qrcodeImg = this.game.posterLoader.getResult(codeName); + // 海报对象 + let qrcode = new createjs.Bitmap(qrcodeImg).set({ + x: this.game.langConfig.id == 3 ? 305 : 306, + y: this.game.langConfig.id == 3 ? 1256 : 1275, + scaleX: 0.34, + scaleY: 0.34, + width: 136, + height: 136 + }); + + let logoImg = this.game.posterLoader.getResult('logo'); + // 海报对象 + let logo = new createjs.Bitmap(logoImg).set({ + x: this.game.langConfig.id == 3 ? 341 : 341, + y: this.game.langConfig.id == 3 ? 1482 : 1482, + }); + + // 插入container + this.posterContainer.addChild(poster, nicknameText, qrcode, levelTitle, person, logo); + + this.posterContainer.cache(0, 0, 750, 1538); + + // easejs > 1.0.0 getCacheDataURL报错 0.8.2版本正常 + let baseUrl = this.posterContainer.cacheCanvas.toDataURL('image/png'); + // let baseUrl = this.posterContainer.getCacheDataURL(); + + setTimeout(() => { + this.destroyPosterCreater(); + }, 1000); + + return baseUrl + } + + // 销毁海报生成器 + destroyPosterCreater() { + this.posterContainer.uncache(); + this.posterContainer.removeAllChildren(); + this.game.stage.mainContainer.removeChild(this.posterContainer); + this.posterContainer = null; + } + + // index 粒子制造机 + createParticle() { + + // 容器 + // const loadingContainer = this.game.stage.loadingContainer; + + // loader + const loader = this.game.vue.$beforeLoader; + + // sprite image + const spriteImg = loader.getResult('snowSprite'); + + + const container = new createjs.Container(); + + + const aniData = { + images: [spriteImg], + frames: [ + [1, 1, 77, 82, 0, 0, 0], + [1, 85, 57, 55, 0, 0, 0], + [1, 142, 46, 45, 0, 0, 0], + [49, 142, 15, 15, 0, 0, 0], + [60, 85, 8, 12, 0, 0, 0], + [60, 99, 6, 6, 0, 0, 0] + ], + animations: { + "snow-1": { "frames": [0] }, + "snow-2": { "frames": [1] }, + "snow-3": { "frames": [2] }, + "snow-4": { "frames": [3] }, + "snow-5": { "frames": [4] }, + "snow-6": { "frames": [3] }, + "snow-7": { "frames": [4] }, + "snow-8": { "frames": [2] }, + "snow-9": { "frames": [3] }, + "snow-10": { "frames": [1] }, + } + } + + const spriteSheet = new createjs.SpriteSheet(aniData); + + const arr = []; + for (let i = 0; i < (window.deviceInfo.system == 'IOS' ? 50 : 50); i++) { + const scale = Math.random() * 0.35 + 0.5; + const name = `snow-${this.game.vue.$Utils.rangeRandom(1, 10)}`; + const sprite = this.createBitmap(spriteSheet, name).set({ + x: Math.random() * 750 - 30, + y: Math.random() * 1300, + ox: Math.random() * 750, + oy: -50, + // regX:14, + // regY:14, + scaleX: scale, + scaleY: scale, + speedX: (Math.random() > 0.5 ? 1 : -1) * (Math.random() * 0.5 + 0.25), + speedY: Math.random() * 1 + 1, + speedR: Math.random() * 0.5 + 0.5, + alpha: Math.random() * 0.3 + 0.5, + }) + + arr.push(sprite) + } + // const mask = new createjs.Shape().setTransform(0, 0, 1, 1); + // mask.graphics.f('#000000').drawRoundRect(0, 0, 750, 1300, 0).es(); + // contianer.mask = mask; + // contianer.compositeOperation = 'darker'; + // arr.push(mask) + container.children = arr; + + this.prarticleContainer = container; + this.game.stage.mainContainer.addChild(container); + return container + } + + + // loading 粒子制造机 + createLoadingParticle() { + const container = new createjs.Container(); + + const arr = []; + for (let i = 0; i < (window.deviceInfo.system == 'IOS' ? 200 : 250); i++) { + const scale = Math.random() * 0.35 + 0.5; + const name = `snow_${this.game.utils.rangeRandom(1, 20)}`; + const sprite = this.createBitmap(this.loadingSprite.spriteSheet, name).set({ + x: Math.random() * 750 - 30, + y: Math.random() * 1624, + ox: Math.random() * 750, + oy: -100, + // regX:14, + // regY:14, + scaleX: scale, + scaleY: scale, + speedX: (Math.random() > 0.5 ? 1 : -1) * (Math.random() * 0.25 + 0.25), + speedY: Math.random() * 1 + 0.5, + alpha: Math.random() * 0.3 + 0.5 + }) + + arr.push(sprite) + } + // const mask = new createjs.Shape().setTransform(0, 0, 1, 1); + // mask.graphics.f('#000000').drawRoundRect(0, 0, 750, 1300, 0).es(); + // contianer.mask = mask; + // contianer.compositeOperation = 'darker'; + // arr.push(mask) + container.children = arr; + + this.loadingPrarticleContainer = container; + this.game.stage.loadingContainer.addChild(container); + return container + } + + //粒子动画更新 + update() { + if (!this.game) return + if (this.game.scene == 1 && this.loadingPrarticleContainer) { + if (this.loadingPrarticleContainer.alpha == 0) { + // console.log('2=>1') + this.loadingPrarticleContainer.alpha = 1; + } + if (this.prarticleContainer && this.prarticleContainer.alpha == 1) { + this.prarticleContainer.alpha = 0; + } + this.loadingPrarticleContainer.children.forEach((item, index) => { + + if (item.x < -30 || item.x > 800 || item.y > 1624) { + item.y = item.oy; + item.x = item.ox; + } + item.x += item.speedX + item.y += item.speedY + + }) + } + if (this.game.scene == 2 && this.prarticleContainer) { + if (this.prarticleContainer.alpha == 0) { + // console.log('1=>2') + this.prarticleContainer.alpha = 1; + } + + if (this.loadingPrarticleContainer.alpha == 1) { + this.loadingPrarticleContainer.alpha = 0; + } //题目一 粒子运动 + this.prarticleContainer.children.forEach((item, index) => { + + if (item.x < -30 || item.x > 800 || item.y > 1400) { + item.y = item.oy; + item.x = item.ox; + item.rotation = 0; + } + item.x += item.speedX * this.game.globalSpeed + item.y += item.speedY * this.game.globalSpeed + item.rotation += item.speedR * this.game.globalSpeed + + }) + } + + } +} + +module.exports = layout; \ No newline at end of file diff --git a/src/page/index/PushCoinGame/index.vue b/src/page/index/PushCoinGame/index.vue new file mode 100644 index 0000000..e6b2995 --- /dev/null +++ b/src/page/index/PushCoinGame/index.vue @@ -0,0 +1,43 @@ + + + + + + + \ No newline at end of file diff --git a/src/page/index/colorSort/index.vue b/src/page/index/colorSort/index.vue index 8cb5f59..e3ac939 100644 --- a/src/page/index/colorSort/index.vue +++ b/src/page/index/colorSort/index.vue @@ -22,7 +22,7 @@ v-for="(item, index) in newColorArr" :key="index" > -
最小值: {{item.min}}
- +最小值: {{ item.min }}
+平均值: {{item.average}}
- +平均值: {{ item.average }}
+最大值: {{item.max}}
- +最大值: {{ item.max }}
+r&&(r=e),(e=j+l+n)r&&(r=e),(e=l+n)r&&(r=e),a.setValues(o,q,p-o,r-q)},b._hasMouseEventListener=function(){for(var b=a._MOUSE_EVENTS,c=0,d=b.length;d>c;c++)if(this.hasEventListener(b[c]))return!0;return!!this.cursor},createjs.DisplayObject=createjs.promote(a,"EventDispatcher")}(),window.createjs=window.createjs||{},function(){"use strict";function a(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var b=createjs.extend(a,createjs.DisplayObject);b._getNumChildren=function(){return this.children.length},b.getNumChildren=createjs.deprecate(b._getNumChildren,"Container.getNumChildren");try{Object.defineProperties(b,{numChildren:{get:b._getNumChildren}})}catch(c){}b.initialize=a,b.isVisible=function(){var a=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;for(var c=this.children.slice(),d=0,e=c.length;e>d;d++){var f=c[d];f.isVisible()&&(a.save(),f.updateContext(a),f.draw(a),a.restore())}return!0},b.addChild=function(a){if(null==a)return a;var b=arguments.length;if(b>1){for(var c=0;b>c;c++)this.addChild(arguments[c]);return arguments[b-1]}var d=a.parent,e=d===this;return d&&d._removeChildAt(createjs.indexOf(d.children,a),e),a.parent=this,this.children.push(a),e||a.dispatchEvent("added"),a},b.addChildAt=function(a,b){var c=arguments.length,d=arguments[c-1];if(0>d||d>this.children.length)return arguments[c-2];if(c>2){for(var e=0;c-1>e;e++)this.addChildAt(arguments[e],d+e);return arguments[c-2]}var f=a.parent,g=f===this;return f&&f._removeChildAt(createjs.indexOf(f.children,a),g),a.parent=this,this.children.splice(b,0,a),g||a.dispatchEvent("added"),a},b.removeChild=function(a){var b=arguments.length;if(b>1){for(var c=!0,d=0;b>d;d++)c=c&&this.removeChild(arguments[d]);return c}return this._removeChildAt(createjs.indexOf(this.children,a))},b.removeChildAt=function(a){var b=arguments.length;if(b>1){for(var c=[],d=0;b>d;d++)c[d]=arguments[d];c.sort(function(a,b){return b-a});for(var e=!0,d=0;b>d;d++)e=e&&this._removeChildAt(c[d]);return e}return this._removeChildAt(a)},b.removeAllChildren=function(){for(var a=this.children;a.length;)this._removeChildAt(0)},b.getChildAt=function(a){return this.children[a]},b.getChildByName=function(a){for(var b=this.children,c=0,d=b.length;d>c;c++)if(b[c].name==a)return b[c];return null},b.sortChildren=function(a){this.children.sort(a)},b.getChildIndex=function(a){return createjs.indexOf(this.children,a)},b.swapChildrenAt=function(a,b){var c=this.children,d=c[a],e=c[b];d&&e&&(c[a]=e,c[b]=d)},b.swapChildren=function(a,b){for(var c,d,e=this.children,f=0,g=e.length;g>f&&(e[f]==a&&(c=f),e[f]==b&&(d=f),null==c||null==d);f++);f!=g&&(e[c]=b,e[d]=a)},b.setChildIndex=function(a,b){var c=this.children,d=c.length;if(!(a.parent!=this||0>b||b>=d)){for(var e=0;d>e&&c[e]!=a;e++);e!=d&&e!=b&&(c.splice(e,1),c.splice(b,0,a))}},b.contains=function(a){for(;a;){if(a==this)return!0;a=a.parent}return!1},b.hitTest=function(a,b){return null!=this.getObjectUnderPoint(a,b)},b.getObjectsUnderPoint=function(a,b,c){var d=[],e=this.localToGlobal(a,b);return this._getObjectsUnderPoint(e.x,e.y,d,c>0,1==c),d},b.getObjectUnderPoint=function(a,b,c){var d=this.localToGlobal(a,b);return this._getObjectsUnderPoint(d.x,d.y,null,c>0,1==c)},b.getBounds=function(){return this._getBounds(null,!0)},b.getTransformedBounds=function(){return this._getBounds()},b.clone=function(b){var c=this._cloneProps(new a);return b&&this._cloneChildren(c),c},b.toString=function(){return"[Container (name="+this.name+")]"},b._tick=function(a){if(this.tickChildren)for(var b=this.children.length-1;b>=0;b--){var c=this.children[b];c.tickEnabled&&c._tick&&c._tick(a)}this.DisplayObject__tick(a)},b._cloneChildren=function(a){a.children.length&&a.removeAllChildren();for(var b=a.children,c=0,d=this.children.length;d>c;c++){var e=this.children[c].clone(!0);e.parent=a,b.push(e)}},b._removeChildAt=function(a,b){if(0>a||a>this.children.length-1)return!1;var c=this.children[a];return c&&(c.parent=null),this.children.splice(a,1),b||c.dispatchEvent("removed"),!0},b._getObjectsUnderPoint=function(b,c,d,e,f,g){if(g=g||0,!g&&!this._testMask(this,b,c))return null;var h,i=createjs.DisplayObject._hitTestContext;f=f||e&&this._hasMouseEventListener();for(var j=this.children,k=j.length,l=k-1;l>=0;l--){var m=j[l],n=m.hitArea;if(m.visible&&(n||m.isVisible())&&(!e||m.mouseEnabled)&&(n||this._testMask(m,b,c)))if(!n&&m instanceof a){var o=m._getObjectsUnderPoint(b,c,d,e,f,g+1);if(!d&&o)return e&&!this.mouseChildren?this:o}else{if(e&&!f&&!m._hasMouseEventListener())continue;var p=m.getConcatenatedDisplayProps(m._props);if(h=p.matrix,n&&(h.appendMatrix(n.getMatrix(n._props.matrix)),p.alpha=n.alpha),i.globalAlpha=p.alpha,i.setTransform(h.a,h.b,h.c,h.d,h.tx-b,h.ty-c),(n||m).draw(i),!this._testHit(i))continue;if(i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,2,2),!d)return e&&!this.mouseChildren?this:m;d.push(m)}}return null},b._testMask=function(a,b,c){var d=a.mask;if(!d||!d.graphics||d.graphics.isEmpty())return!0;var e=this._props.matrix,f=a.parent;e=f?f.getConcatenatedMatrix(e):e.identity(),e=d.getMatrix(d._props.matrix).prependMatrix(e);var g=createjs.DisplayObject._hitTestContext;return g.setTransform(e.a,e.b,e.c,e.d,e.tx-b,e.ty-c),d.graphics.drawAsPath(g),g.fillStyle="#000",g.fill(),this._testHit(g)?(g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,2,2),!0):!1},b._getBounds=function(a,b){var c=this.DisplayObject_getBounds();if(c)return this._transformBounds(c,a,b);var d=this._props.matrix;d=b?d.identity():this.getMatrix(d),a&&d.prependMatrix(a);for(var e=this.children.length,f=null,g=0;e>g;g++){var h=this.children[g];h.visible&&(c=h._getBounds(d))&&(f?f.extend(c.x,c.y,c.width,c.height):f=c.clone())}return f},createjs.Container=createjs.promote(a,"DisplayObject")}(),window.createjs=window.createjs||{},function(){"use strict";function a(a){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof a?document.getElementById(a):a,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var b=createjs.extend(a,createjs.Container);b._get_nextStage=function(){return this._nextStage},b._set_nextStage=function(a){this._nextStage&&(this._nextStage._prevStage=null),a&&(a._prevStage=this),this._nextStage=a};try{Object.defineProperties(b,{nextStage:{get:b._get_nextStage,set:b._set_nextStage}})}catch(c){}b.update=function(a){if(this.canvas&&(this.tickOnUpdate&&this.tick(a),this.dispatchEvent("drawstart",!1,!0)!==!1)){createjs.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var b=this.drawRect,c=this.canvas.getContext("2d");c.setTransform(1,0,0,1,0,0),this.autoClear&&(b?c.clearRect(b.x,b.y,b.width,b.height):c.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),c.save(),this.drawRect&&(c.beginPath(),c.rect(b.x,b.y,b.width,b.height),c.clip()),this.updateContext(c),this.draw(c,!1),c.restore(),this.dispatchEvent("drawend")}},b.tick=function(a){if(this.tickEnabled&&this.dispatchEvent("tickstart",!1,!0)!==!1){var b=new createjs.Event("tick");if(a)for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);this._tick(b),this.dispatchEvent("tickend")}},b.handleEvent=function(a){"tick"==a.type&&this.update(a)},b.clear=function(){if(this.canvas){var a=this.canvas.getContext("2d");a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},b.toDataURL=function(a,b){var c,d=this.canvas.getContext("2d"),e=this.canvas.width,f=this.canvas.height;if(a){c=d.getImageData(0,0,e,f);var g=d.globalCompositeOperation;d.globalCompositeOperation="destination-over",d.fillStyle=a,d.fillRect(0,0,e,f)}var h=this.canvas.toDataURL(b||"image/png");return a&&(d.putImageData(c,0,0),d.globalCompositeOperation=g),h},b.enableMouseOver=function(a){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==a&&this._testMouseOver(!0)),null==a)a=20;else if(0>=a)return;var b=this;this._mouseOverIntervalID=setInterval(function(){b._testMouseOver()},1e3/Math.min(50,a))},b.enableDOMEvents=function(a){null==a&&(a=!0);var b,c,d=this._eventListeners;if(!a&&d){for(b in d)c=d[b],c.t.removeEventListener(b,c.f,!1);this._eventListeners=null}else if(a&&!d&&this.canvas){var e=window.addEventListener?window:document,f=this;d=this._eventListeners={},d.mouseup={t:e,f:function(a){f._handleMouseUp(a)}},d.mousemove={t:e,f:function(a){f._handleMouseMove(a)}},d.dblclick={t:this.canvas,f:function(a){f._handleDoubleClick(a)}},d.mousedown={t:this.canvas,f:function(a){f._handleMouseDown(a)}};for(b in d)c=d[b],c.t.addEventListener(b,c.f,!1)}},b.clone=function(){throw"Stage cannot be cloned."},b.toString=function(){return"[Stage (name="+this.name+")]"},b._getElementRect=function(a){var b;try{b=a.getBoundingClientRect()}catch(c){b={top:a.offsetTop,left:a.offsetLeft,width:a.offsetWidth,height:a.offsetHeight}}var d=(window.pageXOffset||document.scrollLeft||0)-(document.clientLeft||document.body.clientLeft||0),e=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),f=window.getComputedStyle?getComputedStyle(a,null):a.currentStyle,g=parseInt(f.paddingLeft)+parseInt(f.borderLeftWidth),h=parseInt(f.paddingTop)+parseInt(f.borderTopWidth),i=parseInt(f.paddingRight)+parseInt(f.borderRightWidth),j=parseInt(f.paddingBottom)+parseInt(f.borderBottomWidth);return{left:b.left+d+g,right:b.right+d-i,top:b.top+e+h,bottom:b.bottom+e-j}},b._getPointerData=function(a){var b=this._pointerData[a];return b||(b=this._pointerData[a]={x:0,y:0}),b},b._handleMouseMove=function(a){a||(a=window.event),this._handlePointerMove(-1,a,a.pageX,a.pageY)},b._handlePointerMove=function(a,b,c,d,e){if((!this._prevStage||void 0!==e)&&this.canvas){var f=this._nextStage,g=this._getPointerData(a),h=g.inBounds;this._updatePointerPosition(a,b,c,d),(h||g.inBounds||this.mouseMoveOutside)&&(-1===a&&g.inBounds==!h&&this._dispatchMouseEvent(this,h?"mouseleave":"mouseenter",!1,a,g,b),this._dispatchMouseEvent(this,"stagemousemove",!1,a,g,b),this._dispatchMouseEvent(g.target,"pressmove",!0,a,g,b)),f&&f._handlePointerMove(a,b,c,d,null)}},b._updatePointerPosition=function(a,b,c,d){var e=this._getElementRect(this.canvas);c-=e.left,d-=e.top;var f=this.canvas.width,g=this.canvas.height;c/=(e.right-e.left)/f,d/=(e.bottom-e.top)/g;var h=this._getPointerData(a);(h.inBounds=c>=0&&d>=0&&f-1>=c&&g-1>=d)?(h.x=c,h.y=d):this.mouseMoveOutside&&(h.x=0>c?0:c>f-1?f-1:c,h.y=0>d?0:d>g-1?g-1:d),h.posEvtObj=b,h.rawX=c,h.rawY=d,(a===this._primaryPointerID||-1===a)&&(this.mouseX=h.x,this.mouseY=h.y,this.mouseInBounds=h.inBounds)},b._handleMouseUp=function(a){this._handlePointerUp(-1,a,!1)},b._handlePointerUp=function(a,b,c,d){var e=this._nextStage,f=this._getPointerData(a);if(!this._prevStage||void 0!==d){var g=null,h=f.target;d||!h&&!e||(g=this._getObjectsUnderPoint(f.x,f.y,null,!0)),f.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,a,f,b,g),f.down=!1),g==h&&this._dispatchMouseEvent(h,"click",!0,a,f,b),this._dispatchMouseEvent(h,"pressup",!0,a,f,b),c?(a==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[a]):f.target=null,e&&e._handlePointerUp(a,b,c,d||g&&this)}},b._handleMouseDown=function(a){this._handlePointerDown(-1,a,a.pageX,a.pageY)},b._handlePointerDown=function(a,b,c,d,e){this.preventSelection&&b.preventDefault(),(null==this._primaryPointerID||-1===a)&&(this._primaryPointerID=a),null!=d&&this._updatePointerPosition(a,b,c,d);var f=null,g=this._nextStage,h=this._getPointerData(a);e||(f=h.target=this._getObjectsUnderPoint(h.x,h.y,null,!0)),h.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,a,h,b,f),h.down=!0),this._dispatchMouseEvent(f,"mousedown",!0,a,h,b),g&&g._handlePointerDown(a,b,c,d,e||f&&this)},b._testMouseOver=function(a,b,c){if(!this._prevStage||void 0!==b){var d=this._nextStage;if(!this._mouseOverIntervalID)return void(d&&d._testMouseOver(a,b,c));var e=this._getPointerData(-1);if(e&&(a||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var f,g,h,i=e.posEvtObj,j=c||i&&i.target==this.canvas,k=null,l=-1,m="";!b&&(a||this.mouseInBounds&&j)&&(k=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var n=this._mouseOverTarget||[],o=n[n.length-1],p=this._mouseOverTarget=[];for(f=k;f;)p.unshift(f),m||(m=f.cursor),f=f.parent;for(this.canvas.style.cursor=m,!b&&c&&(c.canvas.style.cursor=m),g=0,h=p.length;h>g&&p[g]==n[g];g++)l=g;for(o!=k&&this._dispatchMouseEvent(o,"mouseout",!0,-1,e,i,k),g=n.length-1;g>l;g--)this._dispatchMouseEvent(n[g],"rollout",!1,-1,e,i,k);for(g=p.length-1;g>l;g--)this._dispatchMouseEvent(p[g],"rollover",!1,-1,e,i,o);o!=k&&this._dispatchMouseEvent(k,"mouseover",!0,-1,e,i,o),d&&d._testMouseOver(a,b||k&&this,c||j&&this)}}},b._handleDoubleClick=function(a,b){var c=null,d=this._nextStage,e=this._getPointerData(-1);b||(c=this._getObjectsUnderPoint(e.x,e.y,null,!0),this._dispatchMouseEvent(c,"dblclick",!0,-1,e,a)),d&&d._handleDoubleClick(a,b||c&&this)},b._dispatchMouseEvent=function(a,b,c,d,e,f,g){if(a&&(c||a.hasEventListener(b))){var h=new createjs.MouseEvent(b,c,!1,e.x,e.y,f,d,d===this._primaryPointerID||-1===d,e.rawX,e.rawY,g);a.dispatchEvent(h)}},createjs.Stage=createjs.promote(a,"Container")}(),window.createjs=window.createjs||{},function(){"use strict";function a(b,c){if(this.Stage_constructor(b),void 0!==c){if("object"!=typeof c)throw"Invalid options object";var d=c.premultiply,e=c.transparent,f=c.antialias,g=c.preserveBuffer,h=c.autoPurge}this.vocalDebug=!1,this._preserveBuffer=g||!1,this._antialias=f||!1,this._transparent=e||!1,this._premultiply=d||!1,this._autoPurge=void 0,this.autoPurge=h,this._viewportWidth=0,this._viewportHeight=0,this._projectionMatrix=null,this._webGLContext=null,this._clearColor={r:.5,g:.5,b:.5,a:0},this._maxCardsPerBatch=a.DEFAULT_MAX_BATCH_SIZE,this._activeShader=null,this._vertices=null,this._vertexPositionBuffer=null,this._uvs=null,this._uvPositionBuffer=null,this._indices=null,this._textureIndexBuffer=null,this._alphas=null,this._alphaBuffer=null,this._textureDictionary=[],this._textureIDs={},this._batchTextures=[],this._baseTextures=[],this._batchTextureCount=8,this._lastTextureInsert=-1,this._batchID=0,this._drawID=0,this._slotBlacklist=[],this._isDrawing=0,this._lastTrackedCanvas=0,this.isCacheControlled=!1,this._cacheContainer=new createjs.Container,this._initializeWebGL()}var b=createjs.extend(a,createjs.Stage);a.buildUVRects=function(a,b,c){if(!a||!a._frames)return null;void 0===b&&(b=-1),void 0===c&&(c=!1);for(var d=-1!=b&&c?b:0,e=-1!=b&&c?b+1:a._frames.length,f=d;e>f;f++){var g=a._frames[f];if(!(g.uvRect||g.image.width<=0||g.image.height<=0)){var h=g.rect;g.uvRect={t:h.y/g.image.height,l:h.x/g.image.width,b:(h.y+h.height)/g.image.height,r:(h.x+h.width)/g.image.width}}}return a._frames[-1!=b?b:0].uvRect||{t:0,l:0,b:1,r:1}},a.isWebGLActive=function(a){return a&&a instanceof WebGLRenderingContext&&"undefined"!=typeof WebGLRenderingContext},a.VERTEX_PROPERTY_COUNT=6,a.INDICIES_PER_CARD=6,a.DEFAULT_MAX_BATCH_SIZE=1e4,a.WEBGL_MAX_INDEX_NUM=Math.pow(2,16),a.UV_RECT={t:0,l:0,b:1,r:1};try{a.COVER_VERT=new Float32Array([-1,1,1,1,-1,-1,1,1,1,-1,-1,-1]),a.COVER_UV=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]),a.COVER_UV_FLIP=new Float32Array([0,1,1,1,0,0,1,1,1,0,0,0])}catch(c){}a.REGULAR_VARYING_HEADER="precision mediump float;varying vec2 vTextureCoord;varying lowp float indexPicker;varying lowp float alphaValue;",a.REGULAR_VERTEX_HEADER=a.REGULAR_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;attribute lowp float textureIndex;attribute lowp float objectAlpha;uniform mat4 pMatrix;",a.REGULAR_FRAGMENT_HEADER=a.REGULAR_VARYING_HEADER+"uniform sampler2D uSampler[{{count}}];",a.REGULAR_VERTEX_BODY="void main(void) {gl_Position = vec4((vertexPosition.x * pMatrix[0][0]) + pMatrix[3][0],(vertexPosition.y * pMatrix[1][1]) + pMatrix[3][1],pMatrix[3][2],1.0);alphaValue = objectAlpha;indexPicker = textureIndex;vTextureCoord = uvPosition;}",a.REGULAR_FRAGMENT_BODY="void main(void) {vec4 color = vec4(1.0, 0.0, 0.0, 1.0);if (indexPicker <= 0.5) {color = texture2D(uSampler[0], vTextureCoord);{{alternates}}}{{fragColor}}}",a.REGULAR_FRAG_COLOR_NORMAL="gl_FragColor = vec4(color.rgb, color.a * alphaValue);",a.REGULAR_FRAG_COLOR_PREMULTIPLY="if(color.a > 0.0035) {gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);} else {gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);}",a.PARTICLE_VERTEX_BODY=a.REGULAR_VERTEX_BODY,a.PARTICLE_FRAGMENT_BODY=a.REGULAR_FRAGMENT_BODY,a.COVER_VARYING_HEADER="precision mediump float;varying highp vec2 vRenderCoord;varying highp vec2 vTextureCoord;",a.COVER_VERTEX_HEADER=a.COVER_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;uniform float uUpright;",a.COVER_FRAGMENT_HEADER=a.COVER_VARYING_HEADER+"uniform sampler2D uSampler;",a.COVER_VERTEX_BODY="void main(void) {gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);vRenderCoord = uvPosition;vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));}",a.COVER_FRAGMENT_BODY="void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = color;}",b._get_isWebGL=function(){return!!this._webGLContext},b._set_autoPurge=function(a){a=isNaN(a)?1200:a,-1!=a&&(a=10>a?10:a),this._autoPurge=a},b._get_autoPurge=function(){return Number(this._autoPurge)};try{Object.defineProperties(b,{isWebGL:{get:b._get_isWebGL},autoPurge:{get:b._get_autoPurge,set:b._set_autoPurge}})}catch(c){}b._initializeWebGL=function(){if(this.canvas){if(!this._webGLContext||this._webGLContext.canvas!==this.canvas){var a={depth:!1,alpha:this._transparent,stencil:!0,antialias:this._antialias,premultipliedAlpha:this._premultiply,preserveDrawingBuffer:this._preserveBuffer},b=this._webGLContext=this._fetchWebGLContext(this.canvas,a);if(!b)return null;this.updateSimultaneousTextureCount(b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS)),this._maxTextureSlots=b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._createBuffers(b),this._initTextures(b),b.disable(b.DEPTH_TEST),b.enable(b.BLEND),b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.ONE,b.ONE_MINUS_SRC_ALPHA),b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._premultiply),this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a),this.updateViewport(this._viewportWidth||this.canvas.width,this._viewportHeight||this.canvas.height)}}else this._webGLContext=null;return this._webGLContext},b.update=function(a){if(this.canvas){if(this.tickOnUpdate&&this.tick(a),this.dispatchEvent("drawstart"),this.autoClear&&this.clear(),this._webGLContext)this._batchDraw(this,this._webGLContext),-1==this._autoPurge||this._drawID%(this._autoPurge/2|0)||this.purgeTextures(this._autoPurge);else{var b=this.canvas.getContext("2d");b.save(),this.updateContext(b),this.draw(b,!1),b.restore()}this.dispatchEvent("drawend")}},b.clear=function(){if(this.canvas)if(a.isWebGLActive(this._webGLContext)){var b=this._webGLContext,c=this._clearColor,d=this._transparent?c.a:1;this._webGLContext.clearColor(c.r*d,c.g*d,c.b*d,d),b.clear(b.COLOR_BUFFER_BIT),this._webGLContext.clearColor(c.r,c.g,c.b,c.a)}else this.Stage_clear()},b.draw=function(b,c){if(b===this._webGLContext&&a.isWebGLActive(this._webGLContext)){var d=this._webGLContext;return this._batchDraw(this,d,c),!0}return this.Stage_draw(b,c)},b.cacheDraw=function(b,c,d){if(a.isWebGLActive(this._webGLContext)){var e=this._webGLContext;return this._cacheDraw(e,b,c,d),!0}return!1},b.protectTextureSlot=function(a,b){if(a>this._maxTextureSlots||0>a)throw"Slot outside of acceptable range";this._slotBlacklist[a]=!!b},b.getTargetRenderTexture=function(a,b,c){var d,e=!1,f=this._webGLContext;if(void 0!==a.__lastRT&&a.__lastRT===a.__rtA&&(e=!0),e?(void 0===a.__rtB?a.__rtB=this.getRenderBufferTexture(b,c):((b!=a.__rtB._width||c!=a.__rtB._height)&&this.resizeTexture(a.__rtB,b,c),this.setTextureParams(f)),d=a.__rtB):(void 0===a.__rtA?a.__rtA=this.getRenderBufferTexture(b,c):((b!=a.__rtA._width||c!=a.__rtA._height)&&this.resizeTexture(a.__rtA,b,c),this.setTextureParams(f)),d=a.__rtA),!d)throw"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances";return a.__lastRT=d,d},b.releaseTexture=function(a){var b,c;if(a){if(a.children)for(b=0,c=a.children.length;c>b;b++)this.releaseTexture(a.children[b]);a.cacheCanvas&&a.uncache();var d=void 0;if(void 0!==a._storeID){if(a===this._textureDictionary[a._storeID])return this._killTextureObject(a),void(a._storeID=void 0);d=a}else if(2===a._webGLRenderStyle)d=a.image;else if(1===a._webGLRenderStyle){for(b=0,c=a.spriteSheet._images.length;c>b;b++)this.releaseTexture(a.spriteSheet._images[b]);return}if(void 0===d)return void(this.vocalDebug&&console.log("No associated texture found on release"));this._killTextureObject(this._textureDictionary[d._storeID]),d._storeID=void 0}},b.purgeTextures=function(a){void 0==a&&(a=100);for(var b=this._textureDictionary,c=b.length,d=0;c>d;d++){var e=b[d];e&&e._drawID+a<=this._drawID&&this._killTextureObject(e)}},b.updateSimultaneousTextureCount=function(a){var b=this._webGLContext,c=!1;for((1>a||isNaN(a))&&(a=1),this._batchTextureCount=a;!c;)try{this._activeShader=this._fetchShaderProgram(b),c=!0}catch(d){if(1==this._batchTextureCount)throw"Cannot compile shader "+d;this._batchTextureCount-=4,this._batchTextureCount<1&&(this._batchTextureCount=1),this.vocalDebug&&console.log("Reducing desired texture count due to errors: "+this._batchTextureCount)}},b.updateViewport=function(a,b){this._viewportWidth=0|a,this._viewportHeight=0|b;var c=this._webGLContext;c&&(c.viewport(0,0,this._viewportWidth,this._viewportHeight),this._projectionMatrix=new Float32Array([2/this._viewportWidth,0,0,0,0,-2/this._viewportHeight,1,0,0,0,1,0,-1,1,.1,0]),this._projectionMatrixFlip=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),this._projectionMatrixFlip.set(this._projectionMatrix),this._projectionMatrixFlip[5]*=-1,this._projectionMatrixFlip[13]*=-1)},b.getFilterShader=function(a){a||(a=this);var b=this._webGLContext,c=this._activeShader;if(a._builtShader)c=a._builtShader,a.shaderParamSetup&&(b.useProgram(c),a.shaderParamSetup(b,this,c));else try{c=this._fetchShaderProgram(b,"filter",a.VTX_SHADER_BODY,a.FRAG_SHADER_BODY,a.shaderParamSetup&&a.shaderParamSetup.bind(a)),a._builtShader=c,c._name=a.toString()}catch(d){console&&console.log("SHADER SWITCH FAILURE",d)}return c},b.getBaseTexture=function(a,b){var c=Math.ceil(a>0?a:1)||1,d=Math.ceil(b>0?b:1)||1,e=this._webGLContext,f=e.createTexture();return this.resizeTexture(f,c,d),this.setTextureParams(e,!1),f},b.resizeTexture=function(a,b,c){var d=this._webGLContext;d.bindTexture(d.TEXTURE_2D,a),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,b,c,0,d.RGBA,d.UNSIGNED_BYTE,null),a.width=b,a.height=c},b.getRenderBufferTexture=function(a,b){var c=this._webGLContext,d=this.getBaseTexture(a,b);if(!d)return null;var e=c.createFramebuffer();return e?(d.width=a,d.height=b,c.bindFramebuffer(c.FRAMEBUFFER,e),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,d,0),e._renderTexture=d,d._frameBuffer=e,d._storeID=this._textureDictionary.length,this._textureDictionary[d._storeID]=d,c.bindFramebuffer(c.FRAMEBUFFER,null),d):null},b.setTextureParams=function(a,b){b&&this._antialias?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST)),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE)},b.setClearColor=function(a){var b,c,d,e,f;"string"==typeof a?0==a.indexOf("#")?(4==a.length&&(a="#"+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)+a.charAt(3)+a.charAt(3)),b=Number("0x"+a.slice(1,3))/255,c=Number("0x"+a.slice(3,5))/255,d=Number("0x"+a.slice(5,7))/255,e=Number("0x"+a.slice(7,9))/255):0==a.indexOf("rgba(")&&(f=a.slice(5,-1).split(","),b=Number(f[0])/255,c=Number(f[1])/255,d=Number(f[2])/255,e=Number(f[3])):(b=((4278190080&a)>>>24)/255,c=((16711680&a)>>>16)/255,d=((65280&a)>>>8)/255,e=(255&a)/255),this._clearColor.r=b||0,this._clearColor.g=c||0,this._clearColor.b=d||0,this._clearColor.a=e||0,this._webGLContext&&this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a)},b.toString=function(){return"[StageGL (name="+this.name+")]" +},b._fetchWebGLContext=function(a,b){var c;try{c=a.getContext("webgl",b)||a.getContext("experimental-webgl",b)}catch(d){}if(c)c.viewportWidth=a.width,c.viewportHeight=a.height;else{var e="Could not initialize WebGL";console.error?console.error(e):console.log(e)}return c},b._fetchShaderProgram=function(b,c,d,e,f){b.useProgram(null);var g,h;switch(c){case"filter":h=a.COVER_VERTEX_HEADER+(d||a.COVER_VERTEX_BODY),g=a.COVER_FRAGMENT_HEADER+(e||a.COVER_FRAGMENT_BODY);break;case"particle":h=a.REGULAR_VERTEX_HEADER+a.PARTICLE_VERTEX_BODY,g=a.REGULAR_FRAGMENT_HEADER+a.PARTICLE_FRAGMENT_BODY;break;case"override":h=a.REGULAR_VERTEX_HEADER+(d||a.REGULAR_VERTEX_BODY),g=a.REGULAR_FRAGMENT_HEADER+(e||a.REGULAR_FRAGMENT_BODY);break;case"regular":default:h=a.REGULAR_VERTEX_HEADER+a.REGULAR_VERTEX_BODY,g=a.REGULAR_FRAGMENT_HEADER+a.REGULAR_FRAGMENT_BODY}var i=this._createShader(b,b.VERTEX_SHADER,h),j=this._createShader(b,b.FRAGMENT_SHADER,g),k=b.createProgram();if(b.attachShader(k,i),b.attachShader(k,j),b.linkProgram(k),k._type=c,!b.getProgramParameter(k,b.LINK_STATUS))throw b.useProgram(this._activeShader),b.getProgramInfoLog(k);switch(b.useProgram(k),c){case"filter":k.vertexPositionAttribute=b.getAttribLocation(k,"vertexPosition"),b.enableVertexAttribArray(k.vertexPositionAttribute),k.uvPositionAttribute=b.getAttribLocation(k,"uvPosition"),b.enableVertexAttribArray(k.uvPositionAttribute),k.samplerUniform=b.getUniformLocation(k,"uSampler"),b.uniform1i(k.samplerUniform,0),k.uprightUniform=b.getUniformLocation(k,"uUpright"),b.uniform1f(k.uprightUniform,0),f&&f(b,this,k);break;case"override":case"particle":case"regular":default:k.vertexPositionAttribute=b.getAttribLocation(k,"vertexPosition"),b.enableVertexAttribArray(k.vertexPositionAttribute),k.uvPositionAttribute=b.getAttribLocation(k,"uvPosition"),b.enableVertexAttribArray(k.uvPositionAttribute),k.textureIndexAttribute=b.getAttribLocation(k,"textureIndex"),b.enableVertexAttribArray(k.textureIndexAttribute),k.alphaAttribute=b.getAttribLocation(k,"objectAlpha"),b.enableVertexAttribArray(k.alphaAttribute);for(var l=[],m=0;md;d+=c)h[d]=h[d+1]=0;b.bufferData(b.ARRAY_BUFFER,h,b.DYNAMIC_DRAW),g.itemSize=c,g.numItems=f;var i=this._uvPositionBuffer=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,i),c=2;var j=this._uvs=new Float32Array(f*c);for(d=0,e=j.length;e>d;d+=c)j[d]=j[d+1]=0;b.bufferData(b.ARRAY_BUFFER,j,b.DYNAMIC_DRAW),i.itemSize=c,i.numItems=f;var k=this._textureIndexBuffer=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,k),c=1;var l=this._indices=new Float32Array(f*c);for(d=0,e=l.length;e>d;d++)l[d]=0;b.bufferData(b.ARRAY_BUFFER,l,b.DYNAMIC_DRAW),k.itemSize=c,k.numItems=f;var m=this._alphaBuffer=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,m),c=1;var n=this._alphas=new Float32Array(f*c);for(d=0,e=n.length;e>d;d++)n[d]=1;b.bufferData(b.ARRAY_BUFFER,n,b.DYNAMIC_DRAW),m.itemSize=c,m.numItems=f},b._initTextures=function(){this._lastTextureInsert=-1,this._textureDictionary=[],this._textureIDs={},this._baseTextures=[],this._batchTextures=[];for(var a=0;a a.MAX_TEXTURE_SIZE||b.height>a.MAX_TEXTURE_SIZE)&&console&&console.error("Oversized Texture: "+b.width+"x"+b.height+" vs "+a.MAX_TEXTURE_SIZE+"max"))},b._insertTextureInBatch=function(a,b){if(this._batchTextures[b._activeIndex]!==b){var c=-1,d=(this._lastTextureInsert+1)%this._batchTextureCount,e=d;do{if(this._batchTextures[e]._batchID!=this._batchID&&!this._slotBlacklist[e]){c=e;break}e=(e+1)%this._batchTextureCount}while(e!==d);-1===c&&(this.batchReason="textureOverflow",this._drawBuffers(a),this.batchCardCount=0,c=d),this._batchTextures[c]=b,b._activeIndex=c;var f=b._imageData;f&&f._invalid&&void 0!==b._drawID?this._updateTextureImageData(a,f):(a.activeTexture(a.TEXTURE0+c),a.bindTexture(a.TEXTURE_2D,b),this.setTextureParams(a)),this._lastTextureInsert=c}else{var f=b._imageData;void 0!=b._storeID&&f&&f._invalid&&this._updateTextureImageData(a,f)}b._drawID=this._drawID,b._batchID=this._batchID},b._killTextureObject=function(a){if(a){var b=this._webGLContext;if(void 0!==a._storeID&&a._storeID>=0){this._textureDictionary[a._storeID]=void 0;for(var c in this._textureIDs)this._textureIDs[c]==a._storeID&&delete this._textureIDs[c];a._imageData&&(a._imageData._storeID=void 0),a._imageData=a._storeID=void 0}void 0!==a._activeIndex&&this._batchTextures[a._activeIndex]===a&&(this._batchTextures[a._activeIndex]=this._baseTextures[a._activeIndex]);try{a._frameBuffer&&b.deleteFramebuffer(a._frameBuffer),a._frameBuffer=void 0}catch(d){this.vocalDebug&&console.log(d)}try{b.deleteTexture(a)}catch(d){this.vocalDebug&&console.log(d)}}},b._backupBatchTextures=function(a,b){var c=this._webGLContext;this._backupTextures||(this._backupTextures=[]),void 0===b&&(b=this._backupTextures);for(var d=0;d 0&&this._drawBuffers(b),this._isDrawing++,this._drawID++,this.batchCardCount=0,this.depth=0,this._appendToBatchGroup(a,b,new createjs.Matrix2D,this.alpha,c),this.batchReason="drawFinish",this._drawBuffers(b),this._isDrawing--},b._cacheDraw=function(a,b,c,d){var e,f=this._activeShader,g=this._slotBlacklist,h=this._maxTextureSlots-1,i=this._viewportWidth,j=this._viewportHeight;this.protectTextureSlot(h,!0);var k=b.getMatrix();k=k.clone(),k.scale(1/d.scale,1/d.scale),k=k.invert(),k.translate(-d.offX/d.scale*b.scaleX,-d.offY/d.scale*b.scaleY);var l=this._cacheContainer;l.children=[b],l.transformMatrix=k,this._backupBatchTextures(!1),c&&c.length?this._drawFilters(b,c,d):this.isCacheControlled?(a.clear(a.COLOR_BUFFER_BIT),this._batchDraw(l,a,!0)):(a.activeTexture(a.TEXTURE0+h),b.cacheCanvas=this.getTargetRenderTexture(b,d._drawWidth,d._drawHeight),e=b.cacheCanvas,a.bindFramebuffer(a.FRAMEBUFFER,e._frameBuffer),this.updateViewport(d._drawWidth,d._drawHeight),this._projectionMatrix=this._projectionMatrixFlip,a.clear(a.COLOR_BUFFER_BIT),this._batchDraw(l,a,!0),a.bindFramebuffer(a.FRAMEBUFFER,null),this.updateViewport(i,j)),this._backupBatchTextures(!0),this.protectTextureSlot(h,!1),this._activeShader=f,this._slotBlacklist=g},b._drawFilters=function(a,b,c){var d,e=this._webGLContext,f=this._maxTextureSlots-1,g=this._viewportWidth,h=this._viewportHeight,i=this._cacheContainer,j=b.length;e.activeTexture(e.TEXTURE0+f),d=this.getTargetRenderTexture(a,c._drawWidth,c._drawHeight),e.bindFramebuffer(e.FRAMEBUFFER,d._frameBuffer),this.updateViewport(c._drawWidth,c._drawHeight),e.clear(e.COLOR_BUFFER_BIT),this._batchDraw(i,e,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),this.setTextureParams(e);var k=!1,l=0,m=b[l];do this._activeShader=this.getFilterShader(m),this._activeShader&&(e.activeTexture(e.TEXTURE0+f),d=this.getTargetRenderTexture(a,c._drawWidth,c._drawHeight),e.bindFramebuffer(e.FRAMEBUFFER,d._frameBuffer),e.viewport(0,0,c._drawWidth,c._drawHeight),e.clear(e.COLOR_BUFFER_BIT),this._drawCover(e,k),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),this.setTextureParams(e),(j>1||b[0]._multiPass)&&(k=!k),m=null!==m._multiPass?m._multiPass:b[++l]);while(m);this.isCacheControlled?(e.bindFramebuffer(e.FRAMEBUFFER,null),this.updateViewport(g,h),this._activeShader=this.getFilterShader(this),e.clear(e.COLOR_BUFFER_BIT),this._drawCover(e,k)):(k&&(e.activeTexture(e.TEXTURE0+f),d=this.getTargetRenderTexture(a,c._drawWidth,c._drawHeight),e.bindFramebuffer(e.FRAMEBUFFER,d._frameBuffer),this._activeShader=this.getFilterShader(this),e.viewport(0,0,c._drawWidth,c._drawHeight),e.clear(e.COLOR_BUFFER_BIT),this._drawCover(e,!k)),e.bindFramebuffer(e.FRAMEBUFFER,null),this.updateViewport(g,h),a.cacheCanvas=d)},b._appendToBatchGroup=function(b,c,d,e,f){b._glMtx||(b._glMtx=new createjs.Matrix2D);var g=b._glMtx;g.copy(d),b.transformMatrix?g.appendMatrix(b.transformMatrix):g.appendTransform(b.x,b.y,b.scaleX,b.scaleY,b.rotation,b.skewX,b.skewY,b.regX,b.regY);for(var h,i,j,k,l=b.children.length,m=0;l>m;m++){var n=b.children[m];if(n.visible&&e)if(n.cacheCanvas&&!f||(n._updateState&&n._updateState(),!n.children)){this.batchCardCount+1>this._maxCardsPerBatch&&(this.batchReason="vertexOverflow",this._drawBuffers(c),this.batchCardCount=0),n._glMtx||(n._glMtx=new createjs.Matrix2D);var o=n._glMtx;o.copy(g),n.transformMatrix?o.appendMatrix(n.transformMatrix):o.appendTransform(n.x,n.y,n.scaleX,n.scaleY,n.rotation,n.skewX,n.skewY,n.regX,n.regY);var p,q,r,s,t,u,v=n.cacheCanvas&&!f;if(2===n._webGLRenderStyle||v)r=(f?!1:n.cacheCanvas)||n.image;else{if(1!==n._webGLRenderStyle)continue;if(s=n.spriteSheet.getFrame(n.currentFrame),null===s)continue;r=s.image}var w=this._uvs,x=this._vertices,y=this._indices,z=this._alphas;if(r){if(void 0===r._storeID)t=this._loadTextureImage(c,r),this._insertTextureInBatch(c,t);else{if(t=this._textureDictionary[r._storeID],!t){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}t._batchID!==this._batchID&&this._insertTextureInBatch(c,t)}if(q=t._activeIndex,2===n._webGLRenderStyle||v)!v&&n.sourceRect?(n._uvRect||(n._uvRect={}),u=n.sourceRect,p=n._uvRect,p.t=u.y/r.height,p.l=u.x/r.width,p.b=(u.y+u.height)/r.height,p.r=(u.x+u.width)/r.width,h=0,i=0,j=u.width+h,k=u.height+i):(p=a.UV_RECT,v?(u=n.bitmapCache,h=u.x+u._filterOffX/u.scale,i=u.y+u._filterOffY/u.scale,j=u._drawWidth/u.scale+h,k=u._drawHeight/u.scale+i):(h=0,i=0,j=r.width+h,k=r.height+i));else if(1===n._webGLRenderStyle){var A=s.rect;p=s.uvRect,p||(p=a.buildUVRects(n.spriteSheet,n.currentFrame,!1)),h=-s.regX,i=-s.regY,j=A.width-s.regX,k=A.height-s.regY}var B=this.batchCardCount*a.INDICIES_PER_CARD,C=2*B;x[C]=h*o.a+i*o.c+o.tx,x[C+1]=h*o.b+i*o.d+o.ty,x[C+2]=h*o.a+k*o.c+o.tx,x[C+3]=h*o.b+k*o.d+o.ty,x[C+4]=j*o.a+i*o.c+o.tx,x[C+5]=j*o.b+i*o.d+o.ty,x[C+6]=x[C+2],x[C+7]=x[C+3],x[C+8]=x[C+4],x[C+9]=x[C+5],x[C+10]=j*o.a+k*o.c+o.tx,x[C+11]=j*o.b+k*o.d+o.ty,w[C]=p.l,w[C+1]=p.t,w[C+2]=p.l,w[C+3]=p.b,w[C+4]=p.r,w[C+5]=p.t,w[C+6]=p.l,w[C+7]=p.b,w[C+8]=p.r,w[C+9]=p.t,w[C+10]=p.r,w[C+11]=p.b,y[B]=y[B+1]=y[B+2]=y[B+3]=y[B+4]=y[B+5]=q,z[B]=z[B+1]=z[B+2]=z[B+3]=z[B+4]=z[B+5]=n.alpha*e,this.batchCardCount++}}else this._appendToBatchGroup(n,c,g,n.alpha*e)}},b._drawBuffers=function(b){if(!(this.batchCardCount<=0)){this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : "+this.batchReason);var c=this._activeShader,d=this._vertexPositionBuffer,e=this._textureIndexBuffer,f=this._uvPositionBuffer,g=this._alphaBuffer;b.useProgram(c),b.bindBuffer(b.ARRAY_BUFFER,d),b.vertexAttribPointer(c.vertexPositionAttribute,d.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,this._vertices),b.bindBuffer(b.ARRAY_BUFFER,e),b.vertexAttribPointer(c.textureIndexAttribute,e.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,this._indices),b.bindBuffer(b.ARRAY_BUFFER,f),b.vertexAttribPointer(c.uvPositionAttribute,f.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,this._uvs),b.bindBuffer(b.ARRAY_BUFFER,g),b.vertexAttribPointer(c.alphaAttribute,g.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,this._alphas),b.uniformMatrix4fv(c.pMatrixUniform,b.FALSE,this._projectionMatrix);for(var h=0;h 0&&this._drawBuffers(b),this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : Cover");var d=this._activeShader,e=this._vertexPositionBuffer,f=this._uvPositionBuffer;b.clear(b.COLOR_BUFFER_BIT),b.useProgram(d),b.bindBuffer(b.ARRAY_BUFFER,e),b.vertexAttribPointer(d.vertexPositionAttribute,e.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,a.COVER_VERT),b.bindBuffer(b.ARRAY_BUFFER,f),b.vertexAttribPointer(d.uvPositionAttribute,f.itemSize,b.FLOAT,!1,0,0),b.bufferSubData(b.ARRAY_BUFFER,0,c?a.COVER_UV_FLIP:a.COVER_UV),b.uniform1i(d.samplerUniform,0),b.uniform1f(d.uprightUniform,c?0:1),b.drawArrays(b.TRIANGLES,0,a.INDICIES_PER_CARD)},createjs.StageGL=createjs.promote(a,"Stage")}(),window.createjs=window.createjs||{},function(){function a(a){this.DisplayObject_constructor(),"string"==typeof a?(this.image=document.createElement("img"),this.image.src=a):this.image=a,this.sourceRect=null,this._webGLRenderStyle=createjs.DisplayObject._StageGL_BITMAP}var b=createjs.extend(a,createjs.DisplayObject);b.initialize=a,b.isVisible=function(){var a=this.image,b=this.cacheCanvas||a&&(a.naturalWidth||a.getContext||a.readyState>=2);return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&b)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;var c=this.image,d=this.sourceRect;if(c.getImage&&(c=c.getImage()),!c)return!0;if(d){var e=d.x,f=d.y,g=e+d.width,h=f+d.height,i=0,j=0,k=c.width,l=c.height;0>e&&(i-=e,e=0),g>k&&(g=k),0>f&&(j-=f,f=0),h>l&&(h=l),a.drawImage(c,e,f,g-e,h-f,i,j,g-e,h-f)}else a.drawImage(c,0,0);return!0},b.getBounds=function(){var a=this.DisplayObject_getBounds();if(a)return a;var b=this.image,c=this.sourceRect||b,d=b&&(b.naturalWidth||b.getContext||b.readyState>=2);return d?this._rectangle.setValues(0,0,c.width,c.height):null},b.clone=function(b){var c=this.image;c&&b&&(c=c.cloneNode());var d=new a(c);return this.sourceRect&&(d.sourceRect=this.sourceRect.clone()),this._cloneProps(d),d},b.toString=function(){return"[Bitmap (name="+this.name+")]"},createjs.Bitmap=createjs.promote(a,"DisplayObject")}(),window.createjs=window.createjs||{},function(){"use strict";function a(a,b){this.DisplayObject_constructor(),this.currentFrame=0,this.currentAnimation=null,this.paused=!0,this.spriteSheet=a,this.currentAnimationFrame=0,this.framerate=0,this._animation=null,this._currentFrame=null,this._skipAdvance=!1,this._webGLRenderStyle=createjs.DisplayObject._StageGL_SPRITE,null!=b&&this.gotoAndPlay(b)}var b=createjs.extend(a,createjs.DisplayObject);b.initialize=a,b.isVisible=function(){var a=this.cacheCanvas||this.spriteSheet.complete;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;this._normalizeFrame();var c=this.spriteSheet.getFrame(0|this._currentFrame);if(!c)return!1;var d=c.rect;return d.width&&d.height&&a.drawImage(c.image,d.x,d.y,d.width,d.height,-c.regX,-c.regY,d.width,d.height),!0},b.play=function(){this.paused=!1},b.stop=function(){this.paused=!0},b.gotoAndPlay=function(a){this.paused=!1,this._skipAdvance=!0,this._goto(a)},b.gotoAndStop=function(a){this.paused=!0,this._goto(a)},b.advance=function(a){var b=this.framerate||this.spriteSheet.framerate,c=b&&null!=a?a/(1e3/b):1;this._normalizeFrame(c)},b.getBounds=function(){return this.DisplayObject_getBounds()||this.spriteSheet.getFrameBounds(this.currentFrame,this._rectangle)},b.clone=function(){return this._cloneProps(new a(this.spriteSheet))},b.toString=function(){return"[Sprite (name="+this.name+")]"},b._cloneProps=function(a){return this.DisplayObject__cloneProps(a),a.currentFrame=this.currentFrame,a.currentAnimation=this.currentAnimation,a.paused=this.paused,a.currentAnimationFrame=this.currentAnimationFrame,a.framerate=this.framerate,a._animation=this._animation,a._currentFrame=this._currentFrame,a._skipAdvance=this._skipAdvance,a},b._tick=function(a){this.paused||(this._skipAdvance||this.advance(a&&a.delta),this._skipAdvance=!1),this.DisplayObject__tick(a)},b._normalizeFrame=function(a){a=a||0;var b,c=this._animation,d=this.paused,e=this._currentFrame;if(c){var f=c.speed||1,g=this.currentAnimationFrame;if(b=c.frames.length,g+a*f>=b){var h=c.next;if(this._dispatchAnimationEnd(c,e,d,h,b-1))return;if(h)return this._goto(h,a-(b-g)/f);this.paused=!0,g=c.frames.length-1}else g+=a*f;this.currentAnimationFrame=g,this._currentFrame=c.frames[0|g]}else if(e=this._currentFrame+=a,b=this.spriteSheet.getNumFrames(),e>=b&&b>0&&!this._dispatchAnimationEnd(c,e,d,b-1)&&(this._currentFrame-=b)>=b)return this._normalizeFrame();e=0|this._currentFrame,this.currentFrame!=e&&(this.currentFrame=e,this.dispatchEvent("change"))},b._dispatchAnimationEnd=function(a,b,c,d,e){var f=a?a.name:null;if(this.hasEventListener("animationend")){var g=new createjs.Event("animationend");g.name=f,g.next=d,this.dispatchEvent(g)}var h=this._animation!=a||this._currentFrame!=b;return h||c||!this.paused||(this.currentAnimationFrame=e,h=!0),h},b._goto=function(a,b){if(this.currentAnimationFrame=0,isNaN(a)){var c=this.spriteSheet.getAnimation(a);c&&(this._animation=c,this.currentAnimation=a,this._normalizeFrame(b))}else this.currentAnimation=this._animation=null,this._currentFrame=a,this._normalizeFrame()},createjs.Sprite=createjs.promote(a,"DisplayObject")}(),window.createjs=window.createjs||{},function(){"use strict";function a(a){this.DisplayObject_constructor(),this.graphics=a?a:new createjs.Graphics}var b=createjs.extend(a,createjs.DisplayObject);b.isVisible=function(){var a=this.cacheCanvas||this.graphics&&!this.graphics.isEmpty();return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){return this.DisplayObject_draw(a,b)?!0:(this.graphics.draw(a,this),!0)},b.clone=function(b){var c=b&&this.graphics?this.graphics.clone():this.graphics;return this._cloneProps(new a(c))},b.toString=function(){return"[Shape (name="+this.name+")]"},createjs.Shape=createjs.promote(a,"DisplayObject")}(),window.createjs=window.createjs||{},function(){"use strict";function a(a,b,c){this.DisplayObject_constructor(),this.text=a,this.font=b,this.color=c,this.textAlign="left",this.textBaseline="top",this.maxWidth=null,this.outline=0,this.lineHeight=0,this.lineWidth=null}var b=createjs.extend(a,createjs.DisplayObject),c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");c.getContext&&(a._workingContext=c.getContext("2d"),c.width=c.height=1),a.H_OFFSETS={start:0,left:0,center:-.5,end:-1,right:-1},a.V_OFFSETS={top:0,hanging:-.01,middle:-.4,alphabetic:-.8,ideographic:-.85,bottom:-1},b.isVisible=function(){var a=this.cacheCanvas||null!=this.text&&""!==this.text;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;var c=this.color||"#000";return this.outline?(a.strokeStyle=c,a.lineWidth=1*this.outline):a.fillStyle=c,this._drawText(this._prepContext(a)),!0},b.getMeasuredWidth=function(){return this._getMeasuredWidth(this.text)},b.getMeasuredLineHeight=function(){return 1.2*this._getMeasuredWidth("M")},b.getMeasuredHeight=function(){return this._drawText(null,{}).height},b.getBounds=function(){var b=this.DisplayObject_getBounds();if(b)return b;if(null==this.text||""===this.text)return null;var c=this._drawText(null,{}),d=this.maxWidth&&this.maxWidth 20?this.text.substr(0,17)+"...":this.text)+")]"},b._cloneProps=function(a){return this.DisplayObject__cloneProps(a),a.textAlign=this.textAlign,a.textBaseline=this.textBaseline,a.maxWidth=this.maxWidth,a.outline=this.outline,a.lineHeight=this.lineHeight,a.lineWidth=this.lineWidth,a},b._prepContext=function(a){return a.font=this.font||"10px sans-serif",a.textAlign=this.textAlign||"left",a.textBaseline=this.textBaseline||"top",a.lineJoin="miter",a.miterLimit=2.5,a},b._drawText=function(b,c,d){var e=!!b;e||(b=a._workingContext,b.save(),this._prepContext(b));for(var f=this.lineHeight||this.getMeasuredLineHeight(),g=0,h=0,i=String(this.text).split(/(?:\r\n|\r|\n)/),j=0,k=i.length;k>j;j++){var l=i[j],m=null;if(null!=this.lineWidth&&(m=b.measureText(l).width)>this.lineWidth){var n=l.split(/(\s)/);l=n[0],m=b.measureText(l).width;for(var o=1,p=n.length;p>o;o+=2){var q=b.measureText(n[o]+n[o+1]).width;m+q>this.lineWidth?(e&&this._drawTextLine(b,l,h*f),d&&d.push(l),m>g&&(g=m),l=n[o+1],m=b.measureText(l).width,h++):(l+=n[o]+n[o+1],m+=q)}}e&&this._drawTextLine(b,l,h*f),d&&d.push(l),c&&null==m&&(m=b.measureText(l).width),m>g&&(g=m),h++}return c&&(c.width=g,c.height=h*f),e||b.restore(),c},b._drawTextLine=function(a,b,c){this.outline?a.strokeText(b,0,c,this.maxWidth||65535):a.fillText(b,0,c,this.maxWidth||65535)},b._getMeasuredWidth=function(b){var c=a._workingContext;c.save();var d=this._prepContext(c).measureText(b).width;return c.restore(),d},createjs.Text=createjs.promote(a,"DisplayObject")}(),window.createjs=window.createjs||{},function(){"use strict";function a(a,b){this.Container_constructor(),this.text=a||"",this.spriteSheet=b,this.lineHeight=0,this.letterSpacing=0,this.spaceWidth=0,this._oldProps={text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0},this._oldStage=null,this._drawAction=null}var b=createjs.extend(a,createjs.Container);a.maxPoolSize=100,a._spritePool=[],b.draw=function(a,b){this.DisplayObject_draw(a,b)||(this._updateState(),this.Container_draw(a,b))},b.getBounds=function(){return this._updateText(),this.Container_getBounds()},b.isVisible=function(){var a=this.cacheCanvas||this.spriteSheet&&this.spriteSheet.complete&&this.text;return!!(this.visible&&this.alpha>0&&0!==this.scaleX&&0!==this.scaleY&&a)},b.clone=function(){return this._cloneProps(new a(this.text,this.spriteSheet))},b.addChild=b.addChildAt=b.removeChild=b.removeChildAt=b.removeAllChildren=function(){},b._updateState=function(){this._updateText()},b._cloneProps=function(a){return this.Container__cloneProps(a),a.lineHeight=this.lineHeight,a.letterSpacing=this.letterSpacing,a.spaceWidth=this.spaceWidth,a},b._getFrameIndex=function(a,b){var c,d=b.getAnimation(a);return d||(a!=(c=a.toUpperCase())||a!=(c=a.toLowerCase())||(c=null),c&&(d=b.getAnimation(c))),d&&d.frames[0]},b._getFrame=function(a,b){var c=this._getFrameIndex(a,b);return null==c?c:b.getFrame(c)},b._getLineHeight=function(a){var b=this._getFrame("1",a)||this._getFrame("T",a)||this._getFrame("L",a)||a.getFrame(0);return b?b.rect.height:1},b._getSpaceWidth=function(a){var b=this._getFrame("1",a)||this._getFrame("l",a)||this._getFrame("e",a)||this._getFrame("a",a)||a.getFrame(0);return b?b.rect.width:1},b._updateText=function(){var b,c=0,d=0,e=this._oldProps,f=!1,g=this.spaceWidth,h=this.lineHeight,i=this.spriteSheet,j=a._spritePool,k=this.children,l=0,m=k.length;for(var n in e)e[n]!=this[n]&&(e[n]=this[n],f=!0);if(f){var o=!!this._getFrame(" ",i);o||g||(g=this._getSpaceWidth(i)),h||(h=this._getLineHeight(i));for(var p=0,q=this.text.length;q>p;p++){var r=this.text.charAt(p);if(" "!=r||o)if("\n"!=r&&"\r"!=r){var s=this._getFrameIndex(r,i);null!=s&&(m>l?b=k[l]:(k.push(b=j.length?j.pop():new createjs.Sprite),b.parent=this,m++),b.spriteSheet=i,b.gotoAndStop(s),b.x=c,b.y=d,l++,c+=b.getBounds().width+this.letterSpacing)}else"\r"==r&&"\n"==this.text.charAt(p+1)&&p++,c=0,d+=h;else c+=g}for(;m>l;)j.push(b=k.pop()),b.parent=null,m--;j.length>a.maxPoolSize&&(j.length=a.maxPoolSize)}},createjs.BitmapText=createjs.promote(a,"Container")}(),window.createjs=window.createjs||{},function(){"use strict";function a(b){this.Container_constructor(),!a.inited&&a.init();var c,d,e,f;b instanceof String||arguments.length>1?(c=b,d=arguments[1],e=arguments[2],f=arguments[3],null==e&&(e=-1),b=null):b&&(c=b.mode,d=b.startPosition,e=b.loop,f=b.labels),b||(b={labels:f}),this.mode=c||a.INDEPENDENT,this.startPosition=d||0,this.loop=e===!0?-1:e||0,this.currentFrame=0,this.paused=b.paused||!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||b.frameBounds,this.framerate=null,b.useTicks=b.paused=!0,this.timeline=new createjs.Timeline(b),this._synchOffset=0,this._rawPosition=-1,this._bound_resolveState=this._resolveState.bind(this),this._t=0,this._managed={}}function b(){throw"MovieClipPlugin cannot be instantiated."}var c=createjs.extend(a,createjs.Container);a.INDEPENDENT="independent",a.SINGLE_FRAME="single",a.SYNCHED="synched",a.inited=!1,a.init=function(){a.inited||(b.install(),a.inited=!0)},c._getLabels=function(){return this.timeline.getLabels()},c.getLabels=createjs.deprecate(c._getLabels,"MovieClip.getLabels"),c._getCurrentLabel=function(){return this.timeline.currentLabel},c.getCurrentLabel=createjs.deprecate(c._getCurrentLabel,"MovieClip.getCurrentLabel"),c._getDuration=function(){return this.timeline.duration},c.getDuration=createjs.deprecate(c._getDuration,"MovieClip.getDuration");try{Object.defineProperties(c,{labels:{get:c._getLabels},currentLabel:{get:c._getCurrentLabel},totalFrames:{get:c._getDuration},duration:{get:c._getDuration}})}catch(d){}c.initialize=a,c.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},c.draw=function(a,b){return this.DisplayObject_draw(a,b)?!0:(this._updateState(),this.Container_draw(a,b),!0)},c.play=function(){this.paused=!1},c.stop=function(){this.paused=!0},c.gotoAndPlay=function(a){this.paused=!1,this._goto(a)},c.gotoAndStop=function(a){this.paused=!0,this._goto(a)},c.advance=function(b){var c=a.INDEPENDENT;if(this.mode===c){for(var d=this,e=d.framerate;(d=d.parent)&&null===e;)d.mode===c&&(e=d._framerate);if(this._framerate=e,!this.paused){var f=null!==e&&-1!==e&&null!==b?b/(1e3/e)+this._t:1,g=0|f;for(this._t=f-g;g--;)this._updateTimeline(this._rawPosition+1,!1)}}},c.clone=function(){throw"MovieClip cannot be cloned."},c.toString=function(){return"[MovieClip (name="+this.name+")]"},c._updateState=function(){(-1===this._rawPosition||this.mode!==a.INDEPENDENT)&&this._updateTimeline(-1)},c._tick=function(a){this.advance(a&&a.delta),this.Container__tick(a)},c._goto=function(a){var b=this.timeline.resolve(a);null!=b&&(this._t=0,this._updateTimeline(b,!0))},c._reset=function(){this._rawPosition=-1,this._t=this.currentFrame=0,this.paused=!1},c._updateTimeline=function(b,c){var d=this.mode!==a.INDEPENDENT,e=this.timeline;d&&(b=this.startPosition+(this.mode===a.SINGLE_FRAME?0:this._synchOffset)),0>b&&(b=0),(this._rawPosition!==b||d)&&(this._rawPosition=b,e.loop=this.loop,e.setPosition(b,d||!this.actionsEnabled,c,this._bound_resolveState))},c._renderFirstFrame=function(){var a=this.timeline,b=a.rawPosition;a.setPosition(0,!0,!0,this._bound_resolveState),a.rawPosition=b},c._resolveState=function(){var a=this.timeline;this.currentFrame=a.position;for(var b in this._managed)this._managed[b]=1;for(var c=a.tweens,d=0,e=c.length;e>d;d++){var f=c[d],g=f.target;if(g!==this&&!f.passive){var h=f._stepPosition;g instanceof createjs.DisplayObject?this._addManagedChild(g,h):this._setState(g.state,h)}}var i=this.children;for(d=i.length-1;d>=0;d--){var j=i[d].id;1===this._managed[j]&&(this.removeChildAt(d),delete this._managed[j])}},c._setState=function(a,b){if(a)for(var c=a.length-1;c>=0;c--){var d=a[c],e=d.t,f=d.p;for(var g in f)e[g]=f[g];this._addManagedChild(e,b)}},c._addManagedChild=function(b,c){b._off||(this.addChildAt(b,0),b instanceof a&&(b._synchOffset=c,b.mode===a.INDEPENDENT&&b.autoReset&&!this._managed[b.id]&&b._reset()),this._managed[b.id]=2)},c._getBounds=function(a,b){var c=this.DisplayObject_getBounds();return c||this.frameBounds&&(c=this._rectangle.copy(this.frameBounds[this.currentFrame])),c?this._transformBounds(c,a,b):this.Container__getBounds(a,b)},createjs.MovieClip=createjs.promote(a,"Container"),b.priority=100,b.ID="MovieClip",b.install=function(){createjs.Tween._installPlugin(b)},b.init=function(c,d){"startPosition"===d&&c.target instanceof a&&c._addPlugin(b)},b.step=function(){},b.change=function(a,b,c,d,e){return"startPosition"===c?1===e?b.props[c]:b.prev.props[c]:void 0}}(),window.createjs=window.createjs||{},function(){"use strict";function a(){throw"SpriteSheetUtils cannot be instantiated"}var b=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");b.getContext&&(a._workingCanvas=b,a._workingContext=b.getContext("2d"),b.width=b.height=1),a.extractFrame=function(b,c){isNaN(c)&&(c=b.getAnimation(c).frames[0]);var d=b.getFrame(c);if(!d)return null;var e=d.rect,f=a._workingCanvas;f.width=e.width,f.height=e.height,a._workingContext.drawImage(d.image,e.x,e.y,e.width,e.height,0,0,e.width,e.height);var g=document.createElement("img");return g.src=f.toDataURL("image/png"),g},a.addFlippedFrames=createjs.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),a.mergeAlpha=createjs.deprecate(null,"SpriteSheetUtils.mergeAlpha"),a._flip=function(b,c,d,e){for(var f=b._images,g=a._workingCanvas,h=a._workingContext,i=f.length/c,j=0;i>j;j++){var k=f[j];k.__tmp=j,h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,g.width+1,g.height+1),g.width=k.width,g.height=k.height,h.setTransform(d?-1:1,0,0,e?-1:1,d?k.width:0,e?k.height:0),h.drawImage(k,0,0);var l=document.createElement("img");l.src=g.toDataURL("image/png"),l.width=k.width||k.naturalWidth,l.height=k.height||k.naturalHeight,f.push(l)}var m=b._frames,n=m.length/c;for(j=0;n>j;j++){k=m[j]; + var o = k.rect.clone(); l = f[k.image.__tmp + i * c]; var p = { image: l, rect: o, regX: k.regX, regY: k.regY }; d && (o.x = (l.width || l.naturalWidth) - o.x - o.width, p.regX = o.width - k.regX), e && (o.y = (l.height || l.naturalHeight) - o.y - o.height, p.regY = o.height - k.regY), m.push(p) + } var q = "_" + (d ? "h" : "") + (e ? "v" : ""), r = b._animations, s = b._data, t = r.length / c; for (j = 0; t > j; j++) { var u = r[j]; k = s[u]; var v = { name: u + q, speed: k.speed, next: k.next, frames: [] }; k.next && (v.next += q), m = k.frames; for (var w = 0, x = m.length; x > w; w++)v.frames.push(m[w] + n * c); s[v.name] = v, r.push(v.name) } + }, createjs.SpriteSheetUtils = a + }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.EventDispatcher_constructor(), this.maxWidth = 2048, this.maxHeight = 2048, this.spriteSheet = null, this.scale = 1, this.padding = 1, this.timeSlice = .3, this.progress = -1, this.framerate = a || 0, this._frames = [], this._animations = {}, this._data = null, this._nextFrameIndex = 0, this._index = 0, this._timerID = null, this._scale = 1 } var b = createjs.extend(a, createjs.EventDispatcher); a.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions", a.ERR_RUNNING = "a build is already running", b.addFrame = function (b, c, d, e, f) { if (this._data) throw a.ERR_RUNNING; var g = c || b.bounds || b.nominalBounds; return !g && b.getBounds && (g = b.getBounds()), g ? (d = d || 1, this._frames.push({ source: b, sourceRect: g, scale: d, funct: e, data: f, index: this._frames.length, height: g.height * d }) - 1) : null }, b.addAnimation = function (b, c, d, e) { if (this._data) throw a.ERR_RUNNING; this._animations[b] = { frames: c, next: d, speed: e } }, b.addMovieClip = function (b, c, d, e, f, g) { if (this._data) throw a.ERR_RUNNING; var h = b.frameBounds, i = c || b.bounds || b.nominalBounds; if (!i && b.getBounds && (i = b.getBounds()), i || h) { var j, k, l = this._frames.length, m = b.timeline.duration; for (j = 0; m > j; j++) { var n = h && h[j] ? h[j] : i; this.addFrame(b, n, d, this._setupMovieClipFrame, { i: j, f: e, d: f }) } var o = b.timeline._labels, p = []; for (var q in o) p.push({ index: o[q], label: q }); if (p.length) for (p.sort(function (a, b) { return a.index - b.index }), j = 0, k = p.length; k > j; j++) { for (var r = p[j].label, s = l + p[j].index, t = l + (j == k - 1 ? m : p[j + 1].index), u = [], v = s; t > v; v++)u.push(v); (!g || (r = g(r, b, s, t))) && this.addAnimation(r, u, !0) } } }, b.build = function () { if (this._data) throw a.ERR_RUNNING; for (this._startBuild(); this._drawNext();); return this._endBuild(), this.spriteSheet }, b.buildAsync = function (b) { if (this._data) throw a.ERR_RUNNING; this.timeSlice = b, this._startBuild(); var c = this; this._timerID = setTimeout(function () { c._run() }, 50 - 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3))) }, b.stopAsync = function () { clearTimeout(this._timerID), this._data = null }, b.clone = function () { throw "SpriteSheetBuilder cannot be cloned." }, b.toString = function () { return "[SpriteSheetBuilder]" }, b._startBuild = function () { var b = this.padding || 0; this.progress = 0, this.spriteSheet = null, this._index = 0, this._scale = this.scale; var c = []; this._data = { images: [], frames: c, framerate: this.framerate, animations: this._animations }; var d = this._frames.slice(); if (d.sort(function (a, b) { return a.height <= b.height ? -1 : 1 }), d[d.length - 1].height + 2 * b > this.maxHeight) throw a.ERR_DIMENSIONS; for (var e = 0, f = 0, g = 0; d.length;) { var h = this._fillRow(d, e, g, c, b); if (h.w > f && (f = h.w), e += h.h, !h.h || !d.length) { var i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); i.width = this._getSize(f, this.maxWidth), i.height = this._getSize(e, this.maxHeight), this._data.images[g] = i, h.h || (f = e = 0, g++) } } }, b._setupMovieClipFrame = function (a, b) { var c = a.actionsEnabled; a.actionsEnabled = !1, a.gotoAndStop(b.i), a.actionsEnabled = c, b.f && b.f(a, b.d, b.i) }, b._getSize = function (a, b) { for (var c = 4; Math.pow(2, ++c) < a;); return Math.min(b, Math.pow(2, c)) }, b._fillRow = function (b, c, d, e, f) { var g = this.maxWidth, h = this.maxHeight; c += f; for (var i = h - c, j = f, k = 0, l = b.length - 1; l >= 0; l--) { var m = b[l], n = this._scale * m.scale, o = m.sourceRect, p = m.source, q = Math.floor(n * o.x - f), r = Math.floor(n * o.y - f), s = Math.ceil(n * o.height + 2 * f), t = Math.ceil(n * o.width + 2 * f); if (t > g) throw a.ERR_DIMENSIONS; s > i || j + t > g || (m.img = d, m.rect = new createjs.Rectangle(j, c, t, s), k = k || s, b.splice(l, 1), e[m.index] = [j, c, t, s, d, Math.round(-q + n * p.regX - f), Math.round(-r + n * p.regY - f)], j += t) } return { w: j, h: k } }, b._endBuild = function () { this.spriteSheet = new createjs.SpriteSheet(this._data), this._data = null, this.progress = 1, this.dispatchEvent("complete") }, b._run = function () { for (var a = 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)), b = (new Date).getTime() + a, c = !1; b > (new Date).getTime();)if (!this._drawNext()) { c = !0; break } if (c) this._endBuild(); else { var d = this; this._timerID = setTimeout(function () { d._run() }, 50 - a) } var e = this.progress = this._index / this._frames.length; if (this.hasEventListener("progress")) { var f = new createjs.Event("progress"); f.progress = e, this.dispatchEvent(f) } }, b._drawNext = function () { var a = this._frames[this._index], b = a.scale * this._scale, c = a.rect, d = a.sourceRect, e = this._data.images[a.img], f = e.getContext("2d"); return a.funct && a.funct(a.source, a.data), f.save(), f.beginPath(), f.rect(c.x, c.y, c.width, c.height), f.clip(), f.translate(Math.ceil(c.x - d.x * b), Math.ceil(c.y - d.y * b)), f.scale(b, b), a.source.draw(f), f.restore(), ++this._index < this._frames.length }, createjs.SpriteSheetBuilder = createjs.promote(a, "EventDispatcher") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.DisplayObject_constructor(), "string" == typeof a && (a = document.getElementById(a)), this.mouseEnabled = !1; var b = a.style; b.position = "absolute", b.transformOrigin = b.WebkitTransformOrigin = b.msTransformOrigin = b.MozTransformOrigin = b.OTransformOrigin = "0% 0%", this.htmlElement = a, this._oldProps = null, this._oldStage = null, this._drawAction = null } var b = createjs.extend(a, createjs.DisplayObject); b.isVisible = function () { return null != this.htmlElement }, b.draw = function () { return !0 }, b.cache = function () { }, b.uncache = function () { }, b.updateCache = function () { }, b.hitTest = function () { }, b.localToGlobal = function () { }, b.globalToLocal = function () { }, b.localToLocal = function () { }, b.clone = function () { throw "DOMElement cannot be cloned." }, b.toString = function () { return "[DOMElement (name=" + this.name + ")]" }, b._tick = function (a) { var b = this.stage; b && b !== this._oldStage && (this._drawAction && b.off("drawend", this._drawAction), this._drawAction = b.on("drawend", this._handleDrawEnd, this), this._oldStage = b), this.DisplayObject__tick(a) }, b._handleDrawEnd = function () { var a = this.htmlElement; if (a) { var b = a.style, c = this.getConcatenatedDisplayProps(this._props), d = c.matrix, e = c.visible ? "visible" : "hidden"; if (e != b.visibility && (b.visibility = e), c.visible) { var f = this._oldProps, g = f && f.matrix, h = 1e4; if (!g || !g.equals(d)) { var i = "matrix(" + (d.a * h | 0) / h + "," + (d.b * h | 0) / h + "," + (d.c * h | 0) / h + "," + (d.d * h | 0) / h + "," + (d.tx + .5 | 0); b.transform = b.WebkitTransform = b.OTransform = b.msTransform = i + "," + (d.ty + .5 | 0) + ")", b.MozTransform = i + "px," + (d.ty + .5 | 0) + "px)", f || (f = this._oldProps = new createjs.DisplayProps(!0, null)), f.matrix.copy(d) } f.alpha != c.alpha && (b.opacity = "" + (c.alpha * h | 0) / h, f.alpha = c.alpha) } } }, createjs.DOMElement = createjs.promote(a, "DisplayObject") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a() { this.usesContext = !1, this._multiPass = null, this.VTX_SHADER_BODY = null, this.FRAG_SHADER_BODY = null } var b = a.prototype; b.getBounds = function (a) { return a }, b.shaderParamSetup = function () { }, b.applyFilter = function (a, b, c, d, e, f, g, h) { f = f || a, null == g && (g = b), null == h && (h = c); try { var i = a.getImageData(b, c, d, e) } catch (j) { return !1 } return this._applyFilter(i) ? (f.putImageData(i, g, h), !0) : !1 }, b.toString = function () { return "[Filter]" }, b.clone = function () { return new a }, b._applyFilter = function () { return !0 }, createjs.Filter = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function a() { this.width = void 0, this.height = void 0, this.x = void 0, this.y = void 0, this.scale = 1, this.offX = 0, this.offY = 0, this.cacheID = 0, this._filterOffX = 0, this._filterOffY = 0, this._cacheDataURLID = 0, this._cacheDataURL = null, this._drawWidth = 0, this._drawHeight = 0 } var b = a.prototype; a.getFilterBounds = function (a, b) { b || (b = new createjs.Rectangle); var c = a.filters, d = c && c.length; if (0 >= !!d) return b; for (var e = 0; d > e; e++) { var f = c[e]; if (f && f.getBounds) { var g = f.getBounds(); g && (0 == e ? b.setValues(g.x, g.y, g.width, g.height) : b.extend(g.x, g.y, g.width, g.height)) } } return b }, b.toString = function () { return "[BitmapCache]" }, b.define = function (a, b, c, d, e, f, g) { if (!a) throw "No symbol to cache"; this._options = g, this.target = a, this.width = d >= 1 ? d : 1, this.height = e >= 1 ? e : 1, this.x = b || 0, this.y = c || 0, this.scale = f || 1, this.update() }, b.update = function (b) { if (!this.target) throw "define() must be called before update()"; var c = a.getFilterBounds(this.target), d = this.target.cacheCanvas; this._drawWidth = Math.ceil(this.width * this.scale) + c.width, this._drawHeight = Math.ceil(this.height * this.scale) + c.height, d && this._drawWidth == d.width && this._drawHeight == d.height || this._updateSurface(), this._filterOffX = c.x, this._filterOffY = c.y, this.offX = this.x * this.scale + this._filterOffX, this.offY = this.y * this.scale + this._filterOffY, this._drawToCache(b), this.cacheID = this.cacheID ? this.cacheID + 1 : 1 }, b.release = function () { if (this._webGLCache) this._webGLCache.isCacheControlled || (this.__lastRT && (this.__lastRT = void 0), this.__rtA && this._webGLCache._killTextureObject(this.__rtA), this.__rtB && this._webGLCache._killTextureObject(this.__rtB), this.target && this.target.cacheCanvas && this._webGLCache._killTextureObject(this.target.cacheCanvas)), this._webGLCache = !1; else { var a = this.target.stage; a instanceof createjs.StageGL && a.releaseTexture(this.target.cacheCanvas) } this.target = this.target.cacheCanvas = null, this.cacheID = this._cacheDataURLID = this._cacheDataURL = void 0, this.width = this.height = this.x = this.y = this.offX = this.offY = 0, this.scale = 1 }, b.getCacheDataURL = function () { var a = this.target && this.target.cacheCanvas; return a ? (this.cacheID != this._cacheDataURLID && (this._cacheDataURLID = this.cacheID, this._cacheDataURL = a.toDataURL ? a.toDataURL() : null), this._cacheDataURL) : null }, b.draw = function (a) { return this.target ? (a.drawImage(this.target.cacheCanvas, this.x + this._filterOffX / this.scale, this.y + this._filterOffY / this.scale, this._drawWidth / this.scale, this._drawHeight / this.scale), !0) : !1 }, b._updateSurface = function () { if (!this._options || !this._options.useGL) { var a = this.target.cacheCanvas; return a || (a = this.target.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")), a.width = this._drawWidth, void (a.height = this._drawHeight) } if (!this._webGLCache) if ("stage" === this._options.useGL) { if (!this.target.stage || !this.target.stage.isWebGL) { var b = "Cannot use 'stage' for cache because the object's parent stage is "; throw b += this.target.stage ? "non WebGL." : "not set, please addChild to the correct stage." } this.target.cacheCanvas = !0, this._webGLCache = this.target.stage } else if ("new" === this._options.useGL) this.target.cacheCanvas = document.createElement("canvas"), this._webGLCache = new createjs.StageGL(this.target.cacheCanvas, { antialias: !0, transparent: !0, autoPurge: -1 }), this._webGLCache.isCacheControlled = !0; else { if (!(this._options.useGL instanceof createjs.StageGL)) throw "Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got " + this._options.useGL; this.target.cacheCanvas = !0, this._webGLCache = this._options.useGL, this._webGLCache.isCacheControlled = !0 } var a = this.target.cacheCanvas, c = this._webGLCache; c.isCacheControlled && (a.width = this._drawWidth, a.height = this._drawHeight, c.updateViewport(this._drawWidth, this._drawHeight)), this.target.filters ? (c.getTargetRenderTexture(this.target, this._drawWidth, this._drawHeight), c.getTargetRenderTexture(this.target, this._drawWidth, this._drawHeight)) : c.isCacheControlled || c.getTargetRenderTexture(this.target, this._drawWidth, this._drawHeight) }, b._drawToCache = function (a) { var b = this.target.cacheCanvas, c = this.target, d = this._webGLCache; if (d) d.cacheDraw(c, c.filters, this), b = this.target.cacheCanvas, b.width = this._drawWidth, b.height = this._drawHeight; else { var e = b.getContext("2d"); a || e.clearRect(0, 0, this._drawWidth + 1, this._drawHeight + 1), e.save(), e.globalCompositeOperation = a, e.setTransform(this.scale, 0, 0, this.scale, -this._filterOffX, -this._filterOffY), e.translate(-this.x, -this.y), c.draw(e, !0), e.restore(), c.filters && c.filters.length && this._applyFilters(e) } b._invalid = !0 }, b._applyFilters = function (a) { var b, c = this.target.filters, d = this._drawWidth, e = this._drawHeight, f = 0, g = c[f]; do g.usesContext ? (b && (a.putImageData(b, 0, 0), b = null), g.applyFilter(a, 0, 0, d, e)) : (b || (b = a.getImageData(0, 0, d, e)), g._applyFilter(b)), g = null !== g._multiPass ? g._multiPass : c[++f]; while (g); b && a.putImageData(b, 0, 0) }, createjs.BitmapCache = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a, b, c) { this.Filter_constructor(), this._blurX = a, this._blurXTable = [], this._lastBlurX = null, this._blurY = b, this._blurYTable = [], this._lastBlurY = null, this._quality, this._lastQuality = null, this.FRAG_SHADER_TEMPLATE = "uniform float xWeight[{{blurX}}];uniform float yWeight[{{blurY}}];uniform vec2 textureOffset;void main(void) {vec4 color = vec4(0.0);float xAdj = ({{blurX}}.0-1.0)/2.0;float yAdj = ({{blurY}}.0-1.0)/2.0;vec2 sampleOffset;for(int i=0; i<{{blurX}}; i++) {for(int j=0; j<{{blurY}}; j++) {sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);}}gl_FragColor = color.rgba;}", (isNaN(c) || 1 > c) && (c = 1), this.setQuality(0 | c) } var b = createjs.extend(a, createjs.Filter); b.getBlurX = function () { return this._blurX }, b.getBlurY = function () { return this._blurY }, b.setBlurX = function (a) { (isNaN(a) || 0 > a) && (a = 0), this._blurX = a }, b.setBlurY = function (a) { (isNaN(a) || 0 > a) && (a = 0), this._blurY = a }, b.getQuality = function () { return this._quality }, b.setQuality = function (a) { (isNaN(a) || 0 > a) && (a = 0), this._quality = 0 | a }, b._getShader = function () { var a = this._lastBlurX !== this._blurX, b = this._lastBlurY !== this._blurY, c = this._lastQuality !== this._quality; return a || b || c ? ((a || c) && (this._blurXTable = this._getTable(this._blurX * this._quality)), (b || c) && (this._blurYTable = this._getTable(this._blurY * this._quality)), this._updateShader(), this._lastBlurX = this._blurX, this._lastBlurY = this._blurY, void (this._lastQuality = this._quality)) : this._compiledShader }, b._setShader = function () { this._compiledShader }; try { Object.defineProperties(b, { blurX: { get: b.getBlurX, set: b.setBlurX }, blurY: { get: b.getBlurY, set: b.setBlurY }, quality: { get: b.getQuality, set: b.setQuality }, _builtShader: { get: b._getShader, set: b._setShader } }) } catch (c) { console.log(c) } b._getTable = function (a) { var b = 4.2; if (1 >= a) return [1]; var c = [], d = Math.ceil(2 * a); d += d % 2 ? 0 : 1; for (var e = d / 2 | 0, f = -e; e >= f; f++) { var g = f / e * b; c.push(1 / Math.sqrt(2 * Math.PI) * Math.pow(Math.E, -(Math.pow(g, 2) / 4))) } var h = c.reduce(function (a, b) { return a + b }); return c.map(function (a) { return a / h }) }, b._updateShader = function () { if (void 0 !== this._blurX && void 0 !== this._blurY) { var a = this.FRAG_SHADER_TEMPLATE; a = a.replace(/\{\{blurX\}\}/g, this._blurXTable.length.toFixed(0)), a = a.replace(/\{\{blurY\}\}/g, this._blurYTable.length.toFixed(0)), this.FRAG_SHADER_BODY = a } }, b.shaderParamSetup = function (a, b, c) { a.uniform1fv(a.getUniformLocation(c, "xWeight"), this._blurXTable), a.uniform1fv(a.getUniformLocation(c, "yWeight"), this._blurYTable), a.uniform2f(a.getUniformLocation(c, "textureOffset"), 2 / (b._viewportWidth * this._quality), 2 / (b._viewportHeight * this._quality)) }, a.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1], a.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9], b.getBounds = function (a) { var b = 0 | this.blurX, c = 0 | this.blurY; if (0 >= b && 0 >= c) return a; var d = Math.pow(this.quality, .2); return (a || new createjs.Rectangle).pad(c * d + 1, b * d + 1, c * d + 1, b * d + 1) }, b.clone = function () { return new a(this.blurX, this.blurY, this.quality) }, b.toString = function () { return "[BlurFilter]" }, b._applyFilter = function (b) { var c = this._blurX >> 1; if (isNaN(c) || 0 > c) return !1; var d = this._blurY >> 1; if (isNaN(d) || 0 > d) return !1; if (0 == c && 0 == d) return !1; var e = this.quality; (isNaN(e) || 1 > e) && (e = 1), e |= 0, e > 3 && (e = 3), 1 > e && (e = 1); var f = b.data, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, m = 0, n = 0, o = 0, p = 0, q = 0, r = 0, s = 0, t = 0, u = 0, v = c + c + 1 | 0, w = d + d + 1 | 0, x = 0 | b.width, y = 0 | b.height, z = x - 1 | 0, A = y - 1 | 0, B = c + 1 | 0, C = d + 1 | 0, D = { r: 0, b: 0, g: 0, a: 0 }, E = D; for (i = 1; v > i; i++)E = E.n = { r: 0, b: 0, g: 0, a: 0 }; E.n = D; var F = { r: 0, b: 0, g: 0, a: 0 }, G = F; for (i = 1; w > i; i++)G = G.n = { r: 0, b: 0, g: 0, a: 0 }; G.n = F; for (var H = null, I = 0 | a.MUL_TABLE[c], J = 0 | a.SHG_TABLE[c], K = 0 | a.MUL_TABLE[d], L = 0 | a.SHG_TABLE[d]; e-- > 0;) { m = l = 0; var M = I, N = J; for (h = y; --h > -1;) { for (n = B * (r = f[0 | l]), o = B * (s = f[l + 1 | 0]), p = B * (t = f[l + 2 | 0]), q = B * (u = f[l + 3 | 0]), E = D, i = B; --i > -1;)E.r = r, E.g = s, E.b = t, E.a = u, E = E.n; for (i = 1; B > i; i++)j = l + ((i > z ? z : i) << 2) | 0, n += E.r = f[j], o += E.g = f[j + 1], p += E.b = f[j + 2], q += E.a = f[j + 3], E = E.n; for (H = D, g = 0; x > g; g++)f[l++] = n * M >>> N, f[l++] = o * M >>> N, f[l++] = p * M >>> N, f[l++] = q * M >>> N, j = m + ((j = g + c + 1) < z ? j : z) << 2, n -= H.r - (H.r = f[j]), o -= H.g - (H.g = f[j + 1]), p -= H.b - (H.b = f[j + 2]), q -= H.a - (H.a = f[j + 3]), H = H.n; m += x } for (M = K, N = L, g = 0; x > g; g++) { for (l = g << 2 | 0, n = C * (r = f[l]) | 0, o = C * (s = f[l + 1 | 0]) | 0, p = C * (t = f[l + 2 | 0]) | 0, q = C * (u = f[l + 3 | 0]) | 0, G = F, i = 0; C > i; i++)G.r = r, G.g = s, G.b = t, G.a = u, G = G.n; for (k = x, i = 1; d >= i; i++)l = k + g << 2, n += G.r = f[l], o += G.g = f[l + 1], p += G.b = f[l + 2], q += G.a = f[l + 3], G = G.n, A > i && (k += x); if (l = g, H = F, e > 0) for (h = 0; y > h; h++)j = l << 2, f[j + 3] = u = q * M >>> N, u > 0 ? (f[j] = n * M >>> N, f[j + 1] = o * M >>> N, f[j + 2] = p * M >>> N) : f[j] = f[j + 1] = f[j + 2] = 0, j = g + ((j = h + C) < A ? j : A) * x << 2, n -= H.r - (H.r = f[j]), o -= H.g - (H.g = f[j + 1]), p -= H.b - (H.b = f[j + 2]), q -= H.a - (H.a = f[j + 3]), H = H.n, l += x; else for (h = 0; y > h; h++)j = l << 2, f[j + 3] = u = q * M >>> N, u > 0 ? (u = 255 / u, f[j] = (n * M >>> N) * u, f[j + 1] = (o * M >>> N) * u, f[j + 2] = (p * M >>> N) * u) : f[j] = f[j + 1] = f[j + 2] = 0, j = g + ((j = h + C) < A ? j : A) * x << 2, n -= H.r - (H.r = f[j]), o -= H.g - (H.g = f[j + 1]), p -= H.b - (H.b = f[j + 2]), q -= H.a - (H.a = f[j + 3]), H = H.n, l += x } } return !0 }, createjs.BlurFilter = createjs.promote(a, "Filter") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.Filter_constructor(), this.alphaMap = a, this._alphaMap = null, this._mapData = null, this._mapTexture = null, this.FRAG_SHADER_BODY = "uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * (alphaMap.r * ceil(alphaMap.a)));}" } var b = createjs.extend(a, createjs.Filter); b.shaderParamSetup = function (a, b, c) { this._mapTexture || (this._mapTexture = a.createTexture()), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, this._mapTexture), b.setTextureParams(a), a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, this.alphaMap), a.uniform1i(a.getUniformLocation(c, "uAlphaSampler"), 1) }, b.clone = function () { var b = new a(this.alphaMap); return b._alphaMap = this._alphaMap, b._mapData = this._mapData, b }, b.toString = function () { return "[AlphaMapFilter]" }, b._applyFilter = function (a) { if (!this.alphaMap) return !0; if (!this._prepAlphaMap()) return !1; for (var b = a.data, c = this._mapData, d = 0, e = b.length; e > d; d += 4)b[d + 3] = c[d] || 0; return !0 }, b._prepAlphaMap = function () { if (!this.alphaMap) return !1; if (this.alphaMap == this._alphaMap && this._mapData) return !0; this._mapData = null; var a, b = this._alphaMap = this.alphaMap, c = b; b instanceof HTMLCanvasElement ? a = c.getContext("2d") : (c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), c.width = b.width, c.height = b.height, a = c.getContext("2d"), a.drawImage(b, 0, 0)); try { var d = a.getImageData(0, 0, b.width, b.height) } catch (e) { return !1 } return this._mapData = d.data, !0 }, createjs.AlphaMapFilter = createjs.promote(a, "Filter") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.Filter_constructor(), this.mask = a, this.usesContext = !0, this.FRAG_SHADER_BODY = "uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);}" } var b = createjs.extend(a, createjs.Filter); b.shaderParamSetup = function (a, b, c) { this._mapTexture || (this._mapTexture = a.createTexture()), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, this._mapTexture), b.setTextureParams(a), a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, this.mask), a.uniform1i(a.getUniformLocation(c, "uAlphaSampler"), 1) }, b.applyFilter = function (a, b, c, d, e, f, g, h) { return this.mask ? (f = f || a, null == g && (g = b), null == h && (h = c), f.save(), a != f ? !1 : (f.globalCompositeOperation = "destination-in", f.drawImage(this.mask, g, h), f.restore(), !0)) : !0 }, b.clone = function () { return new a(this.mask) }, b.toString = function () { return "[AlphaMaskFilter]" }, createjs.AlphaMaskFilter = createjs.promote(a, "Filter") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a, b, c, d, e, f, g, h) { this.Filter_constructor(), this.redMultiplier = null != a ? a : 1, this.greenMultiplier = null != b ? b : 1, this.blueMultiplier = null != c ? c : 1, this.alphaMultiplier = null != d ? d : 1, this.redOffset = e || 0, this.greenOffset = f || 0, this.blueOffset = g || 0, this.alphaOffset = h || 0, this.FRAG_SHADER_BODY = "uniform vec4 uColorMultiplier;uniform vec4 uColorOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = (color * uColorMultiplier) + uColorOffset;}" } var b = createjs.extend(a, createjs.Filter); b.shaderParamSetup = function (a, b, c) { a.uniform4f(a.getUniformLocation(c, "uColorMultiplier"), this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier), a.uniform4f(a.getUniformLocation(c, "uColorOffset"), this.redOffset / 255, this.greenOffset / 255, this.blueOffset / 255, this.alphaOffset / 255) }, b.toString = function () { return "[ColorFilter]" }, b.clone = function () { return new a(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset) }, b._applyFilter = function (a) { for (var b = a.data, c = b.length, d = 0; c > d; d += 4)b[d] = b[d] * this.redMultiplier + this.redOffset, b[d + 1] = b[d + 1] * this.greenMultiplier + this.greenOffset, b[d + 2] = b[d + 2] * this.blueMultiplier + this.blueOffset, b[d + 3] = b[d + 3] * this.alphaMultiplier + this.alphaOffset; return !0 }, createjs.ColorFilter = createjs.promote(a, "Filter") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a, b, c, d) { this.setColor(a, b, c, d) } var b = a.prototype; a.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10], a.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], a.LENGTH = a.IDENTITY_MATRIX.length, b.setColor = function (a, b, c, d) { return this.reset().adjustColor(a, b, c, d) }, b.reset = function () { return this.copy(a.IDENTITY_MATRIX) }, b.adjustColor = function (a, b, c, d) { return this.adjustHue(d), this.adjustContrast(b), this.adjustBrightness(a), this.adjustSaturation(c) }, b.adjustBrightness = function (a) { return 0 == a || isNaN(a) ? this : (a = this._cleanValue(a, 255), this._multiplyMatrix([1, 0, 0, 0, a, 0, 1, 0, 0, a, 0, 0, 1, 0, a, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this) }, b.adjustContrast = function (b) { if (0 == b || isNaN(b)) return this; b = this._cleanValue(b, 100); var c; return 0 > b ? c = 127 + b / 100 * 127 : (c = b % 1, c = 0 == c ? a.DELTA_INDEX[b] : a.DELTA_INDEX[b << 0] * (1 - c) + a.DELTA_INDEX[(b << 0) + 1] * c, c = 127 * c + 127), this._multiplyMatrix([c / 127, 0, 0, 0, .5 * (127 - c), 0, c / 127, 0, 0, .5 * (127 - c), 0, 0, c / 127, 0, .5 * (127 - c), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this }, b.adjustSaturation = function (a) { if (0 == a || isNaN(a)) return this; a = this._cleanValue(a, 100); var b = 1 + (a > 0 ? 3 * a / 100 : a / 100), c = .3086, d = .6094, e = .082; return this._multiplyMatrix([c * (1 - b) + b, d * (1 - b), e * (1 - b), 0, 0, c * (1 - b), d * (1 - b) + b, e * (1 - b), 0, 0, c * (1 - b), d * (1 - b), e * (1 - b) + b, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this }, b.adjustHue = function (a) { if (0 == a || isNaN(a)) return this; a = this._cleanValue(a, 180) / 180 * Math.PI; var b = Math.cos(a), c = Math.sin(a), d = .213, e = .715, f = .072; return this._multiplyMatrix([d + b * (1 - d) + c * -d, e + b * -e + c * -e, f + b * -f + c * (1 - f), 0, 0, d + b * -d + .143 * c, e + b * (1 - e) + .14 * c, f + b * -f + c * -.283, 0, 0, d + b * -d + c * -(1 - d), e + b * -e + c * e, f + b * (1 - f) + c * f, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this }, b.concat = function (b) { return b = this._fixMatrix(b), b.length != a.LENGTH ? this : (this._multiplyMatrix(b), this) }, b.clone = function () { return (new a).copy(this) }, b.toArray = function () { for (var b = [], c = 0, d = a.LENGTH; d > c; c++)b[c] = this[c]; return b }, b.copy = function (b) { for (var c = a.LENGTH, d = 0; c > d; d++)this[d] = b[d]; return this }, b.toString = function () { return "[ColorMatrix]" }, b._multiplyMatrix = function (a) { var b, c, d, e = []; for (b = 0; 5 > b; b++) { for (c = 0; 5 > c; c++)e[c] = this[c + 5 * b]; for (c = 0; 5 > c; c++) { var f = 0; for (d = 0; 5 > d; d++)f += a[c + 5 * d] * e[d]; this[c + 5 * b] = f } } }, b._cleanValue = function (a, b) { return Math.min(b, Math.max(-b, a)) }, b._fixMatrix = function (b) { return b instanceof a && (b = b.toArray()), b.length < a.LENGTH ? b = b.slice(0, b.length).concat(a.IDENTITY_MATRIX.slice(b.length, a.LENGTH)) : b.length > a.LENGTH && (b = b.slice(0, a.LENGTH)), b }, createjs.ColorMatrix = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.Filter_constructor(), this.matrix = a, this.FRAG_SHADER_BODY = "uniform mat4 uColorMatrix;uniform vec4 uColorMatrixOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);mat4 m = uColorMatrix;vec4 newColor = vec4(0,0,0,0);newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];gl_FragColor = newColor + uColorMatrixOffset;}" } var b = createjs.extend(a, createjs.Filter); b.shaderParamSetup = function (a, b, c) { var d = this.matrix, e = new Float32Array([d[0], d[1], d[2], d[3], d[5], d[6], d[7], d[8], d[10], d[11], d[12], d[13], d[15], d[16], d[17], d[18]]); a.uniformMatrix4fv(a.getUniformLocation(c, "uColorMatrix"), !1, e), a.uniform4f(a.getUniformLocation(c, "uColorMatrixOffset"), d[4] / 255, d[9] / 255, d[14] / 255, d[19] / 255) }, b.toString = function () { return "[ColorMatrixFilter]" }, b.clone = function () { return new a(this.matrix) }, b._applyFilter = function (a) { for (var b, c, d, e, f = a.data, g = f.length, h = this.matrix, i = h[0], j = h[1], k = h[2], l = h[3], m = h[4], n = h[5], o = h[6], p = h[7], q = h[8], r = h[9], s = h[10], t = h[11], u = h[12], v = h[13], w = h[14], x = h[15], y = h[16], z = h[17], A = h[18], B = h[19], C = 0; g > C; C += 4)b = f[C], c = f[C + 1], d = f[C + 2], e = f[C + 3], f[C] = b * i + c * j + d * k + e * l + m, f[C + 1] = b * n + c * o + d * p + e * q + r, f[C + 2] = b * s + c * t + d * u + e * v + w, f[C + 3] = b * x + c * y + d * z + e * A + B; return !0 }, createjs.ColorMatrixFilter = createjs.promote(a, "Filter") }(), window.createjs = window.createjs || {}, function () { "use strict"; function a() { throw "Touch cannot be instantiated" } a.isSupported = function () { return !!("ontouchstart" in window || window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 0 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 0) }, a.enable = function (b, c, d) { return b && b.canvas && a.isSupported() ? b.__touch ? !0 : (b.__touch = { pointers: {}, multitouch: !c, preventDefault: !d, count: 0 }, "ontouchstart" in window ? a._IOS_enable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_enable(b), !0) : !1 }, a.disable = function (b) { b && ("ontouchstart" in window ? a._IOS_disable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_disable(b), delete b.__touch) }, a._IOS_enable = function (b) { var c = b.canvas, d = b.__touch.f = function (c) { a._IOS_handleEvent(b, c) }; c.addEventListener("touchstart", d, !1), c.addEventListener("touchmove", d, !1), c.addEventListener("touchend", d, !1), c.addEventListener("touchcancel", d, !1) }, a._IOS_disable = function (a) { var b = a.canvas; if (b) { var c = a.__touch.f; b.removeEventListener("touchstart", c, !1), b.removeEventListener("touchmove", c, !1), b.removeEventListener("touchend", c, !1), b.removeEventListener("touchcancel", c, !1) } }, a._IOS_handleEvent = function (a, b) { if (a) { a.__touch.preventDefault && b.preventDefault && b.preventDefault(); for (var c = b.changedTouches, d = b.type, e = 0, f = c.length; f > e; e++) { var g = c[e], h = g.identifier; g.target == a.canvas && ("touchstart" == d ? this._handleStart(a, h, b, g.pageX, g.pageY) : "touchmove" == d ? this._handleMove(a, h, b, g.pageX, g.pageY) : ("touchend" == d || "touchcancel" == d) && this._handleEnd(a, h, b)) } } }, a._IE_enable = function (b) { var c = b.canvas, d = b.__touch.f = function (c) { a._IE_handleEvent(b, c) }; void 0 === window.navigator.pointerEnabled ? (c.addEventListener("MSPointerDown", d, !1), window.addEventListener("MSPointerMove", d, !1), window.addEventListener("MSPointerUp", d, !1), window.addEventListener("MSPointerCancel", d, !1), b.__touch.preventDefault && (c.style.msTouchAction = "none")) : (c.addEventListener("pointerdown", d, !1), window.addEventListener("pointermove", d, !1), window.addEventListener("pointerup", d, !1), window.addEventListener("pointercancel", d, !1), b.__touch.preventDefault && (c.style.touchAction = "none")), b.__touch.activeIDs = {} }, a._IE_disable = function (a) { var b = a.__touch.f; void 0 === window.navigator.pointerEnabled ? (window.removeEventListener("MSPointerMove", b, !1), window.removeEventListener("MSPointerUp", b, !1), window.removeEventListener("MSPointerCancel", b, !1), a.canvas && a.canvas.removeEventListener("MSPointerDown", b, !1)) : (window.removeEventListener("pointermove", b, !1), window.removeEventListener("pointerup", b, !1), window.removeEventListener("pointercancel", b, !1), a.canvas && a.canvas.removeEventListener("pointerdown", b, !1)) }, a._IE_handleEvent = function (a, b) { if (a) { a.__touch.preventDefault && b.preventDefault && b.preventDefault(); var c = b.type, d = b.pointerId, e = a.__touch.activeIDs; if ("MSPointerDown" == c || "pointerdown" == c) { if (b.srcElement != a.canvas) return; e[d] = !0, this._handleStart(a, d, b, b.pageX, b.pageY) } else e[d] && ("MSPointerMove" == c || "pointermove" == c ? this._handleMove(a, d, b, b.pageX, b.pageY) : ("MSPointerUp" == c || "MSPointerCancel" == c || "pointerup" == c || "pointercancel" == c) && (delete e[d], this._handleEnd(a, d, b))) } }, a._handleStart = function (a, b, c, d, e) { var f = a.__touch; if (f.multitouch || !f.count) { var g = f.pointers; g[b] || (g[b] = !0, f.count++, a._handlePointerDown(b, c, d, e)) } }, a._handleMove = function (a, b, c, d, e) { a.__touch.pointers[b] && a._handlePointerMove(b, c, d, e) }, a._handleEnd = function (a, b, c) { var d = a.__touch, e = d.pointers; e[b] && (d.count--, a._handlePointerUp(b, c, !0), delete e[b]) }, createjs.Touch = a }(), window.createjs = window.createjs || {}, function () { "use strict"; var a = createjs.EaselJS = createjs.EaselJS || {}; a.version = "1.0.0", a.buildDate = "Thu, 14 Sep 2017 19:47:53 GMT" }(); module.exports = window.createjs; \ No newline at end of file diff --git a/src/utils/plugins/preloadjs-1.0.0.min.js b/src/utils/plugins/preloadjs-1.0.0.min.js new file mode 100644 index 0000000..2f45433 --- /dev/null +++ b/src/utils/plugins/preloadjs-1.0.0.min.js @@ -0,0 +1,23 @@ +/*! +* @license PreloadJS +* Visit http://createjs.com/ for documentation, updates and examples. +* +* Copyright (c) 2011-2015 gskinner.com, inc. +* +* Distributed under the terms of the MIT license. +* http://www.opensource.org/licenses/mit-license.html +* +* This notice shall be included in all copies or substantial portions of the Software. +*/ +window.createjs = window.createjs || {}, function () { "use strict"; var a = createjs.PreloadJS = createjs.PreloadJS || {}; a.version = "1.0.0", a.buildDate = "Thu, 14 Sep 2017 19:47:47 GMT" }(), window.createjs = window.createjs || {}, createjs.extend = function (a, b) { "use strict"; function c() { this.constructor = a } return c.prototype = b.prototype, a.prototype = new c }, window.createjs = window.createjs || {}, createjs.promote = function (a, b) { "use strict"; var c = a.prototype, d = Object.getPrototypeOf && Object.getPrototypeOf(c) || c.__proto__; if (d) { c[(b += "_") + "constructor"] = d.constructor; for (var e in d) c.hasOwnProperty(e) && "function" == typeof d[e] && (c[b + e] = d[e]) } return a }, window.createjs = window.createjs || {}, createjs.deprecate = function (a, b) { "use strict"; return function () { var c = "Deprecated property or method '" + b + "'. See docs for info."; return console && (console.warn ? console.warn(c) : console.log(c)), a && a.apply(this, arguments) } }, window.createjs = window.createjs || {}, function () { "use strict"; createjs.proxy = function (a, b) { var c = Array.prototype.slice.call(arguments, 2); return function () { return a.apply(b, Array.prototype.slice.call(arguments, 0).concat(c)) } } }(), window.createjs = window.createjs || {}, createjs.indexOf = function (a, b) { "use strict"; for (var c = 0, d = a.length; d > c; c++)if (b === a[c]) return c; return -1 }, window.createjs = window.createjs || {}, function () { "use strict"; function Event(a, b, c) { this.type = a, this.target = null, this.currentTarget = null, this.eventPhase = 0, this.bubbles = !!b, this.cancelable = !!c, this.timeStamp = (new Date).getTime(), this.defaultPrevented = !1, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.removed = !1 } var a = Event.prototype; a.preventDefault = function () { this.defaultPrevented = this.cancelable && !0 }, a.stopPropagation = function () { this.propagationStopped = !0 }, a.stopImmediatePropagation = function () { this.immediatePropagationStopped = this.propagationStopped = !0 }, a.remove = function () { this.removed = !0 }, a.clone = function () { return new Event(this.type, this.bubbles, this.cancelable) }, a.set = function (a) { for (var b in a) this[b] = a[b]; return this }, a.toString = function () { return "[Event (type=" + this.type + ")]" }, createjs.Event = Event }(), window.createjs = window.createjs || {}, function () { "use strict"; function ErrorEvent(a, b, c) { this.Event_constructor("error"), this.title = a, this.message = b, this.data = c } var a = createjs.extend(ErrorEvent, createjs.Event); a.clone = function () { return new createjs.ErrorEvent(this.title, this.message, this.data) }, createjs.ErrorEvent = createjs.promote(ErrorEvent, "Event") }(), window.createjs = window.createjs || {}, function () { "use strict"; function EventDispatcher() { this._listeners = null, this._captureListeners = null } var a = EventDispatcher.prototype; EventDispatcher.initialize = function (b) { b.addEventListener = a.addEventListener, b.on = a.on, b.removeEventListener = b.off = a.removeEventListener, b.removeAllEventListeners = a.removeAllEventListeners, b.hasEventListener = a.hasEventListener, b.dispatchEvent = a.dispatchEvent, b._dispatchEvent = a._dispatchEvent, b.willTrigger = a.willTrigger }, a.addEventListener = function (a, b, c) { var d; d = c ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var e = d[a]; return e && this.removeEventListener(a, b, c), e = d[a], e ? e.push(b) : d[a] = [b], b }, a.on = function (a, b, c, d, e, f) { return b.handleEvent && (c = c || b, b = b.handleEvent), c = c || this, this.addEventListener(a, function (a) { b.call(c, a, e), d && a.remove() }, f) }, a.removeEventListener = function (a, b, c) { var d = c ? this._captureListeners : this._listeners; if (d) { var e = d[a]; if (e) for (var f = 0, g = e.length; g > f; f++)if (e[f] == b) { 1 == g ? delete d[a] : e.splice(f, 1); break } } }, a.off = a.removeEventListener, a.removeAllEventListeners = function (a) { a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null }, a.dispatchEvent = function (a, b, c) { if ("string" == typeof a) { var d = this._listeners; if (!(b || d && d[a])) return !0; a = new createjs.Event(a, b, c) } else a.target && a.clone && (a = a.clone()); try { a.target = this } catch (e) { } if (a.bubbles && this.parent) { for (var f = this, g = [f]; f.parent;)g.push(f = f.parent); var h, i = g.length; for (h = i - 1; h >= 0 && !a.propagationStopped; h--)g[h]._dispatchEvent(a, 1 + (0 == h)); for (h = 1; i > h && !a.propagationStopped; h++)g[h]._dispatchEvent(a, 3) } else this._dispatchEvent(a, 2); return !a.defaultPrevented }, a.hasEventListener = function (a) { var b = this._listeners, c = this._captureListeners; return !!(b && b[a] || c && c[a]) }, a.willTrigger = function (a) { for (var b = this; b;) { if (b.hasEventListener(a)) return !0; b = b.parent } return !1 }, a.toString = function () { return "[EventDispatcher]" }, a._dispatchEvent = function (a, b) { var c, d, e = 2 >= b ? this._captureListeners : this._listeners; if (a && e && (d = e[a.type]) && (c = d.length)) { try { a.currentTarget = this } catch (f) { } try { a.eventPhase = 0 | b } catch (f) { } a.removed = !1, d = d.slice(); for (var g = 0; c > g && !a.immediatePropagationStopped; g++) { var h = d[g]; h.handleEvent ? h.handleEvent(a) : h(a), a.removed && (this.off(a.type, h, 1 == b), a.removed = !1) } } 2 === b && this._dispatchEvent(a, 2.1) }, createjs.EventDispatcher = EventDispatcher }(), window.createjs = window.createjs || {}, function () { "use strict"; function ProgressEvent(a, b) { this.Event_constructor("progress"), this.loaded = a, this.total = null == b ? 1 : b, this.progress = 0 == b ? 0 : this.loaded / this.total } var a = createjs.extend(ProgressEvent, createjs.Event); a.clone = function () { return new createjs.ProgressEvent(this.loaded, this.total) }, createjs.ProgressEvent = createjs.promote(ProgressEvent, "Event") }(window), function () { function a(b, d) { function f(a) { if (f[a] !== q) return f[a]; var b; if ("bug-string-char-index" == a) b = "a" != "a"[0]; else if ("json" == a) b = f("json-stringify") && f("json-parse"); else { var c, e = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'; if ("json-stringify" == a) { var i = d.stringify, k = "function" == typeof i && t; if (k) { (c = function () { return 1 }).toJSON = c; try { k = "0" === i(0) && "0" === i(new g) && '""' == i(new h) && i(s) === q && i(q) === q && i() === q && "1" === i(c) && "[1]" == i([c]) && "[null]" == i([q]) && "null" == i(null) && "[null,null,null]" == i([q, s, null]) && i({ a: [c, !0, !1, null, "\x00\b\n\f\r "] }) == e && "1" === i(null, c) && "[\n 1,\n 2\n]" == i([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == i(new j(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == i(new j(864e13)) && '"-000001-01-01T00:00:00.000Z"' == i(new j(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == i(new j(-1)) } catch (l) { k = !1 } } b = k } if ("json-parse" == a) { var m = d.parse; if ("function" == typeof m) try { if (0 === m("0") && !m(!1)) { c = m(e); var n = 5 == c.a.length && 1 === c.a[0]; if (n) { try { n = !m('" "') } catch (l) { } if (n) try { n = 1 !== m("01") } catch (l) { } if (n) try { n = 1 !== m("1.") } catch (l) { } } } } catch (l) { n = !1 } b = n } } return f[a] = !!b } b || (b = e.Object()), d || (d = e.Object()); var g = b.Number || e.Number, h = b.String || e.String, i = b.Object || e.Object, j = b.Date || e.Date, k = b.SyntaxError || e.SyntaxError, l = b.TypeError || e.TypeError, m = b.Math || e.Math, n = b.JSON || e.JSON; "object" == typeof n && n && (d.stringify = n.stringify, d.parse = n.parse); var o, p, q, r = i.prototype, s = r.toString, t = new j(-0xc782b5b800cec); try { t = -109252 == t.getUTCFullYear() && 0 === t.getUTCMonth() && 1 === t.getUTCDate() && 10 == t.getUTCHours() && 37 == t.getUTCMinutes() && 6 == t.getUTCSeconds() && 708 == t.getUTCMilliseconds() } catch (u) { } if (!f("json")) { var v = "[object Function]", w = "[object Date]", x = "[object Number]", y = "[object String]", z = "[object Array]", A = "[object Boolean]", B = f("bug-string-char-index"); if (!t) var C = m.floor, D = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], E = function (a, b) { return D[b] + 365 * (a - 1970) + C((a - 1969 + (b = +(b > 1))) / 4) - C((a - 1901 + b) / 100) + C((a - 1601 + b) / 400) }; if ((o = r.hasOwnProperty) || (o = function (a) { var b, c = {}; return (c.__proto__ = null, c.__proto__ = { toString: 1 }, c).toString != s ? o = function (a) { var b = this.__proto__, c = a in (this.__proto__ = null, this); return this.__proto__ = b, c } : (b = c.constructor, o = function (a) { var c = (this.constructor || b).prototype; return a in this && !(a in c && this[a] === c[a]) }), c = null, o.call(this, a) }), p = function (a, b) { var d, e, f, g = 0; (d = function () { this.valueOf = 0 }).prototype.valueOf = 0, e = new d; for (f in e) o.call(e, f) && g++; return d = e = null, g ? p = 2 == g ? function (a, b) { var c, d = {}, e = s.call(a) == v; for (c in a) e && "prototype" == c || o.call(d, c) || !(d[c] = 1) || !o.call(a, c) || b(c) } : function (a, b) { var c, d, e = s.call(a) == v; for (c in a) e && "prototype" == c || !o.call(a, c) || (d = "constructor" === c) || b(c); (d || o.call(a, c = "constructor")) && b(c) } : (e = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], p = function (a, b) { var d, f, g = s.call(a) == v, h = !g && "function" != typeof a.constructor && c[typeof a.hasOwnProperty] && a.hasOwnProperty || o; for (d in a) g && "prototype" == d || !h.call(a, d) || b(d); for (f = e.length; d = e[--f]; h.call(a, d) && b(d)); }), p(a, b) }, !f("json-stringify")) { var F = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, G = "000000", H = function (a, b) { return (G + (b || 0)).slice(-a) }, I = "\\u00", J = function (a) { for (var b = '"', c = 0, d = a.length, e = !B || d > 10, f = e && (B ? a.split("") : a); d > c; c++) { var g = a.charCodeAt(c); switch (g) { case 8: case 9: case 10: case 12: case 13: case 34: case 92: b += F[g]; break; default: if (32 > g) { b += I + H(2, g.toString(16)); break } b += e ? f[c] : a.charAt(c) } } return b + '"' }, K = function (a, b, c, d, e, f, g) { var h, i, j, k, m, n, r, t, u, v, B, D, F, G, I, L; try { h = b[a] } catch (M) { } if ("object" == typeof h && h) if (i = s.call(h), i != w || o.call(h, "toJSON")) "function" == typeof h.toJSON && (i != x && i != y && i != z || o.call(h, "toJSON")) && (h = h.toJSON(a)); else if (h > -1 / 0 && 1 / 0 > h) { if (E) { for (m = C(h / 864e5), j = C(m / 365.2425) + 1970 - 1; E(j + 1, 0) <= m; j++); for (k = C((m - E(j, 0)) / 30.42); E(j, k + 1) <= m; k++); m = 1 + m - E(j, k), n = (h % 864e5 + 864e5) % 864e5, r = C(n / 36e5) % 24, t = C(n / 6e4) % 60, u = C(n / 1e3) % 60, v = n % 1e3 } else j = h.getUTCFullYear(), k = h.getUTCMonth(), m = h.getUTCDate(), r = h.getUTCHours(), t = h.getUTCMinutes(), u = h.getUTCSeconds(), v = h.getUTCMilliseconds(); h = (0 >= j || j >= 1e4 ? (0 > j ? "-" : "+") + H(6, 0 > j ? -j : j) : H(4, j)) + "-" + H(2, k + 1) + "-" + H(2, m) + "T" + H(2, r) + ":" + H(2, t) + ":" + H(2, u) + "." + H(3, v) + "Z" } else h = null; if (c && (h = c.call(b, a, h)), null === h) return "null"; if (i = s.call(h), i == A) return "" + h; if (i == x) return h > -1 / 0 && 1 / 0 > h ? "" + h : "null"; if (i == y) return J("" + h); if ("object" == typeof h) { for (G = g.length; G--;)if (g[G] === h) throw l(); if (g.push(h), B = [], I = f, f += e, i == z) { for (F = 0, G = h.length; G > F; F++)D = K(F, h, c, d, e, f, g), B.push(D === q ? "null" : D); L = B.length ? e ? "[\n" + f + B.join(",\n" + f) + "\n" + I + "]" : "[" + B.join(",") + "]" : "[]" } else p(d || h, function (a) { var b = K(a, h, c, d, e, f, g); b !== q && B.push(J(a) + ":" + (e ? " " : "") + b) }), L = B.length ? e ? "{\n" + f + B.join(",\n" + f) + "\n" + I + "}" : "{" + B.join(",") + "}" : "{}"; return g.pop(), L } }; d.stringify = function (a, b, d) { var e, f, g, h; if (c[typeof b] && b) if ((h = s.call(b)) == v) f = b; else if (h == z) { g = {}; for (var i, j = 0, k = b.length; k > j; i = b[j++], h = s.call(i), (h == y || h == x) && (g[i] = 1)); } if (d) if ((h = s.call(d)) == x) { if ((d -= d % 1) > 0) for (e = "", d > 10 && (d = 10); e.length < d; e += " "); } else h == y && (e = d.length <= 10 ? d : d.slice(0, 10)); return K("", (i = {}, i[""] = a, i), f, g, e, "", []) } } if (!f("json-parse")) { var L, M, N = h.fromCharCode, O = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: " ", 110: "\n", 102: "\f", 114: "\r" }, P = function () { throw L = M = null, k() }, Q = function () { for (var a, b, c, d, e, f = M, g = f.length; g > L;)switch (e = f.charCodeAt(L)) { case 9: case 10: case 13: case 32: L++; break; case 123: case 125: case 91: case 93: case 58: case 44: return a = B ? f.charAt(L) : f[L], L++, a; case 34: for (a = "@", L++; g > L;)if (e = f.charCodeAt(L), 32 > e) P(); else if (92 == e) switch (e = f.charCodeAt(++L)) { case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114: a += O[e], L++; break; case 117: for (b = ++L, c = L + 4; c > L; L++)e = f.charCodeAt(L), e >= 48 && 57 >= e || e >= 97 && 102 >= e || e >= 65 && 70 >= e || P(); a += N("0x" + f.slice(b, L)); break; default: P() } else { if (34 == e) break; for (e = f.charCodeAt(L), b = L; e >= 32 && 92 != e && 34 != e;)e = f.charCodeAt(++L); a += f.slice(b, L) } if (34 == f.charCodeAt(L)) return L++, a; P(); default: if (b = L, 45 == e && (d = !0, e = f.charCodeAt(++L)), e >= 48 && 57 >= e) { for (48 == e && (e = f.charCodeAt(L + 1), e >= 48 && 57 >= e) && P(), d = !1; g > L && (e = f.charCodeAt(L), e >= 48 && 57 >= e); L++); if (46 == f.charCodeAt(L)) { for (c = ++L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++); c == L && P(), L = c } if (e = f.charCodeAt(L), 101 == e || 69 == e) { for (e = f.charCodeAt(++L), (43 == e || 45 == e) && L++, c = L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++); c == L && P(), L = c } return +f.slice(b, L) } if (d && P(), "true" == f.slice(L, L + 4)) return L += 4, !0; if ("false" == f.slice(L, L + 5)) return L += 5, !1; if ("null" == f.slice(L, L + 4)) return L += 4, null; P() }return "$" }, R = function (a) { var b, c; if ("$" == a && P(), "string" == typeof a) { if ("@" == (B ? a.charAt(0) : a[0])) return a.slice(1); if ("[" == a) { for (b = []; a = Q(), "]" != a; c || (c = !0))c && ("," == a ? (a = Q(), "]" == a && P()) : P()), "," == a && P(), b.push(R(a)); return b } if ("{" == a) { for (b = {}; a = Q(), "}" != a; c || (c = !0))c && ("," == a ? (a = Q(), "}" == a && P()) : P()), ("," == a || "string" != typeof a || "@" != (B ? a.charAt(0) : a[0]) || ":" != Q()) && P(), b[a.slice(1)] = R(Q()); return b } P() } return a }, S = function (a, b, c) { var d = T(a, b, c); d === q ? delete a[b] : a[b] = d }, T = function (a, b, c) { var d, e = a[b]; if ("object" == typeof e && e) if (s.call(e) == z) for (d = e.length; d--;)S(e, d, c); else p(e, function (a) { S(e, a, c) }); return c.call(a, b, e) }; d.parse = function (a, b) { var c, d; return L = 0, M = "" + a, c = R(Q()), "$" != Q() && P(), L = M = null, b && s.call(b) == v ? T((d = {}, d[""] = c, d), "", b) : c } } } return d.runInContext = a, d } var b = "function" == typeof define && define.amd, c = { "function": !0, object: !0 }, d = c[typeof exports] && exports && !exports.nodeType && exports, e = c[typeof window] && window || this, f = d && c[typeof module] && module && !module.nodeType && "object" == typeof global && global; if (!f || f.global !== f && f.window !== f && f.self !== f || (e = f), d && !b) a(e, d); else { var g = e.JSON, h = e.JSON3, i = !1, j = a(e, e.JSON3 = { noConflict: function () { return i || (i = !0, e.JSON = g, e.JSON3 = h, g = h = null), j } }); e.JSON = { parse: j.parse, stringify: j.stringify } } b && define(function () { return j }) }.call(this), function () { var a = {}; a.a = function () { return a.el("a") }, a.svg = function () { return a.el("svg") }, a.object = function () { return a.el("object") }, a.image = function () { return a.el("image") }, a.img = function () { return a.el("img") }, a.style = function () { return a.el("style") }, a.link = function () { return a.el("link") }, a.script = function () { return a.el("script") }, a.audio = function () { return a.el("audio") }, a.video = function () { return a.el("video") }, a.text = function (a) { return document.createTextNode(a) }, a.el = function (a) { return document.createElement(a) }, createjs.Elements = a }(), function () { var a = {}; a.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i, a.RELATIVE_PATT = /^[.\/]*?\//i, a.EXTENSION_PATT = /\/?[^\/]+\.(\w{1,5})$/i, a.parseURI = function (b) { var c = { absolute: !1, relative: !1, protocol: null, hostname: null, port: null, pathname: null, search: null, hash: null, host: null }; if (null == b) return c; var d = createjs.Elements.a(); d.href = b; for (var e in c) e in d && (c[e] = d[e]); var f = b.indexOf("?"); f > -1 && (b = b.substr(0, f)); var g; return a.ABSOLUTE_PATT.test(b) ? c.absolute = !0 : a.RELATIVE_PATT.test(b) && (c.relative = !0), (g = b.match(a.EXTENSION_PATT)) && (c.extension = g[1].toLowerCase()), c }, a.formatQueryString = function (a, b) { if (null == a) throw new Error("You must specify data."); var c = []; for (var d in a) c.push(d + "=" + escape(a[d])); return b && (c = c.concat(b)), c.join("&") }, a.buildURI = function (a, b) { if (null == b) return a; var c = [], d = a.indexOf("?"); if (-1 != d) { var e = a.slice(d + 1); c = c.concat(e.split("&")) } return -1 != d ? a.slice(0, d) + "?" + this.formatQueryString(b, c) : a + "?" + this.formatQueryString(b, c) }, a.isCrossDomain = function (a) { var b = createjs.Elements.a(); b.href = a.src; var c = createjs.Elements.a(); c.href = location.href; var d = "" != b.hostname && (b.port != c.port || b.protocol != c.protocol || b.hostname != c.hostname); return d }, a.isLocal = function (a) { var b = createjs.Elements.a(); return b.href = a.src, "" == b.hostname && "file:" == b.protocol }, createjs.URLUtils = a }(), function () { var a = { container: null }; a.appendToHead = function (b) { a.getHead().appendChild(b) }, a.appendToBody = function (b) { if (null == a.container) { a.container = document.createElement("div"), a.container.id = "preloadjs-container"; var c = a.container.style; c.visibility = "hidden", c.position = "absolute", c.width = a.container.style.height = "10px", c.overflow = "hidden", c.transform = c.msTransform = c.webkitTransform = c.oTransform = "translate(-10px, -10px)", a.getBody().appendChild(a.container) } a.container.appendChild(b) }, a.getHead = function () { return document.head || document.getElementsByTagName("head")[0] }, a.getBody = function () { return document.body || document.getElementsByTagName("body")[0] }, a.removeChild = function (a) { a.parent && a.parent.removeChild(a) }, a.isImageTag = function (a) { return a instanceof HTMLImageElement }, a.isAudioTag = function (a) { return window.HTMLAudioElement ? a instanceof HTMLAudioElement : !1 }, a.isVideoTag = function (a) { return window.HTMLVideoElement ? a instanceof HTMLVideoElement : !1 }, createjs.DomUtils = a }(), function () { var a = {}; a.parseXML = function (a) { var b = null; try { if (window.DOMParser) { var c = new DOMParser; b = c.parseFromString(a, "text/xml") } } catch (d) { } if (!b) try { b = new ActiveXObject("Microsoft.XMLDOM"), b.async = !1, b.loadXML(a) } catch (d) { b = null } return b }, a.parseJSON = function (a) { if (null == a) return null; try { return JSON.parse(a) } catch (b) { throw b } }, createjs.DataUtils = a }(), window.createjs = window.createjs || {}, function () { var a = {}; a.BINARY = "binary", a.CSS = "css", a.FONT = "font", a.FONTCSS = "fontcss", a.IMAGE = "image", a.JAVASCRIPT = "javascript", a.JSON = "json", a.JSONP = "jsonp", a.MANIFEST = "manifest", a.SOUND = "sound", a.VIDEO = "video", a.SPRITESHEET = "spritesheet", a.SVG = "svg", a.TEXT = "text", a.XML = "xml", createjs.Types = a }(), window.createjs = window.createjs || {}, function () { var a = {}; a.POST = "POST", a.GET = "GET", createjs.Methods = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function LoadItem() { this.src = null, this.type = null, this.id = null, this.maintainOrder = !1, this.callback = null, this.data = null, this.method = createjs.Methods.GET, this.values = null, this.headers = null, this.withCredentials = !1, this.mimeType = null, this.crossOrigin = null, this.loadTimeout = b.LOAD_TIMEOUT_DEFAULT } var a = LoadItem.prototype = {}, b = LoadItem; b.LOAD_TIMEOUT_DEFAULT = 8e3, b.create = function (a) { if ("string" == typeof a) { var c = new LoadItem; return c.src = a, c } if (a instanceof b) return a; if (a instanceof Object && a.src) return null == a.loadTimeout && (a.loadTimeout = b.LOAD_TIMEOUT_DEFAULT), a; throw new Error("Type not recognized.") }, a.set = function (a) { for (var b in a) this[b] = a[b]; return this }, createjs.LoadItem = b }(), function () { var a = {}; a.isBinary = function (a) { switch (a) { case createjs.Types.IMAGE: case createjs.Types.BINARY: return !0; default: return !1 } }, a.isText = function (a) { switch (a) { case createjs.Types.TEXT: case createjs.Types.JSON: case createjs.Types.MANIFEST: case createjs.Types.XML: case createjs.Types.CSS: case createjs.Types.SVG: case createjs.Types.JAVASCRIPT: case createjs.Types.SPRITESHEET: return !0; default: return !1 } }, a.getTypeByExtension = function (a) { if (null == a) return createjs.Types.TEXT; switch (a.toLowerCase()) { case "jpeg": case "jpg": case "gif": case "png": case "webp": case "bmp": return createjs.Types.IMAGE; case "ogg": case "mp3": case "webm": return createjs.Types.SOUND; case "mp4": case "webm": case "ts": return createjs.Types.VIDEO; case "json": return createjs.Types.JSON; case "xml": return createjs.Types.XML; case "css": return createjs.Types.CSS; case "js": return createjs.Types.JAVASCRIPT; case "svg": return createjs.Types.SVG; default: return createjs.Types.TEXT } }, createjs.RequestUtils = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function AbstractLoader(a, b, c) { this.EventDispatcher_constructor(), this.loaded = !1, this.canceled = !1, this.progress = 0, this.type = c, this.resultFormatter = null, this._item = a ? createjs.LoadItem.create(a) : null, this._preferXHR = b, this._result = null, this._rawResult = null, this._loadedItems = null, this._tagSrcAttribute = null, this._tag = null } var a = createjs.extend(AbstractLoader, createjs.EventDispatcher), b = AbstractLoader; try { Object.defineProperties(b, { POST: { get: createjs.deprecate(function () { return createjs.Methods.POST }, "AbstractLoader.POST") }, GET: { get: createjs.deprecate(function () { return createjs.Methods.GET }, "AbstractLoader.GET") }, BINARY: { get: createjs.deprecate(function () { return createjs.Types.BINARY }, "AbstractLoader.BINARY") }, CSS: { get: createjs.deprecate(function () { return createjs.Types.CSS }, "AbstractLoader.CSS") }, FONT: { get: createjs.deprecate(function () { return createjs.Types.FONT }, "AbstractLoader.FONT") }, FONTCSS: { get: createjs.deprecate(function () { return createjs.Types.FONTCSS }, "AbstractLoader.FONTCSS") }, IMAGE: { get: createjs.deprecate(function () { return createjs.Types.IMAGE }, "AbstractLoader.IMAGE") }, JAVASCRIPT: { get: createjs.deprecate(function () { return createjs.Types.JAVASCRIPT }, "AbstractLoader.JAVASCRIPT") }, JSON: { get: createjs.deprecate(function () { return createjs.Types.JSON }, "AbstractLoader.JSON") }, JSONP: { get: createjs.deprecate(function () { return createjs.Types.JSONP }, "AbstractLoader.JSONP") }, MANIFEST: { get: createjs.deprecate(function () { return createjs.Types.MANIFEST }, "AbstractLoader.MANIFEST") }, SOUND: { get: createjs.deprecate(function () { return createjs.Types.SOUND }, "AbstractLoader.SOUND") }, VIDEO: { get: createjs.deprecate(function () { return createjs.Types.VIDEO }, "AbstractLoader.VIDEO") }, SPRITESHEET: { get: createjs.deprecate(function () { return createjs.Types.SPRITESHEET }, "AbstractLoader.SPRITESHEET") }, SVG: { get: createjs.deprecate(function () { return createjs.Types.SVG }, "AbstractLoader.SVG") }, TEXT: { get: createjs.deprecate(function () { return createjs.Types.TEXT }, "AbstractLoader.TEXT") }, XML: { get: createjs.deprecate(function () { return createjs.Types.XML }, "AbstractLoader.XML") } }) } catch (c) { } a.getItem = function () { return this._item }, a.getResult = function (a) { return a ? this._rawResult : this._result }, a.getTag = function () { return this._tag }, a.setTag = function (a) { this._tag = a }, a.load = function () { this._createRequest(), this._request.on("complete", this, this), this._request.on("progress", this, this), this._request.on("loadStart", this, this), this._request.on("abort", this, this), this._request.on("timeout", this, this), this._request.on("error", this, this); var a = new createjs.Event("initialize"); a.loader = this._request, this.dispatchEvent(a), this._request.load() }, a.cancel = function () { this.canceled = !0, this.destroy() }, a.destroy = function () { this._request && (this._request.removeAllEventListeners(), this._request.destroy()), this._request = null, this._item = null, this._rawResult = null, this._result = null, this._loadItems = null, this.removeAllEventListeners() }, a.getLoadedItems = function () { return this._loadedItems }, a._createRequest = function () { this._request = this._preferXHR ? new createjs.XHRRequest(this._item) : new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute) }, a._createTag = function () { return null }, a._sendLoadStart = function () { this._isCanceled() || this.dispatchEvent("loadstart") }, a._sendProgress = function (a) { if (!this._isCanceled()) { var b = null; "number" == typeof a ? (this.progress = a, b = new createjs.ProgressEvent(this.progress)) : (b = a, this.progress = a.loaded / a.total, b.progress = this.progress, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0)), this.hasEventListener("progress") && this.dispatchEvent(b) } }, a._sendComplete = function () { if (!this._isCanceled()) { this.loaded = !0; var a = new createjs.Event("complete"); a.rawResult = this._rawResult, null != this._result && (a.result = this._result), this.dispatchEvent(a) } }, a._sendError = function (a) { !this._isCanceled() && this.hasEventListener("error") && (null == a && (a = new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")), this.dispatchEvent(a)) }, a._isCanceled = function () { return null == window.createjs || this.canceled ? !0 : !1 }, a.resultFormatter = null, a.handleEvent = function (a) { switch (a.type) { case "complete": this._rawResult = a.target._response; var b = this.resultFormatter && this.resultFormatter(this); b instanceof Function ? b.call(this, createjs.proxy(this._resultFormatSuccess, this), createjs.proxy(this._resultFormatFailed, this)) : (this._result = b || this._rawResult, this._sendComplete()); break; case "progress": this._sendProgress(a); break; case "error": this._sendError(a); break; case "loadstart": this._sendLoadStart(); break; case "abort": case "timeout": this._isCanceled() || this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_" + a.type.toUpperCase() + "_ERROR")) } }, a._resultFormatSuccess = function (a) { this._result = a, this._sendComplete() }, a._resultFormatFailed = function (a) { this._sendError(a) }, a.toString = function () { return "[PreloadJS AbstractLoader]" }, createjs.AbstractLoader = createjs.promote(AbstractLoader, "EventDispatcher") }(), window.createjs = window.createjs || {}, function () { "use strict"; function AbstractMediaLoader(a, b, c) { this.AbstractLoader_constructor(a, b, c), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "src", this.on("initialize", this._updateXHR, this) } var a = createjs.extend(AbstractMediaLoader, createjs.AbstractLoader); a.load = function () { this._tag || (this._tag = this._createTag(this._item.src)), this._tag.preload = "auto", this._tag.load(), this.AbstractLoader_load() }, a._createTag = function () { }, a._createRequest = function () { this._request = this._preferXHR ? new createjs.XHRRequest(this._item) : new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute) }, a._updateXHR = function (a) { a.loader.setResponseType && a.loader.setResponseType("blob") }, a._formatResult = function (a) { if (this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler), this._tag.onstalled = null, this._preferXHR) { var b = window.URL || window.webkitURL, c = a.getResult(!0); a.getTag().src = b.createObjectURL(c) } return a.getTag() }, createjs.AbstractMediaLoader = createjs.promote(AbstractMediaLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; var AbstractRequest = function (a) { this._item = a }, a = createjs.extend(AbstractRequest, createjs.EventDispatcher); a.load = function () { }, a.destroy = function () { }, a.cancel = function () { }, createjs.AbstractRequest = createjs.promote(AbstractRequest, "EventDispatcher") }(), window.createjs = window.createjs || {}, function () { "use strict"; function TagRequest(a, b, c) { this.AbstractRequest_constructor(a), this._tag = b, this._tagSrcAttribute = c, this._loadedHandler = createjs.proxy(this._handleTagComplete, this), this._addedToDOM = !1 } var a = createjs.extend(TagRequest, createjs.AbstractRequest); a.load = function () { this._tag.onload = createjs.proxy(this._handleTagComplete, this), this._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this), this._tag.onerror = createjs.proxy(this._handleError, this); var a = new createjs.Event("initialize"); a.loader = this._tag, this.dispatchEvent(a), this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout), this._tag[this._tagSrcAttribute] = this._item.src, null == this._tag.parentNode && (createjs.DomUtils.appendToBody(this._tag), this._addedToDOM = !0) }, a.destroy = function () { this._clean(), this._tag = null, this.AbstractRequest_destroy() }, a._handleReadyStateChange = function () { clearTimeout(this._loadTimeout); var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete() }, a._handleError = function () { this._clean(), this.dispatchEvent("error") }, a._handleTagComplete = function () { this._rawResult = this._tag, this._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult, this._clean(), this.dispatchEvent("complete") }, a._handleTimeout = function () { this._clean(), this.dispatchEvent(new createjs.Event("timeout")) }, a._clean = function () { this._tag.onload = null, this._tag.onreadystatechange = null, this._tag.onerror = null, this._addedToDOM && null != this._tag.parentNode && this._tag.parentNode.removeChild(this._tag), clearTimeout(this._loadTimeout) }, a._handleStalled = function () { }, createjs.TagRequest = createjs.promote(TagRequest, "AbstractRequest") }(), window.createjs = window.createjs || {}, function () { "use strict"; function MediaTagRequest(a, b, c) { this.AbstractRequest_constructor(a), this._tag = b, this._tagSrcAttribute = c, this._loadedHandler = createjs.proxy(this._handleTagComplete, this) } var a = createjs.extend(MediaTagRequest, createjs.TagRequest); a.load = function () { var a = createjs.proxy(this._handleStalled, this); this._stalledCallback = a; var b = createjs.proxy(this._handleProgress, this); this._handleProgress = b, this._tag.addEventListener("stalled", a), this._tag.addEventListener("progress", b), this._tag.addEventListener && this._tag.addEventListener("canplaythrough", this._loadedHandler, !1), this.TagRequest_load() }, a._handleReadyStateChange = function () { clearTimeout(this._loadTimeout); var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete() }, a._handleStalled = function () { }, a._handleProgress = function (a) { if (a && !(a.loaded > 0 && 0 == a.total)) { var b = new createjs.ProgressEvent(a.loaded, a.total); this.dispatchEvent(b) } }, a._clean = function () { this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler), this._tag.removeEventListener("stalled", this._stalledCallback), this._tag.removeEventListener("progress", this._progressCallback), this.TagRequest__clean() }, createjs.MediaTagRequest = createjs.promote(MediaTagRequest, "TagRequest") }(), window.createjs = window.createjs || {}, function () { + "use strict"; function XHRRequest(a) { this.AbstractRequest_constructor(a), this._request = null, this._loadTimeout = null, this._xhrLevel = 1, this._response = null, this._rawResponse = null, this._canceled = !1, this._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this), this._handleProgressProxy = createjs.proxy(this._handleProgress, this), this._handleAbortProxy = createjs.proxy(this._handleAbort, this), this._handleErrorProxy = createjs.proxy(this._handleError, this), this._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this), this._handleLoadProxy = createjs.proxy(this._handleLoad, this), this._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this), !this._createXHR(a) } var a = createjs.extend(XHRRequest, createjs.AbstractRequest); XHRRequest.ACTIVEX_VERSIONS = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], a.getResult = function (a) { return a && this._rawResponse ? this._rawResponse : this._response }, a.cancel = function () { this.canceled = !0, this._clean(), this._request.abort() }, a.load = function () { if (null == this._request) return void this._handleError(); null != this._request.addEventListener ? (this._request.addEventListener("loadstart", this._handleLoadStartProxy, !1), this._request.addEventListener("progress", this._handleProgressProxy, !1), this._request.addEventListener("abort", this._handleAbortProxy, !1), this._request.addEventListener("error", this._handleErrorProxy, !1), this._request.addEventListener("timeout", this._handleTimeoutProxy, !1), this._request.addEventListener("load", this._handleLoadProxy, !1), this._request.addEventListener("readystatechange", this._handleReadyStateChangeProxy, !1)) : (this._request.onloadstart = this._handleLoadStartProxy, this._request.onprogress = this._handleProgressProxy, this._request.onabort = this._handleAbortProxy, this._request.onerror = this._handleErrorProxy, this._request.ontimeout = this._handleTimeoutProxy, this._request.onload = this._handleLoadProxy, this._request.onreadystatechange = this._handleReadyStateChangeProxy), 1 == this._xhrLevel && (this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout)); try { this._item.values ? this._request.send(createjs.URLUtils.formatQueryString(this._item.values)) : this._request.send() } catch (a) { this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND", null, a)) } }, a.setResponseType = function (a) { "blob" === a && (a = window.URL ? "blob" : "arraybuffer", this._responseType = a), this._request.responseType = a }, a.getAllResponseHeaders = function () { return this._request.getAllResponseHeaders instanceof Function ? this._request.getAllResponseHeaders() : null }, a.getResponseHeader = function (a) { return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(a) : null }, a._handleProgress = function (a) { if (a && !(a.loaded > 0 && 0 == a.total)) { var b = new createjs.ProgressEvent(a.loaded, a.total); this.dispatchEvent(b) } }, a._handleLoadStart = function () { clearTimeout(this._loadTimeout), this.dispatchEvent("loadstart") }, a._handleAbort = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED", null, a)) }, a._handleError = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent(a.message)) }, a._handleReadyStateChange = function () { 4 == this._request.readyState && this._handleLoad() }, a._handleLoad = function () { if (!this.loaded) { this.loaded = !0; var a = this._checkError(); if (a) return void this._handleError(a); if (this._response = this._getResponse(), "arraybuffer" === this._responseType) try { this._response = new Blob([this._response]) } catch (b) { if (window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, "TypeError" === b.name && window.BlobBuilder) { var c = new BlobBuilder; c.append(this._response), this._response = c.getBlob() } } this._clean(), this.dispatchEvent(new createjs.Event("complete")) } }, a._handleTimeout = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT", null, a)) }, a._checkError = function () { var a = parseInt(this._request.status); return a >= 400 && 599 >= a ? new Error(a) : 0 == a && /^https?:/.test(location.protocol) ? new Error(0) : null }, a._getResponse = function () { + if (null != this._response) return this._response; + if (null != this._request.response) return this._request.response; try { if (null != this._request.responseText) return this._request.responseText } catch (a) { } try { if (null != this._request.responseXML) return this._request.responseXML } catch (a) { } return null + }, a._createXHR = function (a) { var b = createjs.URLUtils.isCrossDomain(a), c = {}, d = null; if (window.XMLHttpRequest) d = new XMLHttpRequest, b && void 0 === d.withCredentials && window.XDomainRequest && (d = new XDomainRequest); else { for (var e = 0, f = s.ACTIVEX_VERSIONS.length; f > e; e++) { var g = s.ACTIVEX_VERSIONS[e]; try { d = new ActiveXObject(g); break } catch (h) { } } if (null == d) return !1 } null == a.mimeType && createjs.RequestUtils.isText(a.type) && (a.mimeType = "text/plain; charset=utf-8"), a.mimeType && d.overrideMimeType && d.overrideMimeType(a.mimeType), this._xhrLevel = "string" == typeof d.responseType ? 2 : 1; var i = null; if (i = a.method == createjs.Methods.GET ? createjs.URLUtils.buildURI(a.src, a.values) : a.src, d.open(a.method || createjs.Methods.GET, i, !0), b && d instanceof XMLHttpRequest && 1 == this._xhrLevel && (c.Origin = location.origin), a.values && a.method == createjs.Methods.POST && (c["Content-Type"] = "application/x-www-form-urlencoded"), b || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest"), a.headers) for (var j in a.headers) c[j] = a.headers[j]; for (j in c) d.setRequestHeader(j, c[j]); return d instanceof XMLHttpRequest && void 0 !== a.withCredentials && (d.withCredentials = a.withCredentials), this._request = d, !0 }, a._clean = function () { clearTimeout(this._loadTimeout), null != this._request.removeEventListener ? (this._request.removeEventListener("loadstart", this._handleLoadStartProxy), this._request.removeEventListener("progress", this._handleProgressProxy), this._request.removeEventListener("abort", this._handleAbortProxy), this._request.removeEventListener("error", this._handleErrorProxy), this._request.removeEventListener("timeout", this._handleTimeoutProxy), this._request.removeEventListener("load", this._handleLoadProxy), this._request.removeEventListener("readystatechange", this._handleReadyStateChangeProxy)) : (this._request.onloadstart = null, this._request.onprogress = null, this._request.onabort = null, this._request.onerror = null, this._request.ontimeout = null, this._request.onload = null, this._request.onreadystatechange = null) }, a.toString = function () { return "[PreloadJS XHRRequest]" }, createjs.XHRRequest = createjs.promote(XHRRequest, "AbstractRequest") +}(), window.createjs = window.createjs || {}, function () { "use strict"; function LoadQueue(a, b, c) { this.AbstractLoader_constructor(), this._plugins = [], this._typeCallbacks = {}, this._extensionCallbacks = {}, this.next = null, this.maintainScriptOrder = !0, this.stopOnError = !1, this._maxConnections = 1, this._availableLoaders = [createjs.FontLoader, createjs.ImageLoader, createjs.JavaScriptLoader, createjs.CSSLoader, createjs.JSONLoader, createjs.JSONPLoader, createjs.SoundLoader, createjs.ManifestLoader, createjs.SpriteSheetLoader, createjs.XMLLoader, createjs.SVGLoader, createjs.BinaryLoader, createjs.VideoLoader, createjs.TextLoader], this._defaultLoaderLength = this._availableLoaders.length, this.init(a, b, c) } var a = createjs.extend(LoadQueue, createjs.AbstractLoader), b = LoadQueue; try { Object.defineProperties(b, { POST: { get: createjs.deprecate(function () { return createjs.Methods.POST }, "AbstractLoader.POST") }, GET: { get: createjs.deprecate(function () { return createjs.Methods.GET }, "AbstractLoader.GET") }, BINARY: { get: createjs.deprecate(function () { return createjs.Types.BINARY }, "AbstractLoader.BINARY") }, CSS: { get: createjs.deprecate(function () { return createjs.Types.CSS }, "AbstractLoader.CSS") }, FONT: { get: createjs.deprecate(function () { return createjs.Types.FONT }, "AbstractLoader.FONT") }, FONTCSS: { get: createjs.deprecate(function () { return createjs.Types.FONTCSS }, "AbstractLoader.FONTCSS") }, IMAGE: { get: createjs.deprecate(function () { return createjs.Types.IMAGE }, "AbstractLoader.IMAGE") }, JAVASCRIPT: { get: createjs.deprecate(function () { return createjs.Types.JAVASCRIPT }, "AbstractLoader.JAVASCRIPT") }, JSON: { get: createjs.deprecate(function () { return createjs.Types.JSON }, "AbstractLoader.JSON") }, JSONP: { get: createjs.deprecate(function () { return createjs.Types.JSONP }, "AbstractLoader.JSONP") }, MANIFEST: { get: createjs.deprecate(function () { return createjs.Types.MANIFEST }, "AbstractLoader.MANIFEST") }, SOUND: { get: createjs.deprecate(function () { return createjs.Types.SOUND }, "AbstractLoader.SOUND") }, VIDEO: { get: createjs.deprecate(function () { return createjs.Types.VIDEO }, "AbstractLoader.VIDEO") }, SPRITESHEET: { get: createjs.deprecate(function () { return createjs.Types.SPRITESHEET }, "AbstractLoader.SPRITESHEET") }, SVG: { get: createjs.deprecate(function () { return createjs.Types.SVG }, "AbstractLoader.SVG") }, TEXT: { get: createjs.deprecate(function () { return createjs.Types.TEXT }, "AbstractLoader.TEXT") }, XML: { get: createjs.deprecate(function () { return createjs.Types.XML }, "AbstractLoader.XML") } }) } catch (c) { } a.init = function (a, b, c) { this.preferXHR = !0, this._preferXHR = !0, this.setPreferXHR(a), this._paused = !1, this._basePath = b, this._crossOrigin = c, this._loadStartWasDispatched = !1, this._currentlyLoadingScript = null, this._currentLoads = [], this._loadQueue = [], this._loadQueueBackup = [], this._loadItemsById = {}, this._loadItemsBySrc = {}, this._loadedResults = {}, this._loadedRawResults = {}, this._numItems = 0, this._numItemsLoaded = 0, this._scriptOrder = [], this._loadedScripts = [], this._lastProgress = 0 / 0 }, a.registerLoader = function (a) { if (!a || !a.canLoadItem) throw new Error("loader is of an incorrect type."); if (-1 != this._availableLoaders.indexOf(a)) throw new Error("loader already exists."); this._availableLoaders.unshift(a) }, a.unregisterLoader = function (a) { var b = this._availableLoaders.indexOf(a); -1 != b && b < this._defaultLoaderLength - 1 && this._availableLoaders.splice(b, 1) }, a.setPreferXHR = function (a) { return this.preferXHR = 0 != a && null != window.XMLHttpRequest, this.preferXHR }, a.removeAll = function () { this.remove() }, a.remove = function (a) { var b = null; if (a && !Array.isArray(a)) b = [a]; else if (a) b = a; else if (arguments.length > 0) return; var c = !1; if (b) { for (; b.length;) { var d = b.pop(), e = this.getResult(d); for (f = this._loadQueue.length - 1; f >= 0; f--)if (g = this._loadQueue[f].getItem(), g.id == d || g.src == d) { this._loadQueue.splice(f, 1)[0].cancel(); break } for (f = this._loadQueueBackup.length - 1; f >= 0; f--)if (g = this._loadQueueBackup[f].getItem(), g.id == d || g.src == d) { this._loadQueueBackup.splice(f, 1)[0].cancel(); break } if (e) this._disposeItem(this.getItem(d)); else for (var f = this._currentLoads.length - 1; f >= 0; f--) { var g = this._currentLoads[f].getItem(); if (g.id == d || g.src == d) { this._currentLoads.splice(f, 1)[0].cancel(), c = !0; break } } } c && this._loadNext() } else { this.close(); for (var h in this._loadItemsById) this._disposeItem(this._loadItemsById[h]); this.init(this.preferXHR, this._basePath) } }, a.reset = function () { this.close(); for (var a in this._loadItemsById) this._disposeItem(this._loadItemsById[a]); for (var b = [], c = 0, d = this._loadQueueBackup.length; d > c; c++)b.push(this._loadQueueBackup[c].getItem()); this.loadManifest(b, !1) }, a.installPlugin = function (a) { if (null != a && null != a.getPreloadHandlers) { this._plugins.push(a); var b = a.getPreloadHandlers(); if (b.scope = a, null != b.types) for (var c = 0, d = b.types.length; d > c; c++)this._typeCallbacks[b.types[c]] = b; if (null != b.extensions) for (c = 0, d = b.extensions.length; d > c; c++)this._extensionCallbacks[b.extensions[c]] = b } }, a.setMaxConnections = function (a) { this._maxConnections = a, !this._paused && this._loadQueue.length > 0 && this._loadNext() }, a.loadFile = function (a, b, c) { if (null == a) { var d = new createjs.ErrorEvent("PRELOAD_NO_FILE"); return void this._sendError(d) } this._addItem(a, null, c), this.setPaused(b !== !1 ? !1 : !0) }, a.loadManifest = function (a, c, d) { var e = null, f = null; if (Array.isArray(a)) { if (0 == a.length) { var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY"); return void this._sendError(g) } e = a } else if ("string" == typeof a) e = [{ src: a, type: b.MANIFEST }]; else { if ("object" != typeof a) { var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL"); return void this._sendError(g) } if (void 0 !== a.src) { if (null == a.type) a.type = b.MANIFEST; else if (a.type != b.MANIFEST) { var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE"); this._sendError(g) } e = [a] } else void 0 !== a.manifest && (e = a.manifest, f = a.path) } for (var h = 0, i = e.length; i > h; h++)this._addItem(e[h], f, d); this.setPaused(c !== !1 ? !1 : !0) }, a.load = function () { this.setPaused(!1) }, a.getItem = function (a) { return this._loadItemsById[a] || this._loadItemsBySrc[a] }, a.getResult = function (a, b) { var c = this._loadItemsById[a] || this._loadItemsBySrc[a]; if (null == c) return null; var d = c.id; return b && this._loadedRawResults[d] ? this._loadedRawResults[d] : this._loadedResults[d] }, a.getItems = function (a) { var b = []; for (var c in this._loadItemsById) { var d = this._loadItemsById[c], e = this.getResult(c); (a !== !0 || null != e) && b.push({ item: d, result: e, rawResult: this.getResult(c, !0) }) } return b }, a.setPaused = function (a) { this._paused = a, this._paused || this._loadNext() }, a.close = function () { for (; this._currentLoads.length;)this._currentLoads.pop().cancel(); this._scriptOrder.length = 0, this._loadedScripts.length = 0, this.loadStartWasDispatched = !1, this._itemCount = 0, this._lastProgress = 0 / 0 }, a._addItem = function (a, b, c) { var d = this._createLoadItem(a, b, c); if (null != d) { var e = this._createLoader(d); null != e && ("plugins" in e && (e.plugins = this._plugins), d._loader = e, this._loadQueue.push(e), this._loadQueueBackup.push(e), this._numItems++, this._updateProgress(), (this.maintainScriptOrder && d.type == createjs.Types.JAVASCRIPT || d.maintainOrder === !0) && (this._scriptOrder.push(d), this._loadedScripts.push(null))) } }, a._createLoadItem = function (a, b, c) { var d = createjs.LoadItem.create(a); if (null == d) return null; var e = "", f = c || this._basePath; if (d.src instanceof Object) { if (!d.type) return null; if (b) { e = b; var g = createjs.URLUtils.parseURI(b); null == f || g.absolute || g.relative || (e = f + e) } else null != f && (e = f) } else { var h = createjs.URLUtils.parseURI(d.src); h.extension && (d.ext = h.extension), null == d.type && (d.type = createjs.RequestUtils.getTypeByExtension(d.ext)); var i = d.src; if (!h.absolute && !h.relative) if (b) { e = b; var g = createjs.URLUtils.parseURI(b); i = b + i, null == f || g.absolute || g.relative || (e = f + e) } else null != f && (e = f); d.src = e + d.src } d.path = e, (void 0 === d.id || null === d.id || "" === d.id) && (d.id = i); var j = this._typeCallbacks[d.type] || this._extensionCallbacks[d.ext]; if (j) { var k = j.callback.call(j.scope, d, this); if (k === !1) return null; k === !0 || null != k && (d._loader = k), h = createjs.URLUtils.parseURI(d.src), null != h.extension && (d.ext = h.extension) } return this._loadItemsById[d.id] = d, this._loadItemsBySrc[d.src] = d, null == d.crossOrigin && (d.crossOrigin = this._crossOrigin), d }, a._createLoader = function (a) { if (null != a._loader) return a._loader; for (var b = this.preferXHR, c = 0; c < this._availableLoaders.length; c++) { var d = this._availableLoaders[c]; if (d && d.canLoadItem(a)) return new d(a, b) } return null }, a._loadNext = function () { if (!this._paused) { this._loadStartWasDispatched || (this._sendLoadStart(), this._loadStartWasDispatched = !0), this._numItems == this._numItemsLoaded ? (this.loaded = !0, this._sendComplete(), this.next && this.next.load && this.next.load()) : this.loaded = !1; for (var a = 0; a < this._loadQueue.length && !(this._currentLoads.length >= this._maxConnections); a++) { var b = this._loadQueue[a]; this._canStartLoad(b) && (this._loadQueue.splice(a, 1), a--, this._loadItem(b)) } } }, a._loadItem = function (a) { a.on("fileload", this._handleFileLoad, this), a.on("progress", this._handleProgress, this), a.on("complete", this._handleFileComplete, this), a.on("error", this._handleError, this), a.on("fileerror", this._handleFileError, this), this._currentLoads.push(a), this._sendFileStart(a.getItem()), a.load() }, a._handleFileLoad = function (a) { a.target = null, this.dispatchEvent(a) }, a._handleFileError = function (a) { var b = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, a.item); this._sendError(b) }, a._handleError = function (a) { var b = a.target; this._numItemsLoaded++, this._finishOrderedItem(b, !0), this._updateProgress(); var c = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, b.getItem()); this._sendError(c), this.stopOnError ? this.setPaused(!0) : (this._removeLoadItem(b), this._cleanLoadItem(b), this._loadNext()) }, a._handleFileComplete = function (a) { var b = a.target, c = b.getItem(), d = b.getResult(); this._loadedResults[c.id] = d; var e = b.getResult(!0); null != e && e !== d && (this._loadedRawResults[c.id] = e), this._saveLoadedItems(b), this._removeLoadItem(b), this._finishOrderedItem(b) || this._processFinishedLoad(c, b), this._cleanLoadItem(b) }, a._saveLoadedItems = function (a) { var b = a.getLoadedItems(); if (null !== b) for (var c = 0; c < b.length; c++) { var d = b[c].item; this._loadItemsBySrc[d.src] = d, this._loadItemsById[d.id] = d, this._loadedResults[d.id] = b[c].result, this._loadedRawResults[d.id] = b[c].rawResult } }, a._finishOrderedItem = function (a, b) { var c = a.getItem(); if (this.maintainScriptOrder && c.type == createjs.Types.JAVASCRIPT || c.maintainOrder) { a instanceof createjs.JavaScriptLoader && (this._currentlyLoadingScript = !1); var d = createjs.indexOf(this._scriptOrder, c); return -1 == d ? !1 : (this._loadedScripts[d] = b === !0 ? !0 : c, this._checkScriptLoadOrder(), !0) } return !1 }, a._checkScriptLoadOrder = function () { for (var a = this._loadedScripts.length, b = 0; a > b; b++) { var c = this._loadedScripts[b]; if (null === c) break; if (c !== !0) { var d = this._loadedResults[c.id]; c.type == createjs.Types.JAVASCRIPT && createjs.DomUtils.appendToHead(d); var e = c._loader; this._processFinishedLoad(c, e), this._loadedScripts[b] = !0 } } }, a._processFinishedLoad = function (a, b) { if (this._numItemsLoaded++, !this.maintainScriptOrder && a.type == createjs.Types.JAVASCRIPT) { var c = b.getTag(); createjs.DomUtils.appendToHead(c) } this._updateProgress(), this._sendFileComplete(a, b), this._loadNext() }, a._canStartLoad = function (a) { if (!this.maintainScriptOrder || a.preferXHR) return !0; var b = a.getItem(); if (b.type != createjs.Types.JAVASCRIPT) return !0; if (this._currentlyLoadingScript) return !1; for (var c = this._scriptOrder.indexOf(b), d = 0; c > d;) { var e = this._loadedScripts[d]; if (null == e) return !1; d++ } return this._currentlyLoadingScript = !0, !0 }, a._removeLoadItem = function (a) { for (var b = this._currentLoads.length, c = 0; b > c; c++)if (this._currentLoads[c] == a) { this._currentLoads.splice(c, 1); break } }, a._cleanLoadItem = function (a) { var b = a.getItem(); b && delete b._loader }, a._handleProgress = function (a) { var b = a.target; this._sendFileProgress(b.getItem(), b.progress), this._updateProgress() }, a._updateProgress = function () { var a = this._numItemsLoaded / this._numItems, b = this._numItems - this._numItemsLoaded; if (b > 0) { for (var c = 0, d = 0, e = this._currentLoads.length; e > d; d++)c += this._currentLoads[d].progress; a += c / b * (b / this._numItems) } this._lastProgress != a && (this._sendProgress(a), this._lastProgress = a) }, a._disposeItem = function (a) { delete this._loadedResults[a.id], delete this._loadedRawResults[a.id], delete this._loadItemsById[a.id], delete this._loadItemsBySrc[a.src] }, a._sendFileProgress = function (a, b) { if (!this._isCanceled() && !this._paused && this.hasEventListener("fileprogress")) { var c = new createjs.Event("fileprogress"); c.progress = b, c.loaded = b, c.total = 1, c.item = a, this.dispatchEvent(c) } }, a._sendFileComplete = function (a, b) { if (!this._isCanceled() && !this._paused) { var c = new createjs.Event("fileload"); c.loader = b, c.item = a, c.result = this._loadedResults[a.id], c.rawResult = this._loadedRawResults[a.id], a.completeHandler && a.completeHandler(c), this.hasEventListener("fileload") && this.dispatchEvent(c) } }, a._sendFileStart = function (a) { var b = new createjs.Event("filestart"); b.item = a, this.hasEventListener("filestart") && this.dispatchEvent(b) }, a.toString = function () { return "[PreloadJS LoadQueue]" }, createjs.LoadQueue = createjs.promote(LoadQueue, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function TextLoader(a) { this.AbstractLoader_constructor(a, !0, createjs.Types.TEXT) } var a = (createjs.extend(TextLoader, createjs.AbstractLoader), TextLoader); a.canLoadItem = function (a) { return a.type == createjs.Types.TEXT }, createjs.TextLoader = createjs.promote(TextLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function BinaryLoader(a) { this.AbstractLoader_constructor(a, !0, createjs.Types.BINARY), this.on("initialize", this._updateXHR, this) } var a = createjs.extend(BinaryLoader, createjs.AbstractLoader), b = BinaryLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.BINARY }, a._updateXHR = function (a) { a.loader.setResponseType("arraybuffer") }, createjs.BinaryLoader = createjs.promote(BinaryLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function CSSLoader(a, b) { this.AbstractLoader_constructor(a, b, createjs.Types.CSS), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "href", this._tag = b ? createjs.Elements.style() : createjs.Elements.link(), this._tag.rel = "stylesheet", this._tag.type = "text/css" } var a = createjs.extend(CSSLoader, createjs.AbstractLoader), b = CSSLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.CSS }, a._formatResult = function (a) { if (this._preferXHR) { var b = a.getTag(); if (b.styleSheet) b.styleSheet.cssText = a.getResult(!0); else { var c = createjs.Elements.text(a.getResult(!0)); b.appendChild(c) } } else b = this._tag; return createjs.DomUtils.appendToHead(b), b }, createjs.CSSLoader = createjs.promote(CSSLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function FontLoader(a, b) { this.AbstractLoader_constructor(a, b, a.type), this._faces = {}, this._watched = [], this._count = 0, this._watchInterval = null, this._loadTimeout = null, this._injectCSS = void 0 === a.injectCSS ? !0 : a.injectCSS, this.dispatchEvent("initialize") } var a = createjs.extend(FontLoader, createjs.AbstractLoader); FontLoader.canLoadItem = function (a) { return a.type == createjs.Types.FONT || a.type == createjs.Types.FONTCSS }, FontLoader.sampleText = "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ", FontLoader._ctx = document.createElement("canvas").getContext("2d"), FontLoader._referenceFonts = ["serif", "monospace"], FontLoader.WEIGHT_REGEX = /[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/gi, FontLoader.STYLE_REGEX = /[- ._]*(italic|oblique)[- ._]*/gi, FontLoader.FONT_FORMAT = { woff2: "woff2", woff: "woff", ttf: "truetype", otf: "truetype" }, FontLoader.FONT_WEIGHT = { thin: 100, extralight: 200, ultralight: 200, light: 300, semilight: 300, demilight: 300, book: "normal", regular: "normal", semibold: 600, demibold: 600, extrabold: 800, ultrabold: 800, black: 900, heavy: 900 }, FontLoader.WATCH_DURATION = 10, a.load = function () { if (this.type == createjs.Types.FONTCSS) { var a = this._watchCSS(); if (!a) return void this.AbstractLoader_load() } else if (this._item.src instanceof Array) this._watchFontArray(); else { var b = this._defFromSrc(this._item.src); this._watchFont(b), this._injectStyleTag(this._cssFromDef(b)) } this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout), this.dispatchEvent("loadstart") }, a._handleTimeout = function () { this._stopWatching(), this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT")) }, a._createRequest = function () { return this._request }, a.handleEvent = function (a) { switch (a.type) { case "complete": this._rawResult = a.target._response, this._result = !0, this._parseCSS(this._rawResult); break; case "error": this._stopWatching(), this.AbstractLoader_handleEvent(a) } }, a._watchCSS = function () { var a = this._item.src; return a instanceof HTMLStyleElement && (this._injectCSS && !a.parentNode && (document.head || document.getElementsByTagName("head")[0]).appendChild(a), this._injectCSS = !1, a = "\n" + a.textContent), -1 !== a.search(/\n|\r|@font-face/i) ? (this._parseCSS(a), !0) : (this._request = new createjs.XHRRequest(this._item), !1) }, a._parseCSS = function (a) { for (var b = /@font-face\s*\{([^}]+)}/g; ;) { var c = b.exec(a); if (!c) break; this._watchFont(this._parseFontFace(c[1])) } this._injectStyleTag(a) }, a._watchFontArray = function () { for (var a, b = this._item.src, c = "", d = b.length - 1; d >= 0; d--) { var e = b[d]; a = "string" == typeof e ? this._defFromSrc(e) : this._defFromObj(e), this._watchFont(a), c += this._cssFromDef(a) + "\n" } this._injectStyleTag(c) }, a._injectStyleTag = function (a) { if (this._injectCSS) { var b = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style"); c.type = "text/css", c.styleSheet ? c.styleSheet.cssText = a : c.appendChild(document.createTextNode(a)), b.appendChild(c) } }, a._parseFontFace = function (a) { var b = this._getCSSValue(a, "font-family"), c = this._getCSSValue(a, "src"); return b && c ? this._defFromObj({ family: b, src: c, style: this._getCSSValue(a, "font-style"), weight: this._getCSSValue(a, "font-weight") }) : null }, a._watchFont = function (a) { a && !this._faces[a.id] && (this._faces[a.id] = a, this._watched.push(a), this._count++, this._calculateReferenceSizes(a), this._startWatching()) }, a._startWatching = function () { null == this._watchInterval && (this._watchInterval = setInterval(createjs.proxy(this._watch, this), FontLoader.WATCH_DURATION)) }, a._stopWatching = function () { clearInterval(this._watchInterval), clearTimeout(this._loadTimeout), this._watchInterval = null }, a._watch = function () { for (var a = this._watched, b = FontLoader._referenceFonts, c = a.length, d = c - 1; d >= 0; d--)for (var e = a[d], f = e.refs, g = f.length - 1; g >= 0; g--) { var h = this._getTextWidth(e.family + "," + b[g], e.weight, e.style); if (h != f[g]) { var i = new createjs.Event("fileload"); e.type = "font-family", i.item = e, this.dispatchEvent(i), a.splice(d, 1); break } } if (c !== a.length) { var i = new createjs.ProgressEvent(this._count - a.length, this._count); this.dispatchEvent(i) } 0 === c && (this._stopWatching(), this._sendComplete()) }, a._calculateReferenceSizes = function (a) { for (var b = FontLoader._referenceFonts, c = a.refs = [], d = 0; d < b.length; d++)c[d] = this._getTextWidth(b[d], a.weight, a.style) }, a._defFromSrc = function (a) { var b, c = /[- ._]+/g, d = a, e = null; b = d.search(/[?#]/), -1 !== b && (d = d.substr(0, b)), b = d.lastIndexOf("."), -1 !== b && (e = d.substr(b + 1), d = d.substr(0, b)), b = d.lastIndexOf("/"), -1 !== b && (d = d.substr(b + 1)); var f = d, g = f.match(FontLoader.WEIGHT_REGEX); g && (g = g[0], f = f.replace(g, ""), g = g.replace(c, "").toLowerCase()); var h = d.match(FontLoader.STYLE_REGEX); h && (f = f.replace(h[0], ""), h = "italic"), f = f.replace(c, ""); var i = "local('" + d.replace(c, " ") + "'), url('" + a + "')", j = FontLoader.FONT_FORMAT[e]; return j && (i += " format('" + j + "')"), this._defFromObj({ family: f, weight: FontLoader.FONT_WEIGHT[g] || g, style: h, src: i }) }, a._defFromObj = function (a) { var b = { family: a.family, src: a.src, style: a.style || "normal", weight: a.weight || "normal" }; return b.id = b.family + ";" + b.style + ";" + b.weight, b }, a._cssFromDef = function (a) { return "@font-face {\n font-family: '" + a.family + "';\n font-style: " + a.style + ";\n font-weight: " + a.weight + ";\n src: " + a.src + ";\n}" }, a._getTextWidth = function (a, b, c) { var d = FontLoader._ctx; return d.font = c + " " + b + " 72px " + a, d.measureText(FontLoader.sampleText).width }, a._getCSSValue = function (a, b) { var c = new RegExp(b + ":s*([^;}]+?)s*[;}]"), d = c.exec(a); return d && d[1] ? d[1] : null }, createjs.FontLoader = createjs.promote(FontLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function ImageLoader(a, b) { this.AbstractLoader_constructor(a, b, createjs.Types.IMAGE), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "src", createjs.DomUtils.isImageTag(a) ? this._tag = a : createjs.DomUtils.isImageTag(a.src) ? this._tag = a.src : createjs.DomUtils.isImageTag(a.tag) && (this._tag = a.tag), null != this._tag ? this._preferXHR = !1 : this._tag = createjs.Elements.img(), this.on("initialize", this._updateXHR, this) } var a = createjs.extend(ImageLoader, createjs.AbstractLoader), b = ImageLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.IMAGE }, a.load = function () { if ("" != this._tag.src && this._tag.complete) return void this._sendComplete(); var a = this._item.crossOrigin; 1 == a && (a = "Anonymous"), null == a || createjs.URLUtils.isLocal(this._item) || (this._tag.crossOrigin = a), this.AbstractLoader_load() }, a._updateXHR = function (a) { a.loader.mimeType = "text/plain; charset=x-user-defined-binary", a.loader.setResponseType && a.loader.setResponseType("blob") }, a._formatResult = function () { return this._formatImage }, a._formatImage = function (a, b) { var c = this._tag, d = window.URL || window.webkitURL; if (this._preferXHR) if (d) { var e = d.createObjectURL(this.getResult(!0)); c.src = e, c.addEventListener("load", this._cleanUpURL, !1), c.addEventListener("error", this._cleanUpURL, !1) } else c.src = this._item.src; else; c.complete ? a(c) : (c.onload = createjs.proxy(function () { a(this._tag), c.onload = c.onerror = null }, this), c.onerror = createjs.proxy(function (a) { b(new createjs.ErrorEvent("IMAGE_FORMAT", null, a)), c.onload = c.onerror = null }, this)) }, a._cleanUpURL = function (a) { var b = window.URL || window.webkitURL; b.revokeObjectURL(a.target.src) }, createjs.ImageLoader = createjs.promote(ImageLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function JavaScriptLoader(a, b) { this.AbstractLoader_constructor(a, b, createjs.Types.JAVASCRIPT), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "src", this.setTag(createjs.Elements.script()) } var a = createjs.extend(JavaScriptLoader, createjs.AbstractLoader), b = JavaScriptLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.JAVASCRIPT }, a._formatResult = function (a) { var b = a.getTag(); return this._preferXHR && (b.text = a.getResult(!0)), b }, createjs.JavaScriptLoader = createjs.promote(JavaScriptLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function JSONLoader(a) { this.AbstractLoader_constructor(a, !0, createjs.Types.JSON), this.resultFormatter = this._formatResult } var a = createjs.extend(JSONLoader, createjs.AbstractLoader), b = JSONLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.JSON }, a._formatResult = function (a) { var b = null; try { b = createjs.DataUtils.parseJSON(a.getResult(!0)) } catch (c) { var d = new createjs.ErrorEvent("JSON_FORMAT", null, c); return this._sendError(d), c } return b }, createjs.JSONLoader = createjs.promote(JSONLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function JSONPLoader(a) { this.AbstractLoader_constructor(a, !1, createjs.Types.JSONP), this.setTag(createjs.Elements.script()), this.getTag().type = "text/javascript" } var a = createjs.extend(JSONPLoader, createjs.AbstractLoader), b = JSONPLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.JSONP }, a.cancel = function () { this.AbstractLoader_cancel(), this._dispose() }, a.load = function () { if (null == this._item.callback) throw new Error("callback is required for loading JSONP requests."); if (null != window[this._item.callback]) throw new Error("JSONP callback '" + this._item.callback + "' already exists on window. You need to specify a different callback or re-name the current one."); window[this._item.callback] = createjs.proxy(this._handleLoad, this), createjs.DomUtils.appendToBody(this._tag), this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout), this._tag.src = this._item.src }, a._handleLoad = function (a) { this._result = this._rawResult = a, this._sendComplete(), this._dispose() }, a._handleTimeout = function () { this._dispose(), this.dispatchEvent(new createjs.ErrorEvent("timeout")) }, a._dispose = function () { createjs.DomUtils.removeChild(this._tag), delete window[this._item.callback], clearTimeout(this._loadTimeout) }, createjs.JSONPLoader = createjs.promote(JSONPLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function ManifestLoader(a, b) { this.AbstractLoader_constructor(a, b, createjs.Types.MANIFEST), this.plugins = null, this._manifestQueue = null } var a = createjs.extend(ManifestLoader, createjs.AbstractLoader), b = ManifestLoader; b.MANIFEST_PROGRESS = .25, b.canLoadItem = function (a) { return a.type == createjs.Types.MANIFEST }, a.load = function () { this.AbstractLoader_load() }, a._createRequest = function () { var a = this._item.callback; this._request = null != a ? new createjs.JSONPLoader(this._item) : new createjs.JSONLoader(this._item) }, a.handleEvent = function (a) { switch (a.type) { case "complete": return this._rawResult = a.target.getResult(!0), this._result = a.target.getResult(), this._sendProgress(b.MANIFEST_PROGRESS), void this._loadManifest(this._result); case "progress": return a.loaded *= b.MANIFEST_PROGRESS, this.progress = a.loaded / a.total, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0), void this._sendProgress(a) }this.AbstractLoader_handleEvent(a) }, a.destroy = function () { this.AbstractLoader_destroy(), this._manifestQueue.close() }, a._loadManifest = function (a) { if (a && a.manifest) { var b = this._manifestQueue = new createjs.LoadQueue(this._preferXHR); b.on("fileload", this._handleManifestFileLoad, this), b.on("progress", this._handleManifestProgress, this), b.on("complete", this._handleManifestComplete, this, !0), b.on("error", this._handleManifestError, this, !0); for (var c = 0, d = this.plugins.length; d > c; c++)b.installPlugin(this.plugins[c]); b.loadManifest(a) } else this._sendComplete() }, a._handleManifestFileLoad = function (a) { a.target = null, this.dispatchEvent(a) }, a._handleManifestComplete = function () { this._loadedItems = this._manifestQueue.getItems(!0), this._sendComplete() }, a._handleManifestProgress = function (a) { this.progress = a.progress * (1 - b.MANIFEST_PROGRESS) + b.MANIFEST_PROGRESS, this._sendProgress(this.progress) }, a._handleManifestError = function (a) { var b = new createjs.Event("fileerror"); b.item = a.data, this.dispatchEvent(b) }, createjs.ManifestLoader = createjs.promote(ManifestLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function SoundLoader(a, b) { this.AbstractMediaLoader_constructor(a, b, createjs.Types.SOUND), createjs.DomUtils.isAudioTag(a) ? this._tag = a : createjs.DomUtils.isAudioTag(a.src) ? this._tag = a : createjs.DomUtils.isAudioTag(a.tag) && (this._tag = createjs.DomUtils.isAudioTag(a) ? a : a.src), null != this._tag && (this._preferXHR = !1) } var a = createjs.extend(SoundLoader, createjs.AbstractMediaLoader), b = SoundLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.SOUND }, a._createTag = function (a) { var b = createjs.Elements.audio(); return b.autoplay = !1, b.preload = "none", b.src = a, b }, createjs.SoundLoader = createjs.promote(SoundLoader, "AbstractMediaLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function VideoLoader(a, b) { this.AbstractMediaLoader_constructor(a, b, createjs.Types.VIDEO), createjs.DomUtils.isVideoTag(a) || createjs.DomUtils.isVideoTag(a.src) ? (this.setTag(createjs.DomUtils.isVideoTag(a) ? a : a.src), this._preferXHR = !1) : this.setTag(this._createTag()) } var a = createjs.extend(VideoLoader, createjs.AbstractMediaLoader), b = VideoLoader; a._createTag = function () { return createjs.Elements.video() }, b.canLoadItem = function (a) { return a.type == createjs.Types.VIDEO }, createjs.VideoLoader = createjs.promote(VideoLoader, "AbstractMediaLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function SpriteSheetLoader(a, b) { this.AbstractLoader_constructor(a, b, createjs.Types.SPRITESHEET), this._manifestQueue = null } var a = createjs.extend(SpriteSheetLoader, createjs.AbstractLoader), b = SpriteSheetLoader; b.SPRITESHEET_PROGRESS = .25, b.canLoadItem = function (a) { return a.type == createjs.Types.SPRITESHEET }, a.destroy = function () { this.AbstractLoader_destroy(), this._manifestQueue.close() }, a._createRequest = function () { var a = this._item.callback; this._request = null != a ? new createjs.JSONPLoader(this._item) : new createjs.JSONLoader(this._item) }, a.handleEvent = function (a) { switch (a.type) { case "complete": return this._rawResult = a.target.getResult(!0), this._result = a.target.getResult(), this._sendProgress(b.SPRITESHEET_PROGRESS), void this._loadManifest(this._result); case "progress": return a.loaded *= b.SPRITESHEET_PROGRESS, this.progress = a.loaded / a.total, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0), void this._sendProgress(a) }this.AbstractLoader_handleEvent(a) }, a._loadManifest = function (a) { if (a && a.images) { var b = this._manifestQueue = new createjs.LoadQueue(this._preferXHR, this._item.path, this._item.crossOrigin); b.on("complete", this._handleManifestComplete, this, !0), b.on("fileload", this._handleManifestFileLoad, this), b.on("progress", this._handleManifestProgress, this), b.on("error", this._handleManifestError, this, !0), b.loadManifest(a.images) } }, a._handleManifestFileLoad = function (a) { var b = a.result; if (null != b) { var c = this.getResult().images, d = c.indexOf(a.item.src); c[d] = b } }, a._handleManifestComplete = function () { this._result = new createjs.SpriteSheet(this._result), this._loadedItems = this._manifestQueue.getItems(!0), this._sendComplete() }, a._handleManifestProgress = function (a) { this.progress = a.progress * (1 - b.SPRITESHEET_PROGRESS) + b.SPRITESHEET_PROGRESS, this._sendProgress(this.progress) }, a._handleManifestError = function (a) { var b = new createjs.Event("fileerror"); b.item = a.data, this.dispatchEvent(b) }, createjs.SpriteSheetLoader = createjs.promote(SpriteSheetLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { + "use strict"; function SVGLoader(a, b) { + this.AbstractLoader_constructor(a, b, createjs.Types.SVG), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "data", b ? this.setTag(createjs.Elements.svg()) : (this.setTag(createjs.Elements.object()), this.getTag().type = "image/svg+xml") + } var a = createjs.extend(SVGLoader, createjs.AbstractLoader), b = SVGLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.SVG }, a._formatResult = function (a) { var b = createjs.DataUtils.parseXML(a.getResult(!0)), c = a.getTag(); if (!this._preferXHR && document.body.contains(c) && document.body.removeChild(c), null != b.documentElement) { var d = b.documentElement; return document.importNode && (d = document.importNode(d, !0)), c.appendChild(d), c } return b }, createjs.SVGLoader = createjs.promote(SVGLoader, "AbstractLoader") +}(), window.createjs = window.createjs || {}, function () { "use strict"; function XMLLoader(a) { this.AbstractLoader_constructor(a, !0, createjs.Types.XML), this.resultFormatter = this._formatResult } var a = createjs.extend(XMLLoader, createjs.AbstractLoader), b = XMLLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.XML }, a._formatResult = function (a) { return createjs.DataUtils.parseXML(a.getResult(!0)) }, createjs.XMLLoader = createjs.promote(XMLLoader, "AbstractLoader") }(); + +module.exports = window.createjs; \ No newline at end of file diff --git a/src/utils/plugins/soundjs-1.0.0.min.js b/src/utils/plugins/soundjs-1.0.0.min.js new file mode 100644 index 0000000..655fc26 --- /dev/null +++ b/src/utils/plugins/soundjs-1.0.0.min.js @@ -0,0 +1,26 @@ +/*! +* @license SoundJS +* Visit http://createjs.com/ for documentation, updates and examples. +* +* Copyright (c) 2011-2015 gskinner.com, inc. +* +* Distributed under the terms of the MIT license. +* http://www.opensource.org/licenses/mit-license.html +* +* This notice shall be included in all copies or substantial portions of the Software. +*/ + +/**! + * SoundJS FlashAudioPlugin also includes swfobject (http://code.google.com/p/swfobject/) + */ + +window.createjs = window.createjs || {}, function () { var a = createjs.SoundJS = createjs.SoundJS || {}; a.version = "1.0.0", a.buildDate = "Thu, 12 Oct 2017 16:34:05 GMT" }(), window.createjs = window.createjs || {}, createjs.extend = function (a, b) { "use strict"; function c() { this.constructor = a } return c.prototype = b.prototype, a.prototype = new c }, window.createjs = window.createjs || {}, createjs.promote = function (a, b) { "use strict"; var c = a.prototype, d = Object.getPrototypeOf && Object.getPrototypeOf(c) || c.__proto__; if (d) { c[(b += "_") + "constructor"] = d.constructor; for (var e in d) c.hasOwnProperty(e) && "function" == typeof d[e] && (c[b + e] = d[e]) } return a }, window.createjs = window.createjs || {}, createjs.deprecate = function (a, b) { "use strict"; return function () { var c = "Deprecated property or method '" + b + "'. See docs for info."; return console && (console.warn ? console.warn(c) : console.log(c)), a && a.apply(this, arguments) } }, window.createjs = window.createjs || {}, createjs.indexOf = function (a, b) { "use strict"; for (var c = 0, d = a.length; d > c; c++)if (b === a[c]) return c; return -1 }, window.createjs = window.createjs || {}, function () { "use strict"; createjs.proxy = function (a, b) { var c = Array.prototype.slice.call(arguments, 2); return function () { return a.apply(b, Array.prototype.slice.call(arguments, 0).concat(c)) } } }(), window.createjs = window.createjs || {}, function () { "use strict"; function BrowserDetect() { throw "BrowserDetect cannot be instantiated" } var a = BrowserDetect.agent = window.navigator.userAgent; BrowserDetect.isWindowPhone = a.indexOf("IEMobile") > -1 || a.indexOf("Windows Phone") > -1, BrowserDetect.isFirefox = a.indexOf("Firefox") > -1, BrowserDetect.isOpera = null != window.opera, BrowserDetect.isChrome = a.indexOf("Chrome") > -1, BrowserDetect.isIOS = (a.indexOf("iPod") > -1 || a.indexOf("iPhone") > -1 || a.indexOf("iPad") > -1) && !BrowserDetect.isWindowPhone, BrowserDetect.isAndroid = a.indexOf("Android") > -1 && !BrowserDetect.isWindowPhone, BrowserDetect.isBlackberry = a.indexOf("Blackberry") > -1, createjs.BrowserDetect = BrowserDetect }(), window.createjs = window.createjs || {}, function () { "use strict"; function EventDispatcher() { this._listeners = null, this._captureListeners = null } var a = EventDispatcher.prototype; EventDispatcher.initialize = function (b) { b.addEventListener = a.addEventListener, b.on = a.on, b.removeEventListener = b.off = a.removeEventListener, b.removeAllEventListeners = a.removeAllEventListeners, b.hasEventListener = a.hasEventListener, b.dispatchEvent = a.dispatchEvent, b._dispatchEvent = a._dispatchEvent, b.willTrigger = a.willTrigger }, a.addEventListener = function (a, b, c) { var d; d = c ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var e = d[a]; return e && this.removeEventListener(a, b, c), e = d[a], e ? e.push(b) : d[a] = [b], b }, a.on = function (a, b, c, d, e, f) { return b.handleEvent && (c = c || b, b = b.handleEvent), c = c || this, this.addEventListener(a, function (a) { b.call(c, a, e), d && a.remove() }, f) }, a.removeEventListener = function (a, b, c) { var d = c ? this._captureListeners : this._listeners; if (d) { var e = d[a]; if (e) for (var f = 0, g = e.length; g > f; f++)if (e[f] == b) { 1 == g ? delete d[a] : e.splice(f, 1); break } } }, a.off = a.removeEventListener, a.removeAllEventListeners = function (a) { a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null }, a.dispatchEvent = function (a, b, c) { if ("string" == typeof a) { var d = this._listeners; if (!(b || d && d[a])) return !0; a = new createjs.Event(a, b, c) } else a.target && a.clone && (a = a.clone()); try { a.target = this } catch (e) { } if (a.bubbles && this.parent) { for (var f = this, g = [f]; f.parent;)g.push(f = f.parent); var h, i = g.length; for (h = i - 1; h >= 0 && !a.propagationStopped; h--)g[h]._dispatchEvent(a, 1 + (0 == h)); for (h = 1; i > h && !a.propagationStopped; h++)g[h]._dispatchEvent(a, 3) } else this._dispatchEvent(a, 2); return !a.defaultPrevented }, a.hasEventListener = function (a) { var b = this._listeners, c = this._captureListeners; return !!(b && b[a] || c && c[a]) }, a.willTrigger = function (a) { for (var b = this; b;) { if (b.hasEventListener(a)) return !0; b = b.parent } return !1 }, a.toString = function () { return "[EventDispatcher]" }, a._dispatchEvent = function (a, b) { var c, d, e = 2 >= b ? this._captureListeners : this._listeners; if (a && e && (d = e[a.type]) && (c = d.length)) { try { a.currentTarget = this } catch (f) { } try { a.eventPhase = 0 | b } catch (f) { } a.removed = !1, d = d.slice(); for (var g = 0; c > g && !a.immediatePropagationStopped; g++) { var h = d[g]; h.handleEvent ? h.handleEvent(a) : h(a), a.removed && (this.off(a.type, h, 1 == b), a.removed = !1) } } 2 === b && this._dispatchEvent(a, 2.1) }, createjs.EventDispatcher = EventDispatcher }(), window.createjs = window.createjs || {}, function () { "use strict"; function Event(a, b, c) { this.type = a, this.target = null, this.currentTarget = null, this.eventPhase = 0, this.bubbles = !!b, this.cancelable = !!c, this.timeStamp = (new Date).getTime(), this.defaultPrevented = !1, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.removed = !1 } var a = Event.prototype; a.preventDefault = function () { this.defaultPrevented = this.cancelable && !0 }, a.stopPropagation = function () { this.propagationStopped = !0 }, a.stopImmediatePropagation = function () { this.immediatePropagationStopped = this.propagationStopped = !0 }, a.remove = function () { this.removed = !0 }, a.clone = function () { return new Event(this.type, this.bubbles, this.cancelable) }, a.set = function (a) { for (var b in a) this[b] = a[b]; return this }, a.toString = function () { return "[Event (type=" + this.type + ")]" }, createjs.Event = Event }(), window.createjs = window.createjs || {}, function () { "use strict"; function ErrorEvent(a, b, c) { this.Event_constructor("error"), this.title = a, this.message = b, this.data = c } var a = createjs.extend(ErrorEvent, createjs.Event); a.clone = function () { return new createjs.ErrorEvent(this.title, this.message, this.data) }, createjs.ErrorEvent = createjs.promote(ErrorEvent, "Event") }(), window.createjs = window.createjs || {}, function () { "use strict"; function ProgressEvent(a, b) { this.Event_constructor("progress"), this.loaded = a, this.total = null == b ? 1 : b, this.progress = 0 == b ? 0 : this.loaded / this.total } var a = createjs.extend(ProgressEvent, createjs.Event); a.clone = function () { return new createjs.ProgressEvent(this.loaded, this.total) }, createjs.ProgressEvent = createjs.promote(ProgressEvent, "Event") }(window), window.createjs = window.createjs || {}, function () { "use strict"; function LoadItem() { this.src = null, this.type = null, this.id = null, this.maintainOrder = !1, this.callback = null, this.data = null, this.method = createjs.Methods.GET, this.values = null, this.headers = null, this.withCredentials = !1, this.mimeType = null, this.crossOrigin = null, this.loadTimeout = b.LOAD_TIMEOUT_DEFAULT } var a = LoadItem.prototype = {}, b = LoadItem; b.LOAD_TIMEOUT_DEFAULT = 8e3, b.create = function (a) { if ("string" == typeof a) { var c = new LoadItem; return c.src = a, c } if (a instanceof b) return a; if (a instanceof Object && a.src) return null == a.loadTimeout && (a.loadTimeout = b.LOAD_TIMEOUT_DEFAULT), a; throw new Error("Type not recognized.") }, a.set = function (a) { for (var b in a) this[b] = a[b]; return this }, createjs.LoadItem = b }(), window.createjs = window.createjs || {}, function () { var a = {}; a.POST = "POST", a.GET = "GET", createjs.Methods = a }(), window.createjs = window.createjs || {}, function () { var a = {}; a.BINARY = "binary", a.CSS = "css", a.FONT = "font", a.FONTCSS = "fontcss", a.IMAGE = "image", a.JAVASCRIPT = "javascript", a.JSON = "json", a.JSONP = "jsonp", a.MANIFEST = "manifest", a.SOUND = "sound", a.VIDEO = "video", a.SPRITESHEET = "spritesheet", a.SVG = "svg", a.TEXT = "text", a.XML = "xml", createjs.Types = a }(), function () { var a = {}; a.a = function () { return a.el("a") }, a.svg = function () { return a.el("svg") }, a.object = function () { return a.el("object") }, a.image = function () { return a.el("image") }, a.img = function () { return a.el("img") }, a.style = function () { return a.el("style") }, a.link = function () { return a.el("link") }, a.script = function () { return a.el("script") }, a.audio = function () { return a.el("audio") }, a.video = function () { return a.el("video") }, a.text = function (a) { return document.createTextNode(a) }, a.el = function (a) { return document.createElement(a) }, createjs.Elements = a }(), function () { var a = { container: null }; a.appendToHead = function (b) { a.getHead().appendChild(b) }, a.appendToBody = function (b) { if (null == a.container) { a.container = document.createElement("div"), a.container.id = "preloadjs-container"; var c = a.container.style; c.visibility = "hidden", c.position = "absolute", c.width = a.container.style.height = "10px", c.overflow = "hidden", c.transform = c.msTransform = c.webkitTransform = c.oTransform = "translate(-10px, -10px)", a.getBody().appendChild(a.container) } a.container.appendChild(b) }, a.getHead = function () { return document.head || document.getElementsByTagName("head")[0] }, a.getBody = function () { return document.body || document.getElementsByTagName("body")[0] }, a.removeChild = function (a) { a.parent && a.parent.removeChild(a) }, a.isImageTag = function (a) { return a instanceof HTMLImageElement }, a.isAudioTag = function (a) { return window.HTMLAudioElement ? a instanceof HTMLAudioElement : !1 }, a.isVideoTag = function (a) { return window.HTMLVideoElement ? a instanceof HTMLVideoElement : !1 }, createjs.DomUtils = a }(), function () { var a = {}; a.isBinary = function (a) { switch (a) { case createjs.Types.IMAGE: case createjs.Types.BINARY: return !0; default: return !1 } }, a.isText = function (a) { switch (a) { case createjs.Types.TEXT: case createjs.Types.JSON: case createjs.Types.MANIFEST: case createjs.Types.XML: case createjs.Types.CSS: case createjs.Types.SVG: case createjs.Types.JAVASCRIPT: case createjs.Types.SPRITESHEET: return !0; default: return !1 } }, a.getTypeByExtension = function (a) { if (null == a) return createjs.Types.TEXT; switch (a.toLowerCase()) { case "jpeg": case "jpg": case "gif": case "png": case "webp": case "bmp": return createjs.Types.IMAGE; case "ogg": case "mp3": case "webm": return createjs.Types.SOUND; case "mp4": case "webm": case "ts": return createjs.Types.VIDEO; case "json": return createjs.Types.JSON; case "xml": return createjs.Types.XML; case "css": return createjs.Types.CSS; case "js": return createjs.Types.JAVASCRIPT; case "svg": return createjs.Types.SVG; default: return createjs.Types.TEXT } }, createjs.RequestUtils = a }(), function () { var a = {}; a.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i, a.RELATIVE_PATT = /^[.\/]*?\//i, a.EXTENSION_PATT = /\/?[^\/]+\.(\w{1,5})$/i, a.parseURI = function (b) { var c = { absolute: !1, relative: !1, protocol: null, hostname: null, port: null, pathname: null, search: null, hash: null, host: null }; if (null == b) return c; var d = createjs.Elements.a(); d.href = b; for (var e in c) e in d && (c[e] = d[e]); var f = b.indexOf("?"); f > -1 && (b = b.substr(0, f)); var g; return a.ABSOLUTE_PATT.test(b) ? c.absolute = !0 : a.RELATIVE_PATT.test(b) && (c.relative = !0), (g = b.match(a.EXTENSION_PATT)) && (c.extension = g[1].toLowerCase()), c }, a.formatQueryString = function (a, b) { if (null == a) throw new Error("You must specify data."); var c = []; for (var d in a) c.push(d + "=" + escape(a[d])); return b && (c = c.concat(b)), c.join("&") }, a.buildURI = function (a, b) { if (null == b) return a; var c = [], d = a.indexOf("?"); if (-1 != d) { var e = a.slice(d + 1); c = c.concat(e.split("&")) } return -1 != d ? a.slice(0, d) + "?" + this.formatQueryString(b, c) : a + "?" + this.formatQueryString(b, c) }, a.isCrossDomain = function (a) { var b = createjs.Elements.a(); b.href = a.src; var c = createjs.Elements.a(); c.href = location.href; var d = "" != b.hostname && (b.port != c.port || b.protocol != c.protocol || b.hostname != c.hostname); return d }, a.isLocal = function (a) { var b = createjs.Elements.a(); return b.href = a.src, "" == b.hostname && "file:" == b.protocol }, createjs.URLUtils = a }(), window.createjs = window.createjs || {}, function () { "use strict"; function AbstractLoader(a, b, c) { this.EventDispatcher_constructor(), this.loaded = !1, this.canceled = !1, this.progress = 0, this.type = c, this.resultFormatter = null, this._item = a ? createjs.LoadItem.create(a) : null, this._preferXHR = b, this._result = null, this._rawResult = null, this._loadedItems = null, this._tagSrcAttribute = null, this._tag = null } var a = createjs.extend(AbstractLoader, createjs.EventDispatcher), b = AbstractLoader; try { Object.defineProperties(b, { POST: { get: createjs.deprecate(function () { return createjs.Methods.POST }, "AbstractLoader.POST") }, GET: { get: createjs.deprecate(function () { return createjs.Methods.GET }, "AbstractLoader.GET") }, BINARY: { get: createjs.deprecate(function () { return createjs.Types.BINARY }, "AbstractLoader.BINARY") }, CSS: { get: createjs.deprecate(function () { return createjs.Types.CSS }, "AbstractLoader.CSS") }, FONT: { get: createjs.deprecate(function () { return createjs.Types.FONT }, "AbstractLoader.FONT") }, FONTCSS: { get: createjs.deprecate(function () { return createjs.Types.FONTCSS }, "AbstractLoader.FONTCSS") }, IMAGE: { get: createjs.deprecate(function () { return createjs.Types.IMAGE }, "AbstractLoader.IMAGE") }, JAVASCRIPT: { get: createjs.deprecate(function () { return createjs.Types.JAVASCRIPT }, "AbstractLoader.JAVASCRIPT") }, JSON: { get: createjs.deprecate(function () { return createjs.Types.JSON }, "AbstractLoader.JSON") }, JSONP: { get: createjs.deprecate(function () { return createjs.Types.JSONP }, "AbstractLoader.JSONP") }, MANIFEST: { get: createjs.deprecate(function () { return createjs.Types.MANIFEST }, "AbstractLoader.MANIFEST") }, SOUND: { get: createjs.deprecate(function () { return createjs.Types.SOUND }, "AbstractLoader.SOUND") }, VIDEO: { get: createjs.deprecate(function () { return createjs.Types.VIDEO }, "AbstractLoader.VIDEO") }, SPRITESHEET: { get: createjs.deprecate(function () { return createjs.Types.SPRITESHEET }, "AbstractLoader.SPRITESHEET") }, SVG: { get: createjs.deprecate(function () { return createjs.Types.SVG }, "AbstractLoader.SVG") }, TEXT: { get: createjs.deprecate(function () { return createjs.Types.TEXT }, "AbstractLoader.TEXT") }, XML: { get: createjs.deprecate(function () { return createjs.Types.XML }, "AbstractLoader.XML") } }) } catch (c) { } a.getItem = function () { return this._item }, a.getResult = function (a) { return a ? this._rawResult : this._result }, a.getTag = function () { return this._tag }, a.setTag = function (a) { this._tag = a }, a.load = function () { this._createRequest(), this._request.on("complete", this, this), this._request.on("progress", this, this), this._request.on("loadStart", this, this), this._request.on("abort", this, this), this._request.on("timeout", this, this), this._request.on("error", this, this); var a = new createjs.Event("initialize"); a.loader = this._request, this.dispatchEvent(a), this._request.load() }, a.cancel = function () { this.canceled = !0, this.destroy() }, a.destroy = function () { this._request && (this._request.removeAllEventListeners(), this._request.destroy()), this._request = null, this._item = null, this._rawResult = null, this._result = null, this._loadItems = null, this.removeAllEventListeners() }, a.getLoadedItems = function () { return this._loadedItems }, a._createRequest = function () { this._request = this._preferXHR ? new createjs.XHRRequest(this._item) : new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute) }, a._createTag = function () { return null }, a._sendLoadStart = function () { this._isCanceled() || this.dispatchEvent("loadstart") }, a._sendProgress = function (a) { if (!this._isCanceled()) { var b = null; "number" == typeof a ? (this.progress = a, b = new createjs.ProgressEvent(this.progress)) : (b = a, this.progress = a.loaded / a.total, b.progress = this.progress, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0)), this.hasEventListener("progress") && this.dispatchEvent(b) } }, a._sendComplete = function () { if (!this._isCanceled()) { this.loaded = !0; var a = new createjs.Event("complete"); a.rawResult = this._rawResult, null != this._result && (a.result = this._result), this.dispatchEvent(a) } }, a._sendError = function (a) { !this._isCanceled() && this.hasEventListener("error") && (null == a && (a = new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")), this.dispatchEvent(a)) }, a._isCanceled = function () { return null == window.createjs || this.canceled ? !0 : !1 }, a.resultFormatter = null, a.handleEvent = function (a) { switch (a.type) { case "complete": this._rawResult = a.target._response; var b = this.resultFormatter && this.resultFormatter(this); b instanceof Function ? b.call(this, createjs.proxy(this._resultFormatSuccess, this), createjs.proxy(this._resultFormatFailed, this)) : (this._result = b || this._rawResult, this._sendComplete()); break; case "progress": this._sendProgress(a); break; case "error": this._sendError(a); break; case "loadstart": this._sendLoadStart(); break; case "abort": case "timeout": this._isCanceled() || this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_" + a.type.toUpperCase() + "_ERROR")) } }, a._resultFormatSuccess = function (a) { this._result = a, this._sendComplete() }, a._resultFormatFailed = function (a) { this._sendError(a) }, a.toString = function () { return "[PreloadJS AbstractLoader]" }, createjs.AbstractLoader = createjs.promote(AbstractLoader, "EventDispatcher") }(), window.createjs = window.createjs || {}, function () { "use strict"; function AbstractMediaLoader(a, b, c) { this.AbstractLoader_constructor(a, b, c), this.resultFormatter = this._formatResult, this._tagSrcAttribute = "src", this.on("initialize", this._updateXHR, this) } var a = createjs.extend(AbstractMediaLoader, createjs.AbstractLoader); a.load = function () { this._tag || (this._tag = this._createTag(this._item.src)), this._tag.preload = "auto", this._tag.load(), this.AbstractLoader_load() }, a._createTag = function () { }, a._createRequest = function () { this._request = this._preferXHR ? new createjs.XHRRequest(this._item) : new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute) }, a._updateXHR = function (a) { a.loader.setResponseType && a.loader.setResponseType("blob") }, a._formatResult = function (a) { if (this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler), this._tag.onstalled = null, this._preferXHR) { var b = window.URL || window.webkitURL, c = a.getResult(!0); a.getTag().src = b.createObjectURL(c) } return a.getTag() }, createjs.AbstractMediaLoader = createjs.promote(AbstractMediaLoader, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; var AbstractRequest = function (a) { this._item = a }, a = createjs.extend(AbstractRequest, createjs.EventDispatcher); a.load = function () { }, a.destroy = function () { }, a.cancel = function () { }, createjs.AbstractRequest = createjs.promote(AbstractRequest, "EventDispatcher") }(), window.createjs = window.createjs || {}, function () { "use strict"; function TagRequest(a, b, c) { this.AbstractRequest_constructor(a), this._tag = b, this._tagSrcAttribute = c, this._loadedHandler = createjs.proxy(this._handleTagComplete, this), this._addedToDOM = !1 } var a = createjs.extend(TagRequest, createjs.AbstractRequest); a.load = function () { this._tag.onload = createjs.proxy(this._handleTagComplete, this), this._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this), this._tag.onerror = createjs.proxy(this._handleError, this); var a = new createjs.Event("initialize"); a.loader = this._tag, this.dispatchEvent(a), this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout), this._tag[this._tagSrcAttribute] = this._item.src, null == this._tag.parentNode && (createjs.DomUtils.appendToBody(this._tag), this._addedToDOM = !0) }, a.destroy = function () { this._clean(), this._tag = null, this.AbstractRequest_destroy() }, a._handleReadyStateChange = function () { clearTimeout(this._loadTimeout); var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete() }, a._handleError = function () { this._clean(), this.dispatchEvent("error") }, a._handleTagComplete = function () { this._rawResult = this._tag, this._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult, this._clean(), this.dispatchEvent("complete") }, a._handleTimeout = function () { this._clean(), this.dispatchEvent(new createjs.Event("timeout")) }, a._clean = function () { this._tag.onload = null, this._tag.onreadystatechange = null, this._tag.onerror = null, this._addedToDOM && null != this._tag.parentNode && this._tag.parentNode.removeChild(this._tag), clearTimeout(this._loadTimeout) }, a._handleStalled = function () { }, createjs.TagRequest = createjs.promote(TagRequest, "AbstractRequest") }(), window.createjs = window.createjs || {}, function () { "use strict"; function MediaTagRequest(a, b, c) { this.AbstractRequest_constructor(a), this._tag = b, this._tagSrcAttribute = c, this._loadedHandler = createjs.proxy(this._handleTagComplete, this) } var a = createjs.extend(MediaTagRequest, createjs.TagRequest); a.load = function () { var a = createjs.proxy(this._handleStalled, this); this._stalledCallback = a; var b = createjs.proxy(this._handleProgress, this); this._handleProgress = b, this._tag.addEventListener("stalled", a), this._tag.addEventListener("progress", b), this._tag.addEventListener && this._tag.addEventListener("canplaythrough", this._loadedHandler, !1), this.TagRequest_load() }, a._handleReadyStateChange = function () { clearTimeout(this._loadTimeout); var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete() }, a._handleStalled = function () { }, a._handleProgress = function (a) { if (a && !(a.loaded > 0 && 0 == a.total)) { var b = new createjs.ProgressEvent(a.loaded, a.total); this.dispatchEvent(b) } }, a._clean = function () { this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler), this._tag.removeEventListener("stalled", this._stalledCallback), this._tag.removeEventListener("progress", this._progressCallback), this.TagRequest__clean() }, createjs.MediaTagRequest = createjs.promote(MediaTagRequest, "TagRequest") }(), window.createjs = window.createjs || {}, function () { "use strict"; function XHRRequest(a) { this.AbstractRequest_constructor(a), this._request = null, this._loadTimeout = null, this._xhrLevel = 1, this._response = null, this._rawResponse = null, this._canceled = !1, this._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this), this._handleProgressProxy = createjs.proxy(this._handleProgress, this), this._handleAbortProxy = createjs.proxy(this._handleAbort, this), this._handleErrorProxy = createjs.proxy(this._handleError, this), this._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this), this._handleLoadProxy = createjs.proxy(this._handleLoad, this), this._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this), !this._createXHR(a) } var a = createjs.extend(XHRRequest, createjs.AbstractRequest); XHRRequest.ACTIVEX_VERSIONS = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], a.getResult = function (a) { return a && this._rawResponse ? this._rawResponse : this._response }, a.cancel = function () { this.canceled = !0, this._clean(), this._request.abort() }, a.load = function () { if (null == this._request) return void this._handleError(); null != this._request.addEventListener ? (this._request.addEventListener("loadstart", this._handleLoadStartProxy, !1), this._request.addEventListener("progress", this._handleProgressProxy, !1), this._request.addEventListener("abort", this._handleAbortProxy, !1), this._request.addEventListener("error", this._handleErrorProxy, !1), this._request.addEventListener("timeout", this._handleTimeoutProxy, !1), this._request.addEventListener("load", this._handleLoadProxy, !1), this._request.addEventListener("readystatechange", this._handleReadyStateChangeProxy, !1)) : (this._request.onloadstart = this._handleLoadStartProxy, this._request.onprogress = this._handleProgressProxy, this._request.onabort = this._handleAbortProxy, this._request.onerror = this._handleErrorProxy, this._request.ontimeout = this._handleTimeoutProxy, this._request.onload = this._handleLoadProxy, this._request.onreadystatechange = this._handleReadyStateChangeProxy), 1 == this._xhrLevel && (this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout)); try { this._item.values ? this._request.send(createjs.URLUtils.formatQueryString(this._item.values)) : this._request.send() } catch (a) { this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND", null, a)) } }, a.setResponseType = function (a) { "blob" === a && (a = window.URL ? "blob" : "arraybuffer", this._responseType = a), this._request.responseType = a }, a.getAllResponseHeaders = function () { return this._request.getAllResponseHeaders instanceof Function ? this._request.getAllResponseHeaders() : null }, a.getResponseHeader = function (a) { return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(a) : null }, a._handleProgress = function (a) { if (a && !(a.loaded > 0 && 0 == a.total)) { var b = new createjs.ProgressEvent(a.loaded, a.total); this.dispatchEvent(b) } }, a._handleLoadStart = function () { clearTimeout(this._loadTimeout), this.dispatchEvent("loadstart") }, a._handleAbort = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED", null, a)) }, a._handleError = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent(a.message)) }, a._handleReadyStateChange = function () { 4 == this._request.readyState && this._handleLoad() }, a._handleLoad = function () { if (!this.loaded) { this.loaded = !0; var a = this._checkError(); if (a) return void this._handleError(a); if (this._response = this._getResponse(), "arraybuffer" === this._responseType) try { this._response = new Blob([this._response]) } catch (b) { if (window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, "TypeError" === b.name && window.BlobBuilder) { var c = new BlobBuilder; c.append(this._response), this._response = c.getBlob() } } this._clean(), this.dispatchEvent(new createjs.Event("complete")) } }, a._handleTimeout = function (a) { this._clean(), this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT", null, a)) }, a._checkError = function () { var a = parseInt(this._request.status); return a >= 400 && 599 >= a ? new Error(a) : 0 == a && /^https?:/.test(location.protocol) ? new Error(0) : null }, a._getResponse = function () { if (null != this._response) return this._response; if (null != this._request.response) return this._request.response; try { if (null != this._request.responseText) return this._request.responseText } catch (a) { } try { if (null != this._request.responseXML) return this._request.responseXML } catch (a) { } return null }, a._createXHR = function (a) { var b = createjs.URLUtils.isCrossDomain(a), c = {}, d = null; if (window.XMLHttpRequest) d = new XMLHttpRequest, b && void 0 === d.withCredentials && window.XDomainRequest && (d = new XDomainRequest); else { for (var e = 0, f = s.ACTIVEX_VERSIONS.length; f > e; e++) { var g = s.ACTIVEX_VERSIONS[e]; try { d = new ActiveXObject(g); break } catch (h) { } } if (null == d) return !1 } null == a.mimeType && createjs.RequestUtils.isText(a.type) && (a.mimeType = "text/plain; charset=utf-8"), a.mimeType && d.overrideMimeType && d.overrideMimeType(a.mimeType), this._xhrLevel = "string" == typeof d.responseType ? 2 : 1; var i = null; if (i = a.method == createjs.Methods.GET ? createjs.URLUtils.buildURI(a.src, a.values) : a.src, d.open(a.method || createjs.Methods.GET, i, !0), b && d instanceof XMLHttpRequest && 1 == this._xhrLevel && (c.Origin = location.origin), a.values && a.method == createjs.Methods.POST && (c["Content-Type"] = "application/x-www-form-urlencoded"), b || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest"), a.headers) for (var j in a.headers) c[j] = a.headers[j]; for (j in c) d.setRequestHeader(j, c[j]); return d instanceof XMLHttpRequest && void 0 !== a.withCredentials && (d.withCredentials = a.withCredentials), this._request = d, !0 }, a._clean = function () { clearTimeout(this._loadTimeout), null != this._request.removeEventListener ? (this._request.removeEventListener("loadstart", this._handleLoadStartProxy), this._request.removeEventListener("progress", this._handleProgressProxy), this._request.removeEventListener("abort", this._handleAbortProxy), this._request.removeEventListener("error", this._handleErrorProxy), this._request.removeEventListener("timeout", this._handleTimeoutProxy), this._request.removeEventListener("load", this._handleLoadProxy), this._request.removeEventListener("readystatechange", this._handleReadyStateChangeProxy)) : (this._request.onloadstart = null, this._request.onprogress = null, this._request.onabort = null, this._request.onerror = null, this._request.ontimeout = null, this._request.onload = null, this._request.onreadystatechange = null) }, a.toString = function () { return "[PreloadJS XHRRequest]" }, createjs.XHRRequest = createjs.promote(XHRRequest, "AbstractRequest") }(), window.createjs = window.createjs || {}, function () { "use strict"; function SoundLoader(a, b) { this.AbstractMediaLoader_constructor(a, b, createjs.Types.SOUND), createjs.DomUtils.isAudioTag(a) ? this._tag = a : createjs.DomUtils.isAudioTag(a.src) ? this._tag = a : createjs.DomUtils.isAudioTag(a.tag) && (this._tag = createjs.DomUtils.isAudioTag(a) ? a : a.src), null != this._tag && (this._preferXHR = !1) } var a = createjs.extend(SoundLoader, createjs.AbstractMediaLoader), b = SoundLoader; b.canLoadItem = function (a) { return a.type == createjs.Types.SOUND }, a._createTag = function (a) { var b = createjs.Elements.audio(); return b.autoplay = !1, b.preload = "none", b.src = a, b }, createjs.SoundLoader = createjs.promote(SoundLoader, "AbstractMediaLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; var PlayPropsConfig = function () { this.interrupt = null, this.delay = null, this.offset = null, this.loop = null, this.volume = null, this.pan = null, this.startTime = null, this.duration = null }, a = PlayPropsConfig.prototype = {}, b = PlayPropsConfig; b.create = function (a) { if ("string" == typeof a) return console && (console.warn || console.log)("Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info."), (new createjs.PlayPropsConfig).set({ interrupt: a }); if (null == a || a instanceof b || a instanceof Object) return (new createjs.PlayPropsConfig).set(a); if (null == a) throw new Error("PlayProps configuration not recognized.") }, a.set = function (a) { if (null != a) for (var b in a) this[b] = a[b]; return this }, a.toString = function () { return "[PlayPropsConfig]" }, createjs.PlayPropsConfig = b }(), window.createjs = window.createjs || {}, function () { + "use strict"; function Sound() { throw "Sound cannot be instantiated" } function a(a, b) { this.init(a, b) } var b = Sound; b.INTERRUPT_ANY = "any", b.INTERRUPT_EARLY = "early", b.INTERRUPT_LATE = "late", b.INTERRUPT_NONE = "none", b.PLAY_INITED = "playInited", b.PLAY_SUCCEEDED = "playSucceeded", b.PLAY_INTERRUPTED = "playInterrupted", b.PLAY_FINISHED = "playFinished", b.PLAY_FAILED = "playFailed", b.SUPPORTED_EXTENSIONS = ["mp3", "ogg", "opus", "mpeg", "wav", "m4a", "mp4", "aiff", "wma", "mid"], b.EXTENSION_MAP = { m4a: "mp4" }, b.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/, b.defaultInterruptBehavior = b.INTERRUPT_NONE, b.alternateExtensions = [], b.activePlugin = null, b._masterVolume = 1, b._getMasterVolume = function () { return this._masterVolume }, b.getVolume = createjs.deprecate(b._getMasterVolume, "Sound.getVolume"), b._setMasterVolume = function (a) { if (null != Number(a) && (a = Math.max(0, Math.min(1, a)), b._masterVolume = a, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(a))) for (var c = this._instances, d = 0, e = c.length; e > d; d++)c[d].setMasterVolume(a) }, b.setVolume = createjs.deprecate(b._setMasterVolume, "Sound.setVolume"), b._masterMute = !1, b._getMute = function () { return this._masterMute }, b.getMute = createjs.deprecate(b._getMute, "Sound.getMute"), b._setMute = function (a) { if (null != a && (this._masterMute = a, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(a))) for (var b = this._instances, c = 0, d = b.length; d > c; c++)b[c].setMasterMute(a) }, b.setMute = createjs.deprecate(b._setMute, "Sound.setMute"), b._getCapabilities = function () { return null == b.activePlugin ? null : b.activePlugin._capabilities }, b.getCapabilities = createjs.deprecate(b._getCapabilities, "Sound.getCapabilities"), Object.defineProperties(b, { volume: { get: b._getMasterVolume, set: b._setMasterVolume }, muted: { get: b._getMute, set: b._setMute }, capabilities: { get: b._getCapabilities } }), b._pluginsRegistered = !1, b._lastID = 0, b._instances = [], b._idHash = {}, b._preloadHash = {}, b._defaultPlayPropsHash = {}, b.addEventListener = null, b.removeEventListener = null, b.removeAllEventListeners = null, b.dispatchEvent = null, b.hasEventListener = null, b._listeners = null, createjs.EventDispatcher.initialize(b), b.getPreloadHandlers = function () { return { callback: createjs.proxy(b.initLoad, b), types: ["sound"], extensions: b.SUPPORTED_EXTENSIONS } }, b._handleLoadComplete = function (a) { var c = a.target.getItem().src; if (b._preloadHash[c]) for (var d = 0, e = b._preloadHash[c].length; e > d; d++) { var f = b._preloadHash[c][d]; if (b._preloadHash[c][d] = !0, b.hasEventListener("fileload")) { var a = new createjs.Event("fileload"); a.src = f.src, a.id = f.id, a.data = f.data, a.sprite = f.sprite, b.dispatchEvent(a) } } }, b._handleLoadError = function (a) { var c = a.target.getItem().src; if (b._preloadHash[c]) for (var d = 0, e = b._preloadHash[c].length; e > d; d++) { var f = b._preloadHash[c][d]; if (b._preloadHash[c][d] = !1, b.hasEventListener("fileerror")) { var a = new createjs.Event("fileerror"); a.src = f.src, a.id = f.id, a.data = f.data, a.sprite = f.sprite, b.dispatchEvent(a) } } }, b._registerPlugin = function (a) { return a.isSupported() ? (b.activePlugin = new a, !0) : !1 }, b.registerPlugins = function (a) { b._pluginsRegistered = !0; for (var c = 0, d = a.length; d > c; c++)if (b._registerPlugin(a[c])) return !0; return !1 }, b.initializeDefaultPlugins = function () { return null != b.activePlugin ? !0 : b._pluginsRegistered ? !1 : b.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]) ? !0 : !1 }, b.isReady = function () { return null != b.activePlugin }, b.initLoad = function (a) { return "video" == a.type ? !0 : b._registerSound(a) }, b._registerSound = function (c) { + if (!b.initializeDefaultPlugins()) return !1; var d; if (c.src instanceof Object ? (d = b._parseSrc(c.src), d.src = c.path + d.src) : d = b._parsePath(c.src), null == d) return !1; + c.src = d.src, c.type = "sound"; var e = c.data, f = null; if (null != e && (isNaN(e.channels) ? isNaN(e) || (f = parseInt(e)) : f = parseInt(e.channels), e.audioSprite)) for (var g, h = e.audioSprite.length; h--;)g = e.audioSprite[h], b._idHash[g.id] = { src: c.src, startTime: parseInt(g.startTime), duration: parseInt(g.duration) }, g.defaultPlayProps && (b._defaultPlayPropsHash[g.id] = createjs.PlayPropsConfig.create(g.defaultPlayProps)); null != c.id && (b._idHash[c.id] = { src: c.src }); var i = b.activePlugin.register(c); return a.create(c.src, f), null != e && isNaN(e) ? c.data.channels = f || a.maxPerChannel() : c.data = f || a.maxPerChannel(), i.type && (c.type = i.type), c.defaultPlayProps && (b._defaultPlayPropsHash[c.src] = createjs.PlayPropsConfig.create(c.defaultPlayProps)), i + }, b.registerSound = function (a, c, d, e, f) { var g = { src: a, id: c, data: d, defaultPlayProps: f }; a instanceof Object && a.src && (e = c, g = a), g = createjs.LoadItem.create(g), g.path = e, null == e || g.src instanceof Object || (g.src = e + g.src); var h = b._registerSound(g); if (!h) return !1; if (b._preloadHash[g.src] || (b._preloadHash[g.src] = []), b._preloadHash[g.src].push(g), 1 == b._preloadHash[g.src].length) h.on("complete", this._handleLoadComplete, this), h.on("error", this._handleLoadError, this), b.activePlugin.preload(h); else if (1 == b._preloadHash[g.src][0]) return !0; return g }, b.registerSounds = function (a, b) { var c = []; a.path && (b ? b += a.path : b = a.path, a = a.manifest); for (var d = 0, e = a.length; e > d; d++)c[d] = createjs.Sound.registerSound(a[d].src, a[d].id, a[d].data, b, a[d].defaultPlayProps); return c }, b.removeSound = function (c, d) { if (null == b.activePlugin) return !1; c instanceof Object && c.src && (c = c.src); var e; if (c instanceof Object ? e = b._parseSrc(c) : (c = b._getSrcById(c).src, e = b._parsePath(c)), null == e) return !1; c = e.src, null != d && (c = d + c); for (var f in b._idHash) b._idHash[f].src == c && delete b._idHash[f]; return a.removeSrc(c), delete b._preloadHash[c], b.activePlugin.removeSound(c), !0 }, b.removeSounds = function (a, b) { var c = []; a.path && (b ? b += a.path : b = a.path, a = a.manifest); for (var d = 0, e = a.length; e > d; d++)c[d] = createjs.Sound.removeSound(a[d].src, b); return c }, b.removeAllSounds = function () { b._idHash = {}, b._preloadHash = {}, a.removeAll(), b.activePlugin && b.activePlugin.removeAllSounds() }, b.loadComplete = function (a) { if (!b.isReady()) return !1; var c = b._parsePath(a); return a = c ? b._getSrcById(c.src).src : b._getSrcById(a).src, void 0 == b._preloadHash[a] ? !1 : 1 == b._preloadHash[a][0] }, b._parsePath = function (a) { "string" != typeof a && (a = a.toString()); var c = a.match(b.FILE_PATTERN); if (null == c) return !1; for (var d = c[4], e = c[5], f = b.capabilities, g = 0; !f[e];)if (e = b.alternateExtensions[g++], g > b.alternateExtensions.length) return null; a = a.replace("." + c[5], "." + e); var h = { name: d, src: a, extension: e }; return h }, b._parseSrc = function (a) { var c = { name: void 0, src: void 0, extension: void 0 }, d = b.capabilities; for (var e in a) if (a.hasOwnProperty(e) && d[e]) { c.src = a[e], c.extension = e; break } if (!c.src) return !1; var f = c.src.lastIndexOf("/"); return c.name = -1 != f ? c.src.slice(f + 1) : c.src, c }, b.play = function (a, c) { var d = createjs.PlayPropsConfig.create(c), e = b.createInstance(a, d.startTime, d.duration), f = b._playInstance(e, d); return f || e._playFailed(), e }, b.createInstance = function (c, d, e) { if (!b.initializeDefaultPlugins()) return new createjs.DefaultSoundInstance(c, d, e); var f = b._defaultPlayPropsHash[c]; c = b._getSrcById(c); var g = b._parsePath(c.src), h = null; return null != g && null != g.src ? (a.create(g.src), null == d && (d = c.startTime), h = b.activePlugin.create(g.src, d, e || c.duration), f = f || b._defaultPlayPropsHash[g.src], f && h.applyPlayProps(f)) : h = new createjs.DefaultSoundInstance(c, d, e), h.uniqueId = b._lastID++, h }, b.stop = function () { for (var a = this._instances, b = a.length; b--;)a[b].stop() }, b.setDefaultPlayProps = function (a, c) { a = b._getSrcById(a), b._defaultPlayPropsHash[b._parsePath(a.src).src] = createjs.PlayPropsConfig.create(c) }, b.getDefaultPlayProps = function (a) { return a = b._getSrcById(a), b._defaultPlayPropsHash[b._parsePath(a.src).src] }, b._playInstance = function (a, c) { var d = b._defaultPlayPropsHash[a.src] || {}; if (null == c.interrupt && (c.interrupt = d.interrupt || b.defaultInterruptBehavior), null == c.delay && (c.delay = d.delay || 0), null == c.offset && (c.offset = a.position), null == c.loop && (c.loop = a.loop), null == c.volume && (c.volume = a.volume), null == c.pan && (c.pan = a.pan), 0 == c.delay) { var e = b._beginPlaying(a, c); if (!e) return !1 } else { var f = setTimeout(function () { b._beginPlaying(a, c) }, c.delay); a.delayTimeoutId = f } return this._instances.push(a), !0 }, b._beginPlaying = function (b, c) { if (!a.add(b, c.interrupt)) return !1; var d = b._beginPlaying(c); if (!d) { var e = createjs.indexOf(this._instances, b); return e > -1 && this._instances.splice(e, 1), !1 } return !0 }, b._getSrcById = function (a) { return b._idHash[a] || { src: a } }, b._playFinished = function (b) { a.remove(b); var c = createjs.indexOf(this._instances, b); c > -1 && this._instances.splice(c, 1) }, createjs.Sound = Sound, a.channels = {}, a.create = function (b, c) { var d = a.get(b); return null == d ? (a.channels[b] = new a(b, c), !0) : !1 }, a.removeSrc = function (b) { var c = a.get(b); return null == c ? !1 : (c._removeAll(), delete a.channels[b], !0) }, a.removeAll = function () { for (var b in a.channels) a.channels[b]._removeAll(); a.channels = {} }, a.add = function (b, c) { var d = a.get(b.src); return null == d ? !1 : d._add(b, c) }, a.remove = function (b) { var c = a.get(b.src); return null == c ? !1 : (c._remove(b), !0) }, a.maxPerChannel = function () { return c.maxDefault }, a.get = function (b) { return a.channels[b] }; var c = a.prototype; c.constructor = a, c.src = null, c.max = null, c.maxDefault = 100, c.length = 0, c.init = function (a, b) { this.src = a, this.max = b || this.maxDefault, -1 == this.max && (this.max = this.maxDefault), this._instances = [] }, c._get = function (a) { return this._instances[a] }, c._add = function (a, b) { return this._getSlot(b, a) ? (this._instances.push(a), this.length++, !0) : !1 }, c._remove = function (a) { var b = createjs.indexOf(this._instances, a); return -1 == b ? !1 : (this._instances.splice(b, 1), this.length--, !0) }, c._removeAll = function () { for (var a = this.length - 1; a >= 0; a--)this._instances[a].stop() }, c._getSlot = function (a) { var b, c; if (a != Sound.INTERRUPT_NONE && (c = this._get(0), null == c)) return !0; for (var d = 0, e = this.max; e > d; d++) { if (b = this._get(d), null == b) return !0; if (b.playState == Sound.PLAY_FINISHED || b.playState == Sound.PLAY_INTERRUPTED || b.playState == Sound.PLAY_FAILED) { c = b; break } a != Sound.INTERRUPT_NONE && (a == Sound.INTERRUPT_EARLY && b.position < c.position || a == Sound.INTERRUPT_LATE && b.position > c.position) && (c = b) } return null != c ? (c._interrupt(), this._remove(c), !0) : !1 }, c.toString = function () { return "[Sound SoundChannel]" } +}(), window.createjs = window.createjs || {}, function () { "use strict"; var AbstractSoundInstance = function (a, b, c, d) { this.EventDispatcher_constructor(), this.src = a, this.uniqueId = -1, this.playState = null, this.delayTimeoutId = null, this._volume = 1, Object.defineProperty(this, "volume", { get: this._getVolume, set: this._setVolume }), this.getVolume = createjs.deprecate(this._getVolume, "AbstractSoundInstance.getVolume"), this.setVolume = createjs.deprecate(this._setVolume, "AbstractSoundInstance.setVolume"), this._pan = 0, Object.defineProperty(this, "pan", { get: this._getPan, set: this._setPan }), this.getPan = createjs.deprecate(this._getPan, "AbstractSoundInstance.getPan"), this.setPan = createjs.deprecate(this._setPan, "AbstractSoundInstance.setPan"), this._startTime = Math.max(0, b || 0), Object.defineProperty(this, "startTime", { get: this._getStartTime, set: this._setStartTime }), this.getStartTime = createjs.deprecate(this._getStartTime, "AbstractSoundInstance.getStartTime"), this.setStartTime = createjs.deprecate(this._setStartTime, "AbstractSoundInstance.setStartTime"), this._duration = Math.max(0, c || 0), Object.defineProperty(this, "duration", { get: this._getDuration, set: this._setDuration }), this.getDuration = createjs.deprecate(this._getDuration, "AbstractSoundInstance.getDuration"), this.setDuration = createjs.deprecate(this._setDuration, "AbstractSoundInstance.setDuration"), this._playbackResource = null, Object.defineProperty(this, "playbackResource", { get: this._getPlaybackResource, set: this._setPlaybackResource }), d !== !1 && d !== !0 && this._setPlaybackResource(d), this.getPlaybackResource = createjs.deprecate(this._getPlaybackResource, "AbstractSoundInstance.getPlaybackResource"), this.setPlaybackResource = createjs.deprecate(this._setPlaybackResource, "AbstractSoundInstance.setPlaybackResource"), this._position = 0, Object.defineProperty(this, "position", { get: this._getPosition, set: this._setPosition }), this.getPosition = createjs.deprecate(this._getPosition, "AbstractSoundInstance.getPosition"), this.setPosition = createjs.deprecate(this._setPosition, "AbstractSoundInstance.setPosition"), this._loop = 0, Object.defineProperty(this, "loop", { get: this._getLoop, set: this._setLoop }), this.getLoop = createjs.deprecate(this._getLoop, "AbstractSoundInstance.getLoop"), this.setLoop = createjs.deprecate(this._setLoop, "AbstractSoundInstance.setLoop"), this._muted = !1, Object.defineProperty(this, "muted", { get: this._getMuted, set: this._setMuted }), this.getMuted = createjs.deprecate(this._getMuted, "AbstractSoundInstance.getMuted"), this.setMuted = createjs.deprecate(this._setMuted, "AbstractSoundInstance.setMuted"), this._paused = !1, Object.defineProperty(this, "paused", { get: this._getPaused, set: this._setPaused }), this.getPaused = createjs.deprecate(this._getPaused, "AbstractSoundInstance.getPaused"), this.setPaused = createjs.deprecate(this._setPaused, "AbstractSoundInstance.setPaused") }, a = createjs.extend(AbstractSoundInstance, createjs.EventDispatcher); a.play = function (a) { var b = createjs.PlayPropsConfig.create(a); return this.playState == createjs.Sound.PLAY_SUCCEEDED ? (this.applyPlayProps(b), void (this._paused && this._setPaused(!1))) : (this._cleanUp(), createjs.Sound._playInstance(this, b), this) }, a.stop = function () { return this._position = 0, this._paused = !1, this._handleStop(), this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, this }, a.destroy = function () { this._cleanUp(), this.src = null, this.playbackResource = null, this.removeAllEventListeners() }, a.applyPlayProps = function (a) { return null != a.offset && this._setPosition(a.offset), null != a.loop && this._setLoop(a.loop), null != a.volume && this._setVolume(a.volume), null != a.pan && this._setPan(a.pan), null != a.startTime && (this._setStartTime(a.startTime), this._setDuration(a.duration)), this }, a.toString = function () { return "[AbstractSoundInstance]" }, a._getPaused = function () { return this._paused }, a._setPaused = function (a) { return a !== !0 && a !== !1 || this._paused == a || 1 == a && this.playState != createjs.Sound.PLAY_SUCCEEDED ? void 0 : (this._paused = a, a ? this._pause() : this._resume(), clearTimeout(this.delayTimeoutId), this) }, a._setVolume = function (a) { return a == this._volume ? this : (this._volume = Math.max(0, Math.min(1, a)), this._muted || this._updateVolume(), this) }, a._getVolume = function () { return this._volume }, a._setMuted = function (a) { return a === !0 || a === !1 ? (this._muted = a, this._updateVolume(), this) : void 0 }, a._getMuted = function () { return this._muted }, a._setPan = function (a) { return a == this._pan ? this : (this._pan = Math.max(-1, Math.min(1, a)), this._updatePan(), this) }, a._getPan = function () { return this._pan }, a._getPosition = function () { return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || (this._position = this._calculateCurrentPosition()), this._position }, a._setPosition = function (a) { return this._position = Math.max(0, a), this.playState == createjs.Sound.PLAY_SUCCEEDED && this._updatePosition(), this }, a._getStartTime = function () { return this._startTime }, a._setStartTime = function (a) { return a == this._startTime ? this : (this._startTime = Math.max(0, a || 0), this._updateStartTime(), this) }, a._getDuration = function () { return this._duration }, a._setDuration = function (a) { return a == this._duration ? this : (this._duration = Math.max(0, a || 0), this._updateDuration(), this) }, a._setPlaybackResource = function (a) { return this._playbackResource = a, 0 == this._duration && this._playbackResource && this._setDurationFromSource(), this }, a._getPlaybackResource = function () { return this._playbackResource }, a._getLoop = function () { return this._loop }, a._setLoop = function (a) { null != this._playbackResource && (0 != this._loop && 0 == a ? this._removeLooping(a) : 0 == this._loop && 0 != a && this._addLooping(a)), this._loop = a }, a._sendEvent = function (a) { var b = new createjs.Event(a); this.dispatchEvent(b) }, a._cleanUp = function () { clearTimeout(this.delayTimeoutId), this._handleCleanUp(), this._paused = !1, createjs.Sound._playFinished(this) }, a._interrupt = function () { this._cleanUp(), this.playState = createjs.Sound.PLAY_INTERRUPTED, this._sendEvent("interrupted") }, a._beginPlaying = function (a) { return this._setPosition(a.offset), this._setLoop(a.loop), this._setVolume(a.volume), this._setPan(a.pan), null != a.startTime && (this._setStartTime(a.startTime), this._setDuration(a.duration)), null != this._playbackResource && this._position < this._duration ? (this._paused = !1, this._handleSoundReady(), this.playState = createjs.Sound.PLAY_SUCCEEDED, this._sendEvent("succeeded"), !0) : (this._playFailed(), !1) }, a._playFailed = function () { this._cleanUp(), this.playState = createjs.Sound.PLAY_FAILED, this._sendEvent("failed") }, a._handleSoundComplete = function () { return this._position = 0, 0 != this._loop ? (this._loop--, this._handleLoop(), void this._sendEvent("loop")) : (this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, void this._sendEvent("complete")) }, a._handleSoundReady = function () { }, a._updateVolume = function () { }, a._updatePan = function () { }, a._updateStartTime = function () { }, a._updateDuration = function () { }, a._setDurationFromSource = function () { }, a._calculateCurrentPosition = function () { }, a._updatePosition = function () { }, a._removeLooping = function () { }, a._addLooping = function () { }, a._pause = function () { }, a._resume = function () { }, a._handleStop = function () { }, a._handleCleanUp = function () { }, a._handleLoop = function () { }, createjs.AbstractSoundInstance = createjs.promote(AbstractSoundInstance, "EventDispatcher"), createjs.DefaultSoundInstance = createjs.AbstractSoundInstance }(), window.createjs = window.createjs || {}, function () { "use strict"; var AbstractPlugin = function () { this._capabilities = null, this._loaders = {}, this._audioSources = {}, this._soundInstances = {}, this._volume = 1, this._loaderClass, this._soundInstanceClass }, a = AbstractPlugin.prototype; AbstractPlugin._capabilities = null, AbstractPlugin.isSupported = function () { return !0 }, a.register = function (a) { var b = this._loaders[a.src]; return b && !b.canceled ? this._loaders[a.src] : (this._audioSources[a.src] = !0, this._soundInstances[a.src] = [], b = new this._loaderClass(a), b.on("complete", this._handlePreloadComplete, this), this._loaders[a.src] = b, b) }, a.preload = function (a) { a.on("error", this._handlePreloadError, this), a.load() }, a.isPreloadStarted = function (a) { return null != this._audioSources[a] }, a.isPreloadComplete = function (a) { return !(null == this._audioSources[a] || 1 == this._audioSources[a]) }, a.removeSound = function (a) { if (this._soundInstances[a]) { for (var b = this._soundInstances[a].length; b--;) { var c = this._soundInstances[a][b]; c.destroy() } delete this._soundInstances[a], delete this._audioSources[a], this._loaders[a] && this._loaders[a].destroy(), delete this._loaders[a] } }, a.removeAllSounds = function () { for (var a in this._audioSources) this.removeSound(a) }, a.create = function (a, b, c) { this.isPreloadStarted(a) || this.preload(this.register(a)); var d = new this._soundInstanceClass(a, b, c, this._audioSources[a]); return this._soundInstances[a] && this._soundInstances[a].push(d), d.setMasterVolume && d.setMasterVolume(createjs.Sound.volume), d.setMasterMute && d.setMasterMute(createjs.Sound.muted), d }, a.setVolume = function (a) { return this._volume = a, this._updateVolume(), !0 }, a.getVolume = function () { return this._volume }, a.setMute = function () { return this._updateVolume(), !0 }, a.toString = function () { return "[AbstractPlugin]" }, a._handlePreloadComplete = function (a) { var b = a.target.getItem().src; this._audioSources[b] = a.result; for (var c = 0, d = this._soundInstances[b].length; d > c; c++) { var e = this._soundInstances[b][c]; e.playbackResource = this._audioSources[b], this._soundInstances[b] = null } }, a._handlePreloadError = function () { }, a._updateVolume = function () { }, createjs.AbstractPlugin = AbstractPlugin }(), window.createjs = window.createjs || {}, function () { "use strict"; function a(a) { this.AbstractLoader_constructor(a, !0, createjs.Types.SOUND) } var b = createjs.extend(a, createjs.AbstractLoader); a.context = null, b.toString = function () { return "[WebAudioLoader]" }, b._createRequest = function () { this._request = new createjs.XHRRequest(this._item, !1), this._request.setResponseType("arraybuffer") }, b._sendComplete = function () { a.context.decodeAudioData(this._rawResult, createjs.proxy(this._handleAudioDecoded, this), createjs.proxy(this._sendError, this)) }, b._handleAudioDecoded = function (a) { this._result = a, this.AbstractLoader__sendComplete() }, createjs.WebAudioLoader = createjs.promote(a, "AbstractLoader") }(), window.createjs = window.createjs || {}, function () { "use strict"; function WebAudioSoundInstance(a, c, d, e) { this.AbstractSoundInstance_constructor(a, c, d, e), this.gainNode = b.context.createGain(), this.panNode = b.context.createPanner(), this.panNode.panningModel = b._panningModel, this.panNode.connect(this.gainNode), this._updatePan(), this.sourceNode = null, this._soundCompleteTimeout = null, this._sourceNodeNext = null, this._playbackStartTime = 0, this._endedHandler = createjs.proxy(this._handleSoundComplete, this) } var a = createjs.extend(WebAudioSoundInstance, createjs.AbstractSoundInstance), b = WebAudioSoundInstance; b.context = null, b._scratchBuffer = null, b.destinationNode = null, b._panningModel = "equalpower", a.destroy = function () { this.AbstractSoundInstance_destroy(), this.panNode.disconnect(0), this.panNode = null, this.gainNode.disconnect(0), this.gainNode = null }, a.toString = function () { return "[WebAudioSoundInstance]" }, a._updatePan = function () { this.panNode.setPosition(this._pan, 0, -.5) }, a._removeLooping = function () { this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext) }, a._addLooping = function () { this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0)) }, a._setDurationFromSource = function () { this._duration = 1e3 * this.playbackResource.duration }, a._handleCleanUp = function () { this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)), 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0), clearTimeout(this._soundCompleteTimeout), this._playbackStartTime = 0 }, a._cleanUpAudioNode = function (a) { if (a) { if (a.stop(0), a.disconnect(0), createjs.BrowserDetect.isIOS) try { a.buffer = b._scratchBuffer } catch (c) { } a = null } return a }, a._handleSoundReady = function () { this.gainNode.connect(b.destinationNode); var a = .001 * this._duration, c = Math.min(.001 * Math.max(0, this._position), a); this.sourceNode = this._createAndPlayAudioNode(b.context.currentTime - a, c), this._playbackStartTime = this.sourceNode.startTime - c, this._soundCompleteTimeout = setTimeout(this._endedHandler, 1e3 * (a - c)), 0 != this._loop && (this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0)) }, a._createAndPlayAudioNode = function (a, c) { var d = b.context.createBufferSource(); d.buffer = this.playbackResource, d.connect(this.panNode); var e = .001 * this._duration; return d.startTime = a + e, d.start(d.startTime, c + .001 * this._startTime, e - c), d }, a._pause = function () { this._position = 1e3 * (b.context.currentTime - this._playbackStartTime), this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext), 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0), clearTimeout(this._soundCompleteTimeout) }, a._resume = function () { this._handleSoundReady() }, a._updateVolume = function () { var a = this._muted ? 0 : this._volume; a != this.gainNode.gain.value && (this.gainNode.gain.value = a) }, a._calculateCurrentPosition = function () { return 1e3 * (b.context.currentTime - this._playbackStartTime) }, a._updatePosition = function () { this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext), clearTimeout(this._soundCompleteTimeout), this._paused || this._handleSoundReady() }, a._handleLoop = function () { this._cleanUpAudioNode(this.sourceNode), this.sourceNode = this._sourceNodeNext, this._playbackStartTime = this.sourceNode.startTime, this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0), this._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration) }, a._updateDuration = function () { this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._pause(), this._resume()) }, createjs.WebAudioSoundInstance = createjs.promote(WebAudioSoundInstance, "AbstractSoundInstance") }(), window.createjs = window.createjs || {}, function () { "use strict"; function WebAudioPlugin() { this.AbstractPlugin_constructor(), this._panningModel = b._panningModel, this.context = b.context, this.dynamicsCompressorNode = this.context.createDynamicsCompressor(), this.dynamicsCompressorNode.connect(this.context.destination), this.gainNode = this.context.createGain(), this.gainNode.connect(this.dynamicsCompressorNode), createjs.WebAudioSoundInstance.destinationNode = this.gainNode, this._capabilities = b._capabilities, this._loaderClass = createjs.WebAudioLoader, this._soundInstanceClass = createjs.WebAudioSoundInstance, this._addPropsToClasses() } var a = createjs.extend(WebAudioPlugin, createjs.AbstractPlugin), b = WebAudioPlugin; b._capabilities = null, b._panningModel = "equalpower", b.context = null, b._scratchBuffer = null, b._unlocked = !1, b.DEFAULT_SAMPLE_RATE = 44100, b.isSupported = function () { var a = createjs.BrowserDetect.isIOS || createjs.BrowserDetect.isAndroid || createjs.BrowserDetect.isBlackberry; return "file:" != location.protocol || a || this._isFileXHRSupported() ? (b._generateCapabilities(), null == b.context ? !1 : !0) : !1 }, b.playEmptySound = function () { if (null != b.context) { var a = b.context.createBufferSource(); a.buffer = b._scratchBuffer, a.connect(b.context.destination), a.start(0, 0, 0) } }, b._isFileXHRSupported = function () { var a = !0, b = new XMLHttpRequest; try { b.open("GET", "WebAudioPluginTest.fail", !1) } catch (c) { return a = !1 } b.onerror = function () { a = !1 }, b.onload = function () { a = 404 == this.status || 200 == this.status || 0 == this.status && "" != this.response }; try { b.send() } catch (c) { a = !1 } return a }, b._generateCapabilities = function () { if (null == b._capabilities) { var a = document.createElement("audio"); if (null == a.canPlayType) return null; if (null == b.context && (b.context = b._createAudioContext(), null == b.context)) return null; null == b._scratchBuffer && (b._scratchBuffer = b.context.createBuffer(1, 1, 22050)), b._compatibilitySetUp(), "ontouchstart" in window && "running" != b.context.state && (b._unlock(), document.addEventListener("mousedown", b._unlock, !0), document.addEventListener("touchstart", b._unlock, !0), document.addEventListener("touchend", b._unlock, !0)), b._capabilities = { panning: !0, volume: !0, tracks: -1 }; for (var c = createjs.Sound.SUPPORTED_EXTENSIONS, d = createjs.Sound.EXTENSION_MAP, e = 0, f = c.length; f > e; e++) { var g = c[e], h = d[g] || g; b._capabilities[g] = "no" != a.canPlayType("audio/" + g) && "" != a.canPlayType("audio/" + g) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h) } b.context.destination.numberOfChannels < 2 && (b._capabilities.panning = !1) } }, b._createAudioContext = function () { var a = window.AudioContext || window.webkitAudioContext; if (null == a) return null; var c = new a; if (/(iPhone|iPad)/i.test(navigator.userAgent) && c.sampleRate !== b.DEFAULT_SAMPLE_RATE) { var d = c.createBuffer(1, 1, b.DEFAULT_SAMPLE_RATE), e = c.createBufferSource(); e.buffer = d, e.connect(c.destination), e.start(0), e.disconnect(), c.close(), c = new a } return c }, b._compatibilitySetUp = function () { if (b._panningModel = "equalpower", !b.context.createGain) { b.context.createGain = b.context.createGainNode; var a = b.context.createBufferSource(); a.__proto__.start = a.__proto__.noteGrainOn, a.__proto__.stop = a.__proto__.noteOff, b._panningModel = 0 } }, b._unlock = function () { b._unlocked || (b.playEmptySound(), "running" == b.context.state && (document.removeEventListener("mousedown", b._unlock, !0), document.removeEventListener("touchend", b._unlock, !0), document.removeEventListener("touchstart", b._unlock, !0), b._unlocked = !0)) }, a.toString = function () { return "[WebAudioPlugin]" }, a._addPropsToClasses = function () { var a = this._soundInstanceClass; a.context = this.context, a._scratchBuffer = b._scratchBuffer, a.destinationNode = this.gainNode, a._panningModel = this._panningModel, this._loaderClass.context = this.context }, a._updateVolume = function () { var a = createjs.Sound._masterMute ? 0 : this._volume; a != this.gainNode.gain.value && (this.gainNode.gain.value = a) }, createjs.WebAudioPlugin = createjs.promote(WebAudioPlugin, "AbstractPlugin") }(), window.createjs = window.createjs || {}, function () { "use strict"; function HTMLAudioTagPool() { throw "HTMLAudioTagPool cannot be instantiated" } function a() { this._tags = [] } var b = HTMLAudioTagPool; b._tags = {}, b._tagPool = new a, b._tagUsed = {}, b.get = function (a) { var c = b._tags[a]; return null == c ? (c = b._tags[a] = b._tagPool.get(), c.src = a) : b._tagUsed[a] ? (c = b._tagPool.get(), c.src = a) : b._tagUsed[a] = !0, c }, b.set = function (a, c) { c == b._tags[a] ? b._tagUsed[a] = !1 : b._tagPool.set(c) }, b.remove = function (a) { var c = b._tags[a]; return null == c ? !1 : (b._tagPool.set(c), delete b._tags[a], delete b._tagUsed[a], !0) }, b.getDuration = function (a) { var c = b._tags[a]; return null != c && c.duration ? 1e3 * c.duration : 0 }, createjs.HTMLAudioTagPool = HTMLAudioTagPool; var c = a.prototype; c.constructor = a, c.get = function () { var a; return a = 0 == this._tags.length ? this._createTag() : this._tags.pop(), null == a.parentNode && document.body.appendChild(a), a }, c.set = function (a) { var b = createjs.indexOf(this._tags, a); -1 == b && (this._tags.src = null, this._tags.push(a)) }, c.toString = function () { return "[TagPool]" }, c._createTag = function () { var a = document.createElement("audio"); return a.autoplay = !1, a.preload = "none", a } }(), window.createjs = window.createjs || {}, function () { "use strict"; function HTMLAudioSoundInstance(a, b, c, d) { this.AbstractSoundInstance_constructor(a, b, c, d), this._audioSpriteStopTime = null, this._delayTimeoutId = null, this._endedHandler = createjs.proxy(this._handleSoundComplete, this), this._readyHandler = createjs.proxy(this._handleTagReady, this), this._stalledHandler = createjs.proxy(this._playFailed, this), this._audioSpriteEndHandler = createjs.proxy(this._handleAudioSpriteLoop, this), this._loopHandler = createjs.proxy(this._handleSoundComplete, this), c ? this._audioSpriteStopTime = .001 * (b + c) : this._duration = createjs.HTMLAudioTagPool.getDuration(this.src) } var a = createjs.extend(HTMLAudioSoundInstance, createjs.AbstractSoundInstance); a.setMasterVolume = function () { this._updateVolume() }, a.setMasterMute = function () { this._updateVolume() }, a.toString = function () { return "[HTMLAudioSoundInstance]" }, a._removeLooping = function () { null != this._playbackResource && (this._playbackResource.loop = !1, this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1)) }, a._addLooping = function () { null == this._playbackResource || this._audioSpriteStopTime || (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), this._playbackResource.loop = !0) }, a._handleCleanUp = function () { var a = this._playbackResource; if (null != a) { a.pause(), a.loop = !1, a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1), a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1), a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), a.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1); try { a.currentTime = this._startTime } catch (b) { } createjs.HTMLAudioTagPool.set(this.src, a), this._playbackResource = null } }, a._beginPlaying = function (a) { return this._playbackResource = createjs.HTMLAudioTagPool.get(this.src), this.AbstractSoundInstance__beginPlaying(a) }, a._handleSoundReady = function () { if (4 !== this._playbackResource.readyState) { var a = this._playbackResource; return a.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1), a.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1), a.preload = "auto", void a.load() } this._updateVolume(), this._playbackResource.currentTime = .001 * (this._startTime + this._position), this._audioSpriteStopTime ? this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1) : (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), 0 != this._loop && (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), this._playbackResource.loop = !0)), this._playbackResource.play() }, a._handleTagReady = function () { this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1), this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1), this._handleSoundReady() }, a._pause = function () { this._playbackResource.pause() }, a._resume = function () { this._playbackResource.play() }, a._updateVolume = function () { if (null != this._playbackResource) { var a = this._muted || createjs.Sound._masterMute ? 0 : this._volume * createjs.Sound._masterVolume; a != this._playbackResource.volume && (this._playbackResource.volume = a) } }, a._calculateCurrentPosition = function () { return 1e3 * this._playbackResource.currentTime - this._startTime }, a._updatePosition = function () { this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, !1); try { this._playbackResource.currentTime = .001 * (this._position + this._startTime) } catch (a) { this._handleSetPositionSeek(null) } }, a._handleSetPositionSeek = function () { null != this._playbackResource && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1)) }, a._handleAudioSpriteLoop = function () { this._playbackResource.currentTime <= this._audioSpriteStopTime || (this._playbackResource.pause(), 0 == this._loop ? this._handleSoundComplete(null) : (this._position = 0, this._loop--, this._playbackResource.currentTime = .001 * this._startTime, this._paused || this._playbackResource.play(), this._sendEvent("loop"))) }, a._handleLoop = function () { 0 == this._loop && (this._playbackResource.loop = !1, this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1)) }, a._updateStartTime = function () { this._audioSpriteStopTime = .001 * (this._startTime + this._duration), this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1)) }, a._updateDuration = function () { this._audioSpriteStopTime = .001 * (this._startTime + this._duration), this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1)) }, a._setDurationFromSource = function () { this._duration = createjs.HTMLAudioTagPool.getDuration(this.src), this._playbackResource = null }, createjs.HTMLAudioSoundInstance = createjs.promote(HTMLAudioSoundInstance, "AbstractSoundInstance") }(), window.createjs = window.createjs || {}, function () { + "use strict"; function HTMLAudioPlugin() { this.AbstractPlugin_constructor(), this._capabilities = b._capabilities, this._loaderClass = createjs.SoundLoader, this._soundInstanceClass = createjs.HTMLAudioSoundInstance } var a = createjs.extend(HTMLAudioPlugin, createjs.AbstractPlugin), b = HTMLAudioPlugin; b.MAX_INSTANCES = 30, b._AUDIO_READY = "canplaythrough", b._AUDIO_ENDED = "ended", b._AUDIO_SEEKED = "seeked", b._AUDIO_STALLED = "stalled", b._TIME_UPDATE = "timeupdate", b._capabilities = null, b.isSupported = function () { return b._generateCapabilities(), null != b._capabilities }, b._generateCapabilities = function () { if (null == b._capabilities) { var a = document.createElement("audio"); if (null == a.canPlayType) return null; b._capabilities = { panning: !1, volume: !0, tracks: -1 }; for (var c = createjs.Sound.SUPPORTED_EXTENSIONS, d = createjs.Sound.EXTENSION_MAP, e = 0, f = c.length; f > e; e++) { var g = c[e], h = d[g] || g; b._capabilities[g] = "no" != a.canPlayType("audio/" + g) && "" != a.canPlayType("audio/" + g) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h) } } }, a.register = function (a) { var b = createjs.HTMLAudioTagPool.get(a.src), c = this.AbstractPlugin_register(a); return c.setTag(b), c }, a.removeSound = function (a) { this.AbstractPlugin_removeSound(a), createjs.HTMLAudioTagPool.remove(a) }, a.create = function (a, b, c) { var d = this.AbstractPlugin_create(a, b, c); return d.playbackResource = null, d }, a.toString = function () { return "[HTMLAudioPlugin]" }, a.setVolume = a.getVolume = a.setMute = null, createjs.HTMLAudioPlugin = createjs.promote(HTMLAudioPlugin, "AbstractPlugin") +}(); + +module.exports = window.createjs; \ No newline at end of file diff --git a/src/utils/plugins/stats-2d.js b/src/utils/plugins/stats-2d.js new file mode 100644 index 0000000..e525f33 --- /dev/null +++ b/src/utils/plugins/stats-2d.js @@ -0,0 +1,54 @@ +var FPS = FPS || {}; +FPS.time = 0; +FPS.FPS = 0; +FPS.showText = ""; +FPS.startFPS = function (stage,pos = {x : 0, y : 0}, app){ + FPS.app = app; + FPS.pos = pos; + FPS.shape = new createjs.Shape(); + FPS.shape.graphics.beginFill("#2dffda").drawRect(pos.x, pos.y, 140, 50); + FPS.shape.alpha = .5; + FPS.txt = new createjs.Text("COUNT:", "24px Arial", "#ffffff"); + FPS.txt.x = 20; + FPS.txt.y = pos.y+10; + FPS.container = new createjs.Container(); + if (FPS.app.debug) { + stage.addChild(FPS.container); + } + FPS.container.addChild(FPS.shape) + FPS.container.addChild(FPS.txt); + FPS.container.cache(pos.x, pos.y, 140,50); + createjs.Ticker.addEventListener("tick", FPS.TickerFPS); + +// setInterval(FPS.TickerFPS,18) +} +FPS.TickerFPS = function (event) +{ + FPS.date = new Date(); + FPS.currentTime = FPS.date.getTime(); + if(FPS.time!=0) + { + FPS.FPS = Math.ceil(1000/(FPS.currentTime - FPS.time)); + } + FPS.time = FPS.currentTime; + FPS.txt.text = "FPS: "+FPS.FPS + "\n" + FPS.showText; + FPS.container.cache(FPS.pos.x, FPS.pos.y, 140,50); +} +FPS.startFPS2 = function (stage) +{ + FPS.txt = document.getElementById("fps"); + createjs.Ticker.addEventListener("tick", FPS.TickerFPS2); +} +FPS.TickerFPS2 = function (event) +{ + FPS.date = new Date(); + FPS.currentTime = FPS.date.getTime(); + if(FPS.time!=0) + { + FPS.FPS = Math.ceil(1000/(FPS.currentTime - FPS.time)); + } + FPS.time = FPS.currentTime; + FPS.txt.innerText = "FPS: "+FPS.FPS; +} + +module.exports = FPS; \ No newline at end of file diff --git a/src/utils/plugins/stats-3d.min.js b/src/utils/plugins/stats-3d.min.js new file mode 100644 index 0000000..ef000cf --- /dev/null +++ b/src/utils/plugins/stats-3d.min.js @@ -0,0 +1,5 @@ +// stats.js - http://github.com/mrdoob/stats.js +var Stats=function(){function h(a){c.appendChild(a.dom);return a}function k(a){for(var d=0;d e+1E3&&(r.update(1E3*a/(c-e),100),e=c,a=0,t)){var d=performance.memory;t.update(d.usedJSHeapSize/1048576,d.jsHeapSizeLimit/1048576)}return c},update:function(){g=this.end()},domElement:c,setMode:k}}; +Stats.Panel=function(h,k,l){var c=Infinity,g=0,e=Math.round,a=e(window.devicePixelRatio||1),r=80*a,f=48*a,t=3*a,u=2*a,d=3*a,m=15*a,n=74*a,p=30*a,q=document.createElement("canvas");q.width=r;q.height=f;q.style.cssText="width:80px;height:48px";var b=q.getContext("2d");b.font="bold "+9*a+"px Helvetica,Arial,sans-serif";b.textBaseline="top";b.fillStyle=l;b.fillRect(0,0,r,f);b.fillStyle=k;b.fillText(h,t,u);b.fillRect(d,m,n,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d,m,n,p);return{dom:q,update:function(f, +v){c=Math.min(c,f);g=Math.max(g,f);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=k;b.fillText(e(f)+" "+h+" ("+e(c)+"-"+e(g)+")",t,u);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,e((1-f/v)*p))}}};"object"===typeof module&&(module.exports=Stats);