{"version":3,"sources":["webpack:///./LifeDirect.Web/scripts/src/objects/slider.ts","webpack:///external \"jQuery\"","webpack:///./LifeDirect.Web/scripts/src/pages/whyuseus.ts"],"names":["instanceSlider","Glide","Slider","selector","this","updateSlider","w","window","innerWidth","addEventListener","$","width","requestAnimationFrame","isMobile","offset","settings","type","perView","dragThreshold","swipeThreshold","gap","startAt","peek","before","after","update","default","mount","module","exports","jQuery","each","sliderId","attr"],"mappings":"mTAAA,IAEIA,EAFEC,EAAQ,EAAQ,KAITC,EAAb,WAGI,WAAYC,GAAgB,Y,4FAAA,SACxBC,KAAKD,SAAWA,EAChBC,KAAKC,eAEL,IAAIC,EAAIC,OAAOC,WAEfD,OAAOE,iBAAiB,UAAU,WAC1BH,GAAKI,EAAEH,QAAQI,UACfJ,OAAOK,sBAAsB,EAAKP,cAClCC,EAAIC,OAAOC,e,UAZ3B,O,EAAA,G,EAAA,2BAiBI,WACI,IAAMG,EAAQJ,OAAOC,WAGfK,EAAYF,EAAQ,IACpBG,EAASD,GAAYF,EAFJ,KAE8B,GAAKA,EAHlC,KAG6D,EAC/EI,EAAW,CACbC,KAAM,WACNC,QAAS,EACTC,gBAAeL,GAAW,IAC1BM,iBAAgBN,GAAW,GAC3BO,IAAKP,EAAW,GAAK,GACrBQ,QAASR,EAAW,EAAI,EACxBS,KAAMT,EACA,CAAEU,OAAQ,EAAGC,MAAkB,EAATV,EAAc,GACpC,CAAES,OAAQT,EAAQU,MAAOV,IAG9Bd,EAIDA,EAAeyB,OAAOV,IAHtBf,EAAiB,IAAIC,EAAMyB,QAAQtB,KAAKD,SAAUY,IACnCY,a,2BArC3B,O,mCCJAC,EAAOC,QAAUC,Q,iCCAjB,gCAGIpB,EAAE,oBAAoBqB,MAAK,WACvB,IAAIC,EAAW,IAAMtB,EAAEN,MAAM6B,KAAK,MAClC,IAAI,IAAOD,O","file":"why-use-us.5c7c1c3e445e62d19625.js","sourcesContent":["const Glide = require('@glidejs/glide');\n\nlet instanceSlider: any;\n\nexport class Slider {\n selector: string;\n\n constructor(selector: string) {\n this.selector = selector;\n this.updateSlider();\n\n var w = window.innerWidth;\n \n window.addEventListener(\"resize\", () => {\n if (w != $(window).width()) {\n window.requestAnimationFrame(this.updateSlider);\n w = window.innerWidth;\n }\n });\n }\n\n updateSlider() {\n const width = window.innerWidth;\n const dekstopSizeCard = 576;\n const mobileSizeCard = 256;\n const isMobile = (width < 768);\n const offset = isMobile ? (width - mobileSizeCard) / 2 : (width - dekstopSizeCard) / 2;\n const settings = {\n type: \"carousel\",\n perView: 1,\n dragThreshold: isMobile ? 120 : false,\n swipeThreshold: isMobile ? 80 : false,\n gap: isMobile ? 12 : 32,\n startAt: isMobile ? 0 : 1,\n peek: isMobile\n ? { before: 8, after: ((offset * 2) - 8) }\n : { before: offset, after: offset }\n };\n\n if (!instanceSlider) {\n instanceSlider = new Glide.default(this.selector, settings);\n instanceSlider.mount();\n } else {\n instanceSlider.update(settings);\n }\n }\n}","module.exports = jQuery;","import { Slider } from \"../objects/slider\";\n\nfunction initWhyUseUs() {\n $('.js-perks-slider').each(function () {\n var sliderId = '#' + $(this).attr('id');\n new Slider(sliderId);\n });\n}\n\ninitWhyUseUs();"],"sourceRoot":""}