Galaxy Watch6
BUY NOW
PRE-REGISTER
Pre-order now
The watch that knows you best is back with a more personalized health experience and better yet, upgraded sleep tracking. Start off your day with a good night's sleep with Sleep coaching now available on Galaxy Watch6.
Galaxy Watch6Start your everyday wellness journey
Galaxy Watch6 can be seen displaying Sleep score screen. The progress bar is advancing as the sleep score '82' appears with the text 'Excellent' below. The sleep animal, a lion, appears at the bottom of the screen.
Develop healthy sleeping habits Go to Sleep Tracking
Galaxy Watch6 can be seen rotating and then facing the front. Black margin of the display is being reduced to emphasize the larger display.
Large space to view, tap, swipe and scroll Go to Display
GUI of ECG being measured can be seen, with the measure time changing from 15 to 10 seconds and the bpm changing between 72 and 77. Under the numbers is a moving graph illustrating the heartbeat.
Get detailed insights on your body and wellness Go to Health
Set your own goals and get tips on your fitness journey Go to Exercise
Express your own unique style Go to Customize
Display Sleep Tracking Health Exercise Customise
Close Popup
20% larger
30% slimmer
Get even more info at a glance on up to 20% more display. The up to 30% slimmer black margin makes way for Galaxy Watch's biggest screen yet, and more space for self expression with customizable watch faces.1, 2
More screen.
Thinner bezel
Introducing
a slimmer form
Two Galaxy Watch6 can be seen. The first one is positioned to show its thinness. The second one is zoomed in to emphasize the slim design of Galaxy Watch6.
Style and comfort join forces in this slimmer, sleeker shape. Galaxy Watch6 has been redesigned with a trimmed-down watch form, making it easier to wear. The seamless fit and timeless circular design are an ultra-comfortable, lightweight trick up your sleeve.3
Switching bands is One-Click easy
Press the band release button to detach your watch straps easily. Swap them out to change from workout to go-out styles with just one touch. The band guide makes it easy to align, with a satisfying click once it's reattached.4
Galaxy Watch6 watch band can be seen being attached to illustrate the easiness of the one-click release button.
Scratches are no
match for Sapphire
Crystal glass
Ready for anything, rain or shine. Ultra-durable Sapphire Crystal glass makes for a resilient and sturdy watch display, while IP68 and 5ATM ratings mean your watch is tough enough to stay with you on your adventures.5, 6
Defy the dangers of dust
Afraid of water? Not on our watch
Galaxy Watch6 can be seen facing upward with the display zoomed in, with waterdrops next to the Watch to indicate that it is waterproof. A gleam of light goes over the display to emphasize the durability of the Sapphire Crystal glass.
Charge up
in
record time
With one full charge, the watch lasts up to 40 hours. Fast charge the watch to 45% in just 30 minutes and you're all set to explore the great outdoors or enjoy a well-deserved break in bed.7, 8, 9
Up to 45 %
charged in 30 min
Front view of Galaxy Watch6 can be seen with the charging screen GUI on display. The number on the screen goes up from '50%' to '100%', implying the battery is being fully charged.
Our most powerful watch ever
The upgraded processor makes Galaxy Watch6 18% faster than before, improving app launch speed. So whether you're starting off the day with a run or settling in for the night, it keeps up with every gesture.3
Galaxy Watch6 processor is being assembled with the bezel and display.
Better days
begin with
better nights
Understand your nights to make the most of your days. Wear your Galaxy Watch6 to bed and monitor your nightly sleep stage, sleep score and sleep consistency to improve your sleep. And now you can access Sleep Coaching directly on your watch, so you can check tips right on your wrist.10, 11, 12, 13, 14, 15, 16
Information on the time spent in each sleep stage can be seen: Awake 35m, REM 1h 30m, Light 4h 30m, Deep 55m. The information is also displayed as a graph.
Better together
Fabric Band
Light and comfortable Optimized for sleep
Learn more
Be prepared with Cycle Tracking
Get in tune with your health and body. Cycle Tracking powered by uses your nightly skin temperature from your watch, measured while you sleep, to predict the dates of your period and other cycles. Plan ahead and live life to the fullest with Galaxy Watch6.17
A heart monitoring package that watches over you
Lessen your worries with a heart monitoring package that brings you peace of mind, so you can focus on your day. The built-in PPG sensor periodically measures heart rate while you wear your Galaxy Watch6, and will alert you if your heart rate is too high or too low. Use the ECG sensor for more detailed measurements. 18, 19
GUI of ECG being measured can be seen, with the measure time changing from 26 to 31 seconds and the bpm changing between 72 and 77. Under the numbers is a moving graph illustrating the heartbeat.
Add a quick BP check to your wellness routine
Maintain a healthy lifestyle by adding a quick blood pressure check to your daily routine. Measure and track your blood pressure right on your wrist with Galaxy Watch6. No additional equipment required!21, 22, 23, 24
Know your body inside and out with BIA
Skip the clunky machines - collect data on your body any time you like, with the Bioelectrical Impedance Analysis (BIA) sensor on your Galaxy Watch6. These measurements will help you take a data-driven approach to monitor your body and health better and set personalized fitness goals.25, 26, 27
Safety features for your peace of mind
Your watch is on standby in case of an emergency. Should you take a tumble, Fall Detection will catch it and ask if you need help. For other emergencies, simply press the home button five times to send SOS to emergency services. When help arrives, quickly access your Medical info from the lock screen with a single tap. Rest assured, now you're in good hands.27, 28, 29, 30
Daily activity screen can be seen, with the progress bars advancing.
Exercise tracking - Monitor your
fitness journey
Record each of your physical accomplishments, and check all of your progress with Galaxy Watch6. Track your movements for over 90 workouts, including indoor swimming and yoga, or you can even create your own custom workout. Forget to hit start? Your watch will automatically recognize and record select workouts such as running, walking and now, even cycling, so you don't lose precious data.26, 31, 32
Different workout icons can be seen. In the middle is the cycling icon with the person sitting upright. The person begins cycling and slowly bends forward as other workout icons appear from the right.
Set your perfect
intensity with
personalized HR Zone
Set a personalized HR Zone. Or just start running and Galaxy Watch6 will measure your heart rate based on your fitness capacity and optimize an HR Zone that suits you. Once set, you can get notified when you enter your goal HR Zone and make sure you're still in the zone as you move, run and work out to your own beat.34
Start a healthy competition amongst friends and family
Create challenges and let your competitive side shine. Invite your workout buddies, and encourage each other to go the extra mile. Celebrate progress, achievements and personal bests together.
Snap remote
Galaxy Z Flip5 photos from
your watch
Pair your watch with Galaxy Z Flip5 to capture the healthy you up close or from a distance. Galaxy Z Flip5's Flex mode and Camera Controller let you easily switch between photo and video mode, or zoom in and out, all from the comfort of your wrist. Then tap the shutter button on your watch to take a pic.34, 35
On the right is Galaxy Z Flip5 on Flex mode. On the left is Galaxy Watch6 displaying the same screen as Galaxy Z Flip5, illustrating the Camera Controller feature.
More than just a watch
Way more than just a clock. With Galaxy Watch6, you can still text, call, stream music and more, even without your phone. Stay productive and carry on with your day.36, 37
Call Text Stream Music
Call
Text
Stream Music
International Roaming keeps contacts close
Explore the world without getting lost. International Roaming on Galaxy Watch6 allows you to use the map to find your way to landmarks, all from your watch. If you do get into trouble, no need to worry — you'll be able to make calls or send texts to ask for help.38, 39
Samsung Wallet is available on your watch
Don't fumble in your pockets or rummage through your bag looking for cash or cards — you've got Samsung Wallet for that. Now you can pay and ride without taking out your phone, because everything you need is just a swipe or tap away.41
Tap into more apps
Enjoy a variety of popular third-party apps such as Audible, WhatsApp, Spotify and more - all on your Galaxy Watch6 with your smartphone safely in your pocket. 43 41
GPS points you in the right direction
By enabling your watch's built-in GPS on Google Maps, you'll stay on the right path. So even when your adventures take you far, you can find your way home with ease.43, 44
Customise to suit your personality
Make Galaxy Watch6 uniquely your own. Choose from a wide collection of bands in different styles and materials. You can also customize your watch face with your favorite colours, complications, designs or even photos of your pet. The only limit is your imagination.4
Switch and upgrade.
It's so easy
Trade in and save
LEARN MORE
Watch how easy switching is
Smart Switch is the sure and secure way to transfer your data to Galaxy. Take all your apps, watch faces, settings and more, with you when you make the switch.47, 48, 49, 50
LEARN MORE
It's time to find your Watch
-
Galaxy Watch6
Buy Now
Learn More
- Display Sapphire Crystal
- Screen Size 37.3mm | 33.3mm
- Fast Charge8, 9
- Infrared
Temperature
Sensor - Material Armor
Aluminum - Battery
(typical)7 425mAh |
300mAh - Sleep
Tracking - Cycle
Tracking - Body
Composition - Route
Workout /
Track Back - Durability 5ATM+IP68/
MIL-STD-810H - Size 44mm | 40mm
- Weight 33.3g | 28.7g
-
Galaxy Watch6 Classic
Buy Now
Learn More
- Display Sapphire Crystal
- Screen Size 37.3mm | 33.3mm
- Fast Charge8, 9
- Infrared
Temperature
Sensor - Material Stainless Steel
- Battery
(typical)7 425mAh |
300mAh - Sleep
Tracking - Cycle
Tracking - Body
Composition - Route
Workout /
Track Back - Durability 5ATM+IP68/
MIL-STD-810H - Size 47mm | 43mm
- Weight 59.0g | 52.0g
-
Galaxy Watch4
Buy Now
Learn More
- Display Corning®
Gorilla® Glass
with DX+ - Screen Size 34.6mm | 30.4mm
- Fast Charge50
- Infrared
Temperature
Sensor - Material Armor
Aluminum - Battery
(typical)51 361mAh |
247mAh - Sleep
Tracking - Cycle
Tracking - Body
Composition - Route
Workout /
Track Back - Durability 5ATM+IP68/
MIL-STD-810G - Size 44mm | 40mm
- Weight 30.3g | 25.9g
- Display Corning®
-
Galaxy Watch5 Pro
Buy Now
Learn More
- Display Sapphire Crystal
- Screen Size 34.6mm
- Fast Charge51
- Infrared
Temperature
Sensor - Material Titanium
- Battery
(typical)52 590mAh - Sleep
Tracking - Cycle
Tracking - Body
Composition - Route
Workout /
Track Back - Durability 5ATM+IP68/
MIL-STD-810H - Size 45mm
- Weight 46.5g
Join the Flip side
GO TO GALAXY Z FLIP5
Unfold your world
GO TO GALAXY Z FOLD5
Galaxy
Tab S9 | S9+ | S9
Ultra
GO TO GALAXY TAB S9
Galaxy Watch6 Classic
GO TO GALAXY WATCH6 CLASSIC
C C
- Galaxy Watch6 display size is compared to that of Galaxy Watch5.
- The screen size and black margin comparisons are based on Galaxy Watch6 40mm model. Based on Galaxy Watch6 44mm model, the screen size and black margin comparisons are 16.5% and 28%, respectively.
- Compared to Galaxy Watch5.
- Availability of Watch bands may vary by country or region. Additional Watch bands are sold separately.
- Galaxy Watch6 is water resistant to up to 50 meters in depth for 10 minutes under the 5ATM rating. It is not suitable for diving or high-pressure water activities. If the device or your hands are wet, they must be dried thoroughly prior to handling. Galaxy Watch6 provides ingress protection (IP68) against dust and fresh water to a maximum of 1.5 meters for up to 30 minutes. Refer to user manual for further information, including care/use instructions.
- Based on Vickers hardness measured with constant load of 200gf.
- Actual battery life may vary depending on network environment, usage patterns and other factors.
- Testing conducted by Samsung using pre-released version of Galaxy Watch6 (BT & LTE), each paired to a Samsung phone; all devices tested with prerelease software, Galaxy Watch Magnetic Fast Charging USB C Cable (EP-OR900), and Samsung 25W USB C Power Adapter (EP-TA800). Charge time varies with region, settings, usage pattern and environmental factors; actual results may vary.
- Samsung 25W USB C Power Adapter (EP-TA800) sold separately.
- Requires Samsung Health application version 6.24 or later.
- Galaxy Watch6 must be paired with a Samsung Galaxy smartphone with Android 10.0 and minimum 1.5GB Memory.
- Sleep tracking features are intended for general wellness and fitness purposes only. Not intended for use in detection, diagnosis, treatment of any medical condition or sleep disorder. The measurements are for your personal reference only. Please consult a medical professional for advice.
- Sleep Coaching requires sleep data of at least 7 days, including 2 days off.
- Availability of blood oxygen level feature may vary by country or regions.
- Invisible LED is enabled when sleep mode is turned on.
- Fabric Band is sold separately and compatible with Galaxy Watch4 and later released Galaxy Watch series. Availability of watch bands may vary by country/region or carrier
- Cycle Tracking is available for cycle and period prediction which is powered by Natural Cycles. Due to country restrictions in obtaining approval/registration as a Software as a medical device (SaMD), Cycle Tracking based on skin temperature only works on phones and watches purchased in the countries where the service is currently available. NOT INTENDED FOR CONTRACEPTION. If you are currently taking hormonal birth control or undergoing hormonal treatment that inhibits ovulation, this service will not be useful for tracking ovulation. Predictions displayed are for personal reference only. To improve the accuracy of predictions, it is recommended to wear your watch for at least 4 hours during sleep, 5 times a week. Predictions may vary depending on the proper use of your watch, input data, environmental conditions, etc. Intended for users 18 years old and above. Users should not interpret or take clinical action based on the predictions made without consultation of a qualified healthcare professional. Requires latest version of Samsung Health app.
- HR alerts is intended for general wellness and fitness purposes only. Not intended for use in detection, diagnosis, treatment, monitoring or management of any medical condition or disease. Any health-related information accessed through the device and application should not be treated as medical advice. Users should seek any medical advice from a physician.
- Availability of ECG app may vary by country or region. Due to country restrictions in obtaining approval/registration as a Software as a medical device (SaMD), ECG app only works on watches and smartphones purchased in the countries where service is currently available (however, service may be restricted when users travel to non-service countries). Check out https://www.samsung.com/apps/samsung-health-monitor for more information and latest update on service countries. It is not intended for users by people under 22 years old. Users should not interpret or take clinical action based on the device output without consultation of a qualified healthcare professional.
- For accurate blood pressure readings, a calibration is required every 4 weeks by BP monitor & arm cuff. Requires a Galaxy smartphone running Android 10.0 or above.
- For accurate blood pressure readings, a calibration is required every 4 weeks by BP monitor & arm cuff. Requires a Galaxy smartphone running Android 9.0 or above.
- Users should measure their blood pressure when at rest, as they would do with a traditional cuff, and refrain from measuring when they are working out, smoking, or drinking. Blood pressure app is not intended for any diagnostic purposes regarding hypertension or other heart conditions or users under 22 years old. Users should not interpret or take clinical action based on the device output without consultation of a qualified healthcare professional. Blood pressure app is not intended to replace traditional methods of diagnosis or treatment.
- Measured blood pressure history can be reviewed within the Samsung Health Monitor app on a paired smartphone.
- Not intended for use in detection, diagnosis, treatment. Intended for general wellness and fitness purposes only.
- Body composition is only supported in Samsung Galaxy Watch4 series and later released Galaxy Watch models. Body composition should not be used if you have an implanted pacemaker or other implanted medical devices, or if you are pregnant. Any health-related information accessed through the device and application should not be treated as medical advice. Measurement results may not be accurate if you are under 20 years old. The measurements are for your personal reference only. Please consult a medical professional for advice.
- Compatible smartphones and available features may vary by country/region, carrier or device.
- Galaxy Watch6 must have the latest Wear OS version installed.
- Detect falls feature must be enabled on the Galaxy Wearable app on your Galaxy smartphone to use Fall Detection on the watch.
- Emergency call requires network connection or pairing with Galaxy smartphone.
- Information gathered from the watch, Samsung Health app or related software is not intended to diagnose, cure, mitigate, treat or prevent disease or other conditions.
- Auto detect workouts must be turned on in Settings. Auto detect is not available for all workouts.
- Only available on Galaxy Watch6 series and must be paired with a compatible mobile device.
- To update the ranges of each HR zone for running based on cardiopulmonary capabilities, it is required to run outdoors more than 10 min with constant speed of 4km/h or faster.
- Galaxy Z Flip5 sold separately.
- Camera Controller is supported on Galaxy Watch4 and later released Galaxy Watch models when paired with Galaxy S9 series and later. Camera Controller zoom feature is available on Samsung Galaxy Watch4 series and later released Galaxy Watch models that are paired with a Galaxy S series, Galaxy Note series and Galaxy Z series smartphone running One UI 5.1 or above with Camera Controller support.
- LTE connection required to use select features on Galaxy Watch6. LTE connectivity only available in LTE models.
- Not all apps and services are compatible with Wear OS.
- Available on LTE models.
- Enabling International Roaming may result in roaming charges depending on your smartphone carrier's plan.
- Bluetooth, Wi-Fi or LTE connection is required.
- Third-party apps must be downloaded separately.
- GPS function requires internet connection. Can be used on LTE models without paired smartphone. Non-LTE models require Bluetooth connection to paired smartphone.
- By enabling GPS, your current location information may be gathered and used by Galaxy apps and third-party apps to provide location-based services.
- Discount values for broken devices will be considerably lower than those for fully-functional devices, unless there is a separate promotion running that specifically alters the value of broken devices.
- Purchase from Samsung.com before DD/MM/YY. £XX value based on any XXX (brand, product) smartwatch. Charges apply if you fail to send us your trade-in device. T&Cs apply.
- Bluetooth, Wi-Fi or LTE connection is required.
- Third-party apps must be downloaded separately.
- Compatible with Galaxy Watch in Wear OS powered by Samsung. Requires pairing with smartphone with latest version of Smart Switch installed.
- Data and content available for transfer may vary by OS.
- The typical capacity has been tested under third party laboratory conditions. The typical capacity is the estimated average capacity considering the deviation in battery capacity among the battery samples tested under the IEC 61960-3 standard.
- Testing conducted by Samsung using pre-released version of Galaxy Watch6 (BT & LTE), each paired to a Samsung phone; all devices tested with prerelease software, Galaxy Watch Magnetic Fast Charging USB C Cable (EP-OR900), and Samsung 25W USB C Power Adapter (EP-TA800). Charge time varies with region, settings, usage pattern and environmental factors; actual results may vary.
- The typical capacity has been tested under third party laboratory conditions. The typical capacity is the estimated average capacity considering the deviation in battery capacity among the battery samples tested under the IEC 61960-3 standard. Rated capacity is 295mAh. Actual battery life may vary depending on network environment, usage patterns and other factors.
"); return a.attr("data-swiper-slide-index") || a.attr("data-swiper-slide-index", t), i.cache && (this.virtual.cache[t] = a), a }, appendSlide: function (e) { if ("object" == typeof e && "length" in e) for (var t = 0; t < e.length; t += 1)e[t] && this.virtual.slides.push(e[t]); else this.virtual.slides.push(e); this.virtual.update(!0) }, prependSlide: function (e) { var t = this.activeIndex, i = t + 1, s = 1; if (Array.isArray(e)) { for (var a = 0; a < e.length; a += 1)e[a] && this.virtual.slides.unshift(e[a]); i = t + e.length, s = e.length } else this.virtual.slides.unshift(e); if (this.params.virtual.cache) { var r = this.virtual.cache, n = {}; Object.keys(r).forEach((function (e) { var t = r[e], i = t.attr("data-swiper-slide-index"); i && t.attr("data-swiper-slide-index", parseInt(i, 10) + 1), n[parseInt(e, 10) + s] = t })), this.virtual.cache = n } this.virtual.update(!0), this.slideTo(i, 0) }, removeSlide: function (e) { if (null != e) { var t = this.activeIndex; if (Array.isArray(e)) for (var i = e.length - 1; i >= 0; i -= 1)this.virtual.slides.splice(e[i], 1), this.params.virtual.cache && delete this.virtual.cache[e[i]], e[i] < t && (t -= 1), t = Math.max(t, 0); else this.virtual.slides.splice(e, 1), this.params.virtual.cache && delete this.virtual.cache[e], e < t && (t -= 1), t = Math.max(t, 0); this.virtual.update(!0), this.slideTo(t, 0) } }, removeAllSlides: function () { this.virtual.slides = [], this.params.virtual.cache && (this.virtual.cache = {}), this.virtual.update(!0), this.slideTo(0, 0) } }, J = { name: "virtual", params: { virtual: { enabled: !1, slides: [], cache: !0, renderSlide: null, renderExternal: null, addSlidesBefore: 0, addSlidesAfter: 0 } }, create: function () { n.extend(this, { virtual: { update: Q.update.bind(this), appendSlide: Q.appendSlide.bind(this), prependSlide: Q.prependSlide.bind(this), removeSlide: Q.removeSlide.bind(this), removeAllSlides: Q.removeAllSlides.bind(this), renderSlide: Q.renderSlide.bind(this), slides: this.params.virtual.slides, cache: {} } }) }, on: { beforeInit: function () { if (this.params.virtual.enabled) { this.classNames.push(this.params.containerModifierClass + "virtual"); var e = { watchSlidesProgress: !0 }; n.extend(this.params, e), n.extend(this.originalParams, e), this.params.initialSlide || this.virtual.update() } }, setTranslate: function () { this.params.virtual.enabled && this.virtual.update() } } }, ee = { handle: function (i) { var s = this.rtlTranslate, a = i; a.originalEvent && (a = a.originalEvent); var r = a.keyCode || a.charCode; if (!this.allowSlideNext && (this.isHorizontal() && 39 === r || this.isVertical() && 40 === r || 34 === r)) return !1; if (!this.allowSlidePrev && (this.isHorizontal() && 37 === r || this.isVertical() && 38 === r || 33 === r)) return !1; if (!(a.shiftKey || a.altKey || a.ctrlKey || a.metaKey || e.activeElement && e.activeElement.nodeName && ("input" === e.activeElement.nodeName.toLowerCase() || "textarea" === e.activeElement.nodeName.toLowerCase()))) { if (this.params.keyboard.onlyInViewport && (33 === r || 34 === r || 37 === r || 39 === r || 38 === r || 40 === r)) { var n = !1; if (this.$el.parents("." + this.params.slideClass).length > 0 && 0 === this.$el.parents("." + this.params.slideActiveClass).length) return; var o = t.innerWidth, l = t.innerHeight, d = this.$el.offset(); s && (d.left -= this.$el[0].scrollLeft); for (var h = [[d.left, d.top], [d.left + this.width, d.top], [d.left, d.top + this.height], [d.left + this.width, d.top + this.height]], p = 0; p < h.length; p += 1) { var c = h[p]; c[0] >= 0 && c[0] <= o && c[1] >= 0 && c[1] <= l && (n = !0) } if (!n) return } this.isHorizontal() ? (33 !== r && 34 !== r && 37 !== r && 39 !== r || (a.preventDefault ? a.preventDefault() : a.returnValue = !1), (34 !== r && 39 !== r || s) && (33 !== r && 37 !== r || !s) || this.slideNext(), (33 !== r && 37 !== r || s) && (34 !== r && 39 !== r || !s) || this.slidePrev()) : (33 !== r && 34 !== r && 38 !== r && 40 !== r || (a.preventDefault ? a.preventDefault() : a.returnValue = !1), 34 !== r && 40 !== r || this.slideNext(), 33 !== r && 38 !== r || this.slidePrev()), this.emit("keyPress", r) } }, enable: function () { this.keyboard.enabled || (s(e).on("keydown", this.keyboard.handle), this.keyboard.enabled = !0) }, disable: function () { this.keyboard.enabled && (s(e).off("keydown", this.keyboard.handle), this.keyboard.enabled = !1) } }, te = { name: "keyboard", params: { keyboard: { enabled: !1, onlyInViewport: !0 } }, create: function () { n.extend(this, { keyboard: { enabled: !1, enable: ee.enable.bind(this), disable: ee.disable.bind(this), handle: ee.handle.bind(this) } }) }, on: { init: function () { this.params.keyboard.enabled && this.keyboard.enable() }, destroy: function () { this.keyboard.enabled && this.keyboard.disable() } } }; var ie = { lastScrollTime: n.now(), lastEventBeforeSnap: void 0, recentWheelEvents: [], event: function () { return t.navigator.userAgent.indexOf("firefox") > -1 ? "DOMMouseScroll" : function () { var t = "onwheel" in e; if (!t) { var i = e.createElement("div"); i.setAttribute("onwheel", "return;"), t = "function" == typeof i.onwheel } return !t && e.implementation && e.implementation.hasFeature && !0 !== e.implementation.hasFeature("", "") && (t = e.implementation.hasFeature("Events.wheel", "3.0")), t }() ? "wheel" : "mousewheel" }, normalize: function (e) { var t = 0, i = 0, s = 0, a = 0; return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = i, i = 0), s = 10 * t, a = 10 * i, "deltaY" in e && (a = e.deltaY), "deltaX" in e && (s = e.deltaX), e.shiftKey && !s && (s = a, a = 0), (s || a) && e.deltaMode && (1 === e.deltaMode ? (s *= 40, a *= 40) : (s *= 800, a *= 800)), s && !t && (t = s < 1 ? -1 : 1), a && !i && (i = a < 1 ? -1 : 1), { spinX: t, spinY: i, pixelX: s, pixelY: a } }, handleMouseEnter: function () { this.mouseEntered = !0 }, handleMouseLeave: function () { this.mouseEntered = !1 }, handle: function (e) { var t = e, i = this, s = i.params.mousewheel; if (i.params.cssMode && t.preventDefault(), !i.mouseEntered && !s.releaseOnEdges) return !0; t.originalEvent && (t = t.originalEvent); var a = 0, r = i.rtlTranslate ? -1 : 1, o = ie.normalize(t); if (s.forceToAxis) if (i.isHorizontal()) { if (!(Math.abs(o.pixelX) > Math.abs(o.pixelY))) return !0; a = o.pixelX * r } else { if (!(Math.abs(o.pixelY) > Math.abs(o.pixelX))) return !0; a = o.pixelY } else a = Math.abs(o.pixelX) > Math.abs(o.pixelY) ? -o.pixelX * r : -o.pixelY; if (0 === a) return !0; if (s.invert && (a = -a), i.params.freeMode) { var l = { time: n.now(), delta: Math.abs(a), direction: Math.sign(a) }, d = i.mousewheel.lastEventBeforeSnap, h = d && l.time < d.time + 500 && l.delta <= d.delta && l.direction === d.direction; if (!h) { i.mousewheel.lastEventBeforeSnap = void 0, i.params.loop && i.loopFix(); var p = i.getTranslate() + a * s.sensitivity, c = i.isBeginning, u = i.isEnd; if (p >= i.minTranslate() && (p = i.minTranslate()), p <= i.maxTranslate() && (p = i.maxTranslate()), i.setTransition(0), i.setTranslate(p), i.updateProgress(), i.updateActiveIndex(), i.updateSlidesClasses(), (!c && i.isBeginning || !u && i.isEnd) && i.updateSlidesClasses(), i.params.freeModeSticky) { clearTimeout(i.mousewheel.timeout), i.mousewheel.timeout = void 0; var v = i.mousewheel.recentWheelEvents; v.length >= 15 && v.shift(); var f = v.length ? v[v.length - 1] : void 0, m = v[0]; if (v.push(l), f && (l.delta > f.delta || l.direction !== f.direction)) v.splice(0); else if (v.length >= 15 && l.time - m.time < 500 && m.delta - l.delta >= 1 && l.delta <= 6) { var g = a > 0 ? .8 : .2; i.mousewheel.lastEventBeforeSnap = l, v.splice(0), i.mousewheel.timeout = n.nextTick((function () { i.slideToClosest(i.params.speed, !0, void 0, g) }), 0) } i.mousewheel.timeout || (i.mousewheel.timeout = n.nextTick((function () { i.mousewheel.lastEventBeforeSnap = l, v.splice(0), i.slideToClosest(i.params.speed, !0, void 0, .5) }), 500)) } if (h || i.emit("scroll", t), i.params.autoplay && i.params.autoplayDisableOnInteraction && i.autoplay.stop(), p === i.minTranslate() || p === i.maxTranslate()) return !0 } } else { var b = { time: n.now(), delta: Math.abs(a), direction: Math.sign(a), raw: e }, w = i.mousewheel.recentWheelEvents; w.length >= 2 && w.shift(); var y = w.length ? w[w.length - 1] : void 0; if (w.push(b), y ? (b.direction !== y.direction || b.delta > y.delta) && i.mousewheel.animateSlider(b) : i.mousewheel.animateSlider(b), i.mousewheel.releaseScroll(b)) return !0 } return t.preventDefault ? t.preventDefault() : t.returnValue = !1, !1 }, animateSlider: function (e) { return e.delta >= 6 && n.now() - this.mousewheel.lastScrollTime < 60 || (e.direction < 0 ? this.isEnd && !this.params.loop || this.animating || (this.slideNext(), this.emit("scroll", e.raw)) : this.isBeginning && !this.params.loop || this.animating || (this.slidePrev(), this.emit("scroll", e.raw)), this.mousewheel.lastScrollTime = (new t.Date).getTime(), !1) }, releaseScroll: function (e) { var t = this.params.mousewheel; if (e.direction < 0) { if (this.isEnd && !this.params.loop && t.releaseOnEdges) return !0 } else if (this.isBeginning && !this.params.loop && t.releaseOnEdges) return !0; return !1 }, enable: function () { var e = ie.event(); if (this.params.cssMode) return this.wrapperEl.removeEventListener(e, this.mousewheel.handle), !0; if (!e) return !1; if (this.mousewheel.enabled) return !1; var t = this.$el; return "container" !== this.params.mousewheel.eventsTarged && (t = s(this.params.mousewheel.eventsTarged)), t.on("mouseenter", this.mousewheel.handleMouseEnter), t.on("mouseleave", this.mousewheel.handleMouseLeave), t.on(e, this.mousewheel.handle), this.mousewheel.enabled = !0, !0 }, disable: function () { var e = ie.event(); if (this.params.cssMode) return this.wrapperEl.addEventListener(e, this.mousewheel.handle), !0; if (!e) return !1; if (!this.mousewheel.enabled) return !1; var t = this.$el; return "container" !== this.params.mousewheel.eventsTarged && (t = s(this.params.mousewheel.eventsTarged)), t.off(e, this.mousewheel.handle), this.mousewheel.enabled = !1, !0 } }, se = { update: function () { var e = this.params.navigation; if (!this.params.loop) { var t = this.navigation, i = t.$nextEl, s = t.$prevEl; s && s.length > 0 && (this.isBeginning ? s.addClass(e.disabledClass) : s.removeClass(e.disabledClass), s[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](e.lockClass)), i && i.length > 0 && (this.isEnd ? i.addClass(e.disabledClass) : i.removeClass(e.disabledClass), i[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](e.lockClass)) } }, onPrevClick: function (e) { e.preventDefault(), this.isBeginning && !this.params.loop || this.slidePrev() }, onNextClick: function (e) { e.preventDefault(), this.isEnd && !this.params.loop || this.slideNext() }, init: function () { var e, t, i = this.params.navigation; (i.nextEl || i.prevEl) && (i.nextEl && (e = s(i.nextEl), this.params.uniqueNavElements && "string" == typeof i.nextEl && e.length > 1 && 1 === this.$el.find(i.nextEl).length && (e = this.$el.find(i.nextEl))), i.prevEl && (t = s(i.prevEl), this.params.uniqueNavElements && "string" == typeof i.prevEl && t.length > 1 && 1 === this.$el.find(i.prevEl).length && (t = this.$el.find(i.prevEl))), e && e.length > 0 && e.on("click", this.navigation.onNextClick), t && t.length > 0 && t.on("click", this.navigation.onPrevClick), n.extend(this.navigation, { $nextEl: e, nextEl: e && e[0], $prevEl: t, prevEl: t && t[0] })) }, destroy: function () { var e = this.navigation, t = e.$nextEl, i = e.$prevEl; t && t.length && (t.off("click", this.navigation.onNextClick), t.removeClass(this.params.navigation.disabledClass)), i && i.length && (i.off("click", this.navigation.onPrevClick), i.removeClass(this.params.navigation.disabledClass)) } }, ae = { update: function () { var e = this.rtl, t = this.params.pagination; if (t.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var i, a = this.virtual && this.params.virtual.enabled ? this.virtual.slides.length : this.slides.length, r = this.pagination.$el, n = this.params.loop ? Math.ceil((a - 2 * this.loopedSlides) / this.params.slidesPerGroup) : this.snapGrid.length; if (this.params.loop ? ((i = Math.ceil((this.activeIndex - this.loopedSlides) / this.params.slidesPerGroup)) > a - 1 - 2 * this.loopedSlides && (i -= a - 2 * this.loopedSlides), i > n - 1 && (i -= n), i < 0 && "bullets" !== this.params.paginationType && (i = n + i)) : i = void 0 !== this.snapIndex ? this.snapIndex : this.activeIndex || 0, "bullets" === t.type && this.pagination.bullets && this.pagination.bullets.length > 0) { var o, l, d, h = this.pagination.bullets; if (t.dynamicBullets && (this.pagination.bulletSize = h.eq(0)[this.isHorizontal() ? "outerWidth" : "outerHeight"](!0), r.css(this.isHorizontal() ? "width" : "height", this.pagination.bulletSize * (t.dynamicMainBullets + 4) + "px"), t.dynamicMainBullets > 1 && void 0 !== this.previousIndex && (this.pagination.dynamicBulletIndex += i - this.previousIndex, this.pagination.dynamicBulletIndex > t.dynamicMainBullets - 1 ? this.pagination.dynamicBulletIndex = t.dynamicMainBullets - 1 : this.pagination.dynamicBulletIndex < 0 && (this.pagination.dynamicBulletIndex = 0)), o = i - this.pagination.dynamicBulletIndex, d = ((l = o + (Math.min(h.length, t.dynamicMainBullets) - 1)) + o) / 2), h.removeClass(t.bulletActiveClass + " " + t.bulletActiveClass + "-next " + t.bulletActiveClass + "-next-next " + t.bulletActiveClass + "-prev " + t.bulletActiveClass + "-prev-prev " + t.bulletActiveClass + "-main"), r.length > 1) h.each((function (e, a) { var r = s(a), n = r.index(); n === i && r.addClass(t.bulletActiveClass), t.dynamicBullets && (n >= o && n <= l && r.addClass(t.bulletActiveClass + "-main"), n === o && r.prev().addClass(t.bulletActiveClass + "-prev").prev().addClass(t.bulletActiveClass + "-prev-prev"), n === l && r.next().addClass(t.bulletActiveClass + "-next").next().addClass(t.bulletActiveClass + "-next-next")) })); else { var p = h.eq(i), c = p.index(); if (p.addClass(t.bulletActiveClass), t.dynamicBullets) { for (var u = h.eq(o), v = h.eq(l), f = o; f <= l; f += 1)h.eq(f).addClass(t.bulletActiveClass + "-main"); if (this.params.loop) if (c >= h.length - t.dynamicMainBullets) { for (var m = t.dynamicMainBullets; m >= 0; m -= 1)h.eq(h.length - m).addClass(t.bulletActiveClass + "-main"); h.eq(h.length - t.dynamicMainBullets - 1).addClass(t.bulletActiveClass + "-prev") } else u.prev().addClass(t.bulletActiveClass + "-prev").prev().addClass(t.bulletActiveClass + "-prev-prev"), v.next().addClass(t.bulletActiveClass + "-next").next().addClass(t.bulletActiveClass + "-next-next"); else u.prev().addClass(t.bulletActiveClass + "-prev").prev().addClass(t.bulletActiveClass + "-prev-prev"), v.next().addClass(t.bulletActiveClass + "-next").next().addClass(t.bulletActiveClass + "-next-next") } } if (t.dynamicBullets) { var g = Math.min(h.length, t.dynamicMainBullets + 4), b = (this.pagination.bulletSize * g - this.pagination.bulletSize) / 2 - d * this.pagination.bulletSize, w = e ? "right" : "left"; h.css(this.isHorizontal() ? w : "top", b + "px") } } if ("fraction" === t.type && (r.find("." + t.currentClass).text(t.formatFractionCurrent(i + 1)), r.find("." + t.totalClass).text(t.formatFractionTotal(n))), "progressbar" === t.type) { var y; y = t.progressbarOpposite ? this.isHorizontal() ? "vertical" : "horizontal" : this.isHorizontal() ? "horizontal" : "vertical"; var x = (i + 1) / n, T = 1, E = 1; "horizontal" === y ? T = x : E = x, r.find("." + t.progressbarFillClass).transform("translate3d(0,0,0) scaleX(" + T + ") scaleY(" + E + ")").transition(this.params.speed) } "custom" === t.type && t.renderCustom ? (r.html(t.renderCustom(this, i + 1, n)), this.emit("paginationRender", this, r[0])) : this.emit("paginationUpdate", this, r[0]), r[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](t.lockClass) } }, render: function () { var e = this.params.pagination; if (e.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var t = this.virtual && this.params.virtual.enabled ? this.virtual.slides.length : this.slides.length, i = this.pagination.$el, s = ""; if ("bullets" === e.type) { for (var a = this.params.loop ? Math.ceil((t - 2 * this.loopedSlides) / this.params.slidesPerGroup) : this.snapGrid.length, r = 0; r < a; r += 1)e.renderBullet ? s += e.renderBullet.call(this, r, e.bulletClass) : s += "<" + e.bulletElement + ' class="' + e.bulletClass + '">' + e.bulletElement + ">"; i.html(s), this.pagination.bullets = i.find("." + e.bulletClass) } "fraction" === e.type && (s = e.renderFraction ? e.renderFraction.call(this, e.currentClass, e.totalClass) : ' / ', i.html(s)), "progressbar" === e.type && (s = e.renderProgressbar ? e.renderProgressbar.call(this, e.progressbarFillClass) : '', i.html(s)), "custom" !== e.type && this.emit("paginationRender", this.pagination.$el[0]) } }, init: function () { var e = this, t = e.params.pagination; if (t.el) { var i = s(t.el); 0 !== i.length && (e.params.uniqueNavElements && "string" == typeof t.el && i.length > 1 && 1 === e.$el.find(t.el).length && (i = e.$el.find(t.el)), "bullets" === t.type && t.clickable && i.addClass(t.clickableClass), i.addClass(t.modifierClass + t.type), "bullets" === t.type && t.dynamicBullets && (i.addClass("" + t.modifierClass + t.type + "-dynamic"), e.pagination.dynamicBulletIndex = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), "progressbar" === t.type && t.progressbarOpposite && i.addClass(t.progressbarOppositeClass), t.clickable && i.on("click", "." + t.bulletClass, (function (t) { t.preventDefault(); var i = s(this).index() * e.params.slidesPerGroup; e.params.loop && (i += e.loopedSlides), e.slideTo(i) })), n.extend(e.pagination, { $el: i, el: i[0] })) } }, destroy: function () { var e = this.params.pagination; if (e.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var t = this.pagination.$el; t.removeClass(e.hiddenClass), t.removeClass(e.modifierClass + e.type), this.pagination.bullets && this.pagination.bullets.removeClass(e.bulletActiveClass), e.clickable && t.off("click", "." + e.bulletClass) } } }, re = { setTranslate: function () { if (this.params.scrollbar.el && this.scrollbar.el) { var e = this.scrollbar, t = this.rtlTranslate, i = this.progress, s = e.dragSize, a = e.trackSize, r = e.$dragEl, n = e.$el, o = this.params.scrollbar, l = s, d = (a - s) * i; t ? (d = -d) > 0 ? (l = s - d, d = 0) : -d + s > a && (l = a + d) : d < 0 ? (l = s + d, d = 0) : d + s > a && (l = a - d), this.isHorizontal() ? (r.transform("translate3d(" + d + "px, 0, 0)"), r[0].style.width = l + "px") : (r.transform("translate3d(0px, " + d + "px, 0)"), r[0].style.height = l + "px"), o.hide && (clearTimeout(this.scrollbar.timeout), n[0].style.opacity = 1, this.scrollbar.timeout = setTimeout((function () { n[0].style.opacity = 0, n.transition(400) }), 1e3)) } }, setTransition: function (e) { this.params.scrollbar.el && this.scrollbar.el && this.scrollbar.$dragEl.transition(e) }, updateSize: function () { if (this.params.scrollbar.el && this.scrollbar.el) { var e = this.scrollbar, t = e.$dragEl, i = e.$el; t[0].style.width = "", t[0].style.height = ""; var s, a = this.isHorizontal() ? i[0].offsetWidth : i[0].offsetHeight, r = this.size / this.virtualSize, o = r * (a / this.size); s = "auto" === this.params.scrollbar.dragSize ? a * r : parseInt(this.params.scrollbar.dragSize, 10), this.isHorizontal() ? t[0].style.width = s + "px" : t[0].style.height = s + "px", i[0].style.display = r >= 1 ? "none" : "", this.params.scrollbar.hide && (i[0].style.opacity = 0), n.extend(e, { trackSize: a, divider: r, moveDivider: o, dragSize: s }), e.$el[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](this.params.scrollbar.lockClass) } }, getPointerPosition: function (e) { return this.isHorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].clientX : e.clientX : "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].clientY : e.clientY }, setDragPosition: function (e) { var t, i = this.scrollbar, s = this.rtlTranslate, a = i.$el, r = i.dragSize, n = i.trackSize, o = i.dragStartPos; t = (i.getPointerPosition(e) - a.offset()[this.isHorizontal() ? "left" : "top"] - (null !== o ? o : r / 2)) / (n - r), t = Math.max(Math.min(t, 1), 0), s && (t = 1 - t); var l = this.minTranslate() + (this.maxTranslate() - this.minTranslate()) * t; this.updateProgress(l), this.setTranslate(l), this.updateActiveIndex(), this.updateSlidesClasses() }, onDragStart: function (e) { var t = this.params.scrollbar, i = this.scrollbar, s = this.$wrapperEl, a = i.$el, r = i.$dragEl; this.scrollbar.isTouched = !0, this.scrollbar.dragStartPos = e.target === r[0] || e.target === r ? i.getPointerPosition(e) - e.target.getBoundingClientRect()[this.isHorizontal() ? "left" : "top"] : null, e.preventDefault(), e.stopPropagation(), s.transition(100), r.transition(100), i.setDragPosition(e), clearTimeout(this.scrollbar.dragTimeout), a.transition(0), t.hide && a.css("opacity", 1), this.params.cssMode && this.$wrapperEl.css("scroll-snap-type", "none"), this.emit("scrollbarDragStart", e) }, onDragMove: function (e) { var t = this.scrollbar, i = this.$wrapperEl, s = t.$el, a = t.$dragEl; this.scrollbar.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, t.setDragPosition(e), i.transition(0), s.transition(0), a.transition(0), this.emit("scrollbarDragMove", e)) }, onDragEnd: function (e) { var t = this.params.scrollbar, i = this.scrollbar, s = this.$wrapperEl, a = i.$el; this.scrollbar.isTouched && (this.scrollbar.isTouched = !1, this.params.cssMode && (this.$wrapperEl.css("scroll-snap-type", ""), s.transition("")), t.hide && (clearTimeout(this.scrollbar.dragTimeout), this.scrollbar.dragTimeout = n.nextTick((function () { a.css("opacity", 0), a.transition(400) }), 1e3)), this.emit("scrollbarDragEnd", e), t.snapOnRelease && this.slideToClosest()) }, enableDraggable: function () { if (this.params.scrollbar.el) { var t = this.scrollbar, i = this.touchEventsTouch, s = this.touchEventsDesktop, a = this.params, r = t.$el[0], n = !(!o.passiveListener || !a.passiveListeners) && { passive: !1, capture: !1 }, l = !(!o.passiveListener || !a.passiveListeners) && { passive: !0, capture: !1 }; o.touch ? (r.addEventListener(i.start, this.scrollbar.onDragStart, n), r.addEventListener(i.move, this.scrollbar.onDragMove, n), r.addEventListener(i.end, this.scrollbar.onDragEnd, l)) : (r.addEventListener(s.start, this.scrollbar.onDragStart, n), e.addEventListener(s.move, this.scrollbar.onDragMove, n), e.addEventListener(s.end, this.scrollbar.onDragEnd, l)) } }, disableDraggable: function () { if (this.params.scrollbar.el) { var t = this.scrollbar, i = this.touchEventsTouch, s = this.touchEventsDesktop, a = this.params, r = t.$el[0], n = !(!o.passiveListener || !a.passiveListeners) && { passive: !1, capture: !1 }, l = !(!o.passiveListener || !a.passiveListeners) && { passive: !0, capture: !1 }; o.touch ? (r.removeEventListener(i.start, this.scrollbar.onDragStart, n), r.removeEventListener(i.move, this.scrollbar.onDragMove, n), r.removeEventListener(i.end, this.scrollbar.onDragEnd, l)) : (r.removeEventListener(s.start, this.scrollbar.onDragStart, n), e.removeEventListener(s.move, this.scrollbar.onDragMove, n), e.removeEventListener(s.end, this.scrollbar.onDragEnd, l)) } }, init: function () { if (this.params.scrollbar.el) { var e = this.scrollbar, t = this.$el, i = this.params.scrollbar, a = s(i.el); this.params.uniqueNavElements && "string" == typeof i.el && a.length > 1 && 1 === t.find(i.el).length && (a = t.find(i.el)); var r = a.find("." + this.params.scrollbar.dragClass); 0 === r.length && (r = s('
'), a.append(r)), n.extend(e, { $el: a, el: a[0], $dragEl: r, dragEl: r[0] }), i.draggable && e.enableDraggable() } }, destroy: function () { this.scrollbar.disableDraggable() } }, ne = { setTransform: function (e, t) { var i = this.rtl, a = s(e), r = i ? -1 : 1, n = a.attr("data-swiper-parallax") || "0", o = a.attr("data-swiper-parallax-x"), l = a.attr("data-swiper-parallax-y"), d = a.attr("data-swiper-parallax-scale"), h = a.attr("data-swiper-parallax-opacity"); if (o || l ? (o = o || "0", l = l || "0") : this.isHorizontal() ? (o = n, l = "0") : (l = n, o = "0"), o = o.indexOf("%") >= 0 ? parseInt(o, 10) * t * r + "%" : o * t * r + "px", l = l.indexOf("%") >= 0 ? parseInt(l, 10) * t + "%" : l * t + "px", null != h) { var p = h - (h - 1) * (1 - Math.abs(t)); a[0].style.opacity = p } if (null == d) a.transform("translate3d(" + o + ", " + l + ", 0px)"); else { var c = d - (d - 1) * (1 - Math.abs(t)); a.transform("translate3d(" + o + ", " + l + ", 0px) scale(" + c + ")") } }, setTranslate: function () { var e = this, t = e.$el, i = e.slides, a = e.progress, r = e.snapGrid; t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function (t, i) { e.parallax.setTransform(i, a) })), i.each((function (t, i) { var n = i.progress; e.params.slidesPerGroup > 1 && "auto" !== e.params.slidesPerView && (n += Math.ceil(t / 2) - a * (r.length - 1)), n = Math.min(Math.max(n, -1), 1), s(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function (t, i) { e.parallax.setTransform(i, n) })) })) }, setTransition: function (e) { void 0 === e && (e = this.params.speed); this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function (t, i) { var a = s(i), r = parseInt(a.attr("data-swiper-parallax-duration"), 10) || e; 0 === e && (r = 0), a.transition(r) })) } }, oe = { getDistanceBetweenTouches: function (e) { if (e.targetTouches.length < 2) return 1; var t = e.targetTouches[0].pageX, i = e.targetTouches[0].pageY, s = e.targetTouches[1].pageX, a = e.targetTouches[1].pageY; return Math.sqrt(Math.pow(s - t, 2) + Math.pow(a - i, 2)) }, onGestureStart: function (e) { var t = this.params.zoom, i = this.zoom, a = i.gesture; if (i.fakeGestureTouched = !1, i.fakeGestureMoved = !1, !o.gestures) { if ("touchstart" !== e.type || "touchstart" === e.type && e.targetTouches.length < 2) return; i.fakeGestureTouched = !0, a.scaleStart = oe.getDistanceBetweenTouches(e) } a.$slideEl && a.$slideEl.length || (a.$slideEl = s(e.target).closest(".swiper-slide"), 0 === a.$slideEl.length && (a.$slideEl = this.slides.eq(this.activeIndex)), a.$imageEl = a.$slideEl.find("img, svg, canvas"), a.$imageWrapEl = a.$imageEl.parent("." + t.containerClass), a.maxRatio = a.$imageWrapEl.attr("data-swiper-zoom") || t.maxRatio, 0 !== a.$imageWrapEl.length) ? (a.$imageEl.transition(0), this.zoom.isScaling = !0) : a.$imageEl = void 0 }, onGestureChange: function (e) { var t = this.params.zoom, i = this.zoom, s = i.gesture; if (!o.gestures) { if ("touchmove" !== e.type || "touchmove" === e.type && e.targetTouches.length < 2) return; i.fakeGestureMoved = !0, s.scaleMove = oe.getDistanceBetweenTouches(e) } s.$imageEl && 0 !== s.$imageEl.length && (o.gestures ? i.scale = e.scale * i.currentScale : i.scale = s.scaleMove / s.scaleStart * i.currentScale, i.scale > s.maxRatio && (i.scale = s.maxRatio - 1 + Math.pow(i.scale - s.maxRatio + 1, .5)), i.scale < t.minRatio && (i.scale = t.minRatio + 1 - Math.pow(t.minRatio - i.scale + 1, .5)), s.$imageEl.transform("translate3d(0,0,0) scale(" + i.scale + ")")) }, onGestureEnd: function (e) { var t = this.params.zoom, i = this.zoom, s = i.gesture; if (!o.gestures) { if (!i.fakeGestureTouched || !i.fakeGestureMoved) return; if ("touchend" !== e.type || "touchend" === e.type && e.changedTouches.length < 2 && !I.android) return; i.fakeGestureTouched = !1, i.fakeGestureMoved = !1 } s.$imageEl && 0 !== s.$imageEl.length && (i.scale = Math.max(Math.min(i.scale, s.maxRatio), t.minRatio), s.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale(" + i.scale + ")"), i.currentScale = i.scale, i.isScaling = !1, 1 === i.scale && (s.$slideEl = void 0)) }, onTouchStart: function (e) { var t = this.zoom, i = t.gesture, s = t.image; i.$imageEl && 0 !== i.$imageEl.length && (s.isTouched || (I.android && e.preventDefault(), s.isTouched = !0, s.touchesStart.x = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX, s.touchesStart.y = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY)) }, onTouchMove: function (e) { var t = this.zoom, i = t.gesture, s = t.image, a = t.velocity; if (i.$imageEl && 0 !== i.$imageEl.length && (this.allowClick = !1, s.isTouched && i.$slideEl)) { s.isMoved || (s.width = i.$imageEl[0].offsetWidth, s.height = i.$imageEl[0].offsetHeight, s.startX = n.getTranslate(i.$imageWrapEl[0], "x") || 0, s.startY = n.getTranslate(i.$imageWrapEl[0], "y") || 0, i.slideWidth = i.$slideEl[0].offsetWidth, i.slideHeight = i.$slideEl[0].offsetHeight, i.$imageWrapEl.transition(0), this.rtl && (s.startX = -s.startX, s.startY = -s.startY)); var r = s.width * t.scale, o = s.height * t.scale; if (!(r < i.slideWidth && o < i.slideHeight)) { if (s.minX = Math.min(i.slideWidth / 2 - r / 2, 0), s.maxX = -s.minX, s.minY = Math.min(i.slideHeight / 2 - o / 2, 0), s.maxY = -s.minY, s.touchesCurrent.x = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, s.touchesCurrent.y = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, !s.isMoved && !t.isScaling) { if (this.isHorizontal() && (Math.floor(s.minX) === Math.floor(s.startX) && s.touchesCurrent.x < s.touchesStart.x || Math.floor(s.maxX) === Math.floor(s.startX) && s.touchesCurrent.x > s.touchesStart.x)) return void (s.isTouched = !1); if (!this.isHorizontal() && (Math.floor(s.minY) === Math.floor(s.startY) && s.touchesCurrent.y < s.touchesStart.y || Math.floor(s.maxY) === Math.floor(s.startY) && s.touchesCurrent.y > s.touchesStart.y)) return void (s.isTouched = !1) } e.preventDefault(), e.stopPropagation(), s.isMoved = !0, s.currentX = s.touchesCurrent.x - s.touchesStart.x + s.startX, s.currentY = s.touchesCurrent.y - s.touchesStart.y + s.startY, s.currentX < s.minX && (s.currentX = s.minX + 1 - Math.pow(s.minX - s.currentX + 1, .8)), s.currentX > s.maxX && (s.currentX = s.maxX - 1 + Math.pow(s.currentX - s.maxX + 1, .8)), s.currentY < s.minY && (s.currentY = s.minY + 1 - Math.pow(s.minY - s.currentY + 1, .8)), s.currentY > s.maxY && (s.currentY = s.maxY - 1 + Math.pow(s.currentY - s.maxY + 1, .8)), a.prevPositionX || (a.prevPositionX = s.touchesCurrent.x), a.prevPositionY || (a.prevPositionY = s.touchesCurrent.y), a.prevTime || (a.prevTime = Date.now()), a.x = (s.touchesCurrent.x - a.prevPositionX) / (Date.now() - a.prevTime) / 2, a.y = (s.touchesCurrent.y - a.prevPositionY) / (Date.now() - a.prevTime) / 2, Math.abs(s.touchesCurrent.x - a.prevPositionX) < 2 && (a.x = 0), Math.abs(s.touchesCurrent.y - a.prevPositionY) < 2 && (a.y = 0), a.prevPositionX = s.touchesCurrent.x, a.prevPositionY = s.touchesCurrent.y, a.prevTime = Date.now(), i.$imageWrapEl.transform("translate3d(" + s.currentX + "px, " + s.currentY + "px,0)") } } }, onTouchEnd: function () { var e = this.zoom, t = e.gesture, i = e.image, s = e.velocity; if (t.$imageEl && 0 !== t.$imageEl.length) { if (!i.isTouched || !i.isMoved) return i.isTouched = !1, void (i.isMoved = !1); i.isTouched = !1, i.isMoved = !1; var a = 300, r = 300, n = s.x * a, o = i.currentX + n, l = s.y * r, d = i.currentY + l; 0 !== s.x && (a = Math.abs((o - i.currentX) / s.x)), 0 !== s.y && (r = Math.abs((d - i.currentY) / s.y)); var h = Math.max(a, r); i.currentX = o, i.currentY = d; var p = i.width * e.scale, c = i.height * e.scale; i.minX = Math.min(t.slideWidth / 2 - p / 2, 0), i.maxX = -i.minX, i.minY = Math.min(t.slideHeight / 2 - c / 2, 0), i.maxY = -i.minY, i.currentX = Math.max(Math.min(i.currentX, i.maxX), i.minX), i.currentY = Math.max(Math.min(i.currentY, i.maxY), i.minY), t.$imageWrapEl.transition(h).transform("translate3d(" + i.currentX + "px, " + i.currentY + "px,0)") } }, onTransitionEnd: function () { var e = this.zoom, t = e.gesture; t.$slideEl && this.previousIndex !== this.activeIndex && (t.$imageEl.transform("translate3d(0,0,0) scale(1)"), t.$imageWrapEl.transform("translate3d(0,0,0)"), e.scale = 1, e.currentScale = 1, t.$slideEl = void 0, t.$imageEl = void 0, t.$imageWrapEl = void 0) }, toggle: function (e) { var t = this.zoom; t.scale && 1 !== t.scale ? t.out() : t.in(e) }, in: function (e) { var t, i, a, r, n, o, l, d, h, p, c, u, v, f, m, g, b = this.zoom, w = this.params.zoom, y = b.gesture, x = b.image; (y.$slideEl || (y.$slideEl = this.clickedSlide ? s(this.clickedSlide) : this.slides.eq(this.activeIndex), y.$imageEl = y.$slideEl.find("img, svg, canvas"), y.$imageWrapEl = y.$imageEl.parent("." + w.containerClass)), y.$imageEl && 0 !== y.$imageEl.length) && (y.$slideEl.addClass("" + w.zoomedSlideClass), void 0 === x.touchesStart.x && e ? (t = "touchend" === e.type ? e.changedTouches[0].pageX : e.pageX, i = "touchend" === e.type ? e.changedTouches[0].pageY : e.pageY) : (t = x.touchesStart.x, i = x.touchesStart.y), b.scale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, b.currentScale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, e ? (m = y.$slideEl[0].offsetWidth, g = y.$slideEl[0].offsetHeight, a = y.$slideEl.offset().left + m / 2 - t, r = y.$slideEl.offset().top + g / 2 - i, l = y.$imageEl[0].offsetWidth, d = y.$imageEl[0].offsetHeight, h = l * b.scale, p = d * b.scale, v = -(c = Math.min(m / 2 - h / 2, 0)), f = -(u = Math.min(g / 2 - p / 2, 0)), (n = a * b.scale) < c && (n = c), n > v && (n = v), (o = r * b.scale) < u && (o = u), o > f && (o = f)) : (n = 0, o = 0), y.$imageWrapEl.transition(300).transform("translate3d(" + n + "px, " + o + "px,0)"), y.$imageEl.transition(300).transform("translate3d(0,0,0) scale(" + b.scale + ")")) }, out: function () { var e = this.zoom, t = this.params.zoom, i = e.gesture; i.$slideEl || (i.$slideEl = this.clickedSlide ? s(this.clickedSlide) : this.slides.eq(this.activeIndex), i.$imageEl = i.$slideEl.find("img, svg, canvas"), i.$imageWrapEl = i.$imageEl.parent("." + t.containerClass)), i.$imageEl && 0 !== i.$imageEl.length && (e.scale = 1, e.currentScale = 1, i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"), i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"), i.$slideEl.removeClass("" + t.zoomedSlideClass), i.$slideEl = void 0) }, enable: function () { var e = this.zoom; if (!e.enabled) { e.enabled = !0; var t = !("touchstart" !== this.touchEvents.start || !o.passiveListener || !this.params.passiveListeners) && { passive: !0, capture: !1 }, i = !o.passiveListener || { passive: !1, capture: !0 }; o.gestures ? (this.$wrapperEl.on("gesturestart", ".swiper-slide", e.onGestureStart, t), this.$wrapperEl.on("gesturechange", ".swiper-slide", e.onGestureChange, t), this.$wrapperEl.on("gestureend", ".swiper-slide", e.onGestureEnd, t)) : "touchstart" === this.touchEvents.start && (this.$wrapperEl.on(this.touchEvents.start, ".swiper-slide", e.onGestureStart, t), this.$wrapperEl.on(this.touchEvents.move, ".swiper-slide", e.onGestureChange, i), this.$wrapperEl.on(this.touchEvents.end, ".swiper-slide", e.onGestureEnd, t), this.touchEvents.cancel && this.$wrapperEl.on(this.touchEvents.cancel, ".swiper-slide", e.onGestureEnd, t)), this.$wrapperEl.on(this.touchEvents.move, "." + this.params.zoom.containerClass, e.onTouchMove, i) } }, disable: function () { var e = this.zoom; if (e.enabled) { this.zoom.enabled = !1; var t = !("touchstart" !== this.touchEvents.start || !o.passiveListener || !this.params.passiveListeners) && { passive: !0, capture: !1 }, i = !o.passiveListener || { passive: !1, capture: !0 }; o.gestures ? (this.$wrapperEl.off("gesturestart", ".swiper-slide", e.onGestureStart, t), this.$wrapperEl.off("gesturechange", ".swiper-slide", e.onGestureChange, t), this.$wrapperEl.off("gestureend", ".swiper-slide", e.onGestureEnd, t)) : "touchstart" === this.touchEvents.start && (this.$wrapperEl.off(this.touchEvents.start, ".swiper-slide", e.onGestureStart, t), this.$wrapperEl.off(this.touchEvents.move, ".swiper-slide", e.onGestureChange, i), this.$wrapperEl.off(this.touchEvents.end, ".swiper-slide", e.onGestureEnd, t), this.touchEvents.cancel && this.$wrapperEl.off(this.touchEvents.cancel, ".swiper-slide", e.onGestureEnd, t)), this.$wrapperEl.off(this.touchEvents.move, "." + this.params.zoom.containerClass, e.onTouchMove, i) } } }, le = { loadInSlide: function (e, t) { void 0 === t && (t = !0); var i = this, a = i.params.lazy; if (void 0 !== e && 0 !== i.slides.length) { var r = i.virtual && i.params.virtual.enabled ? i.$wrapperEl.children("." + i.params.slideClass + '[data-swiper-slide-index="' + e + '"]') : i.slides.eq(e), n = r.find("." + a.elementClass + ":not(." + a.loadedClass + "):not(." + a.loadingClass + ")"); !r.hasClass(a.elementClass) || r.hasClass(a.loadedClass) || r.hasClass(a.loadingClass) || (n = n.add(r[0])), 0 !== n.length && n.each((function (e, n) { var o = s(n); o.addClass(a.loadingClass); var l = o.attr("data-background"), d = o.attr("data-src"), h = o.attr("data-srcset"), p = o.attr("data-sizes"); i.loadImage(o[0], d || l, h, p, !1, (function () { if (null != i && i && (!i || i.params) && !i.destroyed) { if (l ? (o.css("background-image", 'url("' + l + '")'), o.removeAttr("data-background")) : (h && (o.attr("srcset", h), o.removeAttr("data-srcset")), p && (o.attr("sizes", p), o.removeAttr("data-sizes")), d && (o.attr("src", d), o.removeAttr("data-src"))), o.addClass(a.loadedClass).removeClass(a.loadingClass), r.find("." + a.preloaderClass).remove(), i.params.loop && t) { var e = r.attr("data-swiper-slide-index"); if (r.hasClass(i.params.slideDuplicateClass)) { var s = i.$wrapperEl.children('[data-swiper-slide-index="' + e + '"]:not(.' + i.params.slideDuplicateClass + ")"); i.lazy.loadInSlide(s.index(), !1) } else { var n = i.$wrapperEl.children("." + i.params.slideDuplicateClass + '[data-swiper-slide-index="' + e + '"]'); i.lazy.loadInSlide(n.index(), !1) } } i.emit("lazyImageReady", r[0], o[0]) } })), i.emit("lazyImageLoad", r[0], o[0]) })) } }, load: function () { var e = this, t = e.$wrapperEl, i = e.params, a = e.slides, r = e.activeIndex, n = e.virtual && i.virtual.enabled, o = i.lazy, l = i.slidesPerView; function d(e) { if (n) { if (t.children("." + i.slideClass + '[data-swiper-slide-index="' + e + '"]').length) return !0 } else if (a[e]) return !0; return !1 } function h(e) { return n ? s(e).attr("data-swiper-slide-index") : s(e).index() } if ("auto" === l && (l = 0), e.lazy.initialImageLoaded || (e.lazy.initialImageLoaded = !0), e.params.watchSlidesVisibility) t.children("." + i.slideVisibleClass).each((function (t, i) { var a = n ? s(i).attr("data-swiper-slide-index") : s(i).index(); e.lazy.loadInSlide(a) })); else if (l > 1) for (var p = r; p < r + l; p += 1)d(p) && e.lazy.loadInSlide(p); else e.lazy.loadInSlide(r); if (o.loadPrevNext) if (l > 1 || o.loadPrevNextAmount && o.loadPrevNextAmount > 1) { for (var c = o.loadPrevNextAmount, u = l, v = Math.min(r + u + Math.max(c, u), a.length), f = Math.max(r - Math.max(u, c), 0), m = r + l; m < v; m += 1)d(m) && e.lazy.loadInSlide(m); for (var g = f; g < r; g += 1)d(g) && e.lazy.loadInSlide(g) } else { var b = t.children("." + i.slideNextClass); b.length > 0 && e.lazy.loadInSlide(h(b)); var w = t.children("." + i.slidePrevClass); w.length > 0 && e.lazy.loadInSlide(h(w)) } } }, de = { LinearSpline: function (e, t) { var i, s, a, r, n, o = function (e, t) { for (s = -1, i = e.length; i - s > 1;)e[a = i + s >> 1] <= t ? s = a : i = a; return i }; return this.x = e, this.y = t, this.lastIndex = e.length - 1, this.interpolate = function (e) { return e ? (n = o(this.x, e), r = n - 1, (e - this.x[r]) * (this.y[n] - this.y[r]) / (this.x[n] - this.x[r]) + this.y[r]) : 0 }, this }, getInterpolateFunction: function (e) { this.controller.spline || (this.controller.spline = this.params.loop ? new de.LinearSpline(this.slidesGrid, e.slidesGrid) : new de.LinearSpline(this.snapGrid, e.snapGrid)) }, setTranslate: function (e, t) { var i, s, a = this, r = a.controller.control; function n(e) { var t = a.rtlTranslate ? -a.translate : a.translate; "slide" === a.params.controller.by && (a.controller.getInterpolateFunction(e), s = -a.controller.spline.interpolate(-t)), s && "container" !== a.params.controller.by || (i = (e.maxTranslate() - e.minTranslate()) / (a.maxTranslate() - a.minTranslate()), s = (t - a.minTranslate()) * i + e.minTranslate()), a.params.controller.inverse && (s = e.maxTranslate() - s), e.updateProgress(s), e.setTranslate(s, a), e.updateActiveIndex(), e.updateSlidesClasses() } if (Array.isArray(r)) for (var o = 0; o < r.length; o += 1)r[o] !== t && r[o] instanceof W && n(r[o]); else r instanceof W && t !== r && n(r) }, setTransition: function (e, t) { var i, s = this, a = s.controller.control; function r(t) { t.setTransition(e, s), 0 !== e && (t.transitionStart(), t.params.autoHeight && n.nextTick((function () { t.updateAutoHeight() })), t.$wrapperEl.transitionEnd((function () { a && (t.params.loop && "slide" === s.params.controller.by && t.loopFix(), t.transitionEnd()) }))) } if (Array.isArray(a)) for (i = 0; i < a.length; i += 1)a[i] !== t && a[i] instanceof W && r(a[i]); else a instanceof W && t !== a && r(a) } }, he = { makeElFocusable: function (e) { return e.attr("tabIndex", "0"), e }, addElRole: function (e, t) { return e.attr("role", t), e }, addElLabel: function (e, t) { return e.attr("aria-label", t), e }, disableEl: function (e) { return e.attr("aria-disabled", !0), e }, enableEl: function (e) { return e.attr("aria-disabled", !1), e }, onEnterKey: function (e) { var t = this.params.a11y; if (13 === e.keyCode) { var i = s(e.target); this.navigation && this.navigation.$nextEl && i.is(this.navigation.$nextEl) && (this.isEnd && !this.params.loop || this.slideNext(), this.isEnd ? this.a11y.notify(t.lastSlideMessage) : this.a11y.notify(t.nextSlideMessage)), this.navigation && this.navigation.$prevEl && i.is(this.navigation.$prevEl) && (this.isBeginning && !this.params.loop || this.slidePrev(), this.isBeginning ? this.a11y.notify(t.firstSlideMessage) : this.a11y.notify(t.prevSlideMessage)), this.pagination && i.is("." + this.params.pagination.bulletClass) && i[0].click() } }, notify: function (e) { var t = this.a11y.liveRegion; 0 !== t.length && (t.html(""), t.html(e)) }, updateNavigation: function () { if (!this.params.loop && this.navigation) { var e = this.navigation, t = e.$nextEl, i = e.$prevEl; i && i.length > 0 && (this.isBeginning ? this.a11y.disableEl(i) : this.a11y.enableEl(i)), t && t.length > 0 && (this.isEnd ? this.a11y.disableEl(t) : this.a11y.enableEl(t)) } }, updatePagination: function () { var e = this, t = e.params.a11y; e.pagination && e.params.pagination.clickable && e.pagination.bullets && e.pagination.bullets.length && e.pagination.bullets.each((function (i, a) { var r = s(a); e.a11y.makeElFocusable(r), e.a11y.addElRole(r, "button"), e.a11y.addElLabel(r, t.paginationBulletMessage.replace(/{{index}}/, r.index() + 1)) })) }, init: function () { this.$el.append(this.a11y.liveRegion); var e, t, i = this.params.a11y; this.navigation && this.navigation.$nextEl && (e = this.navigation.$nextEl), this.navigation && this.navigation.$prevEl && (t = this.navigation.$prevEl), e && (this.a11y.makeElFocusable(e), this.a11y.addElRole(e, "button"), this.a11y.addElLabel(e, i.nextSlideMessage), e.on("keydown", this.a11y.onEnterKey)), t && (this.a11y.makeElFocusable(t), this.a11y.addElRole(t, "button"), this.a11y.addElLabel(t, i.prevSlideMessage), t.on("keydown", this.a11y.onEnterKey)), this.pagination && this.params.pagination.clickable && this.pagination.bullets && this.pagination.bullets.length && this.pagination.$el.on("keydown", "." + this.params.pagination.bulletClass, this.a11y.onEnterKey) }, destroy: function () { var e, t; this.a11y.liveRegion && this.a11y.liveRegion.length > 0 && this.a11y.liveRegion.remove(), this.navigation && this.navigation.$nextEl && (e = this.navigation.$nextEl), this.navigation && this.navigation.$prevEl && (t = this.navigation.$prevEl), e && e.off("keydown", this.a11y.onEnterKey), t && t.off("keydown", this.a11y.onEnterKey), this.pagination && this.params.pagination.clickable && this.pagination.bullets && this.pagination.bullets.length && this.pagination.$el.off("keydown", "." + this.params.pagination.bulletClass, this.a11y.onEnterKey) } }, pe = { init: function () { if (this.params.history) { if (!t.history || !t.history.pushState) return this.params.history.enabled = !1, void (this.params.hashNavigation.enabled = !0); var e = this.history; e.initialized = !0, e.paths = pe.getPathValues(), (e.paths.key || e.paths.value) && (e.scrollToSlide(0, e.paths.value, this.params.runCallbacksOnInit), this.params.history.replaceState || t.addEventListener("popstate", this.history.setHistoryPopState)) } }, destroy: function () { this.params.history.replaceState || t.removeEventListener("popstate", this.history.setHistoryPopState) }, setHistoryPopState: function () { this.history.paths = pe.getPathValues(), this.history.scrollToSlide(this.params.speed, this.history.paths.value, !1) }, getPathValues: function () { var e = t.location.pathname.slice(1).split("/").filter((function (e) { return "" !== e })), i = e.length; return { key: e[i - 2], value: e[i - 1] } }, setHistory: function (e, i) { if (this.history.initialized && this.params.history.enabled) { var s = this.slides.eq(i), a = pe.slugify(s.attr("data-history")); t.location.pathname.includes(e) || (a = e + "/" + a); var r = t.history.state; r && r.value === a || (this.params.history.replaceState ? t.history.replaceState({ value: a }, null, a) : t.history.pushState({ value: a }, null, a)) } }, slugify: function (e) { return e.toString().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "") }, scrollToSlide: function (e, t, i) { if (t) for (var s = 0, a = this.slides.length; s < a; s += 1) { var r = this.slides.eq(s); if (pe.slugify(r.attr("data-history")) === t && !r.hasClass(this.params.slideDuplicateClass)) { var n = r.index(); this.slideTo(n, e, i) } } else this.slideTo(0, e, i) } }, ce = { onHashCange: function () { var t = e.location.hash.replace("#", ""); if (t !== this.slides.eq(this.activeIndex).attr("data-hash")) { var i = this.$wrapperEl.children("." + this.params.slideClass + '[data-hash="' + t + '"]').index(); if (void 0 === i) return; this.slideTo(i) } }, setHash: function () { if (this.hashNavigation.initialized && this.params.hashNavigation.enabled) if (this.params.hashNavigation.replaceState && t.history && t.history.replaceState) t.history.replaceState(null, null, "#" + this.slides.eq(this.activeIndex).attr("data-hash") || ""); else { var i = this.slides.eq(this.activeIndex), s = i.attr("data-hash") || i.attr("data-history"); e.location.hash = s || "" } }, init: function () { if (!(!this.params.hashNavigation.enabled || this.params.history && this.params.history.enabled)) { this.hashNavigation.initialized = !0; var i = e.location.hash.replace("#", ""); if (i) for (var a = 0, r = this.slides.length; a < r; a += 1) { var n = this.slides.eq(a); if ((n.attr("data-hash") || n.attr("data-history")) === i && !n.hasClass(this.params.slideDuplicateClass)) { var o = n.index(); this.slideTo(o, 0, this.params.runCallbacksOnInit, !0) } } this.params.hashNavigation.watchState && s(t).on("hashchange", this.hashNavigation.onHashCange) } }, destroy: function () { this.params.hashNavigation.watchState && s(t).off("hashchange", this.hashNavigation.onHashCange) } }, ue = { run: function () { var e = this, t = e.slides.eq(e.activeIndex), i = e.params.autoplay.delay; t.attr("data-swiper-autoplay") && (i = t.attr("data-swiper-autoplay") || e.params.autoplay.delay), clearTimeout(e.autoplay.timeout), e.autoplay.timeout = n.nextTick((function () { e.params.autoplay.reverseDirection ? e.params.loop ? (e.loopFix(), e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.isBeginning ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(e.slides.length - 1, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.params.loop ? (e.loopFix(), e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")) : e.isEnd ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(0, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")), e.params.cssMode && e.autoplay.running && e.autoplay.run() }), i) }, start: function () { return void 0 === this.autoplay.timeout && (!this.autoplay.running && (this.autoplay.running = !0, this.emit("autoplayStart"), this.autoplay.run(), !0)) }, stop: function () { return !!this.autoplay.running && (void 0 !== this.autoplay.timeout && (this.autoplay.timeout && (clearTimeout(this.autoplay.timeout), this.autoplay.timeout = void 0), this.autoplay.running = !1, this.emit("autoplayStop"), !0)) }, pause: function (e) { this.autoplay.running && (this.autoplay.paused || (this.autoplay.timeout && clearTimeout(this.autoplay.timeout), this.autoplay.paused = !0, 0 !== e && this.params.autoplay.waitForTransition ? (this.$wrapperEl[0].addEventListener("transitionend", this.autoplay.onTransitionEnd), this.$wrapperEl[0].addEventListener("webkitTransitionEnd", this.autoplay.onTransitionEnd)) : (this.autoplay.paused = !1, this.autoplay.run()))) } }, ve = { setTranslate: function () { for (var e = this.slides, t = 0; t < e.length; t += 1) { var i = this.slides.eq(t), s = -i[0].swiperSlideOffset; this.params.virtualTranslate || (s -= this.translate); var a = 0; this.isHorizontal() || (a = s, s = 0); var r = this.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(i[0].progress), 0) : 1 + Math.min(Math.max(i[0].progress, -1), 0); i.css({ opacity: r }).transform("translate3d(" + s + "px, " + a + "px, 0px)") } }, setTransition: function (e) { var t = this, i = t.slides, s = t.$wrapperEl; if (i.transition(e), t.params.virtualTranslate && 0 !== e) { var a = !1; i.transitionEnd((function () { if (!a && t && !t.destroyed) { a = !0, t.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], i = 0; i < e.length; i += 1)s.trigger(e[i]) } })) } } }, fe = { setTranslate: function () { var e, t = this.$el, i = this.$wrapperEl, a = this.slides, r = this.width, n = this.height, o = this.rtlTranslate, l = this.size, d = this.params.cubeEffect, h = this.isHorizontal(), p = this.virtual && this.params.virtual.enabled, c = 0; d.shadow && (h ? (0 === (e = i.find(".swiper-cube-shadow")).length && (e = s('
'), i.append(e)), e.css({ height: r + "px" })) : 0 === (e = t.find(".swiper-cube-shadow")).length && (e = s('
'), t.append(e))); for (var u = 0; u < a.length; u += 1) { var v = a.eq(u), f = u; p && (f = parseInt(v.attr("data-swiper-slide-index"), 10)); var m = 90 * f, g = Math.floor(m / 360); o && (m = -m, g = Math.floor(-m / 360)); var b = Math.max(Math.min(v[0].progress, 1), -1), w = 0, y = 0, x = 0; f % 4 == 0 ? (w = 4 * -g * l, x = 0) : (f - 1) % 4 == 0 ? (w = 0, x = 4 * -g * l) : (f - 2) % 4 == 0 ? (w = l + 4 * g * l, x = l) : (f - 3) % 4 == 0 && (w = -l, x = 3 * l + 4 * l * g), o && (w = -w), h || (y = w, w = 0); var T = "rotateX(" + (h ? 0 : -m) + "deg) rotateY(" + (h ? m : 0) + "deg) translate3d(" + w + "px, " + y + "px, " + x + "px)"; if (b <= 1 && b > -1 && (c = 90 * f + 90 * b, o && (c = 90 * -f - 90 * b)), v.transform(T), d.slideShadows) { var E = h ? v.find(".swiper-slide-shadow-left") : v.find(".swiper-slide-shadow-top"), S = h ? v.find(".swiper-slide-shadow-right") : v.find(".swiper-slide-shadow-bottom"); 0 === E.length && (E = s('
'), v.append(E)), 0 === S.length && (S = s('
'), v.append(S)), E.length && (E[0].style.opacity = Math.max(-b, 0)), S.length && (S[0].style.opacity = Math.max(b, 0)) } } if (i.css({ "-webkit-transform-origin": "50% 50% -" + l / 2 + "px", "-moz-transform-origin": "50% 50% -" + l / 2 + "px", "-ms-transform-origin": "50% 50% -" + l / 2 + "px", "transform-origin": "50% 50% -" + l / 2 + "px" }), d.shadow) if (h) e.transform("translate3d(0px, " + (r / 2 + d.shadowOffset) + "px, " + -r / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + d.shadowScale + ")"); else { var C = Math.abs(c) - 90 * Math.floor(Math.abs(c) / 90), M = 1.5 - (Math.sin(2 * C * Math.PI / 360) / 2 + Math.cos(2 * C * Math.PI / 360) / 2), P = d.shadowScale, z = d.shadowScale / M, k = d.shadowOffset; e.transform("scale3d(" + P + ", 1, " + z + ") translate3d(0px, " + (n / 2 + k) + "px, " + -n / 2 / z + "px) rotateX(-90deg)") } var $ = j.isSafari || j.isUiWebView ? -l / 2 : 0; i.transform("translate3d(0px,0," + $ + "px) rotateX(" + (this.isHorizontal() ? 0 : c) + "deg) rotateY(" + (this.isHorizontal() ? -c : 0) + "deg)") }, setTransition: function (e) { var t = this.$el; this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), this.params.cubeEffect.shadow && !this.isHorizontal() && t.find(".swiper-cube-shadow").transition(e) } }, me = { setTranslate: function () { for (var e = this.slides, t = this.rtlTranslate, i = 0; i < e.length; i += 1) { var a = e.eq(i), r = a[0].progress; this.params.flipEffect.limitRotation && (r = Math.max(Math.min(a[0].progress, 1), -1)); var n = -180 * r, o = 0, l = -a[0].swiperSlideOffset, d = 0; if (this.isHorizontal() ? t && (n = -n) : (d = l, l = 0, o = -n, n = 0), a[0].style.zIndex = -Math.abs(Math.round(r)) + e.length, this.params.flipEffect.slideShadows) { var h = this.isHorizontal() ? a.find(".swiper-slide-shadow-left") : a.find(".swiper-slide-shadow-top"), p = this.isHorizontal() ? a.find(".swiper-slide-shadow-right") : a.find(".swiper-slide-shadow-bottom"); 0 === h.length && (h = s('
'), a.append(h)), 0 === p.length && (p = s('
'), a.append(p)), h.length && (h[0].style.opacity = Math.max(-r, 0)), p.length && (p[0].style.opacity = Math.max(r, 0)) } a.transform("translate3d(" + l + "px, " + d + "px, 0px) rotateX(" + o + "deg) rotateY(" + n + "deg)") } }, setTransition: function (e) { var t = this, i = t.slides, s = t.activeIndex, a = t.$wrapperEl; if (i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), t.params.virtualTranslate && 0 !== e) { var r = !1; i.eq(s).transitionEnd((function () { if (!r && t && !t.destroyed) { r = !0, t.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], i = 0; i < e.length; i += 1)a.trigger(e[i]) } })) } } }, ge = { setTranslate: function () { for (var e = this.width, t = this.height, i = this.slides, a = this.$wrapperEl, r = this.slidesSizesGrid, n = this.params.coverflowEffect, l = this.isHorizontal(), d = this.translate, h = l ? e / 2 - d : t / 2 - d, p = l ? n.rotate : -n.rotate, c = n.depth, u = 0, v = i.length; u < v; u += 1) { var f = i.eq(u), m = r[u], g = (h - f[0].swiperSlideOffset - m / 2) / m * n.modifier, b = l ? p * g : 0, w = l ? 0 : p * g, y = -c * Math.abs(g), x = l ? 0 : n.stretch * g, T = l ? n.stretch * g : 0; Math.abs(T) < .001 && (T = 0), Math.abs(x) < .001 && (x = 0), Math.abs(y) < .001 && (y = 0), Math.abs(b) < .001 && (b = 0), Math.abs(w) < .001 && (w = 0); var E = "translate3d(" + T + "px," + x + "px," + y + "px) rotateX(" + w + "deg) rotateY(" + b + "deg)"; if (f.transform(E), f[0].style.zIndex = 1 - Math.abs(Math.round(g)), n.slideShadows) { var S = l ? f.find(".swiper-slide-shadow-left") : f.find(".swiper-slide-shadow-top"), C = l ? f.find(".swiper-slide-shadow-right") : f.find(".swiper-slide-shadow-bottom"); 0 === S.length && (S = s('
'), f.append(S)), 0 === C.length && (C = s('
'), f.append(C)), S.length && (S[0].style.opacity = g > 0 ? g : 0), C.length && (C[0].style.opacity = -g > 0 ? -g : 0) } } (o.pointerEvents || o.prefixedPointerEvents) && (a[0].style.perspectiveOrigin = h + "px 50%") }, setTransition: function (e) { this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) } }, be = { init: function () { var e = this.params.thumbs, t = this.constructor; e.swiper instanceof t ? (this.thumbs.swiper = e.swiper, n.extend(this.thumbs.swiper.originalParams, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), n.extend(this.thumbs.swiper.params, { watchSlidesProgress: !0, slideToClickedSlide: !1 })) : n.isObject(e.swiper) && (this.thumbs.swiper = new t(n.extend({}, e.swiper, { watchSlidesVisibility: !0, watchSlidesProgress: !0, slideToClickedSlide: !1 })), this.thumbs.swiperCreated = !0), this.thumbs.swiper.$el.addClass(this.params.thumbs.thumbsContainerClass), this.thumbs.swiper.on("tap", this.thumbs.onThumbClick) }, onThumbClick: function () { var e = this.thumbs.swiper; if (e) { var t = e.clickedIndex, i = e.clickedSlide; if (!(i && s(i).hasClass(this.params.thumbs.slideThumbActiveClass) || null == t)) { var a; if (a = e.params.loop ? parseInt(s(e.clickedSlide).attr("data-swiper-slide-index"), 10) : t, this.params.loop) { var r = this.activeIndex; this.slides.eq(r).hasClass(this.params.slideDuplicateClass) && (this.loopFix(), this._clientLeft = this.$wrapperEl[0].clientLeft, r = this.activeIndex); var n = this.slides.eq(r).prevAll('[data-swiper-slide-index="' + a + '"]').eq(0).index(), o = this.slides.eq(r).nextAll('[data-swiper-slide-index="' + a + '"]').eq(0).index(); a = void 0 === n ? o : void 0 === o ? n : o - r < r - n ? o : n } this.slideTo(a) } } }, update: function (e) { var t = this.thumbs.swiper; if (t) { var i = "auto" === t.params.slidesPerView ? t.slidesPerViewDynamic() : t.params.slidesPerView; if (this.realIndex !== t.realIndex) { var s, a = t.activeIndex; if (t.params.loop) { t.slides.eq(a).hasClass(t.params.slideDuplicateClass) && (t.loopFix(), t._clientLeft = t.$wrapperEl[0].clientLeft, a = t.activeIndex); var r = t.slides.eq(a).prevAll('[data-swiper-slide-index="' + this.realIndex + '"]').eq(0).index(), n = t.slides.eq(a).nextAll('[data-swiper-slide-index="' + this.realIndex + '"]').eq(0).index(); s = void 0 === r ? n : void 0 === n ? r : n - a == a - r ? a : n - a < a - r ? n : r } else s = this.realIndex; t.visibleSlidesIndexes && t.visibleSlidesIndexes.indexOf(s) < 0 && (t.params.centeredSlides ? s = s > a ? s - Math.floor(i / 2) + 1 : s + Math.floor(i / 2) - 1 : s > a && (s = s - i + 1), t.slideTo(s, e ? 0 : void 0)) } var o = 1, l = this.params.thumbs.slideThumbActiveClass; if (this.params.slidesPerView > 1 && !this.params.centeredSlides && (o = this.params.slidesPerView), this.params.thumbs.multipleActiveThumbs || (o = 1), o = Math.floor(o), t.slides.removeClass(l), t.params.loop || t.params.virtual && t.params.virtual.enabled) for (var d = 0; d < o; d += 1)t.$wrapperEl.children('[data-swiper-slide-index="' + (this.realIndex + d) + '"]').addClass(l); else for (var h = 0; h < o; h += 1)t.slides.eq(this.realIndex + h).addClass(l) } } }, we = [R, q, K, U, Z, J, te, { name: "mousewheel", params: { mousewheel: { enabled: !1, releaseOnEdges: !1, invert: !1, forceToAxis: !1, sensitivity: 1, eventsTarged: "container" } }, create: function () { n.extend(this, { mousewheel: { enabled: !1, enable: ie.enable.bind(this), disable: ie.disable.bind(this), handle: ie.handle.bind(this), handleMouseEnter: ie.handleMouseEnter.bind(this), handleMouseLeave: ie.handleMouseLeave.bind(this), animateSlider: ie.animateSlider.bind(this), releaseScroll: ie.releaseScroll.bind(this), lastScrollTime: n.now(), lastEventBeforeSnap: void 0, recentWheelEvents: [] } }) }, on: { init: function () { !this.params.mousewheel.enabled && this.params.cssMode && this.mousewheel.disable(), this.params.mousewheel.enabled && this.mousewheel.enable() }, destroy: function () { this.params.cssMode && this.mousewheel.enable(), this.mousewheel.enabled && this.mousewheel.disable() } } }, { name: "navigation", params: { navigation: { nextEl: null, prevEl: null, hideOnClick: !1, disabledClass: "swiper-button-disabled", hiddenClass: "swiper-button-hidden", lockClass: "swiper-button-lock" } }, create: function () { n.extend(this, { navigation: { init: se.init.bind(this), update: se.update.bind(this), destroy: se.destroy.bind(this), onNextClick: se.onNextClick.bind(this), onPrevClick: se.onPrevClick.bind(this) } }) }, on: { init: function () { this.navigation.init(), this.navigation.update() }, toEdge: function () { this.navigation.update() }, fromEdge: function () { this.navigation.update() }, destroy: function () { this.navigation.destroy() }, click: function (e) { var t, i = this.navigation, a = i.$nextEl, r = i.$prevEl; !this.params.navigation.hideOnClick || s(e.target).is(r) || s(e.target).is(a) || (a ? t = a.hasClass(this.params.navigation.hiddenClass) : r && (t = r.hasClass(this.params.navigation.hiddenClass)), !0 === t ? this.emit("navigationShow", this) : this.emit("navigationHide", this), a && a.toggleClass(this.params.navigation.hiddenClass), r && r.toggleClass(this.params.navigation.hiddenClass)) } } }, { name: "pagination", params: { pagination: { el: null, bulletElement: "span", clickable: !1, hideOnClick: !1, renderBullet: null, renderProgressbar: null, renderFraction: null, renderCustom: null, progressbarOpposite: !1, type: "bullets", dynamicBullets: !1, dynamicMainBullets: 1, formatFractionCurrent: function (e) { return e }, formatFractionTotal: function (e) { return e }, bulletClass: "swiper-pagination-bullet", bulletActiveClass: "swiper-pagination-bullet-active", modifierClass: "swiper-pagination-", currentClass: "swiper-pagination-current", totalClass: "swiper-pagination-total", hiddenClass: "swiper-pagination-hidden", progressbarFillClass: "swiper-pagination-progressbar-fill", progressbarOppositeClass: "swiper-pagination-progressbar-opposite", clickableClass: "swiper-pagination-clickable", lockClass: "swiper-pagination-lock" } }, create: function () { n.extend(this, { pagination: { init: ae.init.bind(this), render: ae.render.bind(this), update: ae.update.bind(this), destroy: ae.destroy.bind(this), dynamicBulletIndex: 0 } }) }, on: { init: function () { this.pagination.init(), this.pagination.render(), this.pagination.update() }, activeIndexChange: function () { this.params.loop ? this.pagination.update() : void 0 === this.snapIndex && this.pagination.update() }, snapIndexChange: function () { this.params.loop || this.pagination.update() }, slidesLengthChange: function () { this.params.loop && (this.pagination.render(), this.pagination.update()) }, snapGridLengthChange: function () { this.params.loop || (this.pagination.render(), this.pagination.update()) }, destroy: function () { this.pagination.destroy() }, click: function (e) { this.params.pagination.el && this.params.pagination.hideOnClick && this.pagination.$el.length > 0 && !s(e.target).hasClass(this.params.pagination.bulletClass) && (!0 === this.pagination.$el.hasClass(this.params.pagination.hiddenClass) ? this.emit("paginationShow", this) : this.emit("paginationHide", this), this.pagination.$el.toggleClass(this.params.pagination.hiddenClass)) } } }, { name: "scrollbar", params: { scrollbar: { el: null, dragSize: "auto", hide: !1, draggable: !1, snapOnRelease: !0, lockClass: "swiper-scrollbar-lock", dragClass: "swiper-scrollbar-drag" } }, create: function () { n.extend(this, { scrollbar: { init: re.init.bind(this), destroy: re.destroy.bind(this), updateSize: re.updateSize.bind(this), setTranslate: re.setTranslate.bind(this), setTransition: re.setTransition.bind(this), enableDraggable: re.enableDraggable.bind(this), disableDraggable: re.disableDraggable.bind(this), setDragPosition: re.setDragPosition.bind(this), getPointerPosition: re.getPointerPosition.bind(this), onDragStart: re.onDragStart.bind(this), onDragMove: re.onDragMove.bind(this), onDragEnd: re.onDragEnd.bind(this), isTouched: !1, timeout: null, dragTimeout: null } }) }, on: { init: function () { this.scrollbar.init(), this.scrollbar.updateSize(), this.scrollbar.setTranslate() }, update: function () { this.scrollbar.updateSize() }, resize: function () { this.scrollbar.updateSize() }, observerUpdate: function () { this.scrollbar.updateSize() }, setTranslate: function () { this.scrollbar.setTranslate() }, setTransition: function (e) { this.scrollbar.setTransition(e) }, destroy: function () { this.scrollbar.destroy() } } }, { name: "parallax", params: { parallax: { enabled: !1 } }, create: function () { n.extend(this, { parallax: { setTransform: ne.setTransform.bind(this), setTranslate: ne.setTranslate.bind(this), setTransition: ne.setTransition.bind(this) } }) }, on: { beforeInit: function () { this.params.parallax.enabled && (this.params.watchSlidesProgress = !0, this.originalParams.watchSlidesProgress = !0) }, init: function () { this.params.parallax.enabled && this.parallax.setTranslate() }, setTranslate: function () { this.params.parallax.enabled && this.parallax.setTranslate() }, setTransition: function (e) { this.params.parallax.enabled && this.parallax.setTransition(e) } } }, { name: "zoom", params: { zoom: { enabled: !1, maxRatio: 3, minRatio: 1, toggle: !0, containerClass: "swiper-zoom-container", zoomedSlideClass: "swiper-slide-zoomed" } }, create: function () { var e = this, t = { enabled: !1, scale: 1, currentScale: 1, isScaling: !1, gesture: { $slideEl: void 0, slideWidth: void 0, slideHeight: void 0, $imageEl: void 0, $imageWrapEl: void 0, maxRatio: 3 }, image: { isTouched: void 0, isMoved: void 0, currentX: void 0, currentY: void 0, minX: void 0, minY: void 0, maxX: void 0, maxY: void 0, width: void 0, height: void 0, startX: void 0, startY: void 0, touchesStart: {}, touchesCurrent: {} }, velocity: { x: void 0, y: void 0, prevPositionX: void 0, prevPositionY: void 0, prevTime: void 0 } }; "onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function (i) { t[i] = oe[i].bind(e) })), n.extend(e, { zoom: t }); var i = 1; Object.defineProperty(e.zoom, "scale", { get: function () { return i }, set: function (t) { if (i !== t) { var s = e.zoom.gesture.$imageEl ? e.zoom.gesture.$imageEl[0] : void 0, a = e.zoom.gesture.$slideEl ? e.zoom.gesture.$slideEl[0] : void 0; e.emit("zoomChange", t, s, a) } i = t } }) }, on: { init: function () { this.params.zoom.enabled && this.zoom.enable() }, destroy: function () { this.zoom.disable() }, touchStart: function (e) { this.zoom.enabled && this.zoom.onTouchStart(e) }, touchEnd: function (e) { this.zoom.enabled && this.zoom.onTouchEnd(e) }, doubleTap: function (e) { this.params.zoom.enabled && this.zoom.enabled && this.params.zoom.toggle && this.zoom.toggle(e) }, transitionEnd: function () { this.zoom.enabled && this.params.zoom.enabled && this.zoom.onTransitionEnd() }, slideChange: function () { this.zoom.enabled && this.params.zoom.enabled && this.params.cssMode && this.zoom.onTransitionEnd() } } }, { name: "lazy", params: { lazy: { enabled: !1, loadPrevNext: !1, loadPrevNextAmount: 1, loadOnTransitionStart: !1, elementClass: "swiper-lazy", loadingClass: "swiper-lazy-loading", loadedClass: "swiper-lazy-loaded", preloaderClass: "swiper-lazy-preloader" } }, create: function () { n.extend(this, { lazy: { initialImageLoaded: !1, load: le.load.bind(this), loadInSlide: le.loadInSlide.bind(this) } }) }, on: { beforeInit: function () { this.params.lazy.enabled && this.params.preloadImages && (this.params.preloadImages = !1) }, init: function () { this.params.lazy.enabled && !this.params.loop && 0 === this.params.initialSlide && this.lazy.load() }, scroll: function () { this.params.freeMode && !this.params.freeModeSticky && this.lazy.load() }, resize: function () { this.params.lazy.enabled && this.lazy.load() }, scrollbarDragMove: function () { this.params.lazy.enabled && this.lazy.load() }, transitionStart: function () { this.params.lazy.enabled && (this.params.lazy.loadOnTransitionStart || !this.params.lazy.loadOnTransitionStart && !this.lazy.initialImageLoaded) && this.lazy.load() }, transitionEnd: function () { this.params.lazy.enabled && !this.params.lazy.loadOnTransitionStart && this.lazy.load() }, slideChange: function () { this.params.lazy.enabled && this.params.cssMode && this.lazy.load() } } }, { name: "controller", params: { controller: { control: void 0, inverse: !1, by: "slide" } }, create: function () { n.extend(this, { controller: { control: this.params.controller.control, getInterpolateFunction: de.getInterpolateFunction.bind(this), setTranslate: de.setTranslate.bind(this), setTransition: de.setTransition.bind(this) } }) }, on: { update: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, resize: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, observerUpdate: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, setTranslate: function (e, t) { this.controller.control && this.controller.setTranslate(e, t) }, setTransition: function (e, t) { this.controller.control && this.controller.setTransition(e, t) } } }, { name: "a11y", params: { a11y: { enabled: !0, notificationClass: "swiper-notification", prevSlideMessage: "Previous slide", nextSlideMessage: "Next slide", firstSlideMessage: "This is the first slide", lastSlideMessage: "This is the last slide", paginationBulletMessage: "Go to slide {{index}}" } }, create: function () { var e = this; n.extend(e, { a11y: { liveRegion: s('') } }), Object.keys(he).forEach((function (t) { e.a11y[t] = he[t].bind(e) })) }, on: { init: function () { this.params.a11y.enabled && (this.a11y.init(), this.a11y.updateNavigation()) }, toEdge: function () { this.params.a11y.enabled && this.a11y.updateNavigation() }, fromEdge: function () { this.params.a11y.enabled && this.a11y.updateNavigation() }, paginationUpdate: function () { this.params.a11y.enabled && this.a11y.updatePagination() }, destroy: function () { this.params.a11y.enabled && this.a11y.destroy() } } }, { name: "history", params: { history: { enabled: !1, replaceState: !1, key: "slides" } }, create: function () { n.extend(this, { history: { init: pe.init.bind(this), setHistory: pe.setHistory.bind(this), setHistoryPopState: pe.setHistoryPopState.bind(this), scrollToSlide: pe.scrollToSlide.bind(this), destroy: pe.destroy.bind(this) } }) }, on: { init: function () { this.params.history.enabled && this.history.init() }, destroy: function () { this.params.history.enabled && this.history.destroy() }, transitionEnd: function () { this.history.initialized && this.history.setHistory(this.params.history.key, this.activeIndex) }, slideChange: function () { this.history.initialized && this.params.cssMode && this.history.setHistory(this.params.history.key, this.activeIndex) } } }, { name: "hash-navigation", params: { hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 } }, create: function () { n.extend(this, { hashNavigation: { initialized: !1, init: ce.init.bind(this), destroy: ce.destroy.bind(this), setHash: ce.setHash.bind(this), onHashCange: ce.onHashCange.bind(this) } }) }, on: { init: function () { this.params.hashNavigation.enabled && this.hashNavigation.init() }, destroy: function () { this.params.hashNavigation.enabled && this.hashNavigation.destroy() }, transitionEnd: function () { this.hashNavigation.initialized && this.hashNavigation.setHash() }, slideChange: function () { this.hashNavigation.initialized && this.params.cssMode && this.hashNavigation.setHash() } } }, { name: "autoplay", params: { autoplay: { enabled: !1, delay: 3e3, waitForTransition: !0, disableOnInteraction: !0, stopOnLastSlide: !1, reverseDirection: !1 } }, create: function () { var e = this; n.extend(e, { autoplay: { running: !1, paused: !1, run: ue.run.bind(e), start: ue.start.bind(e), stop: ue.stop.bind(e), pause: ue.pause.bind(e), onVisibilityChange: function () { "hidden" === document.visibilityState && e.autoplay.running && e.autoplay.pause(), "visible" === document.visibilityState && e.autoplay.paused && (e.autoplay.run(), e.autoplay.paused = !1) }, onTransitionEnd: function (t) { e && !e.destroyed && e.$wrapperEl && t.target === this && (e.$wrapperEl[0].removeEventListener("transitionend", e.autoplay.onTransitionEnd), e.$wrapperEl[0].removeEventListener("webkitTransitionEnd", e.autoplay.onTransitionEnd), e.autoplay.paused = !1, e.autoplay.running ? e.autoplay.run() : e.autoplay.stop()) } } }) }, on: { init: function () { this.params.autoplay.enabled && (this.autoplay.start(), document.addEventListener("visibilitychange", this.autoplay.onVisibilityChange)) }, beforeTransitionStart: function (e, t) { this.autoplay.running && (t || !this.params.autoplay.disableOnInteraction ? this.autoplay.pause(e) : this.autoplay.stop()) }, sliderFirstMove: function () { this.autoplay.running && (this.params.autoplay.disableOnInteraction ? this.autoplay.stop() : this.autoplay.pause()) }, touchEnd: function () { this.params.cssMode && this.autoplay.paused && !this.params.autoplay.disableOnInteraction && this.autoplay.run() }, destroy: function () { this.autoplay.running && this.autoplay.stop(), document.removeEventListener("visibilitychange", this.autoplay.onVisibilityChange) } } }, { name: "effect-fade", params: { fadeEffect: { crossFade: !1 } }, create: function () { n.extend(this, { fadeEffect: { setTranslate: ve.setTranslate.bind(this), setTransition: ve.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("fade" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "fade"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; n.extend(this.params, e), n.extend(this.originalParams, e) } }, setTranslate: function () { "fade" === this.params.effect && this.fadeEffect.setTranslate() }, setTransition: function (e) { "fade" === this.params.effect && this.fadeEffect.setTransition(e) } } }, { name: "effect-cube", params: { cubeEffect: { slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: .94 } }, create: function () { n.extend(this, { cubeEffect: { setTranslate: fe.setTranslate.bind(this), setTransition: fe.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("cube" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "cube"), this.classNames.push(this.params.containerModifierClass + "3d"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, resistanceRatio: 0, spaceBetween: 0, centeredSlides: !1, virtualTranslate: !0 }; n.extend(this.params, e), n.extend(this.originalParams, e) } }, setTranslate: function () { "cube" === this.params.effect && this.cubeEffect.setTranslate() }, setTransition: function (e) { "cube" === this.params.effect && this.cubeEffect.setTransition(e) } } }, { name: "effect-flip", params: { flipEffect: { slideShadows: !0, limitRotation: !0 } }, create: function () { n.extend(this, { flipEffect: { setTranslate: me.setTranslate.bind(this), setTransition: me.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("flip" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "flip"), this.classNames.push(this.params.containerModifierClass + "3d"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; n.extend(this.params, e), n.extend(this.originalParams, e) } }, setTranslate: function () { "flip" === this.params.effect && this.flipEffect.setTranslate() }, setTransition: function (e) { "flip" === this.params.effect && this.flipEffect.setTransition(e) } } }, { name: "effect-coverflow", params: { coverflowEffect: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows: !0 } }, create: function () { n.extend(this, { coverflowEffect: { setTranslate: ge.setTranslate.bind(this), setTransition: ge.setTransition.bind(this) } }) }, on: { beforeInit: function () { "coverflow" === this.params.effect && (this.classNames.push(this.params.containerModifierClass + "coverflow"), this.classNames.push(this.params.containerModifierClass + "3d"), this.params.watchSlidesProgress = !0, this.originalParams.watchSlidesProgress = !0) }, setTranslate: function () { "coverflow" === this.params.effect && this.coverflowEffect.setTranslate() }, setTransition: function (e) { "coverflow" === this.params.effect && this.coverflowEffect.setTransition(e) } } }, { name: "thumbs", params: { thumbs: { multipleActiveThumbs: !0, swiper: null, slideThumbActiveClass: "swiper-slide-thumb-active", thumbsContainerClass: "swiper-container-thumbs" } }, create: function () { n.extend(this, { thumbs: { swiper: null, init: be.init.bind(this), update: be.update.bind(this), onThumbClick: be.onThumbClick.bind(this) } }) }, on: { beforeInit: function () { var e = this.params.thumbs; e && e.swiper && (this.thumbs.init(), this.thumbs.update(!0)) }, slideChange: function () { this.thumbs.swiper && this.thumbs.update() }, update: function () { this.thumbs.swiper && this.thumbs.update() }, resize: function () { this.thumbs.swiper && this.thumbs.update() }, observerUpdate: function () { this.thumbs.swiper && this.thumbs.update() }, setTransition: function (e) { var t = this.thumbs.swiper; t && t.setTransition(e) }, beforeDestroy: function () { var e = this.thumbs.swiper; e && this.thumbs.swiperCreated && e && e.destroy() } } }]; return void 0 === W.use && (W.use = W.Class.use, W.installModule = W.Class.installModule), W.use(we), W })); //# sourceMappingURL=swiper.min.js.map /*! * ANI-Util JavaScript Library v1.0 * * Copyright 2021. Yoon jae-ho * Released under the MIT license * * Date: 2021-02-09 */ var ANIUTIL = (function () {var calRange = function (values) { var values = {targetValue: values.targetValue,progress: values.progress,startPoint: !!!values.startPoint ? 0 : values.startPoint,endPoint: !!!values.endPoint ? 100 : values.endPoint }; if (values.startPoint > 0) {values.endPoint = values.endPoint - values.startPoint > 0 ? values.endPoint - values.startPoint : values.endPoint; } var returnValue = (values.targetValue * (values.progress - values.startPoint)) / values.endPoint; if (returnValue > values.targetValue) {returnValue = values.targetValue; } if (returnValue < 0) {returnValue = 0; } return returnValue;}; var percentToPixel = function (opts) { var targetValue = opts.targetValue,progress = opts.progress; return targetValue * (progress / 100);}; var videoObjectFit = function (opts) { var init = function (opts) {this.opts = opts;this.resizeTiming = opts.resizeTiming ? opts.resizeTiming : 100;this.setElement();this.setVideoStyle();this.bindEvent(); }; var fn = init.prototype; fn.setElement = function () {if (this.opts.wrapElement !== undefined) { this.wrapElement = this.opts.wrapElement.jquery ? this.opts.wrapElement[0] : this.opts.wrapElement;} if (this.opts.targetVideo !== undefined) { this.targetVideo = this.opts.targetVideo.jquery ? this.opts.targetVideo[0] : this.opts.targetVideo;} }; fn.setVideoStyle = function () {this.wrapElement.style.overflow = 'hidden';this.targetVideo.style.position = 'absolute';this.targetVideo.style.top = '50%';this.targetVideo.style.left = '50%';this.targetVideo.style.transform = 'translate(-50%, -50%)'; }; fn.bindEvent = function () {var self = this; window.addEventListener('load', function () { self.setVideoSize();}); window.addEventListener('resize', function () { self.setVideoSize();}); }; fn.getVideoInfo = function () {this.wrapWidth = this.wrapElement.clientWidth;this.wrapHeight = this.wrapElement.clientHeight;this.videoWidth = this.targetVideo.clientWidth;this.videoHeight = this.targetVideo.clientHeight;this.wrapRatio = this.wrapHeight / this.wrapWidth;this.videoRatio = this.videoHeight / this.videoWidth; }; fn.setVideoSize = function () {var self = this, timer = null; clearTimeout(timer); timer = setTimeout(function () { self.getVideoInfo(); if (self.wrapRatio < self.videoRatio) {self.targetVideo.style.width = '100%';self.targetVideo.style.height = 'auto'; } else {self.targetVideo.style.width = 'auto';self.targetVideo.style.height = '100%'; }}, this.resizeTiming); }; return new init(opts);}; var addClass = function (opts) { var classLength = opts.classList.length; for (var i = 0; i < classLength; i++) {opts.targetElement.classList.add(opts.classList[i]); }}; var removeClass = function (opts) { var classLength = opts.classList.length; for (var i = 0; i < classLength; i++) {opts.targetElement.classList.remove(opts.classList[i]); }}; var scrollController = function (opt) { var opt = opt ? opt : {},agent = navigator.userAgent.toLowerCase(),targetElement = document.scrollingElement || document.documentElement || document.body.parentNode || document.body,speed = !!!opt.speed ? 120 : opt.speed,duration = opt.duration >= 0 ? opt.duration : 1,scrollSize = targetElement.scrollTop,maxScrollSize,frameElement = targetElement === document.body && document.documentElement ? document.documentElement : targetElement, // safari is the new IEmoveState = false,scrollTiming = null; var init = function () {if (agent.indexOf('chrome') == -1 && agent.indexOf('safari') != -1) return; bindEvent.wheel();bindEvent.scroll(); }; var bindEvent = {wheel: function () { if ((navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || agent.indexOf('msie') != -1) {document.addEventListener( 'mousewheel', function (e) {if (document.documentElement.style.overflow == 'hidden') return;eventList.scrollEvent(e); }, {passive: false }); } else {document.addEventListener( 'wheel', function (e) {if (eventList.hasScrollBox(e.target)) return;eventList.scrollEvent(e); }, {passive: false }); }},scroll: function () { window.addEventListener('scroll', function () {if (document.documentElement.style.overflow == 'hidden') return; if (!moveState) { scrollSize = targetElement.scrollTop;} });} }; var eventList = {scrollEvent: function (e) { e.preventDefault(); var fixedMoveSpeed = document.body.getAttribute('data-scroll-speed'); var delta = this.normalizeWheelDelta(e),moveSpeed = opt.currDelta && fixedMoveSpeed ? fixedMoveSpeed : !!!fixedMoveSpeed && !!!speed ? 120 : speed; scrollSize = scrollSize + -delta * moveSpeed; //현재까지 스크롤한 사이즈 maxScrollSize = Math.max(0, Math.min(scrollSize, targetElement.scrollHeight - frameElement.clientHeight)); //최대 스크롤 사이즈 this.update();},normalizeWheelDelta: function (e) { if (e.detail) {if (e.wheelDelta) { return (e.wheelDelta / e.detail / 40) * (e.detail > 0 ? 1 : -1); // Opera} else { return -e.detail / 3; // Firefox} } else {return e.wheelDelta / 120; // IE,Safari,Chrome }},update: function () { var moveRange = maxScrollSize - targetElement.scrollTop,moveSize = 0 >= Math.ceil(targetElement.scrollTop + moveRange) ? 0 : scrollSize > maxScrollSize ? maxScrollSize : Math.ceil(targetElement.scrollTop + moveRange); //한번 스크롤시 이동할 거리 moveState = true; TweenMax.to(targetElement, duration, {ease: 'power1.out',scrollTop: moveSize,onComplete: function () { clearTimeout(scrollTiming); scrollTiming = null; scrollTiming = setTimeout(function () {moveState = false;scrollSize = targetElement.scrollTop; }, 500);} }); if (scrollSize <= 0) {scrollSize = 0; } else if (scrollSize >= maxScrollSize) {scrollSize = maxScrollSize; }},hasScrollBox: function (node) { while (node && node !== document.body && node !== document) {var overflowNode = window.getComputedStyle(node)['overflow'];if (overflowNode && (overflowNode.indexOf('auto') > -1 || overflowNode.indexOf('scroll') > -1)) { return true;}node = node.parentNode; } return false;} }; var requestAnimationFrame = (function () {// requestAnimationFrame cross browserreturn ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (func) {window.setTimeout(func, 1000 / 50); }); })(); return init();}; var resizeScrollOffset = function (opt) { var scrollProgress = null,correctionTiming = null,resizeTiming = !!!opt ? 200 : opt + 200; var scrollElement, scrollElementHeight, winScrollTop, scrollProgress; var init = function () {bindEvent(); }; var getScrollProgerss = function () {if (scrollProgress == null) { scrollElement = document.scrollingElement || document.documentElement || document.body.parentNode || document.body; scrollElementHeight = document.body.clientHeight; winScrollTop = window.pageYOffset + scrollElement.clientHeight; scrollProgress = winScrollTop / scrollElementHeight;} else { scrollElementHeight = document.body.clientHeight;} }; var setCorrScroll = function () {clearTimeout(correctionTiming);correctionTiming = setTimeout(function () { window.scrollTo(0, scrollElementHeight * scrollProgress - window.innerHeight); scrollProgress = null;}, resizeTiming); }; var bindEvent = function () {window.addEventListener('resize', function () { getScrollProgerss(); setCorrScroll();}); }; return init();}; var checkTouchDevice = function () { if (navigator.userAgent.indexOf('Windows') > -1 || navigator.userAgent.indexOf('Macintosh') > -1) {return false; } else if ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch)) {return true; }}; var checkFold = function () { var foldState; var screenRatio = screen.width / screen.height; var isFold = checkTouchDevice() && screenRatio > 0.7137 && screenRatio < 0.8 && document.getElementsByName('viewport')[0].content == 'width=768'; var isFoldLatest = checkTouchDevice() && screenRatio > 0.8 && screenRatio < 0.95 && document.getElementsByName('viewport')[0].content == 'width=768'; if (isFold) {foldState = 'isFold'; } else if (isFoldLatest) {foldState = 'isFoldLatest'; } return foldState;}; var deviceConsole = function (value, visible) { var consoleElement, consoleValueElement; if (!document.querySelector('.console-layer')) {consoleElement = document.createElement('div'); consoleElement.classList.add('console-layer');consoleElement.setAttribute('style', 'position: fixed; left: 0; top: 0; padding: 20px; z-index:1000000000; background: #fff;');document.querySelector('body').append(consoleElement); } if (visible == 'multi') {consoleElement = document.querySelector('.console-layer');consoleValueElement = document.createElement('div');consoleValueElement.classList.add('console-value');consoleValueElement.setAttribute('style', 'border: 1px #ddd solid; float: left; padding: 10px;');consoleElement.append(consoleValueElement); } else {if (!document.querySelector('.console-value')) { consoleValueElement = document.createElement('div'); consoleValueElement.classList.add('console-value'); consoleValueElement.setAttribute('style', 'border: 1px #ddd solid; float: left; padding: 10px;'); consoleElement.append(consoleValueElement); consoleValueElement = document.querySelector('.console-value');} else { consoleValueElement = document.querySelector('.console-value');} } consoleValueElement.innerHTML = value;}; var responsiveHandler = function (opts) { window.resolutionStatus = null; var isResolution,oldActiveIndex,isActiveIndex,callbackTiming = null; var windowWidth = window.innerWidth; var opts = {resolution: opts.resolution,statusName: opts.statusName || [],callback: opts.callback || [],activeTiming: !!!opts.activeTiming ? 100 : opts.activeTiming }; var checkResolution = function () {windowWidth = window.innerWidth;for (var i = 0; i < opts.resolution.length; i++) { var currentSize = opts.resolution[i],nextSize = !!!opts.resolution[i + 1] ? 0 : opts.resolution[i + 1]; if ((windowWidth <= currentSize && windowWidth > nextSize && isResolution != opts.statusName[i]) || (windowWidth <= currentSize && windowWidth > nextSize && isActiveIndex != i)) {document.documentElement.classList.remove(isResolution);isResolution = opts.statusName[i] || i;isActiveIndex = i;document.documentElement.classList.add(isResolution); } else if ((windowWidth >= opts.resolution[0] && isResolution != opts.statusName[0]) || (windowWidth >= opts.resolution[0] && !!!isActiveIndex)) {document.documentElement.classList.remove(isResolution);isResolution = opts.statusName[0] || i;isActiveIndex = i;document.documentElement.classList.add(isResolution); }} }; var activeCallbacks = function () {clearTimeout(callbackTiming);console.log(opts.activeTiming);if (oldActiveIndex == isActiveIndex) return;if (!!!opts.callback[isActiveIndex]) return;callbackTiming = setTimeout(function () { opts.callback[isActiveIndex](); callbackTiming = null; oldActiveIndex = isActiveIndex;}, opts.activeTiming); }; var bindEvent = function () {window.addEventListener('DOMContentLoaded', function () { checkResolution(); oldActiveIndex = isActiveIndex;}); window.addEventListener('resize', function () { checkResolution(); activeCallbacks();}); }; var init = function () {bindEvent(); return this; }; return init(opts);}; return { calRange: function (values) {return calRange(values); }, videoObjectFit: function (opts) {videoObjectFit(opts); }, addClass: function (opts) {addClass(opts); }, removeClass: function (opts) {removeClass(opts); }, scrollController: function (opt) {scrollController(opt); }, resizeScrollOffset: function (opt) {resizeScrollOffset(opt); }, checkTouchDevice: checkTouchDevice, checkFold: checkFold, deviceConsole: deviceConsole, percentToPixel: percentToPixel, responsiveHandler: responsiveHandler}; })(); 'use strict'; window.WATCH6 = window.WATCH6 || {}; const UTILS = (function () {return { isIosDevice: (function () {var isIos = /iPad|iPhone|iPod/.test(navigator.userAgent);isIos ? document.documentElement.classList.add('isIosDevice') : document.documentElement.classList.add('isNotIosDevice');return isIos; })(), checkGlobal: (function () {var check = location.pathname.indexOf('/global/galaxy') === 0 || window.IS_CAMPAIGN === true;if (check) document.documentElement.classList.add('global');else document.documentElement.classList.add('dotcom'); })(), checkOS: (function () {var os = navigator.appVersion.match(/(mac|win|linux)/i);os = os ? os[1].toLowerCase() : '';document.documentElement.classList.add(os); })(), isFireFox: (function () {var check = /firefox/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('firefox'); })(), isWebkit: (function () {var check = /applewebkit/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('webkit'); })(), isChrome: (function () {var check = /chrome/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('chrome'); })(), isOpera: (function () {var check = /opera/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('opera'); })(), isIos: (function () {var check = /ip(ad|hone|od)/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('ios'); })(), isCrIos: (function () {var check = /crios/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('crios'); })(), isAndroid: (function () {var check = /android/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('android'); })(), isSafari: (function () {var checkWebkit = /applewebkit/i.test(navigator.userAgent);var checkChrome = /chrome/i.test(navigator.userAgent);if (checkWebkit && !checkChrome) document.documentElement.classList.add('safari'); })(), isHuawei: (function () {var check = /HUAWEICLT/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('huawei'); })(), isUCBrowser: (function () {var check = /UCBrowser/i.test(navigator.userAgent);if (check) document.documentElement.classList.add('ucbrowser'); })(), winSize: (function () {var isWinSafari = (function () { var appNetscape = navigator.appName === 'Netscape',appVersionMac = navigator.appVersion.indexOf('Mac') !== -1,userAgentSafari = navigator.userAgent.indexOf('Safari') !== -1,userAgentChrome = navigator.userAgent.indexOf('Chrome') !== -1; return appNetscape && !appVersionMac && userAgentSafari && !userAgentChrome;})();if (isWinSafari) { return function () {var win_wh = { w: $(win).width(), h: $(win).height()};return win_wh; };} else { return function () {var win_wh = { w: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, h: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight};return win_wh; };} })(), requestAFrame: (function () {return ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {return window.setTimeout(callback, 1000 / 60); }); })(), cancelAFrame: (function () {return ( window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function (id) {window.clearTimeout(id); }); })(), isObject: function (o) {return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; }, def: function () {var args = [], len$1 = arguments.length;while (len$1--) args[len$1] = arguments[len$1];var to = Object(args[0]);for (var i = 1; i < args.length; i += 1) { var nextSource = args[i]; if (nextSource !== undefined && nextSource !== null) {var keysArray = Object.keys(Object(nextSource));for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { var nextKey = keysArray[nextIndex]; var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); if (desc !== undefined && desc.enumerable) {if (this.isObject(to[nextKey]) && this.isObject(nextSource[nextKey])) { this.def(to[nextKey], nextSource[nextKey]);} else if (!this.isObject(to[nextKey]) && this.isObject(nextSource[nextKey])) { to[nextKey] = {}; this.def(to[nextKey], nextSource[nextKey]);} else { to[nextKey] = nextSource[nextKey];} }} }}return to; }, convertArray: function (nodeList) {return Array.prototype.slice.call(nodeList); }, getOffset: function (element) {var top = element.getBoundingClientRect().top + window.pageYOffset, bottom = element.getBoundingClientRect().bottom + window.pageYOffset;return { top: top, bottom: bottom}; }, getScroll: function () {var top = window.pageYOffset, bottom = top + window.innerHeight;return { top: top, bottom: bottom}; }, getViewPort: function () {var doc = window;var pre = 'inner'; if (!('innerWidth' in window)) { pre = 'client'; doc = document.documentElement || document.body;} return { width: doc[pre + 'Width'], height: doc[pre + 'Height']}; }, getCurrentDevice: function () {var device = 'desktop';var width = UTILS.getViewPort().width;if (width >= 1024) { device = 'desktop';} else if (width < 1024 && width >= 768) { device = 'tablet';} else { device = 'mobile';}return device; }, isInVerticalViewPort: function (el) {var rect = el.getBoundingClientRect();return rect.top - 200 <= UTILS.getViewPort().height && rect.bottom >= 0; }, isInHorizontalViewPort: function (el) {var rect = el.getBoundingClientRect();return rect.left - 200 <= UTILS.getViewPort().width && rect.right + 200 >= 0; }, isVerticalVisible: function (el) {return UTILS.isInVerticalViewPort(el) && !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); }, isHorizontalVisible: function (el) {return UTILS.isInHorizontalViewPort(el) && !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); }, setCookie: function (name, value, day) {var date = new Date();date.setTime(date.getTime() + day * 60 * 60 * 24 * 1000);document.cookie = name + '=' + value + '; exprires=' + date.toUTCString() + '; path=/'; }, getCookie: function (name) {var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');return value ? value[2] : null; }, triggerEvent: function (el, eventName, detail, bubbles, cancelable) {var _detail = !!detail ? detail : null;var _bubbles = !!bubbles ? bubbles : false;var _cancelable = !!cancelable ? cancelable : true;var event; if (_detail == null) { event = document.createEvent('HTMLEvents'); event.initEvent(eventName, _bubbles, _cancelable);} else { event = document.createEvent('CustomEvent'); event.initCustomEvent(eventName, _bubbles, _cancelable, _detail);}el.dispatchEvent(event); }, visibleScroll: function () {if (document.documentElement.classList.contains('isTouchDevice')) return;if (this.scrollFlag === true) { this.scrollFlag = false; document.body.style.position = ''; document.body.style.width = ''; document.body.style.top = ''; document.body.style.boxSizing = ''; document.body.style.paddingRight = ''; document.documentElement.style.overflow = ''; if (this.popupEl !== null) {this.popupEl.style.paddingRight = '';this.popupEl = null; } window.scrollTo(0, this.currentPos);} }, hiddenScroll: function (popupEl) {if (document.documentElement.classList.contains('isTouchDevice')) return;this.popupEl = !!popupEl ? popupEl : null;this.scrollFlag = true;this.currentPos = window.pageYOffset || document.documentElement.scrollTop; var scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;var fixedPos; if (this.currentPos > 0) { fixedPos = '-' + this.currentPos + 'px';} else { fixedPos = 0;} document.body.style.position = 'fixed';document.body.style.width = '100%';document.body.style.top = fixedPos;document.body.style.boxSizing = 'border-box';document.body.style.paddingRight = scrollBarWidth + 'px';document.documentElement.style.overflow = 'hidden'; if (this.popupEl !== null) { this.popupEl.style.paddingRight = scrollBarWidth + 'px';} }, closest: function (el, selector) {do { if (el == document.documentElement) return null; if (el.matches ? el.matches(selector) : el.msMatchesSelector(selector)) return el; el = el.parentElement || el.parentNode;} while (el !== null || el.nodeType === 1); return null; }, onPopupAccessibility: function (el) {el.setAttribute('aria-hidden', true);el.setAttribute('tabindex', -1); var clickable = el.querySelectorAll('a, button, input, select, iframe');for (var i = 0; i < clickable.length; i++) { var currAria = clickable[i].getAttribute('aria-hidden'); var currTab = clickable[i].getAttribute('tabindex'); if (currAria != null && clickable[i].getAttribute('data-prev-aria-hidden') == null) clickable[i].setAttribute('data-prev-aria-hidden', currAria); if (currTab != null && clickable[i].getAttribute('data-prev-tabindex') == null) clickable[i].setAttribute('data-prev-tabindex', currTab); clickable[i].setAttribute('tabindex', -1); clickable[i].setAttribute('aria-hidden', true);} }, offPopupAccessibility: function (el) {el.removeAttribute('aria-hidden');el.removeAttribute('tabindex'); var clickable = el.querySelectorAll('a, button, input, select, iframe');for (var i = 0; i < clickable.length; i++) { var prevAria = clickable[i].getAttribute('data-prev-aria-hidden'); var prevTab = clickable[i].getAttribute('data-prev-tabindex'); if (prevAria != null) clickable[i].setAttribute('aria-hidden', prevAria); else clickable[i].removeAttribute('aria-hidden'); if (prevTab != null) clickable[i].setAttribute('tabindex', prevTab); else clickable[i].removeAttribute('tabindex'); clickable[i].removeAttribute('data-prev-aria-hidden'); clickable[i].removeAttribute('data-prev-tabindex');} }, onAccessibility: function (el) {if (!document.documentElement.classList.contains('is-layer-popup-opened')) { el.setAttribute('aria-hidden', true); el.setAttribute('tabindex', -1); var clickable = el.querySelectorAll('a, button, input, select, iframe'); for (var i = 0; i < clickable.length; i++) {clickable[i].setAttribute('tabindex', -1);clickable[i].setAttribute('aria-hidden', true); }} }, offAccessibility: function (el) {if (!document.documentElement.classList.contains('is-layer-popup-opened')) { el.removeAttribute('aria-hidden'); el.removeAttribute('tabindex'); var clickable = el.querySelectorAll('a, button, input, select, iframe'); for (var i = 0; i < clickable.length; i++) {clickable[i].removeAttribute('tabindex');clickable[i].removeAttribute('aria-hidden'); }} }, extend: function (de, add) {Object.keys(add).forEach(function (key) { de[key] = add[key];}); return de; }, getHeight: function (target) {if (!!target) { var targetStyle = window.getComputedStyle(target); var targetDisplay = targetStyle.display; var targetMaxHeight = parseInt(targetStyle.maxHeight); var returnHeight = 0; if (targetDisplay != 'none' && targetMaxHeight != 0) {return target.offsetHeight; } target.style.position = 'absolute'; target.style.visibility = 'hidden'; target.style.display = 'block'; returnHeight = target.offsetHeight; target.style.display = ''; target.style.position = ''; target.style.visibility = ''; return returnHeight;} return 0; }, setLastActiveItem: function (target) {if (!!target) { this.lastActiveItem = target;} else { this.lastActiveItem = null;} }, getLastActiveItem: function () {if (this.lastActiveItem != null) { return this.lastActiveItem;} else { return null;} }, isRTL: function () {return document.documentElement.classList.contains('rtl'); }, checkRegion: function () {var metas = document.getElementsByTagName('meta');var region = '';for (var i = 0; i < metas.length; i++) { if (metas[i].getAttribute('name') == 'sitecode') {region = metas[i].getAttribute('content');return region; }}if (region == '') return document.location.pathname.indexOf('global') > -1 ? 'global' : 'jp'; }, isLowNetwork: function () {var cookie = '___GALAXY_SPEED';if (UTILS.getCookie(cookie) == null || UTILS.getCookie(cookie) == undefined) return false;else if (UTILS.getCookie(cookie) == 'L') return true;else if (UTILS.getCookie(cookie) == 'H') return false; }, getQueryString: function (key) {var str = location.href;var index = str.indexOf('?') + 1;var lastIndex = str.indexOf('#') > -1 ? str.indexOf('#') + 1 : str.length; if (index == 0) return ''; str = str.substring(index, lastIndex);str = str.split('&');var result = '';for (var i = 0; i < str.length; i++) { var arr = str[i].split('='); if (arr.length != 2) break; if (arr[0] == key) result = arr[1]; break;}return result; }, customParallax: function (opts) {var mode = opts.mode ? opts.mode : 'center';var delay = opts.delay ? opts.delay : 0;var ease = opts.ease ? opts.ease : 'Power0.easeNone';var transZ = opts.transZ ? opts.transZ : 0;var duration = opts.duration ? opts.duration : 0.3;var distance = opts.distance ? opts.distance : 0;var correction = opts.correction ? opts.correction : 0;var windowCorrection = opts.windowCorrection ? window.innerHeight * opts.windowCorrection : 0;var direction = opts.direction ? opts.direction : 1;var activeElement = opts.activeElement;var targetElement = opts.targetElement ? opts.targetElement : activeElement;var wrapperElement = opts.wrapperElement ? opts.wrapperElement : activeElement;var unit = opts.unit ? opts.unit : 'px'; var winScrollTop = window.pageYOffset;var winScrollBottom = window.pageYOffset + window.innerHeight;var elementRect = activeElement.getBoundingClientRect();var elementOffsetTop = winScrollTop + wrapperElement.getBoundingClientRect().top;var elementOffsetBottom = elementOffsetTop + wrapperElement.getBoundingClientRect().height;var trackHeight = window.innerHeight + elementRect.height + windowCorrection * 2; var elementOffsetY = mode == 'center' ? elementRect.top - (window.innerHeight - elementRect.height) / 2 : elementRect.top - window.innerHeight;if (unit == 'px') distance = (elementRect.height * distance) / 100;var percent = correction + ((elementOffsetY * (mode == 'center' ? distance * 2 : distance)) / trackHeight) * direction; if (elementOffsetTop <= winScrollBottom + windowCorrection && elementOffsetBottom >= winScrollTop - windowCorrection) { TweenMax.to(targetElement, duration, {y: percent + unit,z: transZ,ease: ease,delay: delay });} }, getNavHeight: function () {var navHeight = 0;var navigation = document.querySelector('.pd-g-header-navigation') || document.querySelector('#subnav') || document.querySelector('.sticky-menu') || document.querySelector('.pd-g-floating-nav');if (!!navigation) { if (navigation.classList.contains('pd-g-header-navigation')) {var headerNav = navigation.querySelector('.pd-header-navigation');var menuWrap = headerNav.querySelector('.pd-header-navigation__menu-wrap');navHeight = headerNav.clientHeight + menuWrap.clientHeight; } else {navHeight = navigation.clientHeight; }}return navHeight; }, isBrokenFixed: function () {var winWidth = window.innerWidth;var winHeight = window.innerHeight;var brokenFixed = false; document.documentElement.classList.remove('is-broken-fixed');if (winWidth >= 1440 && winHeight <= 540) { document.documentElement.classList.add('is-broken-fixed'); brokenFixed = true;} else if (winWidth <= 810 && winHeight / winWidth < 0.5277) { document.documentElement.classList.add('is-broken-fixed'); brokenFixed = true;} else if (winWidth / window.outerWidth < 0.4) { document.documentElement.classList.add('is-broken-fixed'); brokenFixed = true;} else if (winHeight < UTILS.MIN_VIEW_HEIGHT) { document.documentElement.classList.add('is-broken-fixed'); brokenFixed = true;} else { document.documentElement.classList.remove('is-broken-fixed');} return brokenFixed; }, isFullAnimationBrokenFixed: () => {const winWidth = window.innerWidth;const winHeight = window.innerHeight;const mobileLandscapeMode = !!UTILS.isTouchDevice && window.matchMedia('(orientation: landscape)').matches;const mobilePortraitMode = !!UTILS.isTouchDevice && !window.matchMedia('(orientation: landscape)').matches;let brokenFixed = false; if (mobilePortraitMode && winHeight / winWidth < 1.5) { document.documentElement.classList.add('is-animation-broken-fixed'); brokenFixed = true;} else if (mobileLandscapeMode) { document.documentElement.classList.add('is-animation-broken-fixed'); brokenFixed = true;} else if (winHeight < 700) { document.documentElement.classList.add('is-animation-broken-fixed'); brokenFixed = true;} else { document.documentElement.classList.remove('is-animation-broken-fixed');} // if (winHeight - winWidth >= 0 && winHeight - winWidth < 300) {// document.documentElement.classList.add('is-animation-broken-fixed');// brokenFixed = true;// } else if (winHeight < UTILS.MIN_VIEW_HEIGHT) {// document.documentElement.classList.add('is-animation-broken-fixed');// brokenFixed = true;// } else {// document.documentElement.classList.remove('is-animation-broken-fixed');// } return brokenFixed }, isTouchDevice: (function () {var checkDevice = 'ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch);checkDevice ? document.documentElement.classList.add('isTouchDevice') : document.documentElement.classList.add('isNotTouchDevice');return checkDevice; })(), isIEorEdge: (function () {var word;var agent = navigator.userAgent.toLowerCase();if (navigator.appName == 'Microsoft Internet Explorer') { word = 'msie ';} else if (agent.search('trident') > -1) { word = 'trident/.*rv:';} else if (agent.search('edge/') > -1) { word = 'edge/';} else { return -1;}var reg = new RegExp(word + '([0-9]{1,})(\\.{0,}[0-9]{0,1})');if (reg.exec(agent) != null) { document.documentElement.classList.add('isIEorEdge'); return parseFloat(RegExp.$1 + RegExp.$2);}return -1; })(), page: {scrollLock: { className: 'is-no-scroll', barWidth: function () {return window.innerWidth - document.documentElement.clientWidth; }, el: (function () {return $('html'); })(), run: function (w) {document.documentElement.style.paddingRight = w + 'px'; }, off: function () {var barWidth = this.barWidth();this.el.removeClass(this.className);// NOTE : standard pd 템플릿 대응this.el.removeClass('hive-layer-scroll-lock');this.run(0); // const bodyEl = document.querySelector('body');// bodyEl.style.position = null;// bodyEl.style.top = null;// bodyEl.style.width = null;// window.scrollTo(0, this.scrollEnd) }, on: function () {var barWidth = this.barWidth();this.el.addClass(this.className);this.run(barWidth); // const bodyEl = document.querySelector('body');// const scrollStart = window.pageYOffset || document.documentElement.scrollTop;// bodyEl.style.position = 'fixed';// bodyEl.style.top = -scrollStart + 'px';// bodyEl.style.width = '100%';// this.scrollEnd = scrollStart <= 0 ? 0 : scrollStart; }} }, MIN_VIEW_HEIGHT: 400, RESPONSIVE: {PC: { NAME: 'pc', WIDTH: 1440},TABLET: { NAME: 'tablet', WIDTH: 1024},MOBILE: { NAME: 'mobile', WIDTH: 767} }}; })(); WATCH6.UTILS = UTILS; /*! * Scrolle JavaScript Library v1.0.4 * * Copyright 2021. Yoon jae-ho * Released under the MIT license * * Date: 2021-02-09 */ 'use strict' var SCROLLER = (function () {var init = function (opts) { this.initialize = true; this.opts = opts; this.correction = !!!opts.correction ? 0 : opts.correction; this.removeCorrection = !!!opts.removeCorrection ? 0 : opts.removeCorrection; this.trackHeight = !!!opts.trackHeight ? 0 : opts.trackHeight; this.activeClass = opts.activeClass; this.activeCallbackClass = !!!opts.activeCallbackClass ? 'callback-active' : opts.activeCallbackClass; this.useStrictMode = opts.useStrictMode == undefined ? true : opts.useStrictMode; this.useFixed = !!!opts.useFixed ? false : opts.useFixed; this.useFixedStyle = opts.useFixedStyle == undefined ? true : opts.useFixedStyle; this.useSticky = !!!opts.useSticky ? false : opts.useSticky; this.useStickyStyle = opts.useStickyStyle == undefined ? true : opts.useStickyStyle; this.useViewportOver = !!!opts.useViewportOver ? true : opts.useViewportOver; this.activeVisibility = !!!opts.activeVisibility ? 'before' : opts.activeVisibility; this.activeType = !!!opts.activeType ? 'reverse' : this.opts.activeType; this.autoHeight = opts.autoHeight == undefined ? true : opts.autoHeight; this.offsetY = !!!opts.offsetY ? 0 : opts.offsetY; this.resize = opts.resize == undefined ? true : opts.resize; this.resizeTiming = opts.resizeTiming == undefined ? false : opts.resizeTiming; this.windowHeight = window.innerHeight; this.oldPregress = 0; this.oldWinScrollTop = 0; this.elementInformation = {}; this.isFixedArea = false; this.checkTouchDevice = false; this.elementEventList.setElement.call(this); this.bindEvent();}; var fn = init.prototype; fn.bindEvent = function () { var self = this; var setTimeing = null; this.elementHandler(); if (this.resize) {this.addEventList = function () { if (!self.resizeTiming) {self.windowHeight = window.innerHeight;self.elementHandler(); } else {clearTimeout(setTimeing);setTimeing = setTimeout(function () { self.windowHeight = window.innerHeight; self.elementHandler();}, self.resizeTiming); }};window.addEventListener('resize', this.addEventList); } if (this.opts.IEScroll) {this.utilList.IEScrollHandler.call(this); }}; fn.elementHandler = function () { this.elementEventList.setTrackStyle.call(this); this.getFixedState(); if (this.trackHeight > 1) {this.elementEventList.setTrackHeigh.call(this); } if (!this.useSticky && this.useFixed && this.useFixedStyle) {this.elementEventList.setFixedStyle.call(this); } if (this.useSticky && !this.useFixed && this.useStickyStyle) {this.elementEventList.setStickyStyle.call(this); } return this;}; fn.utilList = { checkTouchDevice: function () {if (navigator.userAgent.indexOf('Windows') > -1 || navigator.userAgent.indexOf('Macintosh') > -1) { return this.checkTouchDevice = false;} else if ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch)) { return this.checkTouchDevice = true;} }, IEScrollHandler: function () {if (navigator.userAgent.match(/Trident\/7\./)) { this.body.addEventListener('mousewheel', function (e) {e.preventDefault();var wheelDelta = e.wheelDelta, currentScrollPosition = window.pageYOffset;window.scrollTo(0, currentScrollPosition - wheelDelta); }); this.body.addEventListener('keydown', function (e) {var currentScrollPosition = window.pageYOffset; switch (e.which) { case 38:e.preventDefault();window.scrollTo(0, currentScrollPosition - 40);break; case 40:e.preventDefault();window.scrollTo(0, currentScrollPosition + 40);break; default:return;} });} }, getScroll: function () {var top = window.pageYOffset, bottom = top + this.windowHeight;return { top: top, bottom: bottom}; }, getOffset: function (element) {var top = element.getBoundingClientRect().top + window.pageYOffset, bottom = element.getBoundingClientRect().bottom + window.pageYOffset;return { top: top, bottom: bottom}; }, getUserAgent: function () {return navigator.userAgent; }}; fn.elementEventList = { setElement: function () {this.body = document.querySelector('body'); if (this.opts.trackElement !== undefined) { this.trackElement = this.opts.trackElement.jquery ? this.opts.trackElement[0] : this.opts.trackElement;} if (this.opts.fixedElement !== undefined) { this.fixedElement = this.opts.fixedElement.jquery ? this.opts.fixedElement[0] : this.opts.fixedElement;} if (this.opts.activeElement !== undefined) { this.activeElement = this.opts.activeElement.jquery ? this.opts.activeElement[0] : this.opts.activeElement;} }, setTrackHeigh: function () {if (this.trackHeight <= 1) return; this.trackElement.style.height = ''; var checkTrackHeight = this.trackElement.clientHeight == 0;var isTrackHeight = this.windowHeight; var calTrackHeight = isTrackHeight * this.trackHeight; if (checkTrackHeight) { this.trackElement.style.height = this.windowHeight + 'px';} this.trackElement.style.height = calTrackHeight + 'px'; }, setTrackStyle: function () {if (!!!this.trackElement) return; if (this.useFixed && window.getComputedStyle(this.trackElement).position == 'static') { this.trackElement.style.position = 'relative';} }, setFixedStyle: function () {if (!this.isFixedArea) { this.fixedElement.style.height = ''; this.fixedElement.style.top = ''; this.fixedElement.style.position = 'absolute';} if (this.fixedElement.clientWidth == 0) { this.fixedElement.style.width = '100%';} if (this.autoHeight) { if (typeof this.offsetY == 'string') {this.fixedElement.style.height = 'calc(' + this.windowHeight + 'px - ' + this.offsetY + ')';this.fixedElement.style.top = this.offsetY; } else {this.fixedElement.style.height = (this.windowHeight - this.offsetY) + 'px';this.fixedElement.style.top = this.offsetY + 'px'; }} }, setStickyStyle: function () {if (!this.isFixedArea) { this.fixedElement.style.position = 'sticky';} if (this.fixedElement.clientWidth == 0) { this.fixedElement.style.width = '100%';} }, setFixedElement: function () {this.diffHeight = this.windowHeight - this.fixedElement.clientHeight;this.trackTopOffset = this.utilList.getOffset.call(this, this.trackElement).top;this.trackBottomOffset = this.utilList.getOffset.call(this, this.trackElement).bottom; if (this.winScrollTop <= this.trackTopOffset) { this.fixedElement.style.position = 'absolute'; if (typeof this.offsetY == 'string') {this.fixedElement.style.top = this.offsetY; } else {this.fixedElement.style.top = this.offsetY + 'px'; } this.fixedElement.style.bottom = '';} else if (this.winScrollBottom >= this.trackBottomOffset) { this.fixedElement.style.position = 'absolute'; this.fixedElement.style.top = this.trackElement.clientHeight - this.fixedElement.clientHeight + 'px';} else { if (!this.isFixedArea) {this.fixedElement.style.position = 'fixed';this.fixedElement.style.top = '0'; }}; },}; fn.getWheelDirection = function () { if (this.winScrollTop >= this.oldWinScrollTop) {this.wheelDirection = 'down'; } else {this.wheelDirection = 'up'; } this.oldWinScrollTop = this.winScrollTop;}; fn.getProgress = function () { var trackTopOffset = this.utilList.getOffset.call(this, this.trackElement).top - (this.windowHeight * this.correction),trackHeight = this.useFixed || this.useSticky ? Math.abs(this.trackElement.clientHeight - this.windowHeight) : this.useViewportOver ? this.trackElement.clientHeight + this.windowHeight : this.trackElement.clientHeight,scrollTop = this.winScrollTop - trackTopOffset,scrollBottom = this.winScrollBottom - trackTopOffset,calProgress = this.useFixed || this.useSticky ? scrollTop / trackHeight * 100 : scrollBottom / trackHeight * 100; if (this.useStrictMode) {this.progress = Math.floor(calProgress) < 0 ? 0 : Math.floor(calProgress) > 100 ? 100 : Math.floor(calProgress); } else {this.progress = calProgress; }; this.getWheelDirection(); return this.progress;}; fn.getFixedState = function () { if (this.progress > 0 && this.progress < 100) {this.isFixedArea = true; } else {this.isFixedArea = false; }}; fn.trackAnimation = function (callback) { if (!this.initialize) return; this.winScrollTop = this.utilList.getScroll.call(this).top - (this.windowHeight * this.correction); this.winScrollBottom = this.utilList.getScroll.call(this).bottom; if (this.useFixed && !this.useSticky) {this.elementEventList.setFixedElement.call(this); }; this.getProgress(); this.getFixedState(); if (callback) {if (this.oldPregress !== this.progress) { callback.call(this);};this.oldPregress = this.progress; };}; fn.activeAnimation = function () { if (!this.initialize) return; this.winScrollTop = this.utilList.getScroll.call(this).top; this.winScrollBottom = this.utilList.getScroll.call(this).bottom; this.trackElementHeight = this.trackElement.clientHeight; this.correctionValue = this.trackElementHeight * this.correction; this.removeCorrectionValue = this.trackElementHeight * this.removeCorrection; this.elementOffsetTop = this.utilList.getOffset.call(this, this.trackElement).top; this.elementOffsetBottom = this.utilList.getOffset.call(this, this.trackElement).bottom; this.downScrollTop = this.winScrollTop - this.correctionValue; this.downScrollBottom = this.winScrollBottom - this.correctionValue; this.upScrollTop = this.winScrollTop + this.correctionValue; this.upScrollBottom = this.winScrollBottom + this.correctionValue; var self = this; var visibleType = this.activeVisibility,removeType = this.activeType,corrHeight = this.windowHeight / 2; var addActiveClass = function () {if (!!!self.activeClass) return; if (typeof self.activeClass == 'object') { var classLength = self.activeClass.length; for (var i = 0; i < classLength; i++) {if (!self.activeElement.classList.contains(self.activeClass[i])) { self.activeElement.classList.add(self.activeClass[i]);} }} else { if (!self.activeElement.classList.contains(self.activeClass)) {self.activeElement.classList.add(self.activeClass); }} }; var removeActiveClass = function () {if (typeof self.activeClass == 'object') { var classLength = self.activeClass.length; for (var i = 0; i < classLength; i++) {if (self.activeElement.classList.contains(self.activeClass[i])) { self.activeElement.classList.remove(self.activeClass[i]);} }} else { if (self.activeElement.classList.contains(self.activeClass)) {self.activeElement.classList.remove(self.activeClass); }} if (self.activeElement.classList.contains(self.activeCallbackClass)) { self.activeElement.classList.remove(self.activeCallbackClass);} }; var activeCallback = function () {if (!self.activeElement.classList.contains(self.activeCallbackClass)) { if (!!!self.opts.activeCallback) return; self.opts.activeCallback.call(self); self.activeElement.classList.add(self.activeCallbackClass);} }; var endCallback = function () {if (self.activeElement.classList.contains(self.activeCallbackClass)) { if (!!!self.opts.endCallback) return; self.opts.endCallback.call(self);} }; var activeHandler = function () {activeCallback();addActiveClass(); }; var removeHandler = function () {endCallback();removeActiveClass(); }; this.getWheelDirection(); switch (visibleType) {case 'before': if (this.wheelDirection == 'down' && this.downScrollBottom >= this.elementOffsetTop && this.downScrollTop <= this.elementOffsetTop ||this.wheelDirection == 'up' && this.upScrollTop <= this.elementOffsetBottom && this.upScrollBottom >= this.elementOffsetBottom ||this.activeType == 'oneWay' && this.downScrollBottom >= this.elementOffsetTop) {activeHandler();this.activeStatus = true; } break; case 'visible': if (this.wheelDirection == 'down' && this.downScrollBottom >= this.elementOffsetTop + corrHeight && this.downScrollTop <= this.elementOffsetTop ||this.wheelDirection == 'up' && this.upScrollTop <= this.elementOffsetBottom - corrHeight && this.upScrollBottom >= this.elementOffsetBottom ||this.activeType == 'oneWay' && this.downScrollBottom >= this.elementOffsetTop + corrHeight) {activeHandler();this.activeStatus = true; } break; } switch (removeType) {case 'reverse': if (visibleType == 'visible') {if (this.activeStatus && this.wheelDirection == 'down' && this.winScrollTop > this.elementOffsetBottom || this.activeStatus && this.wheelDirection == 'up' && this.winScrollBottom < this.elementOffsetTop) { removeHandler(); this.activeStatus = false;} } else {if (this.activeStatus && this.winScrollTop < this.elementOffsetTop && this.winScrollBottom < this.elementOffsetTop || this.activeStatus && this.winScrollTop > this.elementOffsetBottom && this.winScrollBottom > this.elementOffsetBottom) { removeHandler(); this.activeStatus = false;} } break; case 'oneWay': if (visibleType == 'visible') {if (this.activeStatus && this.winScrollBottom < this.elementOffsetTop + corrHeight) { removeHandler(); this.activeStatus = false;} } else {if (this.activeStatus && this.winScrollTop < this.elementOffsetTop && this.winScrollBottom < this.elementOffsetTop) { removeHandler(); this.activeStatus = false;} } break; }};//TO-DO: 네이밍 변경fn.getElementInformation = function () { if (this.trackElement) {this.elementInformation.trackElement = { element: this.trackElement, width: this.trackElement.clientWidth, height: this.trackElement.clientHeight, topOffset: this.utilList.getOffset.call(this, this.trackElement).top, bottomOffset: this.utilList.getOffset.call(this, this.trackElement).bottom} }; if (this.activeElement) {this.elementInformation.activeElement = { element: this.activeElement, width: this.activeElement.clientWidth, height: this.activeElement.clientHeight, topOffset: this.utilList.getOffset.call(this, this.activeElement).top, bottomOffset: this.utilList.getOffset.call(this, this.activeElement).bottom} }; return this.elementInformation;} fn.destroy = function (e) { if (!!this.trackElement) {this.trackElement.style.position = '';this.trackElement.style.height = ''; } if (!!this.fixedElement) {this.fixedElement.style.position = '';this.fixedElement.style.top = '';this.fixedElement.style.height = ''; } this.trackElement = ''; this.fixedElement = ''; this.activeElement = ''; this.correction = ''; this.trackHeight = ''; this.activeCallbackClass = ''; this.useFixed = ''; this.activeVisibility = ''; this.activeType = ''; this.offsetY = ''; this.resize = ''; this.windowHeight = ''; this.elementInformation = ''; window.removeEventListener('load', this.addEventList); window.removeEventListener('resize', this.addEventList); this.initialize = false;}; return function (opts) { return new init(opts);}; })(); (function () {'use strict'; window.WATCH6 = window.WATCH6 || {}; const UTILS = WATCH6.UTILS; class ImageLoader { constructor(el = container, args) {const defParams = { el: el, lazyClass: '.js-img-src', lazyCompleteClass: 'load-complete', startLazyClass: args.startLazyClass || '.js-start-img-src', endLazyClass: args.endLazyClass || '.js-end-img-src', responsiveClass: args.responsiveClass || '.js-res-img', loadOption: args.loadOption, visiblePoint: !!!args.visiblePoint ? 0 : args.visiblePoint, useDefaultImg: args.useDefaultImg, resizeStart: null};this.opts = defParams;this.classes = defParams.classes;this.el = document.querySelector(el);this.init(); } init() {this.initOpts();this.getLazyImage();this.getResponsiveImage();this.bindEvents(); } initOpts() {this.targetAttr = this.opts.loadOption[0].attribute;this.responsiveCheck = this.opts.loadOption;this.dynamicCallCount = 0;this.dynamicLoadedComplate = false; if (this.opts.useDefaultImg) { this.setDefaultImage();} } getLazyImage() {const lazyImageList = Array.from(this.el.querySelectorAll(this.opts.lazyClass));const dynamicLazyImageList = Array.from(this.el.querySelectorAll(this.opts.startLazyClass));const lazyImageAllList = lazyImageList.concat(dynamicLazyImageList); this.lazyImages = lazyImageAllList;this.lazyLength = lazyImageAllList.length; } getResponsiveImage() {const responsiveImageList = this.el.querySelectorAll(this.opts.responsiveClass); this.responsiveImages = responsiveImageList;this.responsiveLength = responsiveImageList.length; } bindEvents() {window.addEventListener('load', this.onLoadHandler.bind(this));window.addEventListener('scroll', this.lazyEvent.bind(this)); if (this.responsiveCheck) { window.addEventListener('resize', this.onResizeHandler.bind(this));} } onLoadHandler() {this.responsiveHandler();this.lazyEvent(); } onResizeHandler() {clearTimeout(this.opts.resizeStart);this.opts.resizeStart = setTimeout(() => { this.responsiveHandler(); this.lazyEvent();}, 80); } lazyEvent() {this.setLazyImage(); if (this.lazyLength === this.lazyCompleteLength) { window.removeEventListener('scroll', this.lazyEvent.bind(this));} } responsiveHandler() {this.windowWidth = window.innerWidth;let resolutionLength = this.opts.loadOption.length; for (let i = 0; i < resolutionLength; i++) { let nextIndex = i + 1,nextPoint = nextIndex == resolutionLength ? 0 : this.opts.loadOption[nextIndex].resolution,checkPoint = false; if (i == 0) {checkPoint = this.windowWidth > nextPoint; } else {checkPoint = this.windowWidth <= this.opts.loadOption[i].resolution && this.windowWidth > nextPoint; } if (checkPoint) {if (this.opts.loadOption[i].attribute !== this.oldAttr) { this.targetAttr = this.opts.loadOption[i].attribute; this.oldAttr = this.targetAttr; this.attrIndex = i; this.dynamicCallCount = 0; this.setResponsiveImage();} }} } setResponsiveImage(imageTarget) {if (imageTarget) { for (let i = 0; i < imageTarget.length; i++) {let targetImage = imageTarget[i];let imgSrc = imageTarget[i].getAttribute(this.targetAttr); if (!!!imgSrc) { imgSrc = this.findImageHandler(targetImage);} if (!imageTarget[i].classList.contains(this.opts.lazyCompleteClass)) { imageTarget[i].setAttribute('src', imgSrc); imageTarget[i].classList.add(this.opts.lazyCompleteClass);} }} else { for (let i = 0; i < this.responsiveLength; i++) {let targetImage = this.responsiveImages[i];let imgSrc = targetImage.getAttribute(this.targetAttr); if (!!!imgSrc) { imgSrc = this.findImageHandler(targetImage);} if (targetImage.classList.contains(this.opts.lazyCompleteClass)) { targetImage.setAttribute('src', imgSrc);} }} } checkCompleteImage() {let lazyCompleteList = this.el.querySelectorAll('.' + this.opts.lazyCompleteClass); this.lazyCompleteLength = lazyCompleteList.length; } setDefaultImage() {for (var i = 0; i < this.lazyLength; i++) { this.lazyImages[i].setAttribute('src', 'data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH/C1hNUCBEYXRhWE1QAz94cAAh+QQFAAAAACwAAAAAAQABAAACAkQBADs=');} } setLazyImage() {this.windowHeight = window.innerHeight; for (let i = 0; i < this.lazyLength; i++) { let targetElement = this.lazyImages[i],corrHeight = this.windowHeight * this.opts.visiblePoint,scrollTop = UTILS.getScroll.call(this).top - corrHeight,scrollBottom = UTILS.getScroll.call(this).bottom + corrHeight,targetOffsetTop = UTILS.getOffset.call(this, targetElement).top,targetOffsetBottom = UTILS.getOffset.call(this, targetElement).bottom,lazyClass = this.opts.lazyClass.split('.'),removeClass = lazyClass[lazyClass.length - 1],startLazyClass = this.opts.startLazyClass.split('.'),startRemoveClass = startLazyClass[startLazyClass.length - 1]; let isOffsetParent; if (window.getComputedStyle(targetElement).display === 'none') {const targetParent = targetElement.parentNode; if (targetParent.offsetParent != null) { isOffsetParent = targetParent.offsetParent; targetOffsetTop = UTILS.getOffset.call(this, targetParent).top; targetOffsetBottom = UTILS.getOffset.call(this, targetParent).bottom;} } else {isOffsetParent = targetElement.offsetParent; } if (((scrollBottom > targetOffsetTop && scrollTop <= targetOffsetTop) || (scrollTop < targetOffsetBottom && scrollBottom > targetOffsetBottom) || (scrollTop < targetOffsetTop && scrollBottom > targetOffsetBottom) || (scrollTop > targetOffsetTop && scrollBottom < targetOffsetBottom)) && isOffsetParent != null ) {let imgSrc = targetElement.getAttribute(this.targetAttr); if (!!!imgSrc) { imgSrc = this.findImageHandler(targetElement);} if (!targetElement.classList.contains(this.opts.lazyCompleteClass)) { targetElement.setAttribute('src', imgSrc); var imageLoadEvent = () => {if (this.opts.startLazyClass.split(' ').length == 1) targetElement.classList.remove(startRemoveClass);if (this.opts.lazyClass.split(' ').length == 1) targetElement.classList.remove(removeClass);// imgElement.classList.add(self.lazyCompleteClass);this.checkCompleteImage();targetElement.removeEventListener('load', imageLoadEvent); }; targetElement.addEventListener('load', imageLoadEvent); targetElement.classList.add(this.opts.lazyCompleteClass);} }} } findRemainingImageAttr(element) {var attrLength = this.opts.loadOption.length; for (var i = 0; i < attrLength; i++) { var getAttr = element.getAttribute(this.opts.loadOption[i].attribute); if (getAttr) {return getAttr;break; }} } findNextImageAttr(element) {const isIndex = this.attrIndex; for (let i = isIndex; i >= 0; i--) { let getAttr = element.getAttribute(this.opts.loadOption[i].attribute); if (getAttr) {return getAttr;break; } if (i == 0 && getAttr == undefined) {return this.findRemainingImageAttr(element); }} } findImageHandler(element) {if (this.attrIndex !== 0) { return this.findNextImageAttr(element);} else { return this.findRemainingImageAttr(element);} }} WATCH6.ImageLoader = ImageLoader; })(); (function () {'use strict'; window.WATCH6 = window.WATCH6 || {}; const UTILS = WATCH6.UTILS;const RESPONSIVE = UTILS.RESPONSIVE; class VideoLoader { constructor(el = container, args) {const defParams = { el: el, lazyClass: args.lazyClass || '.js-video-src', responsiveClass: args.responsiveClass || '.js-res-video', imageLazyCompleteClass: 'load-complete', imageEndLazyClass: args.imageEndLazyClass || '.js-end-img-src', notLoadElement: args.notLoadElement || [], loadOption: args.loadOption, visiblePoint: !!!args.visiblePoint ? 0 : args.visiblePoint, resizeStart: null, classes: {loaded: 'loaded',ended: 'ended' }};this.opts = defParams;this.classes = defParams.classes;this.el = document.querySelector(el);this.init(); } init() {this.initOpts();this.getLazyVideo();this.getResponsiveVideo();this.bindEvents(); } initOpts() {this.getCurrentDevice();const targetindex = this.currentDevice !== 'mobile' ? 0 : 1;this.prevVideoSrc = '';this.targetAttr = this.opts.loadOption[targetindex].attribute;this.responsiveCheck = this.opts.loadOption;this.videoCallStack = []; } getLazyVideo() {let lazyVideoList = Array.from(this.el.querySelectorAll(this.opts.lazyClass)).filter((lazyVideo) => { lazyVideo.isVideoInit = false; for (let i = 0; i < this.opts.notLoadElement.length; i++) {return !lazyVideo.closest(this.opts.notLoadElement[i]); }}); lazyVideoList = lazyVideoList.filter((lazyVideo) => { if (lazyVideo.querySelector('video')) {return lazyVideo; }}); this.lazyVideos = lazyVideoList;this.lazyLength = lazyVideoList.length; } getResponsiveVideo() {let responsiveVideoList = Array.from(this.el.querySelectorAll(this.opts.responsiveClass)).filter((lazyVideo) => { for (let i = 0; i < this.opts.notLoadElement.length; i++) {return !lazyVideo.closest(this.opts.notLoadElement[i]); }});this.responsiveVideos = responsiveVideoList;this.responsiveLength = responsiveVideoList.length; } bindEvents() {window.addEventListener('load', this.onLoadHandler.bind(this));window.addEventListener('scroll', this.lazyEvent.bind(this)); if (this.responsiveCheck) { window.addEventListener('resize', this.onResizeHandler.bind(this));} } getCurrentDevice() {this.winWidth = UTILS.winSize().w;if (this.winWidth >= RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'desktop';else if (this.winWidth > RESPONSIVE.MOBILE.WIDTH && this.winWidth < RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'tablet';else this.currentDevice = 'mobile';this.prevDevice = this.currentDevice; } onLoadHandler() {this.getCurrentDevice();this.responsiveHandler();this.lazyEvent(); } onResizeHandler() {clearTimeout(this.opts.resizeStart);this.opts.resizeStart = setTimeout(() => { this.getCurrentDevice(); this.responsiveHandler(); this.lazyEvent();}, 80); } lazyEvent() {this.setLazyVideo(); if (this.lazyLength === this.lazyCompleteLength) { window.removeEventListener('scroll', this.lazyEvent.bind(this));} } responsiveHandler() {this.windowWidth = window.innerWidth;let resolutionLength = this.opts.loadOption.length; for (let i = 0; i < resolutionLength; i++) { let nextIndex = i + 1,nextPoint = nextIndex == resolutionLength ? 0 : this.opts.loadOption[nextIndex].resolution,checkPoint = false; if (i == 0) {checkPoint = this.windowWidth > nextPoint; } else {checkPoint = this.windowWidth <= this.opts.loadOption[i].resolution && this.windowWidth > nextPoint; } if (checkPoint) {if (this.opts.loadOption[i].attribute !== this.oldAttr) { this.targetAttr = this.opts.loadOption[i].attribute; this.oldAttr = this.targetAttr; this.attrIndex = i; this.setResponsiveVideo();} }} } setResponsiveVideo() {for (let i = 0; i < this.responsiveLength; i++) { const videoElement = this.responsiveVideos[i]; const video = videoElement.querySelector('video'); const videoSrc = videoElement.getAttribute(this.targetAttr); if (videoElement.classList.contains(this.classes.loaded) && videoElement.isVideoInit) {video.querySelectorAll('source').forEach((source) => { const type = source.getAttribute('type'); if (type.indexOf('webm') > -1) source.src = videoSrc + '.webm'; if (type.indexOf('mp4') > -1) source.src = videoSrc + '.mp4'; video.load(); video.addEventListener('canplaythrough', () => {window.setTimeout(() => { videoElement.classList.add(this.classes.loaded);}, 500);this.checkCompleteVideo();this.getEndImage(videoElement); }, { once: true })}); }} } setLazyVideo() {for (let i = 0; i < this.lazyLength; i++) { const winOffsetTop = window.pageYOffset; const winOffsetBottom = winOffsetTop + window.innerHeight; const targetElement = this.lazyVideos[i]; const targetRect = targetElement.getBoundingClientRect(); const targetOffsetTop = winOffsetTop + targetRect.top; const targetOffsetBottom = winOffsetTop + targetRect.bottom; if (winOffsetBottom > targetOffsetTop - (window.innerHeight * (window.pageYOffset != 0 ? this.opts.visiblePoint : 0)) &&winOffsetTop < targetOffsetBottom + (window.innerHeight * (window.pageYOffset != 0 ? this.opts.visiblePoint : 0)) && !targetElement.isVideoInit) {// this.setVideoControl();// if (!UTILS.isLowNetwork()) {if (this.videoCallStack.indexOf(i) < 0) { this.videoCallStack.push(i); this.setVideoSrc();}// } }} } setVideoSrc() {const targetIndex = this.videoCallStack[0];const videoElement = this.lazyVideos[targetIndex];const video = videoElement.querySelector('video');const videoSrc = videoElement.getAttribute(this.targetAttr);const lazyClass = this.opts.lazyClass.split('.');const removeClass = lazyClass[lazyClass.length - 1];const currentVideoSrc = videoSrc; // console.log(this.videoCallStack);// console.log(videoElement, this.videoCallStack.length)if (this.prevVideoSrc !== currentVideoSrc) { // console.log(this.videoCallStack, videoElement, this.targetAttr) video.querySelectorAll('source').forEach((source) => {const type = source.getAttribute('type');if (type.indexOf('webm') > -1) source.src = videoSrc + '.webm';if (type.indexOf('mp4') > -1) source.src = videoSrc + '.mp4'; }); video.load(); video.addEventListener('canplaythrough', () => {window.setTimeout(() => { videoElement.classList.add(this.classes.loaded); // videoElement.classList.remove(this.classes.ended);}, 500);if (this.opts.lazyClass.split(' ').length == 1) videoElement.classList.remove(removeClass);this.checkCompleteVideo();this.getEndImage(videoElement);this.videoCallStack.splice(0, 1);if (this.videoCallStack.length > 0) { this.setVideoSrc();} }, { once: true }); videoElement.isVideoInit = true;}this.prevVideoSrc = currentVideoSrc; } getEndImage(videoElement) {const targetAttr = this.currentDevice === 'desktop' ? 'data-src-pc' : this.currentDevice === 'tablet' ? 'data-src-tablet' : 'data-src-mobile';const endImage = videoElement.querySelector(this.opts.imageEndLazyClass);const lazyClass = this.opts.imageEndLazyClass.split('.');const removeClass = lazyClass[lazyClass.length - 1]; if (endImage && !endImage.classList.contains(this.opts.imageLazyCompleteClass)) { endImage.src = endImage.getAttribute(targetAttr); endImage.addEventListener('load', () => {if (this.opts.imageEndLazyClass.split(' ').length == 1) endImage.classList.remove(removeClass);endImage.classList.add(this.opts.imageLazyCompleteClass); }, { once: true })} } checkCompleteVideo() {let lazyCompleteList = Array.from(this.el.querySelectorAll('.' + this.classes.loaded)).filter((lazyVideo) => { for (let i = 0; i < this.opts.notLoadElement.length; i++) {return !lazyVideo.closest(this.opts.notLoadElement[i]); }});this.lazyCompleteLength = lazyCompleteList.length; }} WATCH6.VideoLoader = VideoLoader; })(); (function () {'use strict';window.WATCH6 = window.WATCH6 || {}; const UTILS = WATCH6.UTILS;const RESPONSIVE = UTILS.RESPONSIVE; class VideoPlayer { constructor(el, args) {const defParams = { sectionElement: args.sectionElement, videoParentElement: null, videoElement: el, videoController: '.video__controller', hiddenElement: '.blind', endImage: '.video__end-frame img', videoLazyClass: '.js-video-src', lazyCompleteClass: 'load-complete', imageEndLazyClass: '.js-end-img-src', visiblePoint: args.visiblePoint ? args.visiblePoint : 0, classes: {loaded: 'loaded',ended: 'ended',paused: 'paused',playing: 'playing',isPaused: 'is-paused' }, resizeStart: null, on: {updateController: null,updatePlayState: null }};this.opts = UTILS.def(defParams, args || {});this.classes = defParams.classes;this.init(); } init() {this.setElements();this.initOpts();if (this.video !== null) { if (!this.video.paused) {this.video.pause(); } this.videoElement.playState = false; this.updateController(); this.bindEvents();} } setElements() {this.videoElement = this.opts.videoElement;this.video = this.videoElement.querySelector('video'); if (this.video === null) return; if (this.opts.videoParentElement !== null) { this.videoParentElement = this.video.closest(this.opts.videoParentElement);} else { this.videoParentElement = this.videoElement;} this.videoController = this.videoParentElement.querySelector(this.opts.videoController); // if (this.videoController) {// this.videoControllerText = this.videoController.querySelector(this.opts.hiddenElement);// } } initOpts() {this.getCurrentDevice();this.autoPlay = this.videoElement.dataset.autoPlay ? JSON.parse(this.videoElement.dataset.autoPlay) : false;this.videoElement.playState = false;this.videoElement.autoPlayState = false;this.useController = this.videoController ? true : false;// if (this.useController) {// this.globalText = JSON.parse(this.videoController.dataset.globalText);// } } getCurrentDevice() {this.winWidth = UTILS.winSize().w;if (this.winWidth >= RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'desktop';else if (this.winWidth > RESPONSIVE.MOBILE.WIDTH && this.winWidth < RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'tablet';else this.currentDevice = 'mobile';this.prevDevice = this.currentDevice; } getEndImage() {const targetAttr = this.currentDevice === 'desktop' ? 'data-src-pc' : this.currentDevice === 'tablet' ? 'data-src-tablet' : 'data-src-mobile';const endImage = this.videoElement.querySelector(this.opts.imageEndLazyClass);const lazyClass = this.opts.imageEndLazyClass.split('.');const removeClass = lazyClass[lazyClass.length - 1]; if (endImage) { endImage.src = endImage.getAttribute(targetAttr); endImage.addEventListener('load', () => {if (this.opts.imageEndLazyClass.split(' ').length == 1) endImage.classList.remove(removeClass);endImage.classList.add(this.opts.lazyCompleteClass); }, { once: true })} } bindEvents() {window.addEventListener('resize', this.onResizeHandler.bind(this));window.addEventListener('scroll', this.onScrollHandler.bind(this));this.video.addEventListener('canplaythrough', this.onCanplayThrough.bind(this), { once: true });if (this.useController) { this.videoController.addEventListener('click', this.onClickController.bind(this));} } onChange(videoElement) {if (videoElement === this.videoElement) { const targetAttr = this.currentDevice !== 'mobile' ? 'data-media-pc' : 'data-media-mo'; const videoSrc = this.videoElement.getAttribute(targetAttr); const currentVideoSrc = videoSrc; if (this.prevVideoSrc !== currentVideoSrc) {this.videoElement.playState = false;this.video.querySelectorAll('source').forEach((source) => { const type = source.getAttribute('type'); if (type.indexOf('webm') > -1) source.src = videoSrc + '.webm'; if (type.indexOf('mp4') > -1) source.src = videoSrc + '.mp4'; this.video.load();}); this.videoElement.classList.remove(this.classes.playing);this.videoElement.classList.remove(this.classes.paused); this.video.addEventListener( 'canplaythrough', () => {if (!UTILS.isLowNetwork()) { this.onPlay();}this.getEndImage(); }, { once: true }); } this.prevVideoSrc = currentVideoSrc;} } onLoad(videoElement) {if (videoElement === this.videoElement) { const targetAttr = this.currentDevice !== 'mobile' ? 'data-media-pc' : 'data-media-mo'; const videoSrc = this.videoElement.getAttribute(targetAttr); this.videoElement.playState = false; this.video.querySelectorAll('source').forEach((source) => {const type = source.getAttribute('type');if (type.indexOf('webm') > -1) source.src = videoSrc + '.webm';if (type.indexOf('mp4') > -1) source.src = videoSrc + '.mp4';this.video.load(); }); this.video.addEventListener('canplaythrough', () => { if (!UTILS.isLowNetwork()) {this.onPlay(); } this.getEndImage();}, { once: true });} } onPlay(videoElement) {const playFunc = () => { if (this.video.readyState > 0 && !this.videoElement.playState) {if (this.video.currentTime === this.video.duration) { this.video.currentTime = 0;}if (this.autoPlay) this.videoElement.autoPlayState = true;this.videoElement.playState = true; if (this.videoElement.classList.contains(this.classes.paused)) { this.videoElement.classList.add(this.classes.playing);} else { window.setTimeout(() => {this.videoElement.classList.add(this.classes.playing); }, 350);}this.videoElement.classList.remove(this.classes.ended);this.videoElement.classList.remove(this.classes.paused); window.setTimeout(() => { this.video.play(); this.updateController(); this.outCallback('updatePlayState', true);}, 350);this.video.addEventListener('ended', this.updatePlayEnded.bind(this), { once: true }); }} if (videoElement) { if (videoElement === this.videoElement) {playFunc(); }} else { playFunc();} } onPause() {if (!this.video.paused) { this.video.pause();}this.videoElement.playState = false;this.videoElement.classList.remove(this.classes.ended);this.videoElement.classList.remove(this.classes.playing);this.videoElement.classList.add(this.classes.paused);this.updateController(); } onEnded() {if (this.video.readyState > 3) { if (!this.video.ended) {this.video.pause(); } this.video.currentTime = this.video.duration; this.videoElement.playState = false; this.videoElement.classList.add(this.classes.ended); this.videoElement.classList.remove(this.classes.playing); this.videoElement.classList.remove(this.classes.paused); this.updateController();} } onReset(videoElement) {const resetFunc = () => { this.video.pause(); this.video.currentTime = 0; this.videoElement.playState = false; if (this.autoPlay) this.videoElement.autoPlayState = false; this.videoElement.classList.remove(this.classes.ended); this.videoElement.classList.remove(this.classes.playing); this.videoElement.classList.remove(this.classes.paused); this.updateController();} if (videoElement) { if (videoElement === this.videoElement) {resetFunc(); }} else { resetFunc();} } onCanplayThrough() {const videoLazyClass = this.opts.videoLazyClass.split('.');const removeClass = videoLazyClass[videoLazyClass.length - 1]; if (this.useController) { window.setTimeout(() => {this.videoController.style.display = 'block'; }, 500);}this.videoElement.classList.add(this.classes.loaded);// this.videoElement.classList.add(this.classes.paused);if (this.opts.videoLazyClass.split(' ').length == 1) this.videoElement.classList.remove(removeClass);this.isCanplay = true;this.onScrollHandler();this.isCanplay = false; } onClickController(e) {e.preventDefault(); if (!this.videoElement.playState) { this.onPlay();} else { this.onPause();} } updatePlayEnded() {this.onPause(); } updateController() {if (!this.useController) return; if (!this.videoElement.playState) { // this.videoControllerText.innerText = this.globalText.play; this.videoController.classList.remove(this.classes.isPaused);} else { // this.videoControllerText.innerText = this.globalText.stop; this.videoController.classList.add(this.classes.isPaused);} const data = { el: this.videoController, playState: this.videoElement.playState} this.outCallback('updateController', data); } onScrollHandler() {if (this.videoElement.closest('.cm-layer')) return;const scrollY = window.scrollY;const direction = scrollY > this.lastScrollY ? 'down' : 'up';const targetHeight = UTILS.getHeight(this.videoElement);const windowHeight = UTILS.winSize().h;// const visiblePoint = targetHeight > windowHeight ? this.opts.visiblePoint : 0;// const visibleOffset = targetHeight * visiblePoint;const visibleOffset = targetHeight * 0.5;const scrollTop = UTILS.getScroll().top;const scrollBottom = UTILS.getScroll().bottom;const targetOffsetTop = UTILS.getOffset(this.videoElement).top;const targetOffsetBottom = UTILS.getOffset(this.videoElement).bottom - visibleOffset; const playState = this.videoElement.classList.contains(this.classes.playing) && this.videoElement.playState;const pausedState = this.videoElement.classList.contains(this.classes.paused) && !this.videoElement.playState;const endedState = this.videoElement.classList.contains(this.classes.ended) && !this.videoElement.playState; if (scrollTop > targetOffsetBottom + visibleOffset) { if (this.autoPlay) {if (this.videoElement.autoPlayState) { if (playState || pausedState) {this.onEnded(); }} else { // NOTE: video load 되기 전 end 이미지가 먼저 노출되어 보여져야할 경우 대응. this.videoElement.classList.add(this.classes.ended);} } // console.log(this.videoElement, 'overview bottom');} else if (scrollBottom < targetOffsetTop) { if (this.autoPlay && this.videoElement.autoPlayState) {if (playState || pausedState || endedState) { // console.log('reset', playState, pausedState); this.onReset();} } // console.log(this.videoElement, 'overview top');} else if (scrollBottom > targetOffsetBottom && scrollTop < targetOffsetTop) { const playState = this.isCanplay || direction === 'down'; if (playState) {// console.log(!this.videoElement.playState, !this.videoElement.autoPlayState)if (this.autoPlay && !this.videoElement.playState && !this.videoElement.autoPlayState) { // console.log('play', direction); if (!UTILS.isLowNetwork()) {this.onPlay(); }} }} this.lastScrollY = scrollY; } onResponsiveChange() {window.setTimeout(() => { this.isCanplay = true; this.onReset(); this.onScrollHandler(); this.isCanplay = false;}, 20) } onResizeHandler() {if (UTILS.winSize().w === this.winWidth) return;this.winWidth = UTILS.winSize().w;if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc();}window.clearTimeout(this.resizeEndTime);this.resizeEndTime = window.setTimeout(this.resizeEndFunc.bind(this), 150); } resizeAnimateFunc() {this.setLayout();this.resizeRequestFrame = UTILS.requestAFrame.call(window, this.resizeAnimateFunc.bind(this)); } resizeEndFunc() {this.opts.resizeStart = null;UTILS.cancelAFrame.call(window, this.resizeRequestFrame); } setLayout() {if (this.winWidth >= RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'desktop';else if (this.winWidth > RESPONSIVE.MOBILE.WIDTH && this.winWidth < RESPONSIVE.TABLET.WIDTH) this.currentDevice = 'tablet';else this.currentDevice = 'mobile'; if (this.currentDevice !== this.prevDevice) { this.onResponsiveChange();} this.prevDevice = this.currentDevice; } outCallback(ing, param) {var callbackObj = this.opts.on[ing];if (callbackObj == null) return;callbackObj(param); }} WATCH6.VideoPlayer = VideoPlayer; })(); (function () {'use strict'; const initialize = (function () { var self = {}; var currDevice = false,prevDevice = null,currentSup = null; var init = function () {setVariables();bindEvents();setScrollControl(); }; var setVariables = function () {self.resizeTimeout = null;self.supClicker = document.querySelectorAll('a.click_sup');self.supTopBtn = document.querySelectorAll('button.click_disclaimer');self.contents = document.getElementById('contents') || document.getElementById('content');self.allClickables = self.contents.querySelectorAll('a, button, input, select'); }; var bindEvents = function () {var i = 0;window.addEventListener('load', onLoadHandler);window.addEventListener('resize', onResizeHandler);window.addEventListener('scroll', onScrollHandler);for (i = 0; i < self.allClickables.length; i++) { var clickable = self.allClickables[i]; clickable.isClicked = false; clickable.isVisible = false; clickable.addEventListener('focusin', centeredFocus); clickable.addEventListener('mousedown', checkClick);} for (i = 0; i < self.supClicker.length; i++) { self.supClicker[i].addEventListener('click', onClickSup);}for (i = 0; i < self.supTopBtn.length; i++) { self.supTopBtn[i].addEventListener('click', onClickSupTopBtn);} }; var onLoadHandler = function () {onResizeHandler();onScrollHandler();if (UTILS.isLowNetwork()) { document.documentElement.classList.add('low_network');}document.documentElement.classList.add('load');window.removeEventListener('load', onLoadHandler); }; var onResizeHandler = function () {if (window.innerWidth >= 1024) currDevice = 'desktop';else if (window.innerWidth >= 768 && window.innerWidth < 1024) currDevice = 'tablet';else currDevice = 'mobile'; clearTimeout(self.resizeTimeout);self.resizeTimeout = setTimeout(function () { UTILS.isBrokenFixed();}, 100); if (currDevice != prevDevice) { document.documentElement.classList.add(currDevice); document.documentElement.classList.remove(prevDevice); prevDevice = currDevice;} }; var onScrollHandler = function () {var winOffsetTop = window.pageYOffset;var winOffsetBottom = winOffsetTop + window.innerHeight; for (var i = 0; i < self.allClickables.length; i++) { var clickable = self.allClickables[i]; var clickablePos = winOffsetTop + clickable.getBoundingClientRect().top; var winVisibleTop = winOffsetTop + UTILS.getNavHeight(); if (clickablePos >= winVisibleTop && clickablePos <= winOffsetBottom) {clickable.isVisible = true; } else if (clickablePos < winVisibleTop || clickablePos > winOffsetBottom) {clickable.isVisible = false; }} }; var onClickSup = function (e) {e.preventDefault();e.stopPropagation(); var _this = this;var destIndex = parseFloat(this.innerText);var disclaimerList = document.querySelectorAll('#desc-section ol');disclaimerList.forEach((el) => { if (window.getComputedStyle(el).display === 'block') {disclaimerList = el; }});var disclaimerItems = disclaimerList.querySelectorAll('li');var disclaimerItem = disclaimerList.querySelectorAll('li')[destIndex - 1];var disclaimer = disclaimerItem.querySelector('span');var disclaimerText = disclaimer.innerHTML;var activeBlock = '' + disclaimerText + '';disclaimer.innerHTML = activeBlock;currentSup = e.currentTarget; var focusInEvent = function () { centeredFocus.call(_this); disclaimer.removeEventListener('focusin', focusInEvent);}; var focusOutEvent = function () { disclaimer.innerHTML = disclaimerText; disclaimer.removeAttribute('tabindex'); disclaimer.removeEventListener('focusout', focusOutEvent);}; if (e.currentTarget.closest('.cm-layer')) { const targetLayer = e.currentTarget.closest('.cm-layer'); $(targetLayer).trigger('closeLayer', false);} disclaimer.addEventListener('focusin', focusInEvent);disclaimer.addEventListener('focusout', focusOutEvent);setTimeout(() => { disclaimerItem.querySelector('a').focus();}, 0); disclaimerItems.forEach(el => el.classList.remove('is-active'));disclaimerItem.classList.add('is-active'); }; var onClickSupTopBtn = function (e) {var disclaimer = e.target.closest('li');var supNum = disclaimer.getAttribute('data-sup');var supList = document.querySelectorAll('.click_sup'); for (let i = 0; i < supList.length; i++) { if (supList[i].innerText === supNum) {centeredFocus.call(this);currentSup.focus(); }} const curSupLayer = currentSup.closest('.cm-layer'); if (!!curSupLayer) { const supLayerId = curSupLayer.id; const layerParent = curSupLayer.parentNode; const targetButton = layerParent.querySelector(`[data-layer-target="#${supLayerId}"]`); if (currentSup.innerText === supNum) {targetButton.focus(); };}; disclaimer.classList.remove('is-active'); }; var centeredFocus = function (e) {if (!document.documentElement.classList.contains('ios') && e && e.relatedTarget == null) return;var _this = this;if (!this.isClicked && !this.isVisible && !isSubNav(this)) { setTimeout(function () {var winOffsetTop = window.pageYOffset;var targetRect = _this.getBoundingClientRect();var winHeight = (window.innerHeight - UTILS.getNavHeight()) / 2;var targetOffsetMid = winOffsetTop - UTILS.getNavHeight() + targetRect.top + targetRect.height / 2; window.scrollTo(0, targetOffsetMid - winHeight); }, 10);}this.isClicked = false; }; var isSubNav = function (element) {var parent = element.parentNode;var parentId = parent.getAttribute('id');if (parentId == 'contents' || parent == document.body) { return false;} else { if (parentId == 'subnav' || parent.classList.contains('sc-s22ultra-popup')) {return true; } else {return isSubNav(parent); }} }; var checkClick = function () {this.isClicked = true; }; var setScrollControl = function () {var docClass = document.documentElement.classList;if (UTILS.checkRegion() != 'global' && !docClass.contains('mac') && !docClass.contains('safari')) { ANIUTIL.scrollController({speed: 120,duration: 0.5 });} }; return {init: init };})(); window.initialize = initialize; })(); (function (global, factory) {global = global;global.TrapFocus = factory(); })(window, function () {'use strict';var TrapFocus = (function (isUndefined) { var win = window,doc = win.document,$ = win.jQuery,hasTrap = null,Util = win.WATCH6.UTILS; function TrapFocus(container, args) {if (!(this instanceof TrapFocus)) { return new TrapFocus(container, args);}var defParams = { obj: container, prevStep: null, isDestroy: false, IgnoreUtilFocusChanges: false, ariaAttr: {hidden: 'aria-hidden',disabled: 'aria-disabled',modal: 'aria-modal' }, ariaNotHidden: (() => {return args && args.ariaNotHidden ? args.ariaNotHidden : []; })(), classAttr: {clone: 'trapfocus' }, elAttr: {tabIndex: 'tabindex',role: 'role' }, customEvent: '.TrapFocus' + new Date().getTime() + Math.random()};this.opts = Util.def(defParams, args || {});if (!(this.obj = $(this.opts.obj)).length) return;if (hasTrap != null) { hasTrap.destroy();}hasTrap = this;this.init(); } TrapFocus.prototype = {init: function () { this.initLayout(); this.buildAria(); this.bindEvents(true); this.loadComponent(); this.obj.data('TrapFocus', this);},initLayout: function () { var ariaAttr = this.opts.ariaAttr; var elAttr = this.opts.elAttr; this.obj.attr(ariaAttr.modal, 'true'); this.obj.attr(elAttr.role, 'dialog');},buildAria: function () { var ariaAttr = this.opts.ariaAttr; var elAttr = this.opts.elAttr; var defaultNotHidden = 'head, script, noscript, link, style, meta'; var hiddenParam = this.opts.ariaNotHidden.length > 0 ? `, ${this.opts.ariaNotHidden.join(',')}` : ''; Util.def(this, {aria: { notHidden: Array(defaultNotHidden + hiddenParam), focusType: ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'], dataAttr: {ariaHidden: 'trapfocusariahidden',ariaDisabled: 'trapfocusariadisabled',tabIndex: 'trapfocustabindex',role: 'trapfocusrole' }, destroy: $.proxy(function () {var dataAttr = this.aria.dataAttr;var hiddenEls = this.aria.hiddenEls;var focusEls = this.aria.focusEls;var tabindexEls = this.aria.tabindexEls; // aria-hiddenfor (var hMin = 0, hMax = hiddenEls.length; hMin < hMax; hMin++) { (function (h_index) {var hiddenEl = hiddenEls.eq(h_index), ariaCondition = hiddenEl.data(dataAttr.ariaHidden), elCondition = hiddenEl.data(dataAttr.role);if (ariaCondition != isUndefined) { hiddenEl.attr(ariaAttr.hidden, ariaCondition); hiddenEl.removeData(dataAttr.ariaHidden);} else { hiddenEl.removeAttr(ariaAttr.hidden);}if (elCondition != isUndefined) { hiddenEl.attr(elAttr.role, elCondition); hiddenEl.removeData(dataAttr.role);} else { hiddenEl.removeAttr(elAttr.role);} })(hMin);} // aria-disabledfor (var fMin = 0, fMax = focusEls.length; fMin < fMax; fMin++) { (function (f_index) {var focusEl = focusEls.eq(f_index), ariaCondition = focusEl.data(dataAttr.ariaDisabled);focusEl.removeAttr(elAttr.tabIndex);if (ariaCondition != isUndefined) { focusEl.attr(ariaAttr.disabled, ariaCondition); focusEl.removeData(dataAttr.ariaDisabled);} else { focusEl.removeAttr(ariaAttr.disabled);} })(fMin);} // tabindexfor (var tMin = 0, tMax = tabindexEls.length; tMin < tMax; tMin++) { (function (t_index) {var tabindexEl = tabindexEls.eq(t_index), ariaCondition = tabindexEl.data(dataAttr.tabIndex);if (ariaCondition != isUndefined) { tabindexEl.attr(elAttr.tabIndex, ariaCondition); tabindexEl.removeData(dataAttr.tabIndex);} else { tabindexEl.removeAttr(elAttr.tabIndex);} })(tMin);} var cookieBtnWrap = document.getElementById('teconsent');if (cookieBtnWrap) { var cookieBtn = cookieBtnWrap.querySelector('a'); if (cookieBtn && cookieBtn.getAttribute('tabindex') === '-1') {cookieBtn.setAttribute('tabindex', '0');cookieBtn.removeAttribute('aria-disabled'); }} }, this), build: $.proxy(function () {var _this = this;var focusTypes = this.aria.focusType;var dataAttr = this.aria.dataAttr;var objParents = this.obj.parents();var hiddenEls = this.obj.siblings().not(_this.aria.notHidden.join(','));var focusEls = $('