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K,YAAL,GAAoB,eAApB;AACD;AACF;AA/BM;AADI,CAAf","sourcesContent":["/**\n * Tabs touch\n *\n * @mixin\n */\n/* @vue/component */\nexport default {\n methods: {\n newOffset (direction) {\n const clientWidth = this.$refs.wrapper.clientWidth\n\n if (direction === 'prev') {\n return Math.max(this.scrollOffset - clientWidth, 0)\n } else {\n return Math.min(this.scrollOffset + clientWidth, this.$refs.container.clientWidth - clientWidth)\n }\n },\n onTouchStart (e) {\n this.startX = this.scrollOffset + e.touchstartX\n this.$refs.container.style.transition = 'none'\n this.$refs.container.style.willChange = 'transform'\n },\n onTouchMove (e) {\n this.scrollOffset = this.startX - e.touchmoveX\n },\n onTouchEnd () {\n const container = this.$refs.container\n const wrapper = this.$refs.wrapper\n const maxScrollOffset = container.clientWidth - wrapper.clientWidth\n container.style.transition = null\n container.style.willChange = null\n\n /* istanbul ignore else */\n if (this.scrollOffset < 0 || !this.isOverflowing) {\n this.scrollOffset = 0\n } else if (this.scrollOffset >= maxScrollOffset) {\n this.scrollOffset = maxScrollOffset\n }\n }\n }\n}\n"],"sourceRoot":""}
|