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SAxFe;AA0FhB,qBA1FgB,2BA0FH;AACX,gBAAI,OAAO,MAAP,KAAkB,WAAtB,EAAmC;AAEnC,mBAAO,mBAAP,CAA2B,QAA3B,EAAqC,KAAK,QAA1C;AACD,SA9Fe;;AAgGhB,iBAAS;AACP,oBADO,sBACC;AACN,6BAAa,KAAK,aAAlB;AAEA;AACA;AACA;AACA;AACA,qBAAK,aAAL,GAAqB,OAAO,UAAP,CAAkB,KAAK,aAAvB,EAAsC,GAAtC,CAArB;AACD,aATM;AAUP,yBAVO,2BAUM;AACX,qBAAK,YAAL,GAAoB,iBAApB;AACA,qBAAK,WAAL,GAAmB,gBAAnB;AACD;AAbM;AAhGO,KAAX,CAAP;AAgHD;AAED;AACA;AACA,SAAS,cAAT,GAAuB;AACrB,QAAI,OAAO,QAAP,KAAoB,WAAxB,EAAqC,OAAO,CAAP,CADhB,CACyB;AAC9C,WAAO,KAAK,GAAL,CACL,SAAS,eAAT,CAA0B,WADrB,EAEL,OAAO,UAAP,IAAqB,CAFhB,CAAP;AAID;AAED,SAAS,eAAT,GAAwB;AACtB,QAAI,OAAO,QAAP,KAAoB,WAAxB,EAAqC,OAAO,CAAP,CADf,CACwB;AAC9C,WAAO,KAAK,GAAL,CACL,SAAS,eAAT,CAA0B,YADrB,EAEL,OAAO,WAAP,IAAsB,CAFjB,CAAP;AAID","sourcesContent":["import Vue from 'vue'\nimport { VuetifyUseOptions, VuetifyBreakpoint } from 'vuetify/types'\n\nconst BREAKPOINTS_DEFAULTS = {\n thresholds: {\n xs: 600,\n sm: 960,\n md: 1280,\n lg: 1920\n },\n scrollbarWidth: 16\n}\n\n/**\n * Factory function for the breakpoint mixin.\n */\nexport default function breakpoint (opts: VuetifyUseOptions['breakpoint'] = {}) {\n if (!opts) {\n opts = {}\n }\n\n return Vue.extend({\n data () {\n return {\n clientHeight: getClientHeight(),\n clientWidth: getClientWidth(),\n resizeTimeout: undefined as number | undefined,\n\n ...BREAKPOINTS_DEFAULTS,\n ...opts\n }\n },\n\n computed: {\n breakpoint (): VuetifyBreakpoint {\n const xs = this.clientWidth < this.thresholds.xs\n const sm = this.clientWidth < this.thresholds.sm && !xs\n const md = this.clientWidth < (this.thresholds.md - this.scrollbarWidth) && !(sm || xs)\n const lg = this.clientWidth < (this.thresholds.lg - this.scrollbarWidth) && !(md || sm || xs)\n const xl = this.clientWidth >= (this.thresholds.lg - this.scrollbarWidth)\n\n const xsOnly = xs\n const smOnly = sm\n const smAndDo