{"version":3,"sources":["webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipItem.vue?ad89","webpack:///src/modals/games/coinflip/coinflip-game/components/CoinflipItem.vue","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipItem.vue?7d0f","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipItem.vue","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipPlayer.vue?a5f7","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipPlayer.vue?9a3f","webpack:///src/modals/games/coinflip/coinflip-game/components/CoinflipPlayer.vue","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipPlayer.vue?7a19","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipPlayer.vue","webpack:///./src/modals/games/coinflip/coinflip-game/components/CoinflipItem.vue?3865","webpack:///./src/modals/games/coinflip/coinflip-game/coinflip-game.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","style","item","color","attrs","_v","_s","name","amount","_e","_f","price","staticRenderFns","props","type","Object","required","component","VImg","class","flipped","backgroundColor","colors","bg","coin","image","user","text","directives","rawName","value","expression","default","Boolean","computed","theme","grey300","grey100","colorBg","colorText","sounds","toss","registerSound","volume","sheen","glow","impact","win","defaultSoundTriggers","lastProgress","components","CoinflipPlayer","CoinflipItem","CoinflipCoin","close","Function","payload","data","loading","join","bandit","showTaxInfo","animation","countdownValue","soundTriggers","rolling","canCallBandit","mapGetters","conga","itemdb","settings","muted","games","coinflip","game","rolledAt","CoinflipGame","find","id","gameConfig","items","sortBy","map","reverse","pot","heads","filter","i","side","SIDE_HEADS","tails","SIDE_TAILS","GAME_STATUS","joinable","isCreator","steamid","creatorId","shouldShowStatus","status","locked","_canCallBandit","config","open","botJoinDisabled","callBanditAvailableAt","Date","now","createdAt","getTime","canCallAfter","time","botJoinAvailableAfter","locksIn","Math","max","ceil","lockingAt","progressValue","countdown","created","beforeDestroy","pause","animatables","forEach","target","anime","remove","watch","oldStatus","$nextTick","roll","immediate","methods","mapActions","modal","$modal","hasReturnValue","maxWidth","noShadow","maxItemSelect","maxItems","minValue","range","maxValue","hideUnderMax","dollarValue","autoselect","modalItems","promise","ids","error","$toast","message","persistent","onTick","val","firstTime","winningSide","winner","console","log","outcome","$coin","$refs","$el","$coinCtn","parentElement","rand","seededRandom","flipCount","floor","MIN_FLIPS","MAX_FLIPS","flips","winSide","rotation","randXFlip","timeline","autoplay","elasticity","easing","update","onUpdate","add","targets","scale","delay","duration","rotateZ","rotateX","begin","anim","setTimeout","classList","opacity","backgroundPosition","translateX","translateY","play","onRollFinished","$socket","request","onBanditCountdownFinished","progress","onProgress","length","includes","getRandomIntInRange","success","title","sound"],"mappings":"uRAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,MAAM,CAACE,YAAY,6CAA6C,CAACF,EAAG,MAAM,CAACE,YAAY,+CAA+CC,MAAM,CAAE,UAAWP,EAAIQ,KAAKC,QAAS,CAACL,EAAG,QAAQ,CAACM,MAAM,CAAC,IAAO,8DAAiEV,EAAIQ,KAAU,MAAI,WAAY,eAAe,IAAI,MAAQ,SAAS,GAAGJ,EAAG,IAAI,CAACE,YAAY,+BAA+B,CAACN,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIQ,KAAKK,MAAM,KAAMb,EAAIQ,KAAKM,OAAS,EAAGV,EAAG,OAAO,CAACJ,EAAIW,GAAG,MAAMX,EAAIY,GAAGZ,EAAIQ,KAAKM,QAAQ,QAAQd,EAAIe,SAASX,EAAG,OAAO,CAACE,YAAY,sCAAsC,CAACN,EAAIW,GAAG,KAAKX,EAAIY,GAAGZ,EAAIgB,GAAG,UAAPhB,CAAkBA,EAAIQ,KAAKS,OAASjB,EAAIQ,KAAKM,QAAU,KAAK,UACtyBI,EAAkB,GCuBtB,GACEC,MAAO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AAcsB,OAAOC,GAAW,YAANA,IAGhC,KAAboH,GAAmB3I,EAAc8I,SAAS,aAC5CtK,EAAOM,OAAOiK,eAAoB,EAAG,IAAIT,OACzC3M,KAAKqE,cAAgBA,EAAcsB,OAAOC,GAAW,YAANA,IAGhC,KAAboH,GAAmB3I,EAAc8I,SAAS,aAC5CtK,EAAOM,OAAOiK,eAAoB,EAAG,IAAIT,OACzC3M,KAAKqE,cAAgBA,EAAcsB,OAAOC,GAAW,YAANA,IAGhC,KAAboH,GAAmB3I,EAAc8I,SAAS,UAC5CtK,EAAOK,KAAKyJ,OACZ3M,KAAKqE,cAAgBA,EAAcsB,OAAOC,GAAW,SAANA,MAGnDgH,eAAe3C,GAAW,SACpB,UAAAjK,KAAK+B,YAAL,eAAWqE,YAAX,UAAuBpG,KAAK+E,KAAKoF,cAAjC,aAAuB,EAAkB/D,UACvC6D,IACFjK,KAAK4J,OAAOyD,QAAQ,mCAAoC,CACtDC,MAAO,eACPC,MAAO1K,EAAOO,MAGhBpD,KAAK2D,QACL3D,KAAK4I,OAAOjC,KAAK,eAAgB,CAAEmC,SAAU,KAAO,CAAE/D,KAAM/E,KAAK+E","file":"js/games-coinflip-coinflip-game-coinflip-game.modal.834884b9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"coinflip-item d-flex px-2 py-1\"},[_c('div',{staticClass:\"item-info flex-grow-1 d-flex align-center\"},[_c('div',{staticClass:\"bg-ui-panel item-image pa-2 flex-grow-0 mr-3\",style:({'--color': _vm.item.color})},[_c('v-img',{attrs:{\"src\":(\"https://community.cloudflare.steamstatic.com/economy/image/\" + (_vm.item.image) + \"/164x164\"),\"aspect-ratio\":\"1\",\"width\":\"40\"}})],1),_c('p',{staticClass:\"text--secondary mb-0 lh-1-3\"},[_vm._v(\" \"+_vm._s(_vm.item.name)+\" \"),(_vm.item.amount > 1)?_c('span',[_vm._v(\" (x\"+_vm._s(_vm.item.amount)+\") \")]):_vm._e()])]),_c('span',{staticClass:\"text-body-2 mr-2 align-self-center\"},[_vm._v(\" $\"+_vm._s(_vm._f(\"toScrap\")(_vm.item.price * (_vm.item.amount || 1)))+\" \")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipItem.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CoinflipItem.vue?vue&type=template&id=35992268&scoped=true&\"\nimport script from \"./CoinflipItem.vue?vue&type=script&lang=js&\"\nexport * from \"./CoinflipItem.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CoinflipItem.vue?vue&type=style&index=0&id=35992268&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"35992268\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VImg } from 'vuetify/lib/components/VImg';\ninstallComponents(component, {VImg})\n","import mod from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipPlayer.vue?vue&type=style&index=0&id=d7928618&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipPlayer.vue?vue&type=style&index=0&id=d7928618&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"player pa-3 d-flex align-center\",class:{flipped: _vm.flipped},style:({backgroundColor: _vm.colors.bg})},[_c('v-img',{staticClass:\"coin flex-grow-0\",class:_vm.flipped ? 'ml-n4' : 'mr-n4',attrs:{\"src\":_vm.coin.image,\"width\":48,\"transition\":false,\"aspect-ratio\":\"1\"}}),_c('UserAvatar',{staticClass:\"avatar\",class:_vm.flipped ? 'ml-3' : 'mr-3',attrs:{\"user\":_vm.user || {name: '?'},\"round\":\"\",\"size\":\"48\",\"color\":\"grey200\"}}),_c('div',{staticClass:\"text-ctn text-body-2\"},[(_vm.user)?_c('Username',{style:({color: _vm.colors.text}),attrs:{\"user\":_vm.user}}):_c('span',{staticClass:\"text--secondary text-caption\"},[_vm._v(\"Empty slot\")]),_c('h5',{directives:[{name:\"t\",rawName:\"v-t\",value:(_vm.coin.name),expression:\"coin.name\"}],staticClass:\"text-caption text--secondary text-no-wrap lh-1-3\"})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipPlayer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipPlayer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CoinflipPlayer.vue?vue&type=template&id=d7928618&scoped=true&\"\nimport script from \"./CoinflipPlayer.vue?vue&type=script&lang=js&\"\nexport * from \"./CoinflipPlayer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CoinflipPlayer.vue?vue&type=style&index=0&id=d7928618&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d7928618\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VImg } from 'vuetify/lib/components/VImg';\ninstallComponents(component, {VImg})\n","import mod from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipItem.vue?vue&type=style&index=0&id=35992268&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--17-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CoinflipItem.vue?vue&type=style&index=0&id=35992268&lang=scss&scoped=true&\"","import sortBy from 'lodash.sortby'\nimport anime from 'animejs/lib/anime.es'\nimport { mapActions, mapGetters } from 'vuex'\nimport seededRandom from 'seed-random'\nimport { getRandomIntInRange } from '@/utils'\nimport { registerSound } from '@/modules/sound'\nimport {\n GAME_STATUS, SIDE_HEADS, SIDE_TAILS,\n MIN_FLIPS, MAX_FLIPS,\n} from '@/views/games/Coinflip/utils'\nimport CoinflipGame from '@/store/models/games/coinflip/CoinflipGame'\nimport CoinflipPlayer from './components/CoinflipPlayer'\nimport CoinflipItem from './components/CoinflipItem'\nimport CoinflipCoin from './components/CoinflipCoin'\n\nconst sounds = {\n toss: registerSound('games/coinflip/toss', { volume: 0.5 }),\n sheen: registerSound('games/coinflip/sheen', { volume: 0.4 }),\n glow: registerSound('games/coinflip/glow', { volume: 0.4 }),\n impact: [\n registerSound('games/coinflip/impact1', { volume: 0.15 }),\n registerSound('games/coinflip/impact2', { volume: 0.15 }),\n registerSound('games/coinflip/impact3', { volume: 0.15 }),\n registerSound('games/coinflip/impact4', { volume: 0.15 }),\n ],\n win: registerSound('games/wheel/win', { volume: 0.3 }),\n}\n\nconst defaultSoundTriggers = () => [\n 'toss',\n 'sheen',\n 'impact1',\n 'impact2',\n 'impact3',\n 'glow',\n]\n\nlet lastProgress = null\n\nexport default {\n components: {\n CoinflipPlayer,\n CoinflipItem,\n CoinflipCoin,\n },\n props: {\n close: {\n type: Function,\n required: true,\n },\n payload: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n loading: {\n join: false,\n bandit: false,\n },\n showTaxInfo: false,\n animation: null,\n countdownValue: 0,\n soundTriggers: defaultSoundTriggers(),\n rolling: false,\n canCallBandit: false,\n }\n },\n computed: {\n ...mapGetters({\n user: 'user/session',\n conga: 'conga/conga',\n itemdb: 'items/items',\n settings: 'settings/settings',\n }),\n muted() {\n return !this.settings?.games?.coinflip?.sounds\n },\n game() {\n const { game } = this.payload\n\n // if hasnt rolled yet, or invalid game obj, find in state\n if (!game.rolledAt) {\n return CoinflipGame.find(game.id)\n }\n\n return game\n },\n gameConfig() {\n return this.conga.games.coinflip\n },\n items() {\n const { itemdb } = this\n\n const items = sortBy(this.game.items.map(item => ({\n ...item,\n ...itemdb[item.name],\n })), 'price').reverse()\n\n return {\n pot: items,\n heads: items.filter(i => i.side === SIDE_HEADS),\n tails: items.filter(i => i.side === SIDE_TAILS),\n }\n },\n GAME_STATUS() {\n return GAME_STATUS\n },\n joinable() {\n if (!this.game.joinable) return false\n if (this.isCreator) return false\n\n return true\n },\n isCreator() {\n if (!this.user) return false\n\n return this.user?.steamid === this.game.creatorId\n },\n shouldShowStatus() {\n if (this.rolling) return false\n\n return this.game.status === GAME_STATUS.locked\n },\n _canCallBandit() {\n const { gameConfig: config, game } = this\n\n if (!this.isCreator) return false\n if (game.status !== GAME_STATUS.open) return false\n if (config.botJoinDisabled) return false\n\n const { callBanditAvailableAt } = this\n\n return callBanditAvailableAt < Date.now()\n },\n callBanditAvailableAt() {\n const { gameConfig: config, game } = this\n\n const createdAt = new Date(game.createdAt).getTime()\n const canCallAfter = config.time.botJoinAvailableAfter\n\n return createdAt + canCallAfter\n },\n locksIn() {\n return Math.max(0, Math.ceil((this.game.lockingAt - Date.now()) / 1e3))\n },\n progressValue() {\n return (((this.countdownValue * 1000) - 1) / this.gameConfig.time.countdown) * 100\n },\n },\n created() {\n if (!this.game) {\n this.close()\n }\n\n this.countdownValue = this.gameConfig.time.countdown / 1e3\n\n this.canCallBandit = this._canCallBandit\n // check if we're subbed\n },\n beforeDestroy() {\n // kill anim\n if (this.animation) {\n this.animation.pause()\n this.animation.animatables.forEach(({ target }) => {\n anime.remove(target)\n })\n }\n },\n watch: {\n 'game.status': {\n async handler(status, oldStatus) {\n if (this.rolling) return\n if (oldStatus && oldStatus > GAME_STATUS.locked) return\n\n // we rolling for the first time\n if (status > GAME_STATUS.locked) {\n await this.$nextTick()\n this.roll(!!oldStatus)\n\n if (oldStatus) {\n this.showTaxInfo = true\n }\n }\n },\n immediate: true,\n },\n },\n methods: {\n ...mapActions({\n join: 'games/coinflip/join',\n }),\n async onJoin() {\n if (this.loading.join) return\n\n if (!this.user) {\n this.$modal.open('auth', { maxWidth: 320, persistent: true })\n return\n }\n\n this.loading.join = true\n\n try {\n const { game } = this\n\n const modal = this.$modal.open(\n 'backpack',\n { hasReturnValue: true, maxWidth: 900, noShadow: true },\n {\n maxItemSelect: this.gameConfig.maxItems,\n minValue: game.range[0],\n maxValue: game.range[1],\n hideUnderMax: true,\n dollarValue: true,\n autoselect: true,\n },\n )\n\n const modalItems = await modal.promise\n if (!modalItems) return\n\n const ids = modalItems.map(i => i.id)\n await this.join({ id: game.id, ids })\n } catch (error) {\n this.$toast.error(error.message)\n } finally {\n this.loading.join = false\n }\n },\n onTick(val) {\n this.countdownValue = val\n },\n roll(firstTime) {\n if (this.rolling) return\n this.rolling = true\n\n const { game } = this\n\n const winningSide = game.winner.side\n\n console.log(`Coinflip ${game.id} rolled ${game.outcome} (Side: ${winningSide})`)\n\n // setup sound triggers\n this.soundTriggers = defaultSoundTriggers()\n lastProgress = 0\n\n const $coin = this.$refs.coin.$el\n const $coinCtn = $coin.parentElement\n\n const rand = seededRandom(game.id)()\n\n const flipCount = Math.floor(rand * (MIN_FLIPS - MAX_FLIPS) + MAX_FLIPS)\n const flips = 180 * flipCount\n const winSide = flipCount % 2 !== winningSide ? 180 : 360\n\n const rotation = flips + winSide\n\n const randXFlip = rand * (-90 - 90) + 90\n\n this.animation = anime.timeline({\n autoplay: false,\n elasticity: 0,\n easing: 'linear',\n update: this.onUpdate,\n })\n // coin zoom\n .add({\n targets: $coinCtn,\n scale: [\n {\n value: 1.8,\n delay: 500,\n duration: 1000,\n easing: 'easeOutQuad',\n },\n {\n value: 1,\n delay: 200,\n duration: 1000,\n easing: 'easeOutBounce',\n },\n ],\n }, 0)\n // coin flip\n .add({\n targets: $coin,\n rotateZ: [\n {\n value: randXFlip,\n duration: 200,\n easing: 'easeOutQuart',\n },\n ],\n rotateX: [\n {\n value: flips - 45,\n duration: 700,\n easing: 'easeOutCirc',\n },\n {\n value: flips + 45,\n duration: 600,\n easing: 'linear',\n },\n {\n value: rotation,\n duration: 800,\n easing: 'easeOutExpo',\n },\n ],\n begin(anim) {\n setTimeout(() => {\n $coin.classList.add('sheen')\n\n setTimeout(() => {\n $coin.classList.remove('sheen')\n }, 1500)\n }, 650)\n },\n }, 500)\n // shadow\n .add({\n targets: '.coin-shadow',\n opacity: [\n { value: 0.7, duration: 100 },\n { value: 0, delay: 1900, duration: 200 },\n ],\n scale: [\n { value: 1, duration: 100 },\n { value: 0.5, duration: 800 },\n {\n value: 1, delay: 500, duration: 800, easing: 'easeOutBounce',\n },\n ],\n backgroundColor: [\n { value: 'rgb(0,0,0)', duration: 1 },\n ],\n duration: 2000,\n }, 500)\n // smoke explosion\n .add({\n targets: '.sprite-smoke',\n opacity: [\n { value: 0, duration: 1 },\n { value: 0.4, duration: 1 },\n { value: 0, delay: 400, duration: 1 },\n ],\n backgroundPosition: [0, '-2400px'],\n duration: 500,\n easing: 'steps(12)',\n }, 2000)\n // board shake\n .add({\n targets: '.coin-board',\n translateX: [\n { value: 6, duration: 50 },\n { value: -4, duration: 50 },\n { value: 2, duration: 50 },\n { value: 0, duration: 50 },\n ],\n translateY: [\n { value: 8, duration: 70 },\n { value: -5, duration: 70 },\n { value: 3, duration: 70 },\n { value: 0, duration: 70 },\n ],\n }, 2000)\n // coin readjust\n .add({\n targets: $coinCtn,\n scale: [\n {\n value: 1.3,\n duration: 1200,\n easing: 'easeOutElastic',\n },\n {\n value: 1,\n delay: 800,\n duration: 1000,\n easing: 'easeOutExpo',\n },\n ],\n }, 3300)\n .add({\n targets: $coin,\n rotateZ: 0,\n rotateX: [\n { value: rotation - 25, duration: 1000 },\n { value: rotation, delay: 1100, duration: 1000 },\n ],\n easing: 'easeOutElastic',\n begin(anim) {\n setTimeout(() => {\n $coin.classList.add('sheen')\n\n setTimeout(() => {\n $coin.classList.remove('sheen')\n }, 1500)\n }, 350)\n },\n }, 3300)\n // gold halo\n .add({\n targets: '.coin-shadow',\n opacity: [\n { value: 0.5, duration: 300 },\n { value: 0, delay: 2100, duration: 200 },\n ],\n scale: [\n { value: 1, duration: 100 },\n { value: 1.15, duration: 1000 },\n {\n value: 1, delay: 500, duration: 1000,\n },\n ],\n backgroundColor: [{ value: 'hsl(49, 100%, 50%)', duration: 1 }],\n }, 3600)\n\n this.animation.play()\n\n setTimeout(() => {\n this.rolling = false\n this.onRollFinished(firstTime)\n }, this.animation.duration)\n },\n async onCallBandit() {\n if (this.loading.bandit) return\n\n this.loading.bandit = true\n\n try {\n const { game } = this\n\n await this.$socket.request('game.coinflip.requestBot', game.id)\n } catch (error) {\n this.$toast.error(error.message)\n } finally {\n this.loading.bandit = false\n }\n },\n onBanditCountdownFinished() {\n this.canCallBandit = true\n },\n onUpdate(anim) {\n if (this.muted) return\n\n const progress = Math.floor(anim.progress)\n\n if (progress > lastProgress) {\n lastProgress = progress\n this.onProgress(progress)\n }\n },\n onProgress(progress) {\n // one-time sounds\n const { soundTriggers } = this\n if (!soundTriggers.length) return\n\n if (progress === 6 && soundTriggers.includes('toss')) {\n sounds.toss.play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'toss')\n }\n\n if (progress === 14 && soundTriggers.includes('sheen')) {\n sounds.sheen.play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'sheen')\n }\n\n if (progress === 33 && soundTriggers.includes('impact1')) {\n sounds.impact[getRandomIntInRange(0, 3)].play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'impact1')\n }\n\n if (progress === 35 && soundTriggers.includes('impact2')) {\n sounds.impact[getRandomIntInRange(0, 3)].play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'impact2')\n }\n\n if (progress === 40 && soundTriggers.includes('impact3')) {\n sounds.impact[getRandomIntInRange(0, 3)].play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'impact3')\n }\n\n if (progress === 58 && soundTriggers.includes('glow')) {\n sounds.glow.play()\n this.soundTriggers = soundTriggers.filter(i => i !== 'glow')\n }\n },\n onRollFinished(firstTime) {\n if (this.user?.steamid === this.game.winner?.steamid) {\n if (firstTime) {\n this.$toast.success('Your items are in your backpack.', {\n title: 'Coinflip won',\n sound: sounds.win,\n })\n\n this.close()\n this.$modal.open('coinflip-won', { maxWidth: 400 }, { game: this.game })\n }\n }\n },\n },\n\n}\n"],"sourceRoot":""}