Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (2024)

Galaxy Buds2

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (1)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (2)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (3)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (4)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (5)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (6)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (7)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (8)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (9)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (10)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (11)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (12)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (13)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (14)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (15)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (16)

Click or tap to zoom out

Click or tap to zoom in/out

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (17)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (18)

Click or tap to zoom out

Zoom in

Galaxy Buds2

SM-R177NZKAXAC

Product Ratings : 3.4(Number of Ratings :166)

  • Well-balanced Sound
  • Battery Life
  • ANC

Choose your Colour

Colour :

key features

  • Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (19)

    Powerful Sound

  • Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (20)

    Active Noise Canceling

  • Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (21)

    Comfortable Fit

Galaxy Buds2

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (22)

Immerse yourself
into your own world

Get lost in what you love. Galaxy Buds2 opens a new world of audio experience with well-balanced sound, unmatched comfort fit, ANC, and seamless connectivity to your phone and watch. Easier controls and better feedback keep you immersed when working out, gaming, or jamming to your beats. 1

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (23)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (24)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (25)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (26)

The front of the Galaxy Buds2 case is shown open, with two Galaxy Buds2 earbuds placed inside the case. The exterior of the Galaxy Buds2 case is in a white color, and the interior of the case, including the two Galaxy Buds2 earbuds, are in an olive colour.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (27)

Galaxy AI is here

Elevate your Galaxy AI experience with Galaxy Buds2: a translator, right in your ear. Enhance the translation features on your Samsung Galaxy smartphone with Galaxy Buds2. Talk to others who speak different languages face-to-face and over the phone.

Face-to-face Over the phone

Use your Galaxy Buds2 to make new friends who speak different languages. Talk through your earbuds, while the other person hears the translated voice through the phone's speaker. Enjoy seamless conversations while making friends and exploring new places.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (28)

*Interpreter feature requires Samsung Account login. Certain languages may require language pack download. Service availability may vary by language. Accuracy of results is not guaranteed.
*Live Translate feature requires a network connection and Samsung Account login. Live Translate feature is only available on the pre-installed Samsung Phone app. languages require language pack download, language availablity will vary. Service availability may vary by language, country, region or carrier. Accuracy of results is not guaranteed.
*Galaxy AI features are supported on Galaxy S24 Ultra, S24 Plus and S24 as of Feb. 2024.
*Samsung Galaxy devices may require the latest software update to properly support Galaxy AI features.
*Images simulated for illustrative purposes. Actual UX/UI may be different.

Galaxy Buds2 capture your words clearly during Live Translation calls with the help of voice recognition. Hear the translation through the Galaxy Buds2 while being able to read the dialog without holding your phone up to your ears.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (29)

*Interpreter feature requires Samsung Account login. Certain languages may require language pack download. Service availability may vary by language. Accuracy of results is not guaranteed.
*Live Translate feature requires a network connection and Samsung Account login. Live Translate feature is only available on the pre-installed Samsung Phone app. languages require language pack download, language availablity will vary. Service availability may vary by language, country, region or carrier. Accuracy of results is not guaranteed.
*Galaxy AI features are supported on Galaxy S24 Ultra, S24 Plus and S24 as of Feb. 2024.
*Samsung Galaxy devices may require the latest software update to properly support Galaxy AI features.
*Images simulated for illustrative purposes. Actual UX/UI may be different.

WELL-BALANCED SOUND

Your world the way
it’s meant to be heard

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (30) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (31)

A woman is wearing olive color Galaxy Buds2 in her ear while riding a skateboard down an asphalt street. She is spreading her arms out and enjoying the ride. A man is in the background, also riding a skateboard by sitting on it.

Enjoy powerful, deep bass to clear treble through
two-way dynamic speakers. The Galaxy Buds2 gives you well-balanced sound quality that enriches every moment of your audio journey. Hear like you’re there.

CRYSTAL-CLEAR CALLS

Leave noise out
of the conversation

Three microphones and a built-in voice pickup unit help you make clearer calls, while a machine-learning based solution filters unwanted sound so you can better share your world with family and friends. The low protrusion design minimizes wind disruptions to make your outdoors calls come in clear. 2

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (32)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (33)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (34)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (35)

An olive color Galaxy Buds2 earbud is split in half and its inner components are shown in order. The outermost shell is opened and inside is a chipset with 1 inner mic. There is also a component with 2 outer mics(Beamforming) and VPU(voice pickup unit).

1 Inner
Mic

2 Outer Mic
(Beamforming)

VPU
(Voice Pickup Unit)

ACTIVE NOISE CANCELING

Choose the sound
you want to hear

Two microphones detect ambient noise while Active Noise Canceling blocks unwanted sound. Background noise can be reduced up to 98% to keep you fully immersed in your music, games, audio books, and your favorite podcasts. 3, 4

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (36) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (37)

A woman is enjoying music while wearing a lavender color Galaxy Buds2. A Galaxy Buds2 case is displayed next to her, which is lavender color on the inside and white on the outside.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (38)

Active Noise Canceling (ANC) On Galaxy Buds2 cuts external background
noise by up to 98%, backed by UL Verification

Tune into or out of the world around you with an easily adjustable three-level ambient sound option.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (39) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (40)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (41)

Ambient Sound

ANC

High

Medium

Low

A lavender Galaxy Buds2 earbud is shown over an illustration that depicts the three levels of ambient sounds that can be adjusted for ANC, from low, medium, to high.

360 AUDIO

Get 360 Audio and be completely immersed

360 Audio places sound all around you, while Dolby Head Tracking™ technology delivers an incredible three-dimensional listening experience. And with Dolby Atmos®, the audio becomes exceptionally detailed, letting you do more than just listen - you'll feel the story happening in front of you.

*Available only on Samsung Galaxy smartphones and tablets with Android One UI version 3.1 or later. 360 Audio and Dolby Head Tracking™ support may vary depending on app and content.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (42)

A set of onyx-colored Galaxy Buds2 slides to the center of the screen. The left side appears from the bottom left corner with the outside part facing forward and the right side appears from the top right with the inside part facing forward to reveal the R and various speaker and mic components. As they meet in the middle, they rotate as a pair 360 degrees to reveal all aspects of both sides.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (43)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (44)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (45)

SOUND CUSTOMIZATION

Sounds tailored to
your taste

Your every audio experience is tailored to your taste with Galaxy Buds2. With six different equalizer settings to choose from, you'll find your own pitch perfect, vibrant sound that keeps you immersed.

How to change equalizer setting

Step 1

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (46) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (47)

The Galaxy Buds2 settings menu is shown on a smartphone screen and the Earbuds setting button is highlighted. A set of lavender Galaxy Buds2 earbuds is seen in the background.

Step 2

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (48) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (49)

step 2) The equalizer button is highlighted in the settings screen.

Step 3

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (50) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (51)

step 3) Different options for the equalizer setting is shown.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (52) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (53)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (54) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (55)

  • Step 1
  • Step 2
  • Step 3

DESIGN

Looks as
good as
it sounds

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (62)

COMFORT FIT

The lightest earbuds
we've ever made

Galaxy Buds2 is lightweight (5g each) and keeps music snug in your ears for even the most active lifestyles. With three sizes of soft, flexible silicon tips you can find a custom fit to get the best ANC experience possible. Find your fit with the "Earbud fit test" menu in the Galaxy Wearable app.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (63)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (64)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (65)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (66)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (67)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (68)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (69)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (70)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (71)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (72)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (73)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (74)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (75)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (76)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (77)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (78)

Eight single Galaxy Buds2 earbuds are placed in a circle. The earbuds are different in colour in clockwise order starting from lavender, olive, black, and white.

Pick your ear-tip size for full comfort

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (79) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (80)

Small

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (81) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (82)

Medium

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (83) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (84)

Large

The ear-tip of an olive color Galaxy Buds2 earbud is shown with different size tips from small, medium, to large.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (85) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (86)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (87) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (88)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (89) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (90)

The video opens with the Galaxy Buds2 logo followed by the text 'Earbud fit test' and an additional line above that reads "How to use". The Galaxy Buds2 case in olive green color is shown opening with olive color earbuds in the case. The two earbuds rise above. The earbuds rotate to show the inner side. A blue circle appears to highlight the 'L' letter displayed on the left earbud, and a text appears on the right that reads: 'Find L(Left) and R(Right) on your earbuds.' A blue circle highlights the 'R' letter displayed on the right earbud. The left earbud is zoomed in, and a simulated human ear appears behind. A blue circle highlights the 'L' letter while a text that reads 'Check the direction marks' appear. The left earbud fits into the simulated human ear. The text 'Insert the earbuds into your ears comfortably' appears. Two blue circles now highlight the two mics on the outer shell of the earbud. A text that reads 'Make sure 2 mics are well-exposed' appears. The frame switches to the text 'Still looking for the right fit? Try the 'Earbud fit test'.' A Samsung Galaxy smartphone is shown with the Galaxy Wearable app in the middle. A set of disclaimer texts read: "For the Earbud fit test, first pair Galaxy Buds2 with your Samsung Galaxy smartphone and then wear both earbuds. Galaxy Buds2 compatible with mobile devices and/or PCs Android 7.0 or later with RAM 1.5G and above." A text 'Put on both earbuds' appear and switches to the text 'and launch 'Galaxy Wearable' app'. The Galaxy Wearable app is opened on the smartphone. The screen zooms into the settings menu, as a text that reads "Tap" appears along with the settings symbol. A yellow circle highlights the Earbuds setting symbol on the smartphone screen. Two disclaimer texts read "screen image simulated for illustrative purpose. To use the Galaxy Wearable app, the Galaxy phone and wearable device must be paired." The word 'Tap' appears along with the Earbud fit test symbol. The text 'Put your earbuds in to start.' appears, followed by "Tap" with the Start button. The fit test results in poor fit. A text reads "If the results say you have a poor fit, adjust your earbuds or change the ear tips.' A text says 'Retry' as the retry button is pressed. The test found good fit and the text 'Found it!' appears. A text reads 'Ear tips are available in 3 different sizes'. Small / Medium / Large eartips are shown with an earbud. The mid-size eartip comes attached on the earbuds by default. The text 'Use the one that fits the best' appears as different sized eartips are shown. The text 'Give it a try' appears. A sequence of people of different genders and races are shown each fitting a Galaxy Buds2 earbud into their ears. A text appears that reads 'Immersive sound with a comfortable fit.' Two olive color earbuds appear and rotates. Four Galaxy Buds2 cases are shown with the Galaxy Buds2 logo above. Each of the Galaxy Buds2 cases open, showing its inner colors from lavender, olive, white, and graphite. The video ends with the text 'samsung.com' followed by the Samsung logo.

COLOUR OPTIONS

Find your
perfect tone

Chic Onyx. Classical graphite. Flawless white. Soothing olive. Stylish lavender. Each earbud comes in a fashion-forward design and matching cases to fit your unique taste. With a widely compatible cradle design, the case keeps your earbuds safe, recharged, and easily portable. 5

  • Onyx
  • Olive
  • White
  • Lavender
  • Graphite

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (91) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (92)

An onyx-colored Galaxy Buds2 case sits in a modern grey setting with a blue sky outside a window in the background. A pair of black Buds2 earbuds is floating above the case. There is an open Buds2 case with two Buds2 earbuds inside.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (93) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (94)

A white Buds2 case is placed in front of a scenic pool of water with a forest behind. Two olive color Buds2 earbuds are shown with the Galaxy Buds2 case. A Buds2 case is open with two earbuds inside. There are two earbuds displayed outside of its case.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (95) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (96)

A white Buds2 case is placed in front of a bright sky filled with white clouds. Two white Buds2 earbuds are shown with the Galaxy Buds2 case. A Buds2 case is open with two earbuds inside. There are two earbuds displayed outside of its case.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (97) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (98)

A white Buds2 case is placed in front of a desert with shades of lavender in the sky. Two lavender Buds2 earbuds are shown with the Galaxy Buds2 case. A Buds2 case is open with two earbuds inside. There are two earbuds displayed outside of its case.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (99) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (100)

A white Buds2 case is placed in front of a dark ocean overlooking a cliff. Two graphite Buds2 earbuds are shown with the Galaxy Buds2 case. A Buds2 case is open with two earbuds inside. There are two earbuds displayed outside of its case.

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (101) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (102)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (103) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (104)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (105) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (106)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (107) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (108)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (109) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (110)

BATTERY LIFE

Plenty of play time,
wherever you go

Whether you're watching your favorite shows, blazing through your playlist, or enjoying the outdoors, Galaxy Buds2 keeps you connected and comfortable all day long. The long lasting battery life gives you up to 5 hours of play-time and 15 more with a fully charged case. 6, 7

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (111) Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (112)

An onyx-colored Galaxy Buds2 case is open and facing forward. The interior of the case is black, and both earbuds are placed in the case.

5 hours

Up to 5 hours of play time with ANC on

20 hours

Up to a total 20 hours of play time when
charged using the case

SMOOTH SYNCING

Switch without
missing a beat

With Auto Switch, moving between your Galaxy devices is easier than ever. Go from watching a movie on your tablet to playing music on the Galaxy Watch4, all hands free. Galaxy Watch4 also supports Quick Buds Control 8 , helping you turn ANC on or off, or check battery life right from your wrist. 9, 10, 11

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (113)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (114)

Galaxy S22 Ultra

LEARN MORE

BUY NOW

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (115)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (116)

Galaxy Tab S8 Ultra

LEARN MORE

BUY NOW

Amazing alone. Better together

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (117)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (118)

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (119)

Galaxy Watch4

LEARN MORE

BUY NOW

* Galaxy S22 Ultra, Galaxy Tab S8 Ultra, Galaxy Buds2 and Galaxy Watch4 sold separately.

Life opens up with Galaxy

EXPLORE MORE

C C

  1. Auto Switch feature only available on Samsung Galaxy smartphones and tablets with OneUI 3.1 or later and Galaxy Watch 4 series or later. Certain devices and applications may not support Auto Switch.
  2. Results are based on Samsung internal lab testing subject to POLQA(Perceptual Objective Listening Quality Analysis), a global standardized test for call quality.
  3. ANC(Active Noise Canceling) is on by default, and the touch and hold gesture for ANC can be configured in the Galaxy Wearable app.
  4. Changing the 3 levels of ambient sound volume can be set up on Galaxy Wearable app.
  5. Available colours may vary by country or carrier.
  6. Earbuds and case provide up to 20 hours of battery life when the case and earbuds are charged to 100%. Based on internal testing. Audio playback time tested by pairing a pre-production Galaxy Buds2 to a recently released Galaxy smartphone with default settings including ANC on. Actual battery life may vary and depend on usage conditions, settings, number of times charged, Bluetooth signal strength, and other factors.
  7. Play time may vary based on settings.
  8. Buds Controller is compatible with Galaxy Buds+, Galaxy Watch4, and their respective following models.
  9. Devices sold separately.
  10. Auto Switch feature only available on Galaxy smartphones and tablets with OneUI 3.1 or later and Watch which is Galaxy 4 series or later. Certain devices and applications may not support Auto Switch.
  11. Samsung Galaxy devices must be logged in to Samsung Account to enable Auto Switch.

'; f.obj.wrap(e); }, build: function () { this.init(); this.initLayout(); }, }, after: { initLayout: function () { f.magicSection.css("position", "relative"); f.magicArticle.css({ position: "sticky", top: 0 }); }, buildFixedLayout: function () { var t = f.magicArticle; p.def(f, { fixedlayout: { state: null, current: null, view: function () { var t = f.breakOpts; var i = this.state; if (this.current !== i) { this.current = i; if (i == null) i = "reset"; if (t.duration != null) this[i](); } }, hasTops: ["out_bot", "out_not_initFollowers"], reset: function () { t.css({ position: "sticky", width: "", bottom: "", }); }, out_top: function () { t.css({ position: "", bottom: "" }); }, out_bot: function () { t.css({ position: "fixed", top: f.opts.props["spaceTop"], bottom: "", }); }, out_bot_pushFollowers: function () { t.css({ position: "absolute", top: "", bottom: 0, }); }, out_not_initFollowers: function () { t.css({ position: "", top: f.opts.props["spaceTop"], bottom: "", }); }, }, }); }, build: function () { this.initLayout(); this.buildFixedLayout(); }, }, load: { before: function () {}, after: function () { var t = f.opts.props; var i = d(h).scrollTop(); var e = { hookOutB: i >= t.triggerMaxOffset }; f.outCallback("init"); }, }, getSize: { winHeight: p.winSize().h, resize: function () { this.winHeight = p.winSize().h; }, }, opts: function () { var r = this; var t = p.winSize().w; var o = p.winSize().h; var i = f.opts.breakpoints, e = [], s; for (var n in i) if (n >= t) { e.push(n); s = Math.min.apply(null, e); } else s = null; var c = p.def({}, f.bOpts); if (s != null) c = p.def(c, i[s]); if (c.duration == null) if (!c.pushFollowers || !c.initFollowers) c.duration = "100%"; var l = (function () { var t = Math.floor(c.spaceHeight(), 10); return t; })(); var a = (function () { var t = l; if (c.spaceTop !== null) t = Math.floor(c.spaceTop(), 10); return t; })(); var u = (function () { var t = f.obj.outerHeight(true); if (c.duration != null) { var i = r.getSize.winHeight / 100; var e = c.duration; var s = parseFloat(e); var n = e.indexOf("%") >= 0; var o = i * s; if (!n) o = s; var a = o - l; t = Math.max(t, a); } return t; })(); var h = (function () { var t = f.magicArticle.outerHeight(true); return t; })(); (function () { var t = f.magicSection.outerHeight(true); var i = f.magicSection.offset().top; var e = Math.ceil(i - o, 10); var s = Math.ceil(i + t, 10); var n = (function () { var t = 1 - c.triggerHook; t = t < 0 ? 0 : t > 1 ? 1 : t; var i = t * o; var e = Math.max(o - l, h + l); if (!c.overlapSpace) { var s = o - l; if (i >= s) i = i - l; } return { min: i, max: e }; })(); f.opts.props["offset"] = i; f.opts.props["minOffset"] = e; f.opts.props["maxOffset"] = s; f.opts.props["triggerMinOffset"] = e + n.min; f.opts.props["triggerMaxOffset"] = s - n.max; f.opts.props["fixedMinOffset"] = e + o - l; f.opts.props["fixedMaxOffset"] = s - h - l; })(); f.opts.props["spaceHeight"] = l; f.opts.props["spaceTop"] = a; f.opts.props["sectionHeight"] = u; f.opts.props["articleHeight"] = h; f.breakOpts = c; f.props = f.opts.props; }, layout: function () { var t = p.winSize().h; var s = f.opts.hasCssSticky; var i = f.opts.props; var n = f.breakOpts; var e = i["spaceHeight"]; var o = i["spaceTop"]; var a = i["sectionHeight"]; var r = i["articleHeight"]; var c = (function () { var t = n.duration == null ? "" : a; if (!s) t = a; return t; })(); var l = (function () { var t = n.duration == null ? "" : o; var i = f.fixedlayout; var e = s; if (s) { if (!n.initFollowers) e = i.hasTops.indexOf(i.state) >= 0; } else e = i.hasTops.indexOf(i.state) >= 0; if (!e) t = ""; return t; })(); if (n.duration == null) { f.magicSection.css("position", ""); f.magicArticle.css({ position: "", top: "" }); } else { f.magicSection.css("position", "relative"); f.magicArticle.css({ position: "sticky", top: 0 }); } f.magicSection.css({ height: c }); f.magicArticle.css({ top: l }); if (!s || !n.initFollowers) f.magicArticle.css({ width: f.magicSection.outerWidth(true), }); if (!n.pushFollowers) f.magicArticle.css({ "margin-bottom": Math.max(t - e, r + e) * -1, }); else f.magicArticle.css({ "margin-bottom": "" }); }, destroy: function () { if (f.obj.parent().is(f.opts.magicArticle)) f.obj.unwrap(); if (f.obj.parent().is(f.opts.magicSection)) f.obj.unwrap(); }, }, }); this.set.before.build(); }, setElements: function () { this.magicArticle = this.obj.parent(this.opts.magicArticle); this.magicSection = this.magicArticle.parent( this.opts.magicSection ); }, buildMotion: function () { var c = this; var l = this.opts.props; var u = this.opts.classAttr; p.def(this, { motion: { progress: { current: { bu: null, au: null }, allUpdate: function (t) { var i = d(h).scrollTop(); if (t) { var e = l.maxOffset - l.minOffset; var s = i - l.minOffset; var n = s / e; } else var n = l.minOffset <= i ? 1 : 0; c.opts.props["allProgress"] = n; c.outCallback("allUpdate"); }, beforeUpdate: function (t) { var i = d(h).scrollTop(); if (t) { var e = l.triggerMinOffset - l.minOffset; var s = i - l.minOffset; var n = s / e; } else var n = l.minOffset <= i ? 1 : 0; c.opts.props["beforeProgress"] = n; if (this.current.bu != n) c.outCallback("beforeUpdate"); this.current.bu = n; }, afterUpdate: function (t) { var i = d(h).scrollTop(); if (t) { var e = l.maxOffset - l.triggerMaxOffset; var s = i - l.triggerMaxOffset; var n = s / e; } else var n = l.triggerMaxOffset <= i ? 1 : 0; c.opts.props["afterProgress"] = n; if (this.current.au != n) c.outCallback("afterUpdate"); this.current.au = n; }, beforeStandbyUpdate: function (t) { var i = d(h).scrollTop(); var e = p.winSize().h; if (t) { var s = l.minOffset - (l.minOffset - e); var n = i - (l.minOffset - e); var o = n / s; } else var o = l.minOffset - e <= i ? 1 : 0; c.opts.props["afterStandbyProgress"] = 0; c.opts.props["beforeStandbyProgress"] = o; c.outCallback("beforeStandbyUpdate"); }, afterStandbyUpdate: function (t) { var i = d(h).scrollTop(); var e = p.winSize().h; if (t) { var s = l.maxOffset + e - l.maxOffset; var n = i - l.maxOffset; var o = n / s; } else var o = l.maxOffset <= i ? 1 : 0; c.opts.props["beforeStandbyProgress"] = 1; c.opts.props["afterStandbyProgress"] = o; c.outCallback("afterStandbyUpdate"); }, update: function (t) { var i = d(h).scrollTop(); if (t) { var e = l.triggerMaxOffset - l.triggerMinOffset; var s = i - l.triggerMinOffset; var n = s / e; } else var n = l.triggerMinOffset <= i ? 1 : 0; c.opts.props["beforeProgress"] = 1; c.opts.props["afterProgress"] = 0; c.opts.props["progress"] = n; c.outCallback("update"); }, }, scroll: { stateAttr: { active: null, hookActive: null, fixedActive: null, buActive: null, auActive: null, }, scope: { out: null, hookOut: null }, destroy: function () {}, build: function () { var t = d(h).scrollTop(); var i = p.winSize().h; var e = c.opts.hasCssSticky; var s = c.breakOpts; var n = { in: l.minOffset <= t && t < l.maxOffset, hookIn: l.triggerMinOffset <= t && t < l.triggerMaxOffset, fixedIn: l.fixedMinOffset <= t && t < l.fixedMaxOffset, }; var o = c.fixedlayout; var a = this.scope; var r = this.stateAttr; o.state = null; if (n.in) { if (!e) if (s.initFollowers) if (!s.pushFollowers) if (l.direction == "FORWARD") o.state = "out_top"; else if (l.direction == "REVERSE") o.state = "out_bot"; if (!s.initFollowers) o.state = "out_bot"; } if (!n.hookIn) if (l.triggerMinOffset > t) a.hookOut = "TOP"; else if (t >= l.triggerMaxOffset) a.hookOut = "BOTTOM"; if (n.fixedIn) { if (!e) if (s.initFollowers) o.state = "out_bot"; c.magicArticle.addClass(u.fixed); if (!s.initFollowers) o.state = "out_bot"; } if (!n.fixedIn) { if (!e) if (s.initFollowers) if (l.fixedMinOffset > t) o.state = "out_top"; else if (t >= l.fixedMaxOffset) if (!s.pushFollowers) o.state = "out_bot"; else o.state = "out_bot_pushFollowers"; c.magicArticle.removeClass(u.fixed); if (!s.initFollowers) if (s.pushFollowers) if (t >= l.fixedMaxOffset) o.state = "out_bot_pushFollowers"; } if (!n.in) { if (!e) if (s.initFollowers) if (!s.pushFollowers) if (l.minOffset > t) o.state = "out_top"; else if (t >= l.maxOffset) o.state = "out_bot_pushFollowers"; if (l.minOffset > t) { a.out = "TOP"; c.opts.props["beforeProgress"] = 0; c.opts.props["afterProgress"] = 0; c.opts.props["allProgress"] = 0; c.opts.props["progress"] = 0; } else if (t >= l.maxOffset) { a.out = "BOTTOM"; c.opts.props["beforeProgress"] = 1; c.opts.props["afterProgress"] = 1; c.opts.props["allProgress"] = 1; c.opts.props["progress"] = 1; } if (!s.initFollowers) { o.state = "out_not_initFollowers"; if (!s.pushFollowers) if (t >= l.maxOffset) o.state = "out_bot_pushFollowers"; } } o.view(); if (n.in) if (r.active != "in") { r.active = "in"; c.outCallback("in"); } if (!n.hookIn) if (r.hookActive != "out") { r.hookActive = "out"; c.motion.progress.update(false); c.outCallback("hookOut"); } if (n.in) c.motion.progress.allUpdate(true); if (l.minOffset <= t && t < l.triggerMinOffset) { r.buActive = null; c.motion.progress.beforeUpdate(true); } else if (l.minOffset > t) { if (r.buActive != "u") { r.buActive = "u"; c.motion.progress.beforeUpdate(false); } } else if (t >= l.triggerMinOffset) if (r.buActive != "d") { r.buActive = "d"; c.motion.progress.beforeUpdate(false); } if (n.hookIn) { if (r.hookActive != "in") { r.hookActive = "in"; if (l.direction == "FORWARD") c.motion.progress.beforeUpdate(false); else if (l.direction == "REVERSE") c.motion.progress.afterUpdate(false); c.outCallback("hookIn"); } c.motion.progress.update(true); } if (n.fixedIn) if (r.fixedActive != "in") r.fixedActive = "in"; if (!n.fixedIn) if (r.fixedActive != "out") r.fixedActive = "out"; if (l.triggerMaxOffset <= t && t < l.maxOffset) { r.auActive = null; c.motion.progress.afterUpdate(true); } else if (l.triggerMaxOffset > t) { if (r.auActive != "u") { r.auActive = "u"; c.motion.progress.afterUpdate(false); } } else if (t >= l.maxOffset) if (r.auActive != "d") { r.auActive = "d"; c.motion.progress.afterUpdate(false); } if (!n.in) { if (r.active != "out") { r.active = "out"; if (l.minOffset > t) c.motion.progress.beforeUpdate(false); else if (t >= l.maxOffset) c.motion.progress.afterUpdate(false); c.motion.progress.allUpdate(false); c.outCallback("out"); } if (l.minOffset - i <= t && t < l.minOffset + i) c.motion.progress.beforeStandbyUpdate(true); if (l.maxOffset - i <= t && t < l.maxOffset + i) c.motion.progress.afterStandbyUpdate(true); } }, }, destroy: function () { this.scroll.destroy(); }, build: function () { this.scroll.build(); }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { d(h).on( this.changeEvents("scroll"), this.scrollFunc.bind(this) ); d(h).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); } else { d(h).off(this.changeEvents("scroll")); d(h).off(this.changeEvents("resize orientationchange")); } }, scrollFunc: function () { var t = this.opts.scrollEndTime; this.winTop = d(h).scrollTop(); if (this.opts.stateAttr.prevTop > this.winTop) this.opts.props["direction"] = "REVERSE"; else if (this.opts.stateAttr.prevTop < this.winTop) this.opts.props["direction"] = "FORWARD"; this.opts.stateAttr.prevTop = this.winTop; if (this.opts.stateAttr.scroll == null) { this.opts.stateAttr.scroll = this.winTop; this.scrollAnimateFunc(); } h.clearTimeout(this.opts.timeAttr.scrollEnd); this.opts.timeAttr.scrollEnd = h.setTimeout( this.scrollEndFunc.bind(this), t ); }, scrollEndFunc: function () { this.opts.stateAttr.scroll = null; this.scrollAct(); p.cancelAFrame.call(h, this.opts.requestAttr.scroll); }, scrollAnimateFunc: function () { this.scrollAct(); this.opts.requestAttr.scroll = p.requestAFrame.call( h, this.scrollAnimateFunc.bind(this) ); }, scrollAct: function () { if (!this.opts.stateAttr.destroy) { if (this.opts.stateAttr.resize == null) this.set.opts(); this.motion.build(); } }, resizeFunc: function (t) { var i = this.opts.resizeEndTime; if (t != e && t.type == "orientationchange") this.opts.stateAttr.isOrientationchange = true; this.winWidth = p.winSize().w; if (this.opts.stateAttr.resize == null) { this.opts.stateAttr.resize = this.winWidth; this.resizeAnimateFunc(); } h.clearTimeout(this.opts.timeAttr.resizeEnd); this.opts.timeAttr.resizeEnd = h.setTimeout( this.resizeEndFunc.bind(this), i ); }, resizeEndFunc: function () { this.opts.stateAttr.resize = null; this.resizeAct(); this.opts.stateAttr.isOrientationchange = false; p.cancelAFrame.call(h, this.opts.requestAttr.resize); }, resizeAnimateFunc: function () { this.resizeAct(); this.opts.requestAttr.resize = p.requestAFrame.call( h, this.resizeAnimateFunc.bind(this) ); }, resizeAct: function () { if (!this.opts.stateAttr.destroy) { if (p.isOrientationchange) { if (this.opts.stateAttr.isOrientationchange) this.set.getSize.resize(); } else this.set.getSize.resize(); this.set.opts(); this.set.layout(); this.scrollFunc(); } }, refresh: function () { if (p.isOrientationchange) { if (this.opts.stateAttr.isOrientationchange) this.set.getSize.resize(); } else this.set.getSize.resize(); this.set.opts(); this.set.layout(); this.scrollAct(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.bindEvents(false); this.set.destroy(); this.motion.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return o; })(); })(); })(this), (function (o, a, r) { function i(t, e) { e = e || t + r; var s = o(), i = t + "." + e + "-special-event"; function n(i) { o(s).each(function () { var t = o(this); this === i.target || t.has(i.target).length || t.triggerHandler(e, [i.target]); }); } o.event.special[e] = { setup: function () { 1 === (s = s.add(this)).length && o(a).bind(i, n); }, teardown: function () { 0 === (s = s.not(this)).length && o(a).unbind(i); }, add: function (t) { var e = t.handler; t.handler = function (t, i) { (t.target = i), e.apply(this, arguments); }; }, }; } o.map( "click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup touchstart touchend".split( " " ), function (t) { i(t); } ), i("focusin", "focus" + r), i("focusout", "blur" + r), (o.addOutsideEvent = i); })(jQuery, document, "outside"), $(function () { !(function () { "use strict"; var t; (function (t) { var i = window, e = i.jQuery, o = i.Upbs.util; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { contrastSection: ".cp-high-contrast", btnContrast: ".type-contrast", btnDefault: ".type-default", mode: "highContrastMode", classAttr: { contrast: "color_yb" }, props: {}, customEvent: ".Contrast" + new Date().getTime() + Math.random(), }; this.opts = o.def(e, i || {}); this.init(); } s.prototype = { init: function () { this.setElements(); this.initOpts(); this.bindEvents(true); this.run(); }, setElements: function () { this.html = e("html"); this.contrastSection = e(this.opts.contrastSection); this.btnContrast = this.contrastSection.find( this.opts.btnContrast ); this.btnDefault = this.contrastSection.find( this.opts.btnDefault ); }, initOpts: function () { this.opts.props["contrast"] = e.trim( this.btnContrast.attr("title") ); this.opts.props["default"] = e.trim( this.btnDefault.attr("title") ); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { this.btnContrast.on( this.changeEvents("click"), this.contrastClick.bind(this) ); this.btnDefault.on( this.changeEvents("click"), this.defaultClick.bind(this) ); } else { this.btnContrast.off(this.changeEvents("click")); this.btnDefault.off(this.changeEvents("click")); } }, contrastClick: function (t) { t.preventDefault(); var i = this.opts.mode; o.cookie.set(i, "1", 1); this.run(); }, defaultClick: function (t) { t.preventDefault(); var i = this.opts.mode; o.cookie.set(i, "0", 1); this.run(); }, run: function () { var t = this.html; var i = this.opts.mode; var e = this.opts.classAttr; var s = this.opts.props; var n = o.cookie.get(i); if (n.length && n == "1") { t.addClass(e.contrast); this.btnContrast.attr("title", s["contrast"] + " selected"); this.btnDefault.attr("title", s["default"]); } else { t.removeClass(e.contrast); this.btnContrast.attr("title", s["contrast"]); this.btnDefault.attr("title", s["default"] + " selected"); } }, }; new s(); })(); })(); }), (function (t) { t.PictureImg = (function () { "use strict"; var t; return (function (w) { var i = window, y = i.jQuery, l = i.Upbs.util; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { container: t, target: "img, .js-img-bg", props: [], classAttr: { loaded: "is-loaded", active: "is-active", bg: "js-img-bg", }, customEvent: ".PictureImg" + new Date().getTime() + Math.random(), viewType: null, resizeStart: null, on: { complete: null }, }; this.opts = l.def(e, i || {}); if (!(this.obj = y(this.opts.container)).length) return; if (this.obj.attr("data-load") == "true") return; this.init(); } s.prototype = { init: function () { this.setElements(); this.initOpts(); this.resizeFunc(); this.bindEvents(true); this.obj.attr("data-load", "true"); this.obj.data("PictureImg", this); }, setElements: function () { this.targets = this.obj.find(this.opts.target).hide(); }, initOpts: function () { var a = this; var t = function (t) { var i = ""; if (t !== w && t.length) i = t .replace(/\s/gi, "") .replace(/\(/gi, "") .replace(/\)/gi, ""); else i = ""; return i; }; for (var i = 0, e = this.targets.length; i < e; i++) { var s = this.targets.eq(i), n = s.hasClass(this.opts.classAttr.bg), o = y.trim(s.attr("data-media")), r = t(o), c = r.split("and"); if (r.length) { var l = { TARGET: s, BGTYPE: n }; for (var u = 0, h = c.length; u < h; u++) { var f = c[u], d = f.split(":"); if (d[0] === "min-width") l["MIN"] = parseInt(d[1]); else if (d[0] === "max-width") l["MAX"] = parseInt(d[1]); } this.opts.props.push(l); } } var p = function (t) { var i = a.opts.props, e = []; for (var s = 0, n = i.length; s < n; s++) { var o = i[s]; if (t > o["MAX"]) e.push(o["MAX"]); } return e.length ? Math.max.apply(null, e) + 1 : 0; }; var v = function (t) { var i = a.opts.props, e = []; for (var s = 0, n = i.length; s < n; s++) { var o = i[s]; if (t < o["MIN"]) e.push(o["MIN"]); } return e.length ? Math.min.apply(null, e) - 1 : Infinity; }; for (var m = 0, g = this.opts.props.length; m < g; m++) { var b = this.opts.props[m]; if (!b.hasOwnProperty("MIN")) b["MIN"] = p(b["MAX"]); if (!b.hasOwnProperty("MAX")) b["MAX"] = v(b["MIN"]); } this.opts.props.sort(function (t, i) { if (t.MIN > i.MIN) return 1; if (t.MIN < i.MIN) return -1; if (t.MAX > i.MAX) return 1; if (t.MAX < i.MAX) return -1; return 0; }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) y(i).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); else y(i).off(this.changeEvents("resize orientationchange")); }, resizeFunc: function () { this.winWidth = l.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } i.clearTimeout(this.resizeEndTime); this.resizeEndTime = i.setTimeout( this.resizeEndFunc.bind(this), 50 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; l.cancelAFrame.call(i, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = l.requestAFrame.call( i, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { var t = this; var i = t.opts.classAttr; var e = this.opts.props, s = []; for (var n = 0, o = e.length; n < o; n++) { var a = e[n]; if (a["MIN"] <= this.winWidth && a["MAX"] >= this.winWidth) s.push(n); } if (s.length) { var r = s[s.length - 1]; if (this.opts.viewType != r) { if (this.opts.viewType !== null) e[this.opts.viewType]["TARGET"] .hide() .removeClass(i.active); this.opts.viewType = r; if (e[r]["TARGET"].attr("data-srcset") != w) { t.obj.removeClass(i.loaded); e[r]["TARGET"].removeAttr("src"); var c = e[r]["TARGET"].attr("data-srcset"); if (e[r]["BGTYPE"]) e[r]["TARGET"].css( "background-image", "url(" + c + ")" ); else e[r]["TARGET"].attr("src", c); e[r]["TARGET"].removeAttr("data-srcset"); l.imgLoaded(e[r]["TARGET"]).done(function () { t.obj.addClass(i.loaded); t.outCallback("complete"); }); e[r]["TARGET"].css("display", "").addClass(i.active); } else { e[r]["TARGET"].css("display", "").addClass(i.active); this.outCallback("complete"); } } } else if (this.opts.viewType !== null) { this.opts.viewType = null; this.targets.hide().removeClass(i.active); this.outCallback("complete"); } }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return s; })(); })(); })(this), $(function () { -1 != window.Upbs.util.isIEorEdge && (function () { "use strict"; var t; (function (b) { var i = window, w = i.jQuery, r = i.Upbs.util; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { dataAttr: "data-picture", stateAttr: { destroy: null }, resizeStart: null, customEvent: ".PictureLayout" + new Date().getTime() + Math.random(), }; this.opts = r.def(e, i || {}); this.init(); } s.prototype = { init: function () { this.setElements(); if (this.pictures.length) { this.buildLayout(); this.resizeFunc(); this.bindResizeEvents(); } }, setElements: function () { this.pictures = w("[" + this.opts.dataAttr + "]"); }, buildLayout: function () { var n = this.pictures; r.def(this, { layout: { instance: [], resize: function () { for (var t = 0, i = this.instance.length; t < i; t++) this.instance[t].resize(); }, build: function () { for (var t = 0, i = n.length; t < i; t++) { var e = n.eq(t); var s = new o(e); this.instance.push(s); } }, }, }); this.layout.build(); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindResizeEvents: function () { w(i).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); }, resizeFunc: function (t) { this.winWidth = r.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } i.clearTimeout(this.resizeEndTime); this.resizeEndTime = i.setTimeout( this.resizeEndFunc.bind(this), 250 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; this.setLayout(); r.cancelAFrame.call(i, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = r.requestAFrame.call( i, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { if (!this.opts.stateAttr.destroy) this.layout.resize(); }, }; function o(t, i) { var e = { target: "source", props: [], stateAttr: { current: null }, viewType: null, }; this.opts = r.def(e, i || {}); if (!(this.obj = w(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.initOpts(); }, setElements: function () { this.targets = this.obj.find(this.opts.target); }, initOpts: function () { var a = this; var t = function (t) { var i = ""; if (t !== b && t.length) i = t .replace(/\s/gi, "") .replace(/\(/gi, "") .replace(/\)/gi, "") .replace(/\px/gi, ""); else i = ""; return i; }; for (var i = 0, e = this.targets.length; i < e; i++) { var s = this.targets.eq(i), n = w.trim(s.attr("media")), o = t(n), r = o.split("and"); if (o.length) { var c = { TARGET: s, SRCSET: s.attr("srcset") }; for (var l = 0, u = r.length; l < u; l++) { var h = r[l], f = h.split(":"); if (f[0] === "min-width") c["MIN"] = parseInt(f[1]); else if (f[0] === "max-width") c["MAX"] = parseInt(f[1]); } this.opts.props.push(c); } } var d = function (t) { var i = a.opts.props, e = []; for (var s = 0, n = i.length; s < n; s++) { var o = i[s]; if (t > o["MAX"]) e.push(o["MAX"]); } return e.length ? Math.max.apply(null, e) + 1 : 0; }; var p = function (t) { var i = a.opts.props, e = []; for (var s = 0, n = i.length; s < n; s++) { var o = i[s]; if (t < o["MIN"]) e.push(o["MIN"]); } return e.length ? Math.min.apply(null, e) - 1 : Infinity; }; for (var v = 0, m = this.opts.props.length; v < m; v++) { var g = this.opts.props[v]; if (!g.hasOwnProperty("MIN")) g["MIN"] = d(g["MAX"]); if (!g.hasOwnProperty("MAX")) g["MAX"] = p(g["MIN"]); } this.opts.props.sort(function (t, i) { if (t.MIN > i.MIN) return 1; if (t.MIN < i.MIN) return -1; if (t.MAX > i.MAX) return 1; if (t.MAX < i.MAX) return -1; return 0; }); }, resize: function () { var t = r.winSize().w; var i = this.opts.props, e = []; for (var s = 0, n = i.length; s < n; s++) { var o = i[s]; if (o["MIN"] <= t && o["MAX"] >= t) e.push(s); } if (e.length) { var a = e[e.length - 1]; if (this.opts.viewType != a) { this.opts.viewType = a; this.obj.css( "background-image", "url(" + i[a]["SRCSET"] + ")" ); } } else if (this.opts.viewType !== null) { this.opts.viewType = null; this.obj.css("background-image", ""); } }, }; new s(); })(); })(); }), $(function () { !(function () { "use strict"; var t; (function (t) { var i = window, s = i.jQuery, a = i.Upbs.util, e = i.Upbs.RESPONSIVE; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { domAttr: { move: "data-move-dom", fix: "data-fix-dom" }, sizeAttr: { action: null }, stateAttr: { destory: false }, resizeStart: null, customEvent: ".ResponsiveLayout" + new Date().getTime() + Math.random(), }; this.opts = a.def(e, i || {}); this.init(); } n.prototype = { init: function () { this.setElements(); this.buildLayout(); this.resizeFunc(); this.bindResizeEvents(); }, setElements: function () { this.moveDoms = s("[" + this.opts.domAttr.move + "]"); }, buildLayout: function () { var n = this; var o = this.moveDoms; a.def(this, { layout: { instance: [], mo: function () { for (var t = 0, i = this.instance.length; t < i; t++) this.instance[t].mo(); }, pc: function () { for (var t = 0, i = this.instance.length; t < i; t++) this.instance[t].pc(); }, build: function () { for (var t = 0, i = o.length; t < i; t++) { var e = o.eq(t); var s = new r(e, { domAttr: n.opts.domAttr }); this.instance.push(s); } }, }, }); this.layout.build(); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindResizeEvents: function () { s(i).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); }, resizeFunc: function (t) { this.winWidth = a.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } i.clearTimeout(this.resizeEndTime); this.resizeEndTime = i.setTimeout( this.resizeEndFunc.bind(this), 250 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; this.setLayout(); a.cancelAFrame.call(i, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = a.requestAFrame.call( i, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { if (!this.opts.stateAttr.destroy) if (this.winWidth > e.MO.WIDTH) { if (this.opts.sizeAttr.action !== "OTHER") { this.opts.sizeAttr.action = "OTHER"; this.layout.pc(); } } else if (this.opts.sizeAttr.action !== e.MO.WIDTH) { this.opts.sizeAttr.action = e.MO.WIDTH; this.layout.mo(); } }, }; function r(t, i) { var e = { classAttr: { pc: "js-display-pc", mo: "js-display-mo" }, stateAttr: { current: null }, }; this.opts = a.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.initOpts(); }, setElements: function () { var t = this.opts.domAttr; var i = this.opts.classAttr; var e = this.obj.attr(t.move); this.fixDoms = s("[" + t.fix + '="' + e + '"]'); this.pcDom = this.fixDoms.not("." + i.mo); this.moDom = this.fixDoms.not("." + i.pc); }, initOpts: function () { var t = true; if (this.obj.parent().hasClass(this.opts.classAttr.mo)) t = false; this.opts.stateAttr.current = t ? "pc" : "mo"; }, pc: function () { if (this.opts.stateAttr.current == "pc") return; this.pcDom.append(this.obj); this.opts.stateAttr.current = "pc"; }, mo: function () { if (this.opts.stateAttr.current == "mo") return; this.moDom.append(this.obj); this.opts.stateAttr.current = "mo"; }, }; new n(); })(); })(); }); var SCROLLER = (function () { function i(t) { (this.initialize = !0), (this.opts = t), (this.correction = t.correction || 0), (this.removeCorrection = t.removeCorrection || 0), (this.trackHeight = t.trackHeight || 0), (this.activeClass = t.activeClass), (this.activeCallbackClass = t.activeCallbackClass || "callback-active"), (this.useStrictMode = null == t.useStrictMode || t.useStrictMode), (this.useFixed = t.useFixed || !1), (this.useFixedStyle = null == t.useFixedStyle || t.useFixedStyle), (this.useViewportOver = t.useViewportOver || !0), (this.activeVisibility = t.activeVisibility || "before"), (this.activeType = t.activeType ? this.opts.activeType : "reverse"), (this.autoHeight = null == t.autoHeight || t.autoHeight), (this.offsetY = t.offsetY || 0), (this.resize = null == t.resize || t.resize), (this.resizeTiming = null != t.resizeTiming && t.resizeTiming), (this.windowHeight = window.innerHeight), (this.oldPregress = 0), (this.oldWinScrollTop = 0), (this.elementInformation = {}), (this.isFixedArea = !1), (this.checkTouchDevice = !1), this.elementEventList.setElement.call(this), this.bindEvent(); } var t = i.prototype; return ( (t.bindEvent = function () { var t = this, i = null; this.elementHandler(), this.resize && ((this.addEventList = function () { t.resizeTiming ? (clearTimeout(i), (i = setTimeout(function () { (t.windowHeight = window.innerHeight), t.elementHandler(); }, t.resizeTiming))) : ((t.windowHeight = window.innerHeight), t.elementHandler()); }), window.addEventListener("resize", this.addEventList)), this.opts.IEScroll && this.utilList.IEScrollHandler.call(this); }), (t.elementHandler = function () { return ( this.elementEventList.setTrackStyle.call(this), this.getFixedState(), 1 < this.trackHeight && this.elementEventList.setTrackHeigh.call(this), this.useFixed && this.useFixedStyle && this.elementEventList.setFixedStyle.call(this), this ); }), (t.utilList = { checkTouchDevice: function () { return -1 < navigator.userAgent.indexOf("Windows") || -1 < navigator.userAgent.indexOf("Macintosh") ? (this.checkTouchDevice = !1) : "ontouchstart" in window || (window.DocumentTouch && document instanceof window.DocumentTouch) ? (this.checkTouchDevice = !0) : void 0; }, IEScrollHandler: function () { navigator.userAgent.match(/Trident\/7\./) && (this.body.addEventListener("mousewheel", function (t) { t.preventDefault(); var i = t.wheelDelta, t = window.pageYOffset; window.scrollTo(0, t - i); }), this.body.addEventListener("keydown", function (t) { var i = window.pageYOffset; switch (t.which) { case 38: t.preventDefault(), window.scrollTo(0, i - 40); break; case 40: t.preventDefault(), window.scrollTo(0, i + 40); break; default: return; } })); }, getScroll: function () { var t = window.pageYOffset; return { top: t, bottom: t + this.windowHeight }; }, getOffset: function (t) { return { top: t.getBoundingClientRect().top + window.pageYOffset, bottom: t.getBoundingClientRect().bottom + window.pageYOffset, }; }, getUserAgent: function () { return navigator.userAgent; }, }), (t.elementEventList = { setElement: function () { (this.body = document.querySelector("body")), void 0 !== this.opts.trackElement && (this.trackElement = this.opts.trackElement.jquery ? this.opts.trackElement[0] : this.opts.trackElement), void 0 !== this.opts.fixedElement && (this.fixedElement = this.opts.fixedElement.jquery ? this.opts.fixedElement[0] : this.opts.fixedElement), void 0 !== this.opts.activeElement && (this.activeElement = this.opts.activeElement.jquery ? this.opts.activeElement[0] : this.opts.activeElement); }, setTrackHeigh: function () { var t, i; this.trackHeight <= 1 || ((this.trackElement.style.height = ""), (t = 0 == this.trackElement.clientHeight), (i = this.windowHeight * this.trackHeight), t && (this.trackElement.style.height = this.windowHeight + "px"), (this.trackElement.style.height = i + "px")); }, setTrackStyle: function () { this.trackElement && this.useFixed && "static" == window.getComputedStyle(this.trackElement).position && (this.trackElement.style.position = "relative"); }, setFixedStyle: function () { this.isFixedArea || ((this.fixedElement.style.height = ""), (this.fixedElement.style.top = ""), (this.fixedElement.style.position = "absolute")), 0 == this.fixedElement.clientWidth && (this.fixedElement.style.width = "100%"), this.autoHeight && ("string" == typeof this.offsetY ? ((this.fixedElement.style.height = "calc(" + this.windowHeight + "px - " + this.offsetY + ")"), (this.fixedElement.style.top = this.offsetY)) : ((this.fixedElement.style.height = this.windowHeight - this.offsetY + "px"), (this.fixedElement.style.top = this.offsetY + "px"))); }, 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), this.winScrollTop <= this.trackTopOffset ? ((this.fixedElement.style.position = "absolute"), "string" == typeof this.offsetY ? (this.fixedElement.style.top = this.offsetY) : (this.fixedElement.style.top = this.offsetY + "px"), (this.fixedElement.style.bottom = "")) : this.winScrollBottom >= this.trackBottomOffset ? ((this.fixedElement.style.position = "absolute"), (this.fixedElement.style.top = this.trackElement.clientHeight - this.fixedElement.clientHeight + "px")) : this.isFixedArea || ((this.fixedElement.style.position = "fixed"), (this.fixedElement.style.top = "0")); }, }), (t.getWheelDirection = function () { this.winScrollTop >= this.oldWinScrollTop ? (this.wheelDirection = "down") : (this.wheelDirection = "up"), (this.oldWinScrollTop = this.winScrollTop); }), (t.getProgress = function () { var t = this.utilList.getOffset.call(this, this.trackElement).top - this.windowHeight * this.correction, i = this.useFixed ? Math.abs(this.trackElement.clientHeight - this.windowHeight) : this.useViewportOver ? this.trackElement.clientHeight + this.windowHeight : this.trackElement.clientHeight, e = this.winScrollTop - t, t = this.winScrollBottom - t, i = this.useFixed ? (e / i) * 100 : (t / i) * 100; return ( this.useStrictMode ? (this.progress = Math.floor(i) < 0 ? 0 : 100 < Math.floor(i) ? 100 : Math.floor(i)) : (this.progress = i), this.getWheelDirection(), this.progress ); }), (t.getFixedState = function () { 0 < this.progress && this.progress < 100 ? (this.isFixedArea = !0) : (this.isFixedArea = !1); }), (t.trackAnimation = function (t) { this.initialize && ((this.winScrollTop = this.utilList.getScroll.call(this).top), (this.winScrollBottom = this.utilList.getScroll.call(this).bottom), this.useFixed && this.elementEventList.setFixedElement.call(this), this.getProgress(), this.getFixedState(), t && (this.oldPregress !== this.progress && t.call(this), (this.oldPregress = this.progress))); }), (t.activeAnimation = function () { if (this.initialize) { (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); function t() { e.activeElement.classList.contains(e.activeCallbackClass) || (e.opts.activeCallback && (e.opts.activeCallback.call(e), e.activeElement.classList.add(e.activeCallbackClass))), (function () { if (e.activeClass) if ("object" == typeof e.activeClass) for (var t = e.activeClass.length, i = 0; i < t; i++) e.activeElement.classList.contains( e.activeClass[i] ) || e.activeElement.classList.add(e.activeClass[i]); else e.activeElement.classList.contains(e.activeClass) || e.activeElement.classList.add(e.activeClass); })(); } function i() { e.activeElement.classList.contains(e.activeCallbackClass) && e.opts.endCallback && e.opts.endCallback.call(e), (function () { if ("object" == typeof e.activeClass) for (var t = e.activeClass.length, i = 0; i < t; i++) e.activeElement.classList.contains(e.activeClass[i]) && e.activeElement.classList.remove(e.activeClass[i]); else e.activeElement.classList.contains(e.activeClass) && e.activeElement.classList.remove(e.activeClass); e.activeElement.classList.contains(e.activeCallbackClass) && e.activeElement.classList.remove(e.activeCallbackClass); })(); } var e = this, s = this.activeVisibility, n = this.activeType, o = this.windowHeight / 2; switch ((this.getWheelDirection(), s)) { case "before": (("down" == this.wheelDirection && this.downScrollBottom >= this.elementOffsetTop && this.downScrollTop <= this.elementOffsetTop) || ("up" == this.wheelDirection && this.upScrollTop <= this.elementOffsetBottom && this.upScrollBottom >= this.elementOffsetBottom) || ("oneWay" == this.activeType && this.downScrollBottom >= this.elementOffsetTop)) && (t(), (this.activeStatus = !0)); break; case "visible": (("down" == this.wheelDirection && this.downScrollBottom >= this.elementOffsetTop + o && this.downScrollTop <= this.elementOffsetTop) || ("up" == this.wheelDirection && this.upScrollTop <= this.elementOffsetBottom - o && this.upScrollBottom >= this.elementOffsetBottom) || ("oneWay" == this.activeType && this.downScrollBottom >= this.elementOffsetTop + o)) && (t(), (this.activeStatus = !0)); } switch (n) { case "reverse": "visible" == s ? ((this.activeStatus && "down" == this.wheelDirection && this.winScrollTop > this.elementOffsetBottom) || (this.activeStatus && "up" == this.wheelDirection && this.winScrollBottom < this.elementOffsetTop)) && (i(), (this.activeStatus = !1)) : ((this.activeStatus && this.winScrollTop < this.elementOffsetTop && this.winScrollBottom < this.elementOffsetTop) || (this.activeStatus && this.winScrollTop > this.elementOffsetBottom && this.winScrollBottom > this.elementOffsetBottom)) && (i(), (this.activeStatus = !1)); break; case "oneWay": "visible" == s ? this.activeStatus && this.winScrollBottom < this.elementOffsetTop && (i(), (this.activeStatus = !1)) : this.activeStatus && this.winScrollTop < this.elementOffsetTop && this.winScrollBottom < this.elementOffsetTop && (i(), (this.activeStatus = !1)); } } }), (t.getElementInformation = function () { return ( 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, }), 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, }), this.elementInformation ); }), (t.destroy = function (t) { this.trackElement && ((this.trackElement.style.position = ""), (this.trackElement.style.height = "")), 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 = !1); }), function (t) { return new i(t); } ); })(), RANGEHANDLER = (function () { function i(t) { return ( (this.opts = t), (this.targetValue = t.targetValue), (this.startPoint = t.startPoint || 0), (this.endPoint = t.endPoint || 100), (this.activeStartPoint = this.startPoint + 1), (this.activeEndPoint = this.endPoint - 1), (this.onStart = t.onStart), (this.onUpdate = t.onUpdate), (this.onComplete = t.onComplete), (this.onReverseStart = t.onReverseStart), (this.onReverseComplete = t.onReverseComplete), (this.oldScroll = 0), (this.activeOnStart = !1), (this.activeonComplete = !1), (this.completeOnCallback = !1), (this.activeonReverseStart = !1), (this.activeonReverseComplete = !1), (this.completeReverseCallback = !1), this ); } var t = i.prototype; return ( (t.calValue = function (t) { 0 <= this.startPoint && (i = 0 < this.endPoint - this.startPoint ? this.endPoint - this.startPoint : this.endPoint); var i = (this.targetValue * (t - this.startPoint)) / i; return (i = (i = i > this.targetValue ? this.targetValue : i) < 0 ? 0 : i); }), (t.checkWheelDirection = function () { return ( (this.windowScroll = window.pageYOffset), this.oldScroll < this.windowScroll ? ((this.oldScroll = this.windowScroll), "down") : ((this.oldScroll = this.windowScroll), "up") ); }), (t.callBackList = { onStart: function () { this.onStart && this.onStart(), (this.activeOnStart = !0); }, onComplete: function () { this.onComplete && this.onComplete(), (this.activeonComplete = !0), (this.completeOnCallback = !0), (this.activeonReverseStart = !1), (this.activeonReverseComplete = !1), (this.completeReverseCallback = !1); }, onReverseStart: function () { this.onReverseStart && this.onReverseStart(), (this.activeonReverseStart = !0); }, onReverseComplete: function () { this.onReverseComplete && this.onReverseComplete(), (this.activeonReverseComplete = !0), (this.completeReverseCallback = !0), (this.activeOnStart = !1), (this.activeonComplete = !1), (this.completeOnCallback = !1); }, onUpdate: function () { this.onUpdate && this.onUpdate(); }, }), (t.checkScrollType = function (t) { return t > this.activeStartPoint && t < this.activeEndPoint && !this.completeOnCallback && !this.activeOnStart && "down" == this.isDirection ? "onStart" : t > this.activeEndPoint && !this.completeOnCallback && !this.activeonComplete && "down" == this.isDirection ? "onComplete" : t < this.activeEndPoint && this.completeOnCallback && !this.activeonReverseStart && "up" == this.isDirection ? "onReverseStart" : t < this.activeStartPoint && this.completeOnCallback && !this.activeonReverseComplete && "up" == this.isDirection ? "onReverseComplete" : (this.activeOnStart && !this.activeonComplete && "down" == this.isDirection) || (this.activeOnStart && !this.activeonComplete && "up" == this.isDirection) || (this.activeonReverseStart && !this.activeonReverseComplete && "down" == this.isDirection) || (this.activeonReverseStart && !this.activeonReverseComplete && "up" == this.isDirection) ? "onUpdate" : void 0; }), (t.activeAnimation = function (t) { switch ( ((this.isValue = this.calValue(t)), (this.isDirection = this.checkWheelDirection()), this.checkScrollType(t)) ) { case "onUpdate": (this.activeonReverseStart && t > this.activeEndPoint && "down" == this.isDirection ? this.callBackList.onComplete : this.activeOnStart && t < this.activeStartPoint && "up" == this.isDirection ? this.callBackList.onReverseComplete : this.callBackList.onUpdate ).call(this); break; case "onStart": this.callBackList.onStart.call(this); break; case "onComplete": !(t > this.activeStartPoint) || this.activeonReverseStart || this.activeonReverseComplete || this.completeReverseCallback || this.activeOnStart || this.activeonComplete || this.completeOnCallback || (this.callBackList.onStart.call(this), this.callBackList.onUpdate.call(this)), this.callBackList.onComplete.call(this); break; case "onReverseStart": this.callBackList.onReverseStart.call(this); break; case "onReverseComplete": this.callBackList.onReverseComplete.call(this); } }), function (t) { return new i(t); } ); })(), SEQUENCEPLAYER = (function () { function i(t) { return ( (this.opts = t), (this.targetElement = t.targetElement), (this.imageList = []), (this.loadCount = 0), (this.playIndex = null), (this.playingTime = 0), (this.pausePlayingTime = 0), (this.usePlay = !1), (this.useReverse = !1), (this.imageLoadOffset = this.opts.imageLoadOffset || 0), this.setCanvas(), this.loadImages(), this ); } var t = i.prototype; return ( (t.setCanvas = function () { function t(t) { var i; "CANVAS" == t.tagName ? (this.canvas = t) : ((this.canvas = document.createElement("CANVAS")), "append" != this.opts.addType && (i = this.targetElement.firstElementChild) ? i.parentNode.insertBefore(this.canvas, i) : this.targetElement.appendChild(this.canvas)); } this.targetElement.jquery ? t.call(this, this.targetElement[0]) : t.call(this, this.targetElement), (this.context = this.canvas.getContext("2d")), (this.canvas.width = this.opts.width), (this.canvas.height = this.opts.height); }), (t.loadImages = function () { var e, t, i, s = this, n = function () { (t = window.pageYOffset + window.innerHeight + window.innerHeight * s.imageLoadOffset), o(), i <= t && (a(), window.removeEventListener("scroll", n)); }, o = function () { i = s.targetElement.getBoundingClientRect().top + window.pageYOffset; }, a = function () { for (var t = s.opts.startNum; t <= s.opts.endNum; t++) ((e = new Image()).src = s.opts.path + s.opts.name + t + "." + s.opts.extension), (function (t) { var i = function () { (s.imageList[t] = this), s.loadCount < s.opts.endNum ? (s.loadCount++, this.removeEventListener("load", i)) : s.opts.autoPlay && s.loadCount == s.opts.endNum && s.play(); }; e.addEventListener("load", i); })(t), (e = null); }; n(), window.addEventListener("scroll", n); }), (t.sequenceLoadCheck = function (t) { var i = this, e = null, e = setInterval(function () { i.loadCount == i.opts.endNum && (i.activeSequence(t), clearInterval(e), (e = null)); }, 100); }), (t.play = function (t) { var i; (t = t || {}), this.isPlay || ((i = t.index > this.opts.endNum ? this.opts.endNum : t.index), (this.endCallback = t.endCallback || function () {}), (this.beforeTime = t.beforeTime || 0), "number" == typeof t.index ? this.loadCount == this.opts.endNum && this.drawCanvas(i) : this.loadCount !== this.opts.endNum ? this.sequenceLoadCheck() : this.activeSequence()); }), (t.reverse = function () { this.isPlay || (this.loadCount !== this.opts.endNum ? this.sequenceLoadCheck("reverse") : this.activeSequence("reverse")); }), (t.pause = function () { this.isPlay && (this.useReverse && this.usePlayIng && (this.useReverse = !1), window.cancelAnimationFrame(this.playAnimation), (this.isPlay = !1), (this.pausePlayingTime = this.playingTime)); }), (t.stop = function () { this.pause(), (this.playIndex = null), (this.playingTime = 0), (this.pausePlayingTime = 0), (this.usePlay = !1), (this.usePlayIng = !1), (this.useReverse = !1), (this.useReverseIng = !1), this.drawCanvas(this.opts.startNum); }), (t.drawCanvas = function (t) { (!t && this.oldPlayIndex == this.playIndex) || (this.context.clearRect(0, 0, this.opts.width, this.opts.height), this.context.drawImage( this.imageList[0 <= t ? t : this.playIndex], 0, 0, this.opts.width, this.opts.height ), (this.oldPlayIndex = this.playIndex), t && (this.playIndex = t)); }), (t.activeSequence = function (e) { var s, n = this, o = this.opts.endNum / this.opts.playTime, a = null; this.isPlay = !0; function r(t) { t && null == a && (a = Math.ceil(t)), null == n.playIndex && "reverse" !== e ? (n.playIndex = n.opts.startNum) : null == n.playIndex && "reverse" == e && (n.playIndex = n.opts.endNum); } function c() { (n.playingTime = 0), (n.pausePlayingTime = 0), (n.playIndex = null), n.pause(), (n.isPlay = !1), (n.usePlay = !1), (n.usePlayIng = !1), (n.useReverse = !1), (n.useReverseIng = !1), n.opts.loop && n.play(); } var l = { default: function () { r(), ("reverse" == e && n.playIndex >= n.opts.startNum) || (!e && n.playIndex <= n.opts.endNum) ? (n.drawCanvas(), e ? n.playIndex-- : n.playIndex++, (n.playAnimation = window.requestAnimationFrame( l.default ))) : ((n.playIndex = null), (n.isPlay = !1), n.pause()); }, timeControll: function (t) { switch ( (r(t), (s = Math.ceil(t) - a), ((!e && n.playIndex <= n.opts.endNum) || ("reverse" == e && n.playIndex >= n.opts.startNum)) && n.drawCanvas(), e) ) { case void 0: if (n.useReverse && !n.useReverseIng) { n.usePlayIng = !0; var i = n.opts.playTime - n.pausePlayingTime; if ( ((n.playIndex = Math.ceil((s + i) * o)), (n.playingTime = s + i), n.playingTime > n.opts.playTime - n.beforeTime && n.endCallback(), n.playingTime > n.opts.playTime) ) return void c(); } else if ( ((n.usePlay = !0), (n.playIndex = Math.ceil((s + n.pausePlayingTime) * o)), (n.playingTime = s + n.pausePlayingTime), n.playingTime > n.opts.playTime - n.beforeTime && n.endCallback(), n.playingTime > n.opts.playTime) ) return void c(); break; case "reverse": if (n.usePlay || (n.usePlayIng && n.useReverse)) { n.useReverseIng = !0; i = n.pausePlayingTime - n.opts.playTime; if ( ((n.playIndex = Math.floor( (n.opts.playTime + i - s) * o )), (n.playingTime = n.opts.playTime + i - s), n.playingTime < n.beforeTime && n.endCallback(), n.playingTime > n.opts.playTime || n.playIndex <= 0) ) return void c(); } else if ( ((n.useReverse = !0), (n.playIndex = Math.floor( (n.opts.playTime - (s + n.pausePlayingTime)) * o )), (n.playingTime = s + n.pausePlayingTime), n.playingTime > n.opts.playTime - n.beforeTime && n.endCallback(), n.playingTime > n.opts.playTime) ) return void c(); } n.playAnimation = window.requestAnimationFrame(l.timeControll); }, }; this.playAnimation = window.requestAnimationFrame( this.opts.playTime ? l.timeControll : l.default ); }), function (t) { return new i(t); } ); })(), ANIUTIL = (function () { function i(t) { function i(t) { (this.opts = t), (this.resizeTiming = t.resizeTiming || 100), this.setElement(), this.setVideoStyle(), this.bindEvent(); } var e = i.prototype; return ( (e.setElement = function () { void 0 !== this.opts.wrapElement && (this.wrapElement = this.opts.wrapElement.jquery ? this.opts.wrapElement[0] : this.opts.wrapElement), void 0 !== this.opts.targetVideo && (this.targetVideo = this.opts.targetVideo.jquery ? this.opts.targetVideo[0] : this.opts.targetVideo); }), (e.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%)"); }), (e.bindEvent = function () { var t = this; window.addEventListener("load", function () { t.setVideoSize(); }), window.addEventListener("resize", function () { t.setVideoSize(); }); }), (e.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); }), (e.setVideoSize = function () { var t = this; clearTimeout(null), setTimeout(function () { t.getVideoInfo(), t.wrapRatio < t.videoRatio ? ((t.targetVideo.style.width = "100%"), (t.targetVideo.style.height = "auto")) : ((t.targetVideo.style.width = "auto"), (t.targetVideo.style.height = "100%")); }, this.resizeTiming); }), new i(t) ); } function e(t) { function i() { return ( (this.opts = t), (this.lazyCompleteClass = "load-complete"), (this.lazyClass = t.lazyClass), (this.responsiveClass = t.responsiveClass), (this.loadOption = t.loadOption), (this.targetAttr = t.loadOption[0].attribute), (this.visiblePoint = t.visiblePoint || 0), (this.useDefaultImg = t.useDefaultImg), this.getLazyImage(), this.getResponsiveImage(), this.bindEvent(), (window.imageLoader = this) ); } var e = i.prototype; return ( (e.bindEvent = function () { var t = this, i = null, e = this.loadOption, s = function () { t.setLazyImage(), t.lazyLength == t.lazyCompleteLength && window.removeEventListener("scroll", s); }; this.useDefaultImg && this.setDefaultImage(), window.addEventListener("load", function () { t.responsiveHandler(), s(); }), window.addEventListener("scroll", s), e && window.addEventListener("resize", function () { clearTimeout(i), (i = setTimeout(function () { t.responsiveHandler(), s(); }, 80)); }); }), (e.utilList = { getOffset: function (t) { return { top: t.getBoundingClientRect().top + window.pageYOffset, bottom: t.getBoundingClientRect().bottom + window.pageYOffset, }; }, getScroll: function () { var t = window.pageYOffset; return { top: t, bottom: t + this.windowHeight }; }, }), (e.getLazyImage = function () { var t = document.querySelectorAll(this.lazyClass); (this.lazyImages = t), (this.lazyLength = t.length); }), (e.checkCompleteImage = function () { var t = document.querySelectorAll("." + this.lazyCompleteClass); this.lazyCompleteLength = t.length; }), (e.getResponsiveImage = function () { var t = document.querySelectorAll(this.responsiveClass); (this.responsiveImages = t), (this.responsiveLength = t.length); }), (e.setDefaultImage = function () { for (var t = 0; t < this.lazyLength; t++) this.lazyImages[t].setAttribute( "src", "data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH/C1hNUCBEYXRhWE1QAz94cAAh+QQFAAAAACwAAAAAAQABAAACAkQBADs=" ); }), (e.responsiveHandler = function () { this.windowWidth = window.innerWidth; for (var t = this.loadOption.length, i = 0; i < t; i++) { var e = i + 1, e = e == t ? 0 : this.loadOption[e].resolution; (0 == i || this.windowWidth <= this.loadOption[i].resolution) && this.windowWidth > e && this.loadOption[i].attribute !== this.oldAttr && ((this.targetAttr = this.loadOption[i].attribute), (this.oldAttr = this.targetAttr), (this.attrIndex = i), this.setResponsiveImage()); } }), (e.setResponsiveImage = function (t) { if (t) for (var i = 0; i < t.length; i++) { var e = t[i], s = t[i].getAttribute(this.targetAttr); t[i].classList.contains(this.lazyCompleteClass) || (t[i].setAttribute("src", s), t[i].classList.add(this.lazyCompleteClass)); } else for (i = 0; i < this.responsiveLength; i++) (s = (s = (e = this.responsiveImages[i]).getAttribute( this.targetAttr )) || this.findImageHandler(e)), e.classList.contains(this.lazyCompleteClass) && e.setAttribute("src", s); }), (e.findRemainingImageAttr = function (t) { for (var i = this.loadOption.length, e = 0; e < i; e++) { var s = t.getAttribute(this.loadOption[e].attribute); if (s) return s; } }), (e.findNextImageAttr = function (t) { for (var i = this.attrIndex; 0 <= i; i--) { var e = t.getAttribute(this.loadOption[i].attribute); if (e) return e; if (0 == i && null == e) return this.findRemainingImageAttr(t); } }), (e.findImageHandler = function (t) { return 0 !== this.attrIndex ? this.findNextImageAttr(t) : this.findRemainingImageAttr(t); }), (e.setLazyImage = function () { var e = this; this.windowHeight = window.innerHeight; for (var t = 0; t < this.lazyLength; t++) { var i = this.lazyImages[t], s = this.windowHeight * this.visiblePoint, n = this.utilList.getScroll.call(this).top - s, o = this.utilList.getScroll.call(this).bottom + s, a = this.utilList.getOffset.call(this, i).top, r = this.utilList.getOffset.call(this, i).bottom, s = this.lazyClass.split("."), c = s[s.length - 1]; ((a < o && n <= a) || (n < r && r < o) || (n < a && r < o) || (a < n && o < r)) && null != i.offsetParent && ((r = (r = i.getAttribute(this.targetAttr)) || this.findImageHandler(i)), i.classList.contains(this.lazyCompleteClass) || (i.setAttribute("src", r), (function (t) { var i = function () { 1 == e.opts.lazyClass.split(" ").length && t.classList.remove(c), t.classList.add(e.lazyCompleteClass), e.checkCompleteImage(), t.removeEventListener("load", i); }; t.addEventListener("load", i); })(i))); } }), new i() ); } function s(t) { var i, e, s = null, n = null, o = t ? t + 200 : 200; window.addEventListener("resize", function () { null == s ? ((e = document.scrollingElement || document.documentElement || document.body.parentNode || document.body), (i = document.body.clientHeight), (e = window.pageYOffset + e.clientHeight), (s = e / i)) : (i = document.body.clientHeight), clearTimeout(n), (n = setTimeout(function () { window.scrollTo(0, i * s - window.innerHeight), (s = null); }, o)); }); } function n() { return ( !( -1 < navigator.userAgent.indexOf("Windows") || -1 < navigator.userAgent.indexOf("Macintosh") ) && (!!( "ontouchstart" in window || (window.DocumentTouch && document instanceof window.DocumentTouch) ) || void 0) ); } return { calRange: function (t) { 0 < (t = { targetValue: t.targetValue, progress: t.progress, startPoint: t.startPoint || 0, endPoint: t.endPoint || 100, }).startPoint && (t.endPoint = 0 < t.endPoint - t.startPoint ? t.endPoint - t.startPoint : t.endPoint); var i = (t.targetValue * (t.progress - t.startPoint)) / t.endPoint; return (i = (i = i > t.targetValue ? t.targetValue : i) < 0 ? 0 : i); }, videoObjectFit: function (t) { i(t); }, imageLoader: function (t) { e(t); }, addClass: function (t) { !(function (t) { for (var i = t.classList.length, e = 0; e < i; e++) t.targetElement.classList.add(t.classList[e]); })(t); }, removeClass: function (t) { !(function (t) { for (var i = t.classList.length, e = 0; e < i; e++) t.targetElement.classList.remove(t.classList[e]); })(t); }, scrollController: function (t) { !(function (e) { var s, e = e || {}, t = navigator.userAgent.toLowerCase(), n = document.scrollingElement || document.documentElement || document.body.parentNode || document.body, o = e.speed || 120, i = 0 <= e.duration ? e.duration : 1, a = n.scrollTop, r = n === document.body && document.documentElement ? document.documentElement : n, c = !1, l = null, u = { wheel: function () { ("Netscape" == navigator.appName && -1 != navigator.userAgent.search("Trident")) || -1 != t.indexOf("msie") ? document.addEventListener( "mousewheel", function (t) { "hidden" != document.documentElement.style.overflow && h.scrollEvent(t); }, { passive: !1 } ) : document.addEventListener( "wheel", function (t) { h.scrollEvent(t); }, { passive: !1 } ); }, scroll: function () { window.addEventListener("scroll", function () { "hidden" != document.documentElement.style.overflow && (c || (a = n.scrollTop)); }); }, }, h = { scrollEvent: function (t) { t.preventDefault(); var i = document.body.getAttribute("data-scroll-speed"), t = this.normalizeWheelDelta(t), i = e.currDelta && i ? i : i || o ? o : 120; (a += -t * i), (s = Math.max( 0, Math.min(a, n.scrollHeight - r.clientHeight) )), this.update(); }, normalizeWheelDelta: function (t) { return t.detail ? t.wheelDelta ? (t.wheelDelta / t.detail / 40) * (0 < t.detail ? 1 : -1) : -t.detail / 3 : t.wheelDelta / 120; }, update: function () { var t = s - n.scrollTop, t = Math.ceil(n.scrollTop + t) <= 0 ? 0 : s < a ? s : Math.ceil(n.scrollTop + t); (c = !0), TweenMax.to(n, i, { ease: "power1.out", scrollTop: t, onComplete: function () { clearTimeout(l), (l = null), (l = setTimeout(function () { (c = !1), (a = n.scrollTop); }, 500)); }, }), a <= 0 ? (a = 0) : s <= a && (a = s); }, }; window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame; (-1 == t.indexOf("chrome") && -1 != t.indexOf("safari")) || (u.wheel(), u.scroll()); })(t); }, resizeScrollOffset: function (t) { s(t); }, checkTouchDevice: n, checkFold: function () { var t, i = screen.width / screen.height, e = n() && 0.7137 < i && i < 0.8 && "width=768" == document.getElementsByName("viewport")[0].content, i = n() && 0.8 < i && i < 0.95 && "width=768" == document.getElementsByName("viewport")[0].content; return e ? (t = "isFold") : i && (t = "isFoldLatest"), t; }, deviceConsole: function (t, i) { var e, s; document.querySelector(".console-layer") || ((e = document.createElement("div")).classList.add( "console-layer" ), e.setAttribute( "style", "position: fixed; left: 0; top: 0; padding: 20px; z-index:1000000000; background: #fff;" ), document.querySelector("body").append(e)), "multi" == i ? ((e = document.querySelector(".console-layer")), (s = document.createElement("div")).classList.add( "console-value" ), s.setAttribute( "style", "border: 1px #ddd solid; float: left; padding: 10px;" ), e.append(s)) : (s = (document.querySelector(".console-value") || ((s = document.createElement("div")).classList.add( "console-value" ), s.setAttribute( "style", "border: 1px #ddd solid; float: left; padding: 10px;" ), e.append(s)), document.querySelector(".console-value"))), (s.innerHTML = t); }, percentToPixel: function (t) { return t.targetValue * (t.progress / 100); }, }; })(); $(function () { !(function () { "use strict"; var t; (function (t) { var i = window, c = i.document; function e(t, i) { if (!(this instanceof e)) return new e(t, i); this.init(); } e.prototype = { init: function () { var r = this; var i = c.querySelectorAll("a.click_sup"); for (var t = 0; t < i.length; t++) (function (t) { i[t].addEventListener("click", function (t) { t.preventDefault(); var i = parseFloat(this.innerText); var e = c.querySelectorAll("#desc-section li")[i - 1]; var s = e.innerText; var n = '' + s + ""; e.innerHTML = n; var o = function () { var n = this; setTimeout(function () { var t = window.pageYOffset; var i = n.getBoundingClientRect(); var e = (window.innerHeight - r.getNavHeight()) / 2; var s = t - r.getNavHeight() + i.top + i.height / 2; window.scrollTo(0, s - e); }, 10); e.removeEventListener("focusin", o); }; var a = function () { e.innerHTML = s; e.removeAttribute("tabindex"); e.removeEventListener("focusout", a); }; e.addEventListener("focusin", o); e.addEventListener("focusout", a); e.querySelector("a").focus(); }); })(t); }, getNavHeight: function () { var t = 0; var i = document.querySelector(".pd-g-header-navigation") || document.querySelector("#subnav") || document.querySelector(".sticky-menu"); if (!!i) t = i.clientHeight; return t; }, }; new e(); })(); })(); }), (function (t) { t.SwipeDir = (function () { "use strict"; var t; return (function (a) { var t = window, i = t.document, s = t.jQuery, r = t.Upbs.util; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { isRTL: r.isRTL(), container: t, moves: {}, props: {}, coords: {}, stateAttr: { fTime: null, eTime: null, down: false, move: false, destroy: false, }, maxRange: { time: 2500, coords: r.isDevice ? 36 : 18 }, customEvent: ".SwipeDir" + new Date().getTime() + Math.random(), on: { moveStart: null, move: null, moveEnd: null, swipeLeft: null, swipeRight: null, }, }; this.opts = r.def(e, i || {}); if (!(this.obj = s(this.opts.container)).length) return; this.init(); } n.prototype = { init: function () { this.initOpts(); this.bindEvents(true); }, initOpts: function () { this.opts.props["currentX"] = 0; this.opts.props["currentY"] = 0; }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) this.obj.on( this.changeEvents("mousedown touchstart"), this.wrapMouseFunc.bind(this) ); else this.obj.off(this.changeEvents("mousedown touchstart")); }, bindDocEvents: function (t) { if (t) { s(i).on( this.changeEvents("mouseleave"), this.docMouseLeave.bind(this) ); s(i).on( this.changeEvents("mousemove touchmove"), this.docMouseMoveFunc.bind(this) ); s(i).on( this.changeEvents("mouseup touchend"), this.docMouseUpFunc.bind(this) ); } else { s(i).off(this.changeEvents("mouseleave")); s(i).off(this.changeEvents("mousemove touchmove")); s(i).off(this.changeEvents("mouseup touchend")); } }, getPageCoords: function (t) { var i = r.isDevice && t.originalEvent.changedTouches != a ? t.originalEvent.changedTouches[0] : t; var e = this.opts.moves; var s = i.pageX; var n = i.pageY; var o = { x: s - e.x, y: n - e.y }; return o; }, wrapMouseFunc: function (t) { var i = this.opts.stateAttr; if (i.destroy) return; if (t.button == 2) return; if (t.type === "mousedown" || t.type === "touchstart") { var e = r.isDevice && t.originalEvent.changedTouches != a ? t.originalEvent.changedTouches[0] : t; if ( r.isDevice && (t.originalEvent.hasOwnProperty("touches") && t.originalEvent.touches.length) >= 2 ) { i.down = false; i.move = false; this.bindDocEvents(false); } else { if (!r.isDevice) t.preventDefault(); var s = this.opts.props; this.opts.moves["x"] = e.pageX - s["currentX"]; this.opts.moves["y"] = e.pageY - s["currentY"]; if (!i.down) { i.down = true; this.bindDocEvents(true); } } } }, docMouseLeave: function (t) { this.docMouseUpFunc(t); }, docMouseMoveFunc: function (t) { var i = this.opts.stateAttr; if (i.destroy) return; if (i.down) { if (!i.move) { i.fTime = new Date().getTime(); this.outCallback("moveStart"); } i.move = true; var e = this.getPageCoords(t); this.opts.coords = e; this.outCallback("move"); } }, docMouseUpFunc: function (t) { var i = this.opts.stateAttr; var e = this.opts.maxRange; if (i.destroy) return; if (i.down) { i.down = false; if (i.move) { i.eTime = new Date().getTime(); var s = this.getPageCoords(t); this.opts.coords = s; this.outCallback("moveEnd"); var n = i.eTime - i.fTime; if (n <= e.time) if (s.x > e.coords) { var o = this.opts.isRTL ? "swipeRight" : "swipeLeft"; this.outCallback(o); } else if (s.x < -e.coords) { var o = this.opts.isRTL ? "swipeLeft" : "swipeRight"; this.outCallback(o); } } i.move = false; this.bindDocEvents(false); } }, pause: function () { this.opts.stateAttr.destroy = true; }, play: function () { this.opts.stateAttr.destroy = false; }, destroy: function () { this.opts.stateAttr.destroy = true; this.bindDocEvents(false); this.bindEvents(false); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return n; })(); })(); })(this), $(function () { !(function () { "use strict"; var t; (function (t) { var h = window, i = h.document, f = h.jQuery, d = h.Upbs.util; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { sections: "[data-sc-section]", focusEls: "a, button, input", space: 10, stateAttr: { down: false, winBlur: false }, customEvent: ".WaFocusPosition" + new Date().getTime() + Math.random(), }; this.opts = d.def(e, i || {}); this.init(); } s.prototype = { init: function () { this.setElements(); this.bindEvents(); }, setElements: function () { this.sections = f(this.opts.sections); this.btns = this.sections.find(this.opts.focusEls); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function () { var t = this; this.btns.on( this.changeEvents("mousedown"), this.mouseActive.bind(this) ); this.sections.on( this.changeEvents("focusin"), this.opts.focusEls, this.focusActive.bind(this) ); f(h).on( this.changeEvents("blur focus"), this.winActive.bind(this) ); }, docBindEvents: function (t) { if (t) f(i).on( this.changeEvents("mousemove mouseup"), this.docMouseUp.bind(this) ); else f(i).off(this.changeEvents("mousemove mouseup")); }, docMouseUp: function (t) { if (t.type === "mousemove") t.preventDefault(); else if (t.type === "mouseup") { this.opts.stateAttr.down = false; this.docBindEvents(false); } }, winActive: function (t) { var i = this.opts.stateAttr; if (t.type === "focus") h.setTimeout(function () { i.winBlur = false; }, 150); else if (t.type === "blur") i.winBlur = true; }, mouseActive: function () { this.opts.stateAttr.down = true; this.docBindEvents(true); }, focusActive: function (t) { if (this.opts.stateAttr.down) return; var i = f(h).scrollTop(); var e = d.winSize().h; var s = d.page.sticky.height(); var n = e - s; var o = f(t.target); var a = o.outerHeight(true); var r = o.offset().top; var c = r - s - n / 2 + a / 2; var l = r - e + a + this.opts.space; var u = r - s - this.opts.space; if (!(l < i && i < u)) if (!this.opts.stateAttr.winBlur) f("html, body").scrollTop(c); this.opts.stateAttr.winBlur = false; }, }; new s(); })(); })(); }), (function (t) { t.LazyPicture = (function () { "use strict"; var t; return (function (t) { var a = window, i = a.document, r = a.jQuery, s = a.Upbs.util; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { offsetTarget: null, customEvent: ".Component" + new Date().getTime() + Math.random(), props: {}, stateAttr: { destroy: false, scroll: null, resize: null }, requestAttr: { scroll: null, resize: null }, timeAttr: { scrollEnd: null, resizeEnd: null }, scrollEndTime: 60, resizeEndTime: (function () { var t = false; if (s.isDevice && !s.isIOS) t = true; return t ? 500 : 280; })(), on: { complete: null }, }; this.opts = s.def(e, i || {}); if (!(this.obj = r(t)).length) return; this.init(); } n.prototype = { init: function () { this.initOpts(); this.buildSet(); this.buildPictureLoaded(); this.buildMotion(); this.resizeFunc(); this.bindEvents(true); }, initOpts: function () { this.offsetTarget = this.opts.offsetTarget == null ? this.obj : this.opts.offsetTarget; }, buildSet: function () { var o = this; s.def(this, { set: { opts: function () { var n = s.winSize().h; (function () { var t = o.offsetTarget.outerHeight(true); var i = o.offsetTarget.offset().top; var e = Math.ceil(i - n, 10); var s = Math.ceil(i + t, 10); o.opts.props["offset"] = i; o.opts.props["minOffset"] = e; o.opts.props["maxOffset"] = s; })(); o.props = o.opts.props; }, }, }); }, buildPictureLoaded: function () { var i = this; s.def(this, { pictures: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, load: function () { var t = i.obj.attr("data-load") == "true"; if (t || this.instance !== null) return; this.instance = new PictureImg(i.obj, { on: { complete: function () { i.outCallback("complete"); s.page.reposition(); }, }, }); }, }, }); }, buildMotion: function () { var n = this; var o = this.opts.props; s.def(this, { motion: { scroll: { stateAttr: { active: null }, getSize: { winHeight: s.winSize().h, resize: function () { this.winHeight = s.winSize().h; }, }, build: function () { var t = r(a).scrollTop(); var i = this.getSize.winHeight; var e = { in: o.minOffset - i <= t && t < o.maxOffset + i, }; var s = this.stateAttr; if (e.in) if (s.active != "in") { s.active = "in"; n.pictures.load(); n.opts.stateAttr.destroy = true; a.setTimeout(function () { n.bindEvents(false); }, 10); } if (!e.in) if (s.active != "out") s.active = "out"; }, }, build: function () { this.scroll.build(); }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { r(a).on( this.changeEvents("scroll"), this.scrollFunc.bind(this) ); r(a).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); } else { r(a).off(this.changeEvents("scroll")); r(a).off(this.changeEvents("resize orientationchange")); } }, scrollFunc: function () { var t = this.opts.scrollEndTime; this.winTop = r(a).scrollTop(); if (this.opts.stateAttr.scroll == null) { this.opts.stateAttr.scroll = this.winTop; this.scrollAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.scrollEnd); this.opts.timeAttr.scrollEnd = a.setTimeout( this.scrollEndFunc.bind(this), t ); }, scrollEndFunc: function () { this.opts.stateAttr.scroll = null; this.scrollAct(); s.cancelAFrame.call(a, this.opts.requestAttr.scroll); }, scrollAnimateFunc: function () { this.scrollAct(); this.opts.requestAttr.scroll = s.requestAFrame.call( a, this.scrollAnimateFunc.bind(this) ); }, scrollAct: function () { if (!this.opts.stateAttr.destroy) { this.set.opts(); this.motion.build(); } }, resizeFunc: function (t) { var i = this.opts.resizeEndTime; this.winWidth = s.winSize().w; if (this.opts.stateAttr.resize == null) { this.opts.stateAttr.resize = this.winWidth; this.resizeAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.resizeEnd); this.opts.timeAttr.resizeEnd = a.setTimeout( this.resizeEndFunc.bind(this), i ); }, resizeEndFunc: function () { this.opts.stateAttr.resize = null; this.resizeAct(); s.cancelAFrame.call(a, this.opts.requestAttr.resize); }, resizeAnimateFunc: function () { this.resizeAct(); this.opts.requestAttr.resize = s.requestAFrame.call( a, this.resizeAnimateFunc.bind(this) ); }, resizeAct: function () { if (!this.opts.stateAttr.destroy) { this.motion.scroll.getSize.resize(); this.scrollFunc(); } }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return n; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".js-picture[data-async]" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new LazyPicture(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsAnc = (function () { "use strict"; var t; return (function (t) { var i = window, e = i.document, s = i.jQuery, n = i.Upbs.util, o = i.Upbs.RESPONSIVE; function a(t, i) { if (!(this instanceof a)) return new a(t, i); var e = { stateAttr: { destroy: false } }; this.opts = n.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } a.prototype = { init: function () { this.buildEarMotion(); }, buildEarMotion: function () { var t = this; n.def(this, { earmotion: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { this.instance = new r(t.obj); }, }, }); this.earmotion.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.earmotion.destroy(); }, }; function r(t, i) { var e = { expSection: ".sc-buds-anc__explain-img", expInner: ".sc-buds-anc__explain-img-inner", classAttr: { motion: "is-motion" }, stateAttr: { destroy: false }, }; this.opts = n.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildMagicTween(); }, setElements: function () { this.expSection = this.obj.find(this.opts.expSection); this.expInner = this.expSection.find(this.opts.expInner); }, buildMotion: function () { var t = this; var i = this.opts.classAttr; n.def(this, { motion: { stateAttr: { active: false }, reset: function () { if (this.stateAttr.active) { this.stateAttr.active = false; t.expSection.removeClass(i.motion); } }, out: function () {}, build: function () { if (!this.stateAttr.active) { this.stateAttr.active = true; t.expSection.addClass(i.motion); } }, }, }); }, buildMagicTween: function () { var s = this; n.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { var e = this; var t = function () { var t = 0.25; if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var i = s.magictween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.expInner, { init: false, on: { init: function () { i.setTimeout(function () { e.stateAttr.tweenInit = true; t(); }, 350); }, out: function () { if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var t = s.magictween.instance.motion.scroll.scope.out; if (t == "TOP") s.motion.reset(); } }, allUpdate: function () { t(); }, }, }); this.instance.init(); n.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.magictween.destroy(); }, }; return a; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-anc" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsAnc(t.obj.eq(i)); }, }), new s(); })(); }), (function () { "use strict"; var t, i, e, s, n, o, a, r, c, l, u; (window.BudsAudio = window.BudsAudio || {}), (BudsAudio = ((i = !(t = {})), (e = null), (s = function () { (t.scene = null), (t.imagePath = ""), (t.player = null), (t.sequence = t.section.querySelector( ".sc-buds-audio__seq-image canvas" )), (t.seqWrap = t.section.querySelector( ".sc-buds-audio__seq-wrap" )); }), (n = function () { window.addEventListener("load", o), window.addEventListener("resize", a), window.addEventListener("scroll", c); }), (o = function () { a(), c(), window.removeEventListener("load", o); }), (a = function () { (i = !(768 <= window.innerWidth)), clearTimeout(t.resizeTimeout), (t.resizeTimeout = setTimeout(function () { c(); }, 50)), i != e && r(), (e = i); }), (r = function () { u(), l(); }), (c = function () { null != t.scene && t.scene.activeAnimation(); }), (l = function () { null == t.scene && (t.scene = SCROLLER({ trackElement: t.section, activeElement: t.section, correction: 0.5, activeVisibility: "before", activePlay: "oneWay", activeCallback: function () { null != t.player && (t.seqWrap.classList.add("sc-cue-ready"), setTimeout(function () { t.seqWrap.classList.add("sc-cue1"); }, 200), setTimeout(function () { t.seqWrap.classList.add("sc-cue2"), t.player.play({ endCallback: function () { t.seqWrap.classList.add("sc-cue-end"), t.seqWrap.classList.add("sc-cue-round"), setTimeout(function () { t.seqWrap.classList.remove("sc-cue-round"); }, 1500); }, }); }, 1e3)); }, endCallback: function () { null != t.player && (t.seqWrap.classList.add("sc-cue-ready"), t.seqWrap.classList.remove("sc-cue1"), t.seqWrap.classList.remove("sc-cue2"), t.seqWrap.classList.remove("sc-cue-end"), t.seqWrap.classList.remove("sc-cue-round"), t.player.stop()); }, resize: !0, })); }), (u = function () { "undefined" != typeof __BUDS_SEQUENCE_URL && null != __BUDS_SEQUENCE_URL && null != __BUDS_SEQUENCE_URL && "" != __BUDS_SEQUENCE_URL ? (t.imagePath = __BUDS_SEQUENCE_URL + "/") : (t.imagePath = "/src/galaxy-buds2/images/"), null == t.player && (t.player = SEQUENCEPLAYER({ targetElement: t.sequence, startNum: 0, endNum: 98, path: t.imagePath, name: "galaxy-buds2-audio-seq", extension: "jpg", width: 1920, height: 1920, playTime: 1800, imageLoadOffset: 2, })), (t.isSeqLoaded = !0); }), { init: function () { (t.section = document.querySelector(".sc-buds-audio")), t.section && (s(), n()); }, })); })(), window.BudsAudio.init(), (function (t) { t.BatteryLife = (function () { "use strict"; var t; return (function (t) { var i = window, e = i.document, s = i.jQuery, n = i.Upbs.util, o = i.Upbs.RESPONSIVE; function a(t, i) { if (!(this instanceof a)) return new a(t, i); var e = { isRTL: n.isRTL(), plDesc: ".js-parallax-callout", classAttr: { motion: "is-motion" }, stateAttr: { destroy: false }, }; this.opts = n.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } a.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildMagicTween(); }, setElements: function () { this.plDesc = this.obj.find(this.opts.plDesc); }, buildMotion: function () { var t = this; var i = this.opts.classAttr; n.def(this, { motion: { stateAttr: { play: false }, reset: function () { if (this.stateAttr.play) { this.stateAttr.play = false; t.plDesc.removeClass(i.motion); } }, out: function () {}, build: function () { if (!this.stateAttr.play) { this.stateAttr.play = true; t.plDesc.addClass(i.motion); } }, }, }); }, buildMagicTween: function () { var s = this; n.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { var e = this; var t = function () { var t = n.winSize().w > o.MO.WIDTH ? 0.35 : 0.25; if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var i = s.magictween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.plDesc, { init: false, on: { init: function () { i.setTimeout(function () { e.stateAttr.tweenInit = true; t(); }, 350); }, out: function () { if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var t = s.magictween.instance.motion.scroll.scope.out; if (t == "TOP") s.motion.reset(); } }, allUpdate: function () { t(); }, }, }); this.instance.init(); n.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.motion.destroy(); this.magictween.destroy(); }, }; return a; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-battery-life" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BatteryLife(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsCall = (function () { "use strict"; var t; return (function (t) { var a = window, i = a.document, r = a.jQuery, f = a.Upbs.util, e = a.Upbs.RESPONSIVE; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { jsPicture: ".js-picture", visualWrap: ".sc-buds-call__visual", canvasSection: ".sc-buds-call__canvas-box", canvasObj: ".sc-buds-call__canvas", sizeAttr: { action: null }, stateAttr: { destroy: false }, resizeStart: null, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = f.def(e, i || {}); if (!(this.obj = r(t)).length) return; this.init(); } s.prototype = { init: function () { this.setElements(); this.buildParts(); this.buildSequence(); this.resizeFunc(); this.bindResizeEvents(true); }, setElements: function () { this.visualWrap = this.obj.find(this.opts.visualWrap); this.canvasSection = this.obj.find(this.opts.canvasSection); }, buildParts: function () { var e = this; f.def(this, { parts: { instance: null, classAttr: { scene1: "sc-show-scene1" }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, reset: function () { if (this.instance == null) return this; var t = this.classAttr; e.visualWrap.removeClass(t.scene1); this.pause().progress(0); return this; }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { if (this.instance == null) { var t = this.classAttr; var i = new TimelineMax(); i.pause(); i.to({}, 3.5, { onStart: function () { e.visualWrap.addClass(t.scene1); }, }); this.instance = i; } }, }, }); this.parts.build(); }, buildSequence: function () { var s = this; f.def(this, { sequence: { mo: { instance: null, el: (function () { return s.canvasSection.find(".display-mo"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); this.reset(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { s.sequence.pc.pause(); s.canvasSection.css("height", ""); if (this.instance == null) { var t = this.el.find(s.opts.jsPicture); var i = this.el.find(s.opts.canvasObj); i.hide(); t.css("display", ""); s.parts.reset(); var e = new o(s.canvasSection, { visualWrap: s.visualWrap, wrapEl: this.el, picture: t, on: { play: function () { s.parts.play(); }, reset: function () { s.parts.reset(); }, }, }); this.instance = e; } else this.reset().play(); }, }, pc: { instance: null, el: (function () { return s.canvasSection.find(".display-pc"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { s.sequence.mo.pause(); if (this.instance == null) { var t = this.el.find(s.opts.jsPicture); var i = this.el.find(s.opts.canvasObj); if (f.band == "LOW") { i.hide(); t.css("display", ""); var e = new n(s.canvasSection, { picture: t, on: { play: function () { s.parts.play(); }, }, }); s.parts.play(); } else { s.parts.reset(); var e = new c(s.canvasSection, { visualWrap: s.visualWrap, canvasObj: i, on: { play: function () { s.parts.play(); }, reset: function () { s.parts.reset(); }, }, }); } this.instance = e; } else this.reset().play(); }, }, resize: function () { if (s.opts.sizeAttr.action == "OTHER") this.pc.resize(); else if (s.opts.sizeAttr.action == 767) this.mo.resize(); }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindResizeEvents: function (t) { if (t) r(a).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); else r(a).off(this.changeEvents("resize orientationchange")); }, resizeFunc: function (t) { this.winWidth = f.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } a.clearTimeout(this.resizeEndTime); this.resizeEndTime = a.setTimeout( this.resizeEndFunc.bind(this), 250 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; this.setLayout(); f.cancelAFrame.call(a, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = f.requestAFrame.call( a, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { if (!this.opts.stateAttr.destroy) { this.sequence.resize(); if (this.winWidth > e.MO.WIDTH) { if (this.opts.sizeAttr.action !== "OTHER") { this.opts.sizeAttr.action = "OTHER"; this.sequence.pc.build(); } } else if (this.opts.sizeAttr.action !== e.MO.WIDTH) { this.opts.sizeAttr.action = e.MO.WIDTH; this.sequence.mo.build(); } } }, destroy: function () { this.opts.stateAttr.destroy = true; this.parts.destroy(); }, }; function n(t, i) { var e = { stateAttr: { pause: false }, on: { play: null } }; this.opts = f.def(e, i || {}); if (!(this.obj = r(t)).length) return; this.init(); } n.prototype = { init: function () { this.setElements(); this.buildLazyLoad(); }, setElements: function () { this.picture = this.opts.picture; }, buildLazyLoad: function () { var e = this; f.def(this, { lazyload: { instance: null, build: function () { if (this.instance != null) return; for (var t = 0, i = e.picture.length; t < i; t++) (function (t) { new LazyPicture(e.picture.eq(t), { offsetTarget: e.obj, }); })(t); }, }, }); this.lazyload.build(); }, reset: function () { this.obj.css("height", ""); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; this.outCallback("play"); }, resize: function () { this.obj.css("height", ""); }, destroy: function () {}, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function o(t, i) { var e = { stateAttr: { pause: false, destroy: false, scroll: null, resize: null, }, classAttr: { motion: "is-motion" }, requestAttr: { scroll: null, resize: null }, timeAttr: { scrollEnd: null, resizeEnd: null }, scrollEndTime: 60, resizeEndTime: (function () { var t = false; if (f.isDevice && !f.isIOS) t = true; return t ? 500 : 280; })(), customEvent: ".MoPicture" + new Date().getTime() + Math.random(), on: { play: null, reset: null }, }; this.opts = f.def(e, i || {}); if (!(this.obj = r(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildShotTween(); this.buildMotionVisible(); this.resizeFunc(); this.bindEvents(true); }, setElements: function () { this.visualWrap = this.opts.visualWrap; this.wrapEl = this.opts.wrapEl; }, buildMotion: function () { var t = this; var i = this.opts.classAttr; f.def(this, { motion: { stateAttr: { play: false }, timeAttr: { build: null }, reset: function () { if (this.stateAttr.play) { this.stateAttr.play = false; t.visualWrap.removeClass(i.motion); a.clearTimeout(this.timeAttr.build); } }, out: function () {}, build: function () { if (!this.stateAttr.play) { this.stateAttr.play = true; t.visualWrap.addClass(i.motion); a.clearTimeout(this.timeAttr.build); this.timeAttr.build = a.setTimeout(function () { t.outCallback("play"); }, 1e3); } }, }, }); }, buildShotTween: function () { var s = this; f.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { var t = 0.25; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t) { s.mvisible.stateAttr.active = false; s.motion.build(); } else s.motion.out(); } }; this.instance = new MagicScroll(s.obj, { init: false, on: { init: function () { a.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; t(); } }, 350); }, out: function () {}, allUpdate: function () { if (!s.opts.stateAttr.pause) t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, buildMotionVisible: function () { var s = this; var n = this.shottween; var o = this.visualWrap; f.def(this, { mvisible: { stateAttr: { active: false }, props: {}, opts: function () { var t = f.winSize().h; var i = o.offset().top; var e = parseFloat(o.css("margin-top")); var s = i - t - e; this.props["minOffset"] = s; }, build: function () { this.opts(); var t = r(a).scrollTop(); var i = this.props; if (!s.opts.stateAttr.pause) if (n.stateAttr.tweenInit) { if (n.instance == null) return; if (t < i["minOffset"]) { var e = n.instance.motion.scroll.scope.out; if (e == "TOP") if (!this.stateAttr.active) { this.stateAttr.active = true; s.outCallback("reset"); s.motion.reset(); } } } }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { r(a).on( this.changeEvents("scroll"), this.scrollFunc.bind(this) ); r(a).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); } else { r(a).off(this.changeEvents("scroll")); r(a).off(this.changeEvents("resize orientationchange")); } }, scrollFunc: function () { var t = this.opts.scrollEndTime; this.winTop = r(a).scrollTop(); if (this.opts.stateAttr.scroll == null) { this.opts.stateAttr.scroll = this.winTop; this.scrollAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.scrollEnd); this.opts.timeAttr.scrollEnd = a.setTimeout( this.scrollEndFunc.bind(this), t ); }, scrollEndFunc: function () { this.opts.stateAttr.scroll = null; this.scrollAct(); f.cancelAFrame.call(a, this.opts.requestAttr.scroll); }, scrollAnimateFunc: function () { this.scrollAct(); this.opts.requestAttr.scroll = f.requestAFrame.call( a, this.scrollAnimateFunc.bind(this) ); }, scrollAct: function () { if (!this.opts.stateAttr.destroy && !this.opts.stateAttr.pause) this.mvisible.build(); }, resizeFunc: function (t) { var i = this.opts.resizeEndTime; this.winWidth = f.winSize().w; if (this.opts.stateAttr.resize == null) { this.opts.stateAttr.resize = this.winWidth; this.resizeAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.resizeEnd); this.opts.timeAttr.resizeEnd = a.setTimeout( this.resizeEndFunc.bind(this), i ); }, resizeEndFunc: function () { this.opts.stateAttr.resize = null; this.resizeAct(); f.cancelAFrame.call(a, this.opts.requestAttr.resize); }, resizeAnimateFunc: function () { this.resizeAct(); this.opts.requestAttr.resize = f.requestAFrame.call( a, this.resizeAnimateFunc.bind(this) ); }, resizeAct: function () { if (!this.opts.stateAttr.destroy && !this.opts.stateAttr.pause) this.scrollFunc(); }, reset: function () { this.outCallback("reset"); this.motion.reset(); this.obj.css("height", ""); }, pause: function () { this.opts.stateAttr.pause = true; a.clearTimeout(this.motion.timeAttr.build); }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.obj.css("height", ""); }, destroy: function () { this.opts.stateAttr.destroy = true; this.bindEvents(false); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function c(t, i) { var e = { canvasData: {}, customEvent: ".PcSequence" + new Date().getTime() + Math.random(), stateAttr: { pause: false, destroy: false, scroll: null, resize: null, }, requestAttr: { scroll: null, resize: null }, timeAttr: { scrollEnd: null, resizeEnd: null }, scrollEndTime: 60, resizeEndTime: (function () { var t = false; if (f.isDevice && !f.isIOS) t = true; return t ? 500 : 280; })(), on: { play: null, reset: null }, }; this.opts = f.def(e, i || {}); if (!(this.obj = r(t)).length) return; this.init(); } c.prototype = { init: function () { this.setElements(); this.initOpts(); this.buildMotion(); this.buildShotTween(); this.buildMotionVisible(); this.resizeFunc(); this.bindEvents(true); }, setElements: function () { this.visualWrap = this.opts.visualWrap; this.canvasSection = this.obj; this.canvasObj = this.opts.canvasObj; this.canvasObjD = this.canvasObj[0]; this.ctx = this.canvasObjD.getContext("2d"); }, initOpts: function () { var t = this.canvasObj.data("component"); for (var i in t) this.opts.canvasData[i] = t[i]; }, buildMotion: function () { var h = this; var u = this.opts.canvasData; f.def(this, { motion: { instance: null, stateAttr: { loadstart: false, firstLoaded: false, loaded: false, complete: false, conditionIn: false, direction: null, }, props: { min: u.min, max: u.max, current: null, progress: 0, }, imgs: {}, load: function () { if (this.stateAttr.loadstart) return; this.stateAttr.loadstart = true; var s = this; var n = u.root; var o = u.pName; var a = "." + u.type; var r = this.props.min; var c = this.props.max; var l = function () { s.stateAttr.firstLoaded = true; s.drawImage(s.props.min); s.props.current = s.props.min; }; var t = function (t) { var i = new Image(); i.onload = function () { s.imgs[t] = { dom: this, w: this.width, h: this.height, }; r++; if (t == s.props.min) l(); if (r == c + 1) { s.stateAttr.loaded = true; s.layout(); if (s.stateAttr.conditionIn) s.build(); else { s.pause(); s.draw(s.props.min); } } }; var e = (function () { if (t < 10) return "00" + t; else if (t >= 10 && t < 100) return "0" + t; else return t; })(); i.src = n + o + e + a; }; this.layout(); for (var i = this.props.min, e = c; i <= e; i++) t(i); }, getSize: function () { if (h.shottween == t) return { winHeight: f.winSize().h }; return h.shottween.getSize(); }, limits: function (t) { var i = 1012; var e = 472; var s = {}; var n = t.width; var o = (n / i) * e; s.width = n; s.height = o; return s; }, layout: function () { var t = f.getBoundingClientRect(h.canvasSection[0]); var i = this.limits(t); var e = i.width; var s = i.height; h.canvasSection[0].style.height = s + "px"; h.canvasObjD.width = e; h.canvasObjD.height = s; }, draw: function (t) { if (this.stateAttr.loaded) this.drawImage(t); this.props.current = t; }, drawImage: function (t) { var i = this.imgs; var e = i[t]; var s = f.getBoundingClientRect(h.canvasSection[0]); var n = this.limits(s); var o = n.width; var a = n.height; var r = e.w; var c = e.h; if (e.w > o) { r = o; c = e.h * (o / e.w); } if (c > a) { r = e.w * (a / e.h); c = a; } var l = (o - r) / 2; var u = (a - c) / 2; h.ctx.clearRect(0, 0, o, a); h.ctx.drawImage(e.dom, l, u, r, c); }, resize: function () { this.layout(); if (this.stateAttr.firstLoaded) if (this.props.current != null) this.drawImage(this.props.current); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) this.pause().progress(0); } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = f.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var t = this; this.stateAttr.conditionIn = true; if (!this.stateAttr.loaded) return; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var i = this.props; if (this.instance == null) { var e = { v: i.min }; var s = new TimelineMax(); s.to(e, 1.7, { ease: Power0.easeNone, v: i.max, onUpdate: function () { t.draw(Math.round(t.delTweenID(e).v)); }, onComplete: function () { t.stateAttr.complete = true; if (!h.opts.stateAttr.pause) h.outCallback("play"); }, }); this.instance = s; } else this.instance.play(); } }, }, }); }, buildShotTween: function () { var s = this; f.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false, lazyload: false }, lazyload: function () { if (this.stateAttr.lazyload) return; this.stateAttr.lazyload = true; s.motion.load(); this.instance.opts.on.beforeStandbyUpdate = null; this.instance.opts.on.afterStandbyUpdate = null; }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { var t = 0.25; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t) { s.mvisible.stateAttr.active = false; s.motion.build(); } else s.motion.out(); } }; this.instance = new MagicScroll(s.canvasSection, { init: false, on: { init: function () { a.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; t(); } }, 350); }, in: function () { if (!s.opts.stateAttr.pause) e.lazyload(); }, out: function () {}, beforeStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, afterStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, buildMotionVisible: function () { var s = this; var n = this.shottween; var o = this.visualWrap; f.def(this, { mvisible: { stateAttr: { active: false }, props: {}, opts: function () { var t = f.winSize().h; var i = o.offset().top; var e = parseFloat(o.css("margin-top")); var s = i - t - e; this.props["minOffset"] = s; }, build: function () { this.opts(); var t = r(a).scrollTop(); var i = this.props; if (!s.opts.stateAttr.pause) if (n.stateAttr.tweenInit) { if (n.instance == null) return; if (t < i["minOffset"]) { var e = n.instance.motion.scroll.scope.out; if (e == "TOP") if (!this.stateAttr.active) { this.stateAttr.active = true; s.outCallback("reset"); s.motion.reset(); } } } }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { r(a).on( this.changeEvents("scroll"), this.scrollFunc.bind(this) ); r(a).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); } else { r(a).off(this.changeEvents("scroll")); r(a).off(this.changeEvents("resize orientationchange")); } }, scrollFunc: function () { var t = this.opts.scrollEndTime; this.winTop = r(a).scrollTop(); if (this.opts.stateAttr.scroll == null) { this.opts.stateAttr.scroll = this.winTop; this.scrollAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.scrollEnd); this.opts.timeAttr.scrollEnd = a.setTimeout( this.scrollEndFunc.bind(this), t ); }, scrollEndFunc: function () { this.opts.stateAttr.scroll = null; this.scrollAct(); f.cancelAFrame.call(a, this.opts.requestAttr.scroll); }, scrollAnimateFunc: function () { this.scrollAct(); this.opts.requestAttr.scroll = f.requestAFrame.call( a, this.scrollAnimateFunc.bind(this) ); }, scrollAct: function () { if (!this.opts.stateAttr.destroy && !this.opts.stateAttr.pause) this.mvisible.build(); }, resizeFunc: function (t) { var i = this.opts.resizeEndTime; this.winWidth = f.winSize().w; if (this.opts.stateAttr.resize == null) { this.opts.stateAttr.resize = this.winWidth; this.resizeAnimateFunc(); } a.clearTimeout(this.opts.timeAttr.resizeEnd); this.opts.timeAttr.resizeEnd = a.setTimeout( this.resizeEndFunc.bind(this), i ); }, resizeEndFunc: function () { this.opts.stateAttr.resize = null; this.resizeAct(); f.cancelAFrame.call(a, this.opts.requestAttr.resize); }, resizeAnimateFunc: function () { this.resizeAct(); this.opts.requestAttr.resize = f.requestAFrame.call( a, this.resizeAnimateFunc.bind(this) ); }, resizeAct: function () { if (!this.opts.stateAttr.destroy && !this.opts.stateAttr.pause) this.scrollFunc(); }, reset: function () { this.outCallback("reset"); this.motion.reset(); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.motion.resize(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.bindEvents(false); this.motion.destroy(); this.shottween.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return s; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-call" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsCall(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsColor = (function () { "use strict"; var t; return (function (t) { var i = window, e = i.document, s = i.jQuery, n = i.Upbs.util, o = i.Upbs.RESPONSIVE; function a(t, i) { if (!(this instanceof a)) return new a(t, i); var e = { jsPicture: ".js-picture", contents: ".sc-buds-color__contents", imgSection: ".sc-buds-color__img", stateAttr: { destroy: false }, }; this.opts = n.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } a.prototype = { init: function () { this.setElements(); this.buildLazyLoad(); this.buildTab(); }, setElements: function () { this.jsPictures = this.obj.find(this.opts.jsPicture); this.contents = this.obj.find(this.opts.contents); this.imgSection = this.contents.find(this.opts.imgSection); }, buildLazyLoad: function () { var e = this; n.def(this, { lazyload: { instance: null, build: function () { if (this.instance != null) return; for (var t = 0, i = e.jsPictures.length; t < i; t++) (function (t) { new LazyPicture(e.jsPictures.eq(t), { offsetTarget: e.imgSection, }); })(t); }, }, }); this.lazyload.build(); }, buildTab: function () { var t = this; n.def(this, { buildtab: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { if (this.instance != null) return; this.instance = new r(t.contents, { imgSection: t.opts.imgSection, }); }, }, }); this.buildtab.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.buildtab.destroy(); }, }; function r(t, i) { var e = { colorList: ".sc-buds-color__color", colorBtn: ".sc-buds-color__color-item-btn", mainSection: ".sc-buds-color__img-main-inner", subSection: ".sc-buds-color__img-sub", itemChild: ".sc-buds-color__panel", prevIndex: null, currentIndex: null, props: {}, classAttr: { selected: "is-selected", open: "is-open" }, stateAttr: { animated: false }, customEvent: ".BuildTab" + new Date().getTime() + Math.random(), }; this.opts = n.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.initOpts(); this.initLayout(); this.buildSwipe(); this.bindEvents(true); }, setElements: function () { this.colorList = this.obj.find(this.opts.colorList); this.tabChild = this.colorList.children(); this.colorBtn = this.tabChild.find(this.opts.colorBtn); this.imgSection = this.obj.find(this.opts.imgSection); this.mainSection = this.imgSection.find(this.opts.mainSection); this.mainChild = this.mainSection.find(this.opts.itemChild); this.subSection = this.imgSection.find(this.opts.subSection); this.subChild = this.subSection.find(this.opts.subChild); }, initOpts: function () { var t = this.opts.props; for (var i = 0, e = this.tabChild.length; i < e; i++) { var s = this.tabChild.eq(i); var n = s.find(this.opts.colorBtn); var o = n.attr("href"); var a = this.mainSection.find(o); var r = this.subSection.find( '[data-id="' + o.split("#")[1] + '"]' ); t[i] = { LI: s, TAB: n, MAINIMG: a, SUBIMG: r }; } }, initLayout: function () { var t = this.opts.classAttr; this.tabChild.removeClass(t.selected); this.colorBtn.removeAttr("title"); this.mainChild.removeClass(t.open); this.subChild.removeClass(t.open); this.opts.currentIndex = 0; this.run(); }, buildSwipe: function () { var t = this; n.def(this, { swipe: { main: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { if (this.instance !== null) return; this.instance = new SwipeDir(t.mainSection, { on: { swipeRight: function () { t.next(); }, swipeLeft: function () { t.prev(); }, }, }); }, }, sub: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { if (this.instance !== null) return; this.instance = new SwipeDir(t.subSection, { on: { swipeRight: function () { t.next(); }, swipeLeft: function () { t.prev(); }, }, }); }, }, destroy: function () { this.main.destroy(); this.sub.destroy(); }, build: function () { this.main.build(); this.sub.build(); }, }, }); this.swipe.build(); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) this.colorBtn.on( this.changeEvents("click"), this.tabClick.bind(this) ); else this.colorBtn.off(this.changeEvents("click")); }, tabClick: function (t) { t.preventDefault(); if (this.opts.stateAttr.animated) return; var i = s(t.currentTarget); var e = this.colorBtn.index(i); this.opts.currentIndex = e; this.run(); }, prev: function () { if (this.opts.stateAttr.animated) return; this.opts.currentIndex--; if (this.opts.currentIndex < 0) this.opts.currentIndex = this.tabChild.length - 1; this.run(); }, next: function () { if (this.opts.stateAttr.animated) return; this.opts.currentIndex++; if (this.opts.currentIndex >= this.tabChild.length) this.opts.currentIndex = 0; this.run(); }, run: function () { var t = this; var i = this.opts.classAttr; var e = this.opts.props; if (this.opts.prevIndex != this.opts.currentIndex) { this.opts.stateAttr.animated = true; var s = null; TweenLite.set(this.mainSection, { position: "relative" }); TweenLite.set(this.subSection, { position: "relative" }); if (this.opts.prevIndex != null) { s = e[this.opts.prevIndex]; s["LI"].removeClass(i.selected); s["TAB"].removeAttr("title"); TweenLite.set(s["MAINIMG"], { position: "absolute", width: "100%", top: 0, }); TweenLite.set(s["SUBIMG"], { position: "absolute", width: "100%", top: 0, }); } var n = e[this.opts.currentIndex]; n["LI"].addClass(i.selected); n["TAB"].attr("title", "selected"); TweenLite.set(n["MAINIMG"], { opacity: 0, position: "relative", zIndex: 10, }); TweenLite.set(n["SUBIMG"], { opacity: 0, position: "relative", zIndex: 10, }); n["MAINIMG"].addClass(i.open); n["SUBIMG"].addClass(i.open); TweenLite.to(n["MAINIMG"], 0.2, { opacity: 1, onComplete: function () { if (s != null) { s["MAINIMG"].removeClass(i.open); s["MAINIMG"].css({ position: "", width: "", top: "" }); } n["MAINIMG"].css({ opacity: "", position: "", zIndex: "", }); }, }); TweenLite.to(n["SUBIMG"], 0.2, { opacity: 1, onComplete: function () { if (s != null) { s["SUBIMG"].removeClass(i.open); s["SUBIMG"].css({ position: "", width: "", top: "" }); } t.mainSection.css({ position: "" }); t.subSection.css({ position: "" }); n["SUBIMG"].css({ opacity: "", position: "", zIndex: "", }); t.opts.stateAttr.animated = false; }, }); } this.opts.prevIndex = this.opts.currentIndex; }, destroy: function () { this.bindEvents(false); this.swipe.destroy(); }, }; return a; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-color" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsColor(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.ComportFit = (function () { "use strict"; var t; return (function (t) { var i = window, e = i.document, m = i.jQuery, f = i.Upbs.util, s = i.Upbs.RESPONSIVE; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { canvasSection: ".sc-comfort-fit__canvas-box", canvasObj: ".sc-comfort-fit__canvas", sizeAttr: { action: null }, stateAttr: { destroy: false }, resizeStart: null, customEvent: ".Component" + new Date().getTime() + Math.random(), videoLink: ".sc-comfort-fit__video-link", videoDesc: ".sc-comfort-fit__video-description", }; this.opts = f.def(e, i || {}); if (!(this.obj = m(t)).length) return; this.init(); } n.prototype = { init: function () { this.setElements(); this.buildSequence(); this.buildSizeView(); this.resizeFunc(); this.bindClickEvents(true); this.bindResizeEvents(true); }, setElements: function () { this.canvasSection = this.obj.find(this.opts.canvasSection); this.videoLink = this.obj.find(this.opts.videoLink); this.videoDesc = this.obj.find(this.opts.videoDesc); }, buildSequence: function () { var e = this; f.def(this, { sequence: { mo: { instance: null, el: (function () { return e.canvasSection.find(".display-mo"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { e.sequence.pc.pause(); if (this.instance == null) { var t = this.el.find(e.opts.canvasObj); var i = new a(e.canvasSection, { canvasObj: t }); this.instance = i; } else this.reset().play(); }, }, pc: { instance: null, el: (function () { return e.canvasSection.find(".display-pc"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { e.sequence.mo.pause(); if (this.instance == null) { var t = this.el.find(e.opts.canvasObj); var i = new o(e.canvasSection, { canvasObj: t }); this.instance = i; } else this.reset().play(); }, }, resize: function () { if (e.opts.sizeAttr.action == "OTHER") this.pc.resize(); else if (e.opts.sizeAttr.action == 767) this.mo.resize(); }, }, }); }, buildSizeView: function () { var t = this; f.def(this, { sizeview: { instance: null, build: function () { if (this.instance != null) return; this.instance = new r(t.obj); }, }, }); this.sizeview.build(); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindClickEvents: function (t) { if (t) m(this.videoLink).on( this.changeEvents("click"), this.clickFunc.bind(this) ); else m(this.videoLink).off(this.changeEvents("click")); }, clickFunc: function (t) { t.preventDefault(); var i = this.videoLink.attr("href"); this.vodPlayer.show(i, this.videoLink, true); var e = null; if (m(this.videoLink).parent().find(".youtube-desc").length > 0) e = m(this.videoLink) .parent() .find(".youtube-desc") .clone() .removeAttr("aria-hidden", ""); m("#layer-youtube").find("h3").empty().text(""); m("#layer-youtube iframe").attr( "title", this.videoDesc.attr("data-iframe-title") ); if (e != null) m("#layer-youtube").find(".m_video_view").append(e); if ( window.GALAXY && window.GALAXY.isGalaxy && m(this.videoLink).parents(".youtube-slide").length ) window.GALAXY.omniture(m(this.videoLink).attr("data-omni")); }, bindResizeEvents: function (t) { if (t) m(i).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); else m(i).off(this.changeEvents("resize orientationchange")); }, resizeFunc: function (t) { this.winWidth = f.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } i.clearTimeout(this.resizeEndTime); this.resizeEndTime = i.setTimeout( this.resizeEndFunc.bind(this), 250 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; this.setLayout(); f.cancelAFrame.call(i, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = f.requestAFrame.call( i, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { if (!this.opts.stateAttr.destroy) { this.sequence.resize(); if (this.winWidth > s.MO.WIDTH) { if (this.opts.sizeAttr.action !== "OTHER") { this.opts.sizeAttr.action = "OTHER"; this.sequence.pc.build(); } } else if (this.opts.sizeAttr.action !== s.MO.WIDTH) { this.opts.sizeAttr.action = s.MO.WIDTH; this.sequence.mo.build(); } } }, destroy: function () { this.opts.stateAttr.destroy = true; }, vodPlayer: (function () { var n, o, a, r, c, l = null, u = false, h = null, f = null, d = false; function t(t, i, e) { m(".spr-live-chat-frame").css("z-index", 2400); m(".QSIFeedbackButton").css("z-index", 2400); var s = t.split("?v=")[1]; m("#wrap").attr("aria-hidden", "true"); h = m("body").find( "a,input,select,textarea,button,video,iframe" ); f = m("body").children(); if (!n) { n = m( [ '

', '

', '', 'Movie player Layer', '

', '', '

', "

", "

", "

", ].join("") ); o = n.find("span.layer-title"); r = n.find("iframe"); a = r.parent(); c = n.find('button[class*="_btn_close"]'); c.one("keydown", function () { d = true; }); c.bind("click", function () { h.each(function (t) { var i = m(this).data("prev-tabindex"); if (i !== undefined && i !== null) m(this).attr("tabindex", i); else m(this).removeAttr("tabindex"); m(this).removeAttr("aria-hidden"); if (h.length - 1 == t) { c.attr("tabindex", "-1"); c.attr("aria-hidden", "true"); d && l.length && l.trigger("focus"); p(); } }); f.each(function (t, i) { var e = m(i); if ( e.attr("id") != "consent_blackbar" && e.attr("id") != "layer-youtube" && !e.hasClass("cookie-bar") ) { e.removeAttr("tabindex"); e.removeAttr("aria-hidden"); } else { var s = e.find( "a,input,select,textarea,button,video,iframe" ); s.each(function (t, i) { m(i).removeAttr("tabindex"); m(i).removeAttr("aria-hidden"); }); } }); }); n.bind("touchmove", function (t) { t.preventDefault(); }).appendTo(document.body); } n.removeAttr("aria-hidden"); if (!u) { n.addClass("show"); c.attr("tabindex", "0"); c.removeAttr("aria-hidden"); if (i) l = m(i); r.attr("src", v(s, e)).appendTo(a); h.each(function (t) { var i = m(this).attr("tabindex"); if (i !== undefined && i !== null) m(this).data("prev-tabindex", i); m(this).attr("tabindex", "-1"); m(this).attr("aria-hidden", "true"); if (h.length - 1 == t) m(".layer-title").trigger("focus"); }); f.each(function (t, i) { var e = m(i); if ( e.attr("id") != "consent_blackbar" && e.attr("id") != "layer-youtube" && !e.hasClass("cookie-bar") ) { e.attr("tabindex", -1); e.attr("aria-hidden", true); } else { var s = e.find( "a,input,select,textarea,button,video,iframe" ); s.each(function (t, i) { m(i).attr("tabindex", 0); m(i).attr("aria-hidden", false); }); } }); o.focus(); if (l.attr("data-hidden-text") !== undefined) n.find(".m_video_view").append( '

' + l.attr("data-hidden-text") + "

" ); u = true; } } function p() { if (u) { n.attr("aria-hidden", "true"); m("#wrap").removeAttr("aria-hidden"); n.removeClass("show"); h.each(function (t) { var i = m(this).data("prev-tabindex"); if (i !== undefined && i !== null) m(this).attr("tabindex", i); else m(this).removeAttr("tabindex"); m(this).removeAttr("aria-hidden"); }); f.each(function (t, i) { var e = m(i); if ( e.attr("id") != "consent_blackbar" && e.attr("id") != "layer-youtube" && !e.hasClass("cookie-bar") ) { e.removeAttr("tabindex"); e.removeAttr("aria-hidden"); } else { var s = e.find( "a,input,select,textarea,button,video,iframe" ); s.each(function (t, i) { m(i).removeAttr("tabindex"); m(i).removeAttr("aria-hidden"); }); } }); d && l && l.focus(); setTimeout(function () { l.focus(); l = null; }, 100); i(n, function () { r.attr("src", "about:blank").detach(); }); u = false; n.remove(); n = null; } d = false; } function v(t, i, e) { return ( "//www.youtube.com/embed/" + t + "?showinfo=0&wmode=transparent&autoplay=1&rel=0" ); } function i() { var s = m.support.transition, n = "transitionend webkitTransitionEnd mozTransitionEnd oTransitionEnd msTransitionEnd"; return function (i, e, t) { if (s) i.bind(n, function (t) { if (t.target == this) { e.call(this); i.unbind(n); } }); else e.call(i[0]); }; } return { show: t, hide: p }; })(), }; function o(t, i) { var e = { canvasData: {}, customEvent: ".PcSequence" + new Date().getTime() + Math.random(), stateAttr: { pause: false }, on: { play: null, reset: null }, }; this.opts = f.def(e, i || {}); if (!(this.obj = m(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.initOpts(); this.buildMotion(); this.buildShotTween(); }, setElements: function () { this.canvasSection = this.obj; this.canvasObj = this.opts.canvasObj; this.canvasObjD = this.canvasObj[0]; this.ctx = this.canvasObjD.getContext("2d"); }, initOpts: function () { var t = this.canvasObj.data("component"); for (var i in t) this.opts.canvasData[i] = t[i]; }, buildMotion: function () { var h = this; var u = this.opts.canvasData; f.def(this, { motion: { instance: null, stateAttr: { loadstart: false, firstLoaded: false, loaded: false, complete: false, conditionIn: false, direction: null, }, props: { min: u.min, max: u.max, current: null, progress: 0, }, imgs: {}, load: function () { if (this.stateAttr.loadstart) return; this.stateAttr.loadstart = true; var s = this; var n = u.root; var o = u.pName; var a = "." + u.type; var r = this.props.min; var c = this.props.max; var l = function () { s.stateAttr.firstLoaded = true; s.drawImage(s.props.min); s.props.current = s.props.min; }; var t = function (t) { var i = new Image(); i.onload = function () { s.imgs[t] = { dom: this, w: this.width, h: this.height, }; r++; if (t == s.props.min) l(); if (r == c + 1) { s.stateAttr.loaded = true; s.layout(); if (s.stateAttr.conditionIn) s.build(); else { s.pause(); s.draw(s.props.min); } } }; var e = (function () { if (t < 10) return "00" + t; else if (t >= 10 && t < 100) return "0" + t; else return t; })(); i.src = n + o + e + a; }; this.layout(); for (var i = this.props.min, e = c; i <= e; i++) t(i); }, getSize: function () { if (h.shottween == t) return { winHeight: f.winSize().h }; return h.shottween.getSize(); }, limits: function (t) { var i = 730; var e = 730; var s = {}; var n = t.width; var o = (n / i) * e; s.width = n; s.height = o; return s; }, layout: function () { var t = f.getBoundingClientRect(h.canvasSection[0]); var i = this.limits(t); var e = i.width; var s = i.height; h.canvasSection[0].style.height = s + "px"; h.canvasObjD.width = e; h.canvasObjD.height = s; }, draw: function (t) { if (this.stateAttr.loaded) this.drawImage(t); this.props.current = t; }, drawImage: function (t) { var i = this.imgs; var e = i[t]; var s = f.getBoundingClientRect(h.canvasSection[0]); var n = this.limits(s); var o = n.width; var a = n.height; var r = e.w; var c = e.h; if (e.w > o) { r = o; c = e.h * (o / e.w); } if (c > a) { r = e.w * (a / e.h); c = a; } var l = (o - r) / 2; var u = (a - c) / 2; h.ctx.clearRect(0, 0, o, a); h.ctx.drawImage(e.dom, l, u, r, c); }, resize: function () { this.layout(); if (this.stateAttr.firstLoaded) if (this.props.current != null) this.drawImage(this.props.current); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) { h.obj.removeClass("is-motion"); this.pause().progress(0); } } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = f.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var t = this; this.stateAttr.conditionIn = true; if (!this.stateAttr.loaded) return; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var i = this.props; if (this.instance == null) { var e = { v: i.min }; var s = new TimelineMax(); s.to(e, 0.7, { ease: Power0.easeNone, v: i.max, onUpdate: function () { t.draw(Math.round(t.delTweenID(e).v)); }, onComplete: function () { t.stateAttr.complete = true; h.obj.addClass("is-motion"); }, }); this.instance = s; } else this.instance.play(); } }, }, }); }, buildShotTween: function () { var s = this; f.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false, lazyload: false }, lazyload: function () { if (this.stateAttr.lazyload) return; this.stateAttr.lazyload = true; s.motion.load(); this.instance.opts.on.beforeStandbyUpdate = null; this.instance.opts.on.afterStandbyUpdate = null; }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { var t = 0.35; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.canvasSection, { init: false, on: { init: function () { i.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; t(); } }, 350); }, in: function () { if (!s.opts.stateAttr.pause) e.lazyload(); }, out: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var t = s.shottween.instance.motion.scroll.scope.out; if (t == "TOP") s.motion.reset(); } }, beforeStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, afterStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, reset: function () { this.motion.reset(); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.motion.resize(); }, destroy: function () { this.motion.destroy(); this.shottween.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function a(t, i) { var e = { canvasData: {}, customEvent: ".MoSequence" + new Date().getTime() + Math.random(), stateAttr: { pause: false }, on: { play: null, reset: null }, }; this.opts = f.def(e, i || {}); if (!(this.obj = m(t)).length) return; this.init(); } a.prototype = { init: function () { this.setElements(); this.initOpts(); this.buildMotion(); this.buildShotTween(); }, setElements: function () { this.canvasSection = this.obj; this.canvasObj = this.opts.canvasObj; this.canvasObjD = this.canvasObj[0]; this.ctx = this.canvasObjD.getContext("2d"); }, initOpts: function () { var t = this.canvasObj.data("component"); for (var i in t) this.opts.canvasData[i] = t[i]; }, buildMotion: function () { var h = this; var u = this.opts.canvasData; f.def(this, { motion: { instance: null, stateAttr: { loadstart: false, firstLoaded: false, loaded: false, complete: false, conditionIn: false, direction: null, }, props: { min: u.min, max: u.max, current: null, progress: 0, }, imgs: {}, load: function () { if (this.stateAttr.loadstart) return; this.stateAttr.loadstart = true; var s = this; var n = u.root; var o = u.pName; var a = "." + u.type; var r = this.props.min; var c = this.props.max; var l = function () { s.stateAttr.firstLoaded = true; s.drawImage(s.props.min); s.props.current = s.props.min; }; var t = function (t) { var i = new Image(); i.onload = function () { s.imgs[t] = { dom: this, w: this.width, h: this.height, }; r++; if (t == s.props.min) l(); if (r == c + 1) { s.stateAttr.loaded = true; s.layout(); if (s.stateAttr.conditionIn) s.build(); else { s.pause(); s.draw(s.props.min); } } }; var e = (function () { if (t < 10) return "00" + t; else if (t >= 10 && t < 100) return "0" + t; else return t; })(); i.src = n + o + e + a; }; this.layout(); for (var i = this.props.min, e = c; i <= e; i++) t(i); }, getSize: function () { if (h.shottween == t) return { winHeight: f.winSize().h }; return h.shottween.getSize(); }, limits: function (t) { var i = 600; var e = 600; var s = {}; var n = t.width; var o = (n / i) * e; s.width = n; s.height = o; return s; }, layout: function () { var t = f.getBoundingClientRect(h.canvasSection[0]); var i = this.limits(t); var e = i.width; var s = i.height; h.canvasSection[0].style.height = s + "px"; h.canvasObjD.width = e; h.canvasObjD.height = s; }, draw: function (t) { if (this.stateAttr.loaded) this.drawImage(t); this.props.current = t; }, drawImage: function (t) { var i = this.imgs; var e = i[t]; var s = f.getBoundingClientRect(h.canvasSection[0]); var n = this.limits(s); var o = n.width; var a = n.height; var r = e.w; var c = e.h; if (e.w > o) { r = o; c = e.h * (o / e.w); } if (c > a) { r = e.w * (a / e.h); c = a; } var l = (o - r) / 2; var u = (a - c) / 2; h.ctx.clearRect(0, 0, o, a); h.ctx.drawImage(e.dom, l, u, r, c); }, resize: function () { this.layout(); if (this.stateAttr.firstLoaded) if (this.props.current != null) this.drawImage(this.props.current); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) { h.obj.removeClass("is-motion"); this.pause().progress(0); } } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = f.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var t = this; this.stateAttr.conditionIn = true; if (!this.stateAttr.loaded) return; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var i = this.props; if (this.instance == null) { var e = { v: i.min }; var s = new TimelineMax(); s.to(e, 0.7, { ease: Power0.easeNone, v: i.max, onUpdate: function () { t.draw(Math.round(t.delTweenID(e).v)); }, onComplete: function () { t.stateAttr.complete = true; h.obj.addClass("is-motion"); }, }); this.instance = s; } else this.instance.play(); } }, }, }); }, buildShotTween: function () { var s = this; f.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false, lazyload: false }, lazyload: function () { if (this.stateAttr.lazyload) return; this.stateAttr.lazyload = true; s.motion.load(); this.instance.opts.on.beforeStandbyUpdate = null; this.instance.opts.on.afterStandbyUpdate = null; }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { var t = 0.35; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.canvasSection, { init: false, on: { init: function () { i.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; t(); } }, 350); }, in: function () { if (!s.opts.stateAttr.pause) e.lazyload(); }, out: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var t = s.shottween.instance.motion.scroll.scope.out; if (t == "TOP") s.motion.reset(); } }, beforeStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, afterStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { e.lazyload(); s.motion.out(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, reset: function () { this.motion.reset(); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.motion.resize(); }, destroy: function () { this.motion.destroy(); this.shottween.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function r(t, i) { var e = { sizeSection: ".sc-comfort-fit__size-cont", stateAttr: { pause: false }, classAttr: { motion: "is-motion" }, }; this.opts = f.def(e, i || {}); if (!(this.obj = m(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildMagicTween(); }, setElements: function () { this.sizeSection = this.obj.find(this.opts.sizeSection); }, buildMotion: function () { var t = this; var i = this.opts.classAttr; f.def(this, { motion: { stateAttr: { play: false }, reset: function () { if (this.stateAttr.play) { this.stateAttr.play = false; t.sizeSection.removeClass(i.motion); } }, out: function () {}, build: function () { if (!this.stateAttr.play) { this.stateAttr.play = true; t.sizeSection.addClass(i.motion); } }, }, }); }, buildMagicTween: function () { var s = this; f.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { var t = 0.35; if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var i = s.magictween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.sizeSection, { init: false, on: { init: function () { i.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; t(); } }, 350); }, out: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var t = s.magictween.instance.motion.scroll.scope.out; if (t == "TOP") s.motion.reset(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () {}, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return n; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-comfort-fit" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new ComportFit(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsCustom = (function () { "use strict"; var t; return (function (t) { var i = window, e = i.document, s = i.jQuery, f = i.Upbs.util, c = i.Upbs.RESPONSIVE; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { jsPicture: ".js-picture", contents: ".sc-buds-custom__visual", stateAttr: { destroy: false }, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = f.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } n.prototype = { init: function () { this.setElements(); this.buildLazyLoad(); this.buildSetMotion(); }, setElements: function () { this.jsPictures = this.obj.find(this.opts.jsPicture); this.contents = this.obj.find(this.opts.contents); }, buildLazyLoad: function () { var e = this; f.def(this, { lazyload: { instance: null, build: function () { if (this.instance != null) return; for (var t = 0, i = e.jsPictures.length; t < i; t++) (function (t) { new LazyPicture(e.jsPictures.eq(t), { offsetTarget: e.contents, }); })(t); }, }, }); this.lazyload.build(); }, buildSetMotion: function () { var t = this; f.def(this, { setmotion: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { this.instance = new o(t.obj); }, }, }); this.setmotion.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.setmotion.destroy(); }, }; function o(t, i) { var e = { tabSection: ".sc-buds-custom__pager", setSection: ".sc-buds-custom__setting-list", setPd1: ".sc-buds-custom__setting-pd1", setPd2: ".sc-buds-custom__setting-pd2", controller: ".sc-buds-custom__setting-control", classAttr: { active: "is-active", selected: "is-selected" }, ariaAttr: { selected: "aria-selected", hidden: "aria-hidden" }, stateAttr: { destroy: false }, customEvent: ".SetMotion" + new Date().getTime() + Math.random(), }; this.opts = f.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.buildParallax(); this.buildMotion(); this.buildMagicTween(); this.bindEvents(true); }, setElements: function () { this.tabSection = this.obj.find(this.opts.tabSection); this.tabChilds = this.tabSection.children(); this.tabBtns = this.tabChilds.find("a"); this.setSection = this.obj.find(this.opts.setSection); this.listChilds = this.setSection.children(); this.setPd1 = this.obj.find(this.opts.setPd1); this.setPd2 = this.obj.find(this.opts.setPd2); this.controller = this.obj.find(this.opts.controller); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { this.tabBtns.on( this.changeEvents("click"), this.tabClick.bind(this) ); this.controller.on( this.changeEvents("click"), this.onClickController.bind(this) ); } else { this.tabBtns.off(this.changeEvents("click")); this.controller.off(this.changeEvents("click")); } }, tabClick: function (t) { t.preventDefault(); var i = s(t.currentTarget); var e = this.tabBtns.index(i); this.motion.go(e); }, onClickController: function (t) { t.preventDefault(); var i = s(t.currentTarget); var e = ""; if (i.hasClass("sc-buds-custom__setting-control--stop")) { i.addClass("sc-buds-custom__setting-control--play"); i.removeClass("sc-buds-custom__setting-control--stop"); e = i.attr("data-play-text"); this.motion.stateAttr.isPaused = true; this.motion.pause(); } else if ( i.hasClass("sc-buds-custom__setting-control--play") ) { i.addClass("sc-buds-custom__setting-control--stop"); i.removeClass("sc-buds-custom__setting-control--play"); e = i.attr("data-stop-text"); if (this.motion.instance == null) this.motion.build(); if ( this.motion.instance._time == this.motion.instance._duration ) { this.motion.stateAttr.direction = "FORWARD"; this.motion.reset(); } this.motion.stateAttr.isPaused = false; this.motion.play(); } i.find(".blind").text(e); }, buildParallax: function () { var r = this; f.def(this, { parallax: { instance: null, props: { 1: { min: 0, max: 1 }, progress: 0 }, tweens: { instance: null, duration: 0.3, kill: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, build: function (t) { this.kill(); var i = r.parallax; var e = f.def({}, i.props); this.instance = TweenLite.to(e, this.duration, { progress: t, onUpdate: function () { i.instance.progress(e.progress); i.props.progress = e.progress; }, }); }, init: function () { if (this.duration <= 0) this.duration = 1e-4; }, }, draw: function (t) { var i = f.winSize().w; var e = c.MO.WIDTH; var s = i < e; var n = s ? 15 : 20; var o = s ? 30 : 40; var a = 1; if (s) a = i / 720; else if (i < c.PC.WIDTH) a = i / c.PC.WIDTH; n = n * a; o = o * a; TweenLite.set(r.setPd1, { y: n / 2 - n * t.v1 }); TweenLite.set(r.setPd2, { y: -(o / 2) + o * t.v1 }); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.tweens.build(t); return this; }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, initLayout: function () { var t = { v1: this.props["1"].min }; this.draw(t); }, delTweenID: function (t) { var i = f.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, build: function () { var e = this; var t = this.props; if (this.instance == null) { this.tweens.init(); this.initLayout(); var s = { v1: t["1"].min }; var i = new TimelineMax(); i.pause(); i.to(s, 0.5, { ease: Power0.easeNone, v1: t["1"].max, onUpdate: function () { var t = e.delTweenID(s).v1; var i = { v1: t }; e.draw(i); }, }); this.instance = i; } }, }, }); this.parallax.build(); }, buildMotion: function () { var c = this; var l = this.listChilds; var u = this.opts.classAttr; var h = this.opts.ariaAttr; f.def(this, { motion: { instance: null, stateAttr: { isPaused: false, conditionIn: false, direction: null, }, props: { progress: 0 }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) { this.pause().progress(0); var t = l.eq(0); l.not(t).removeClass(u.active).attr(h.hidden, "true"); t.addClass(u.active).attr(h.hidden, "false"); } } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = f.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, go: function (t) { if (this.instance == null) return; var i = l.eq(t); this.instance.gotoAndStop("T" + t); i.addClass(u.active).attr(h.hidden, "false"); l.not(i).removeClass(u.active).attr(h.hidden, "true"); l.css({ position: "", width: "", top: "", opacity: "" }); i.css({ opacity: "", position: "", zIndex: "" }); this.indicator(t); }, indicator: function (t) { var i = c.tabBtns.eq(t); var e = c.tabBtns.not(i); e.removeClass(u.selected).attr(h.selected, "false"); i.addClass(u.selected).attr(h.selected, "true"); }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var a = this; this.stateAttr.conditionIn = true; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var t = this.props; if (this.instance == null) { var r = new TimelineMax(); var i = function (t) { var i = t - 1; var e = l.eq(t); var s = l.eq(i); var n = { opacity: 1, onStart: function () { if (i >= 0) TweenLite.set(s, { position: "absolute", width: "100%", top: 0, }); TweenLite.set(e, { position: "relative", zIndex: 10, }); e.addClass(u.active).attr(h.hidden, "false"); a.indicator(t); if ( c.controller.hasClass( "sc-buds-custom__setting-control--play" ) ) { c.controller.addClass( "sc-buds-custom__setting-control--stop" ); c.controller.removeClass( "sc-buds-custom__setting-control--play" ); c.controller .find(".blind") .text(c.controller.attr("data-stop-text")); } }, onComplete: function () { l.not(e) .removeClass(u.active) .attr(h.hidden, "true"); s.css({ position: "", width: "", top: "" }); e.css({ opacity: "", position: "", zIndex: "", }); if ( t == l.length - 1 && c.controller.hasClass( "sc-buds-custom__setting-control--stop" ) ) { c.controller.addClass( "sc-buds-custom__setting-control--play" ); c.controller.removeClass( "sc-buds-custom__setting-control--stop" ); c.controller .find(".blind") .text(c.controller.attr("data-play-text")); } }, }; var o = 0.35; if (t == 0) { r.to(e, 0, n); r.addLabel("T" + t); } else { r.fromTo( e, o, { opacity: 0 }, n, "T" + (t - 1) + "+=" + 1 ); r.addLabel("T" + t); } }; for (var e = 0, s = l.length; e < s; e++) i(e); this.instance = r; if (!a.stateAttr.isPaused) this.indicator(0); } else if (!a.stateAttr.isPaused) this.instance.play(); } }, }, }); }, buildMagicTween: function () { var s = this; f.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { var e = this; var t = function () { var t = 0.25; if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var i = s.magictween.instance.props.allProgress; if (i > t) s.motion.build(); else s.motion.out(); s.parallax.progress(i); } }; this.instance = new MagicScroll(s.setSection, { init: false, on: { init: function () { i.setTimeout(function () { e.stateAttr.tweenInit = true; t(); }, 350); }, out: function () { if (e.stateAttr.tweenInit) { if (s.magictween.instance == null) return; var t = s.magictween.instance.motion.scroll.scope.out; if (t == "TOP") if (!s.motion.stateAttr.isPaused) s.motion.reset(); } }, allUpdate: function () { t(); }, }, }); this.instance.init(); f.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.bindEvents(false); this.parallax.destroy(); this.magictween.destroy(); }, }; return n; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-custom" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsCustom(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsDesign = (function () { "use strict"; var t; return (function (t) { var s = window, i = s.document, n = s.jQuery, c = s.Upbs.util, l = s.Upbs.RESPONSIVE; function o(t, i) { if (!(this instanceof o)) return new o(t, i); var e = { designSection: ".sc-buds-design__wrap", plHeadline: ".js-parallax-headline", plImg: ".js-parallax-img", stateAttr: { destroy: false }, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = c.def(e, i || {}); if (!(this.obj = n(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildMagicTween(); }, setElements: function () { this.designSection = this.obj.find(this.opts.designSection); this.plHeadline = this.obj.find(this.opts.plHeadline); this.plImg = this.obj.find(this.opts.plImg); }, buildMotion: function () { var r = this; c.def(this, { motion: { parallax: { instance: null, props: { 1: { min: 0, max: 1 }, progress: 0 }, tweens: { instance: null, duration: 0.3, kill: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, build: function (t) { this.kill(); var i = r.motion.parallax; var e = c.def({}, i.props); this.instance = TweenLite.to(e, this.duration, { progress: t, onUpdate: function () { i.instance.progress(e.progress); i.props.progress = e.progress; }, }); }, init: function () { if (this.duration <= 0) this.duration = 1e-4; }, }, draw: function (t) { var i = c.winSize().w; var e = l.MO.WIDTH; var s = i < e; var n = s ? 80 : 100; var o = s ? 90 : 120; var a = 1; if (s) a = i / 720; else if (i < l.PC.WIDTH) a = i / l.PC.WIDTH; n = n * a; o = o * a; TweenLite.set(r.plHeadline, { y: n / 2 - n * t.v1 }); TweenLite.set(r.plImg, { y: o * t.v1 }); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.tweens.build(t); return this; }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, initLayout: function () { var t = { v1: this.props["1"].min }; this.draw(t); }, build: function () { var e = r.motion; var s = this; var t = this.props; if (this.instance == null) { this.tweens.init(); this.initLayout(); var n = { v1: t["1"].min }; var i = new TimelineMax(); i.pause(); i.to(n, 0.5, { ease: Power0.easeNone, v1: t["1"].max, onUpdate: function () { var t = e.delTweenID(n).v1; var i = { v1: t }; s.draw(i); }, }); this.instance = i; } }, }, delTweenID: function (t) { var i = c.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, destroy: function () { this.parallax.destroy(); }, build: function () { this.parallax.build(); }, }, }); this.motion.build(); }, buildMagicTween: function () { var e = this; c.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { var i = this; var t = function () { if (i.stateAttr.tweenInit) { if (e.magictween.instance == null) return; var t = e.magictween.instance.props.allProgress; e.motion.parallax.progress(t); } }; this.instance = new MagicScroll(e.designSection, { init: false, on: { init: function () { s.setTimeout(function () { i.stateAttr.tweenInit = true; t(); }, 350); }, allUpdate: function () { t(); }, }, }); this.instance.init(); c.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.magictween.destroy(); }, }; return o; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-design" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsDesign(t.obj.eq(i)); }, }), new s(); })(); }), (function () { "use strict"; var u, t, i, e, s, n, o, a, r, c, l, h, f, d, p, v, m, g, b; (window.BudsEcosystem = window.BudsEcosystem || {}), (BudsEcosystem = ((t = !(u = {})), (i = null), (e = function () { (u.compInner = u.section.querySelectorAll( ".sc-buds-ecosystem__item-inner" )), (u.compImage = u.section.querySelectorAll( ".sc-buds-ecosystem__item-image img" )), (u.compShadow = u.section.querySelectorAll( ".sc-buds-ecosystem__item-shadow img" )), (u.compPopup = u.section.querySelectorAll( ".sc-buds-ecosystem__popup" )), (u.compCtaWrap = u.section.querySelectorAll( ".sc-buds-ecosystem__item-cta" )), (u.compCta = u.section.querySelectorAll( ".sc-buds-ecosystem__item-cta-link" )); }), (s = function () { window.addEventListener("load", o), window.addEventListener("scroll", c); for (var t = 0; t < u.compCta.length; t++) { var i = b(u.compCta[t], ".sc-buds-ecosystem__item"); (u.compCta[t].popup = i.querySelector( ".sc-buds-ecosystem__popup" )), (u.compCta[t].closer = u.compCta[t].popup.querySelector( ".sc-buds-ecosystem__popup-close" )), (u.compCta[t].closer.popup = u.compCta[t].popup), (u.compCta[t].closer.opener = u.compCta[t]), u.compCta[t].addEventListener("click", l), u.compCta[t].addEventListener("click", h); } }), (n = function () { for (var t = 0; t < u.compPopup.length; t++) { u.compPopup[t].setAttribute("aria-hidden", "true"); for ( var i = u.compPopup[t].querySelectorAll("a, button"), e = 0; e < i.length; e++ ) i[e].setAttribute("tabindex", "-1"), i[e].setAttribute("aria-hidden", "true"); } }), (o = function () { a(), c(), window.removeEventListener("load", o); }), (a = function () { (t = !(768 <= window.innerWidth)), clearTimeout(u.resizeTimeout), (u.resizeTimeout = setTimeout(function () { c(); }, 50)), t != i && r(), (i = t); }), (r = function () {}), (c = function () { g({ activeElement: u.compInner[0], targetElement: u.compInner[0], distance: t ? 7 : 5, direction: -1, }), g({ activeElement: u.compInner[1], targetElement: u.compInner[1], distance: t ? 6 : 4, }), g({ activeElement: u.compInner[2], targetElement: u.compInner[2], distance: t ? 6 : 4, }), g({ activeElement: u.compInner[3], targetElement: u.compInner[3], distance: t ? 7 : 5, direction: -1, }); }), (l = function (t) { var i = this; t.preventDefault(), p(), this.popup.classList.contains("is-active") || this.popup.classList.add("is-active"), window.removeEventListener("click", d), setTimeout(function () { i.closer.focus(), window.addEventListener("click", d); }, 50), this.closer.addEventListener("click", f), this.setAttribute("aria-hidden", "true"), this.setAttribute("tabindex", "-1"), v(this); }), (h = function () { for (var t = 0; t < u.compCta.length; t++) u.compCta[t].removeEventListener("click", h); }), (f = function (t) { var i = this; t.preventDefault(), this.popup.classList.contains("is-active") && this.popup.classList.remove("is-active"), this.removeEventListener("click", f), window.removeEventListener("click", d), m(this), this.opener.removeAttribute("aria-hidden"), this.opener.removeAttribute("tabindex"), setTimeout(function () { i.opener.focus(); }, 50); }), (d = function (t) { b(t.target, ".sc-buds-ecosystem__popup") || (p(), n(), window.removeEventListener("click", d)); }), (p = function () { for (var t = 0; t < u.compPopup.length; t++) u.compPopup[t].classList.contains("is-active") && u.compPopup[t].classList.remove("is-active"), u.compCta[t].removeAttribute("aria-hidden"), u.compCta[t].removeAttribute("tabindex"); }), (v = function (t) { t.popup.removeAttribute("aria-hidden"); for ( var i = t.popup.querySelectorAll("a, button"), e = 0; e < i.length; e++ ) i[e].removeAttribute("tabindex"), i[e].removeAttribute("aria-hidden"); }), (m = function (t) { t.popup.setAttribute("aria-hidden", "true"); for ( var i = t.popup.querySelectorAll("a, button"), e = 0; e < i.length; e++ ) i[e].setAttribute("tabindex", "-1"), i[e].setAttribute("aria-hidden", "true"); }), (g = function (t) { var i = t.distance || 0, e = t.direction || 1, s = t.activeElement, n = t.targetElement || s, o = u.section, a = window.pageYOffset, r = window.pageYOffset + window.innerHeight, c = s.getBoundingClientRect(), l = a + o.getBoundingClientRect().top, t = l + o.getBoundingClientRect().height, s = window.innerHeight + c.height, o = c.top - (window.innerHeight - c.height) / 2, i = (c.height * i) / 100; l <= r && a <= t && TweenMax.to(n, 0.2, { y: ((2 * i * o) / s) * e + "px", z: 0, ease: Power0.easeNone, delay: 0, }); }), (b = function (t, i) { do { if (t == document.documentElement) return null; if (t.matches ? t.matches(i) : t.msMatchesSelector(i)) return t; } while ( null !== (t = t.parentElement || t.parentNode) || 1 === t.nodeType ); return null; }), { init: function () { (u.section = document.querySelector(".sc-buds-ecosystem")), u.section && (e(), s(), n()); }, })), window.BudsEcosystem.init(); })(), (function (t) { t.BudsIntro = (function () { "use strict"; var t; return (function (t) { var p = window, i = p.document, s = p.jQuery, h = p.Upbs.util, e = p.Upbs.RESPONSIVE; function n(t, i) { if (!(this instanceof n)) return new n(t, i); var e = { jsPicture: ".js-picture", contentWrap: ".sc-buds-intro__content", canvasSection: ".sc-buds-intro__canvas-box", canvasWrap: ".sc-buds-intro__canvas-wrap", canvasObj: ".sc-buds-intro__canvas", sizeAttr: { action: null }, headLine: ".sc-buds-intro__headline", descSection: ".sc-buds-intro__desc", classAttr: { moving: "moving-start", lowBand: "low-band" }, stateAttr: { destroy: false }, resizeStart: null, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = h.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } n.prototype = { init: function () { this.setElements(); this.initLayout(); this.buildParts(); this.buildSequence(); this.resizeFunc(); this.bindResizeEvents(true); }, setElements: function () { this.contentWrap = this.obj.find(this.opts.contentWrap); this.canvasSection = this.obj.find(this.opts.canvasSection); this.headLine = this.obj.find(this.opts.headLine); this.descSection = this.obj.find(this.opts.descSection); }, initLayout: function () { if (h.band == "LOW") this.canvasSection.addClass(this.opts.classAttr.lowBand); }, buildParts: function () { var i = this; h.def(this, { parts: { instance: null, stateAttr: { active: false }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, reset: function () { if (this.instance == null) return this; this.stateAttr.active = false; this.pause().progress(0); return this; }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); return this; }, play: function () { if (this.instance == null) return this; if (!this.stateAttr.active) { this.stateAttr.active = true; this.instance.play(); } return this; }, build: function () { if (this.instance == null) { var t = new TimelineMax(); t.pause(); t.fromTo( i.headLine, 0.5, { opacity: 0 }, { opacity: 1 }, "PARTS1" ); t.fromTo( i.descSection, 0.5, { opacity: 0 }, { opacity: 1 }, "PARTS1+=.1" ); this.instance = t; } }, }, }); this.parts.build(); }, buildSequence: function () { var o = this; var a = this.opts.classAttr; h.def(this, { sequence: { mo: { instance: null, el: (function () { return o.canvasSection.find(".display-mo"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { o.sequence.pc.pause(); o.parts.reset(); var t = this.el; o.canvasSection .find("." + a.moving) .removeClass(a.moving); if (this.instance == null) { var i = this.el.find(">" + o.opts.jsPicture); var e = this.el.find(o.opts.canvasWrap); var s = this.el.find(o.opts.canvasObj); if (h.band == "LOW") { e.hide(); i.css("display", ""); var n = new c(o.canvasSection, { wrapEl: this.el, picture: i, on: { bg: function () { t.addClass(a.moving); }, parts: function () { o.parts.play(); }, }, }); o.parts.play(); } else var n = new u(o.canvasSection, { jsPicture: o.opts.jsPicture, canvasWrap: e, canvasObj: s, on: { bg: function () { t.addClass(a.moving); }, parts: function () { o.parts.play(); }, }, }); this.instance = n; } else this.reset().play(); }, }, pc: { instance: null, el: (function () { return o.canvasSection.find(".display-pc"); })(), resize: function () { if (this.instance == null) return; this.instance.resize(); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, reset: function () { if (this.instance == null) return this; this.instance.reset(); return this; }, play: function () { if (this.instance == null) return this; this.instance.play(); return this; }, build: function () { o.sequence.mo.pause(); o.parts.reset(); var t = this.el; o.canvasSection .find("." + a.moving) .removeClass(a.moving); if (this.instance == null) { var i = this.el.find(">" + o.opts.jsPicture); var e = this.el.find(o.opts.canvasWrap); var s = this.el.find(o.opts.canvasObj); if (h.band == "LOW") { e.hide(); i.css("display", ""); var n = new r(o.canvasSection, { picture: i, on: { bg: function () { t.addClass(a.moving); }, parts: function () { o.parts.play(); }, }, }); o.parts.play(); } else { o.parts.reset(); var n = new l(o.canvasSection, { jsPicture: o.opts.jsPicture, canvasWrap: e, canvasObj: s, on: { bg: function () { t.addClass(a.moving); }, parts: function () { o.parts.play(); }, }, }); } this.instance = n; } else this.reset().play(); }, }, resize: function () { if (o.opts.sizeAttr.action == "OTHER") this.pc.resize(); else if (o.opts.sizeAttr.action == 767) this.mo.resize(); }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindResizeEvents: function (t) { if (t) s(p).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); else s(p).off(this.changeEvents("resize orientationchange")); }, resizeFunc: function (t) { this.winWidth = h.winSize().w; if (this.opts.resizeStart == null) { this.opts.resizeStart = this.winWidth; this.resizeAnimateFunc(); } p.clearTimeout(this.resizeEndTime); this.resizeEndTime = p.setTimeout( this.resizeEndFunc.bind(this), 250 ); }, resizeEndFunc: function () { this.opts.resizeStart = null; this.setLayout(); h.cancelAFrame.call(p, this.resizeRequestFrame); }, resizeAnimateFunc: function () { this.setLayout(); this.resizeRequestFrame = h.requestAFrame.call( p, this.resizeAnimateFunc.bind(this) ); }, setLayout: function () { if (!this.opts.stateAttr.destroy) { this.sequence.resize(); if (this.winWidth > e.MO.WIDTH) { if (this.opts.sizeAttr.action !== "OTHER") { this.opts.sizeAttr.action = "OTHER"; this.sequence.pc.build(); } } else if (this.opts.sizeAttr.action !== e.MO.WIDTH) { this.opts.sizeAttr.action = e.MO.WIDTH; this.sequence.mo.build(); } } }, destroy: function () { this.opts.stateAttr.destroy = true; this.parts.destroy(); }, }; function r(t, i) { var e = { stateAttr: { pause: false }, on: { bg: null, parts: null }, }; this.opts = h.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.buildLazyLoad(); this.outCallback("bg"); }, setElements: function () { this.picture = this.opts.picture; }, buildLazyLoad: function () { var e = this; h.def(this, { lazyload: { instance: null, build: function () { if (this.instance != null) return; for (var t = 0, i = e.picture.length; t < i; t++) (function (t) { new LazyPicture(e.picture.eq(t), { offsetTarget: e.obj, }); })(t); }, }, }); this.lazyload.build(); }, reset: function () { this.obj.css("height", ""); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; this.outCallback("bg"); this.outCallback("parts"); }, resize: function () { this.obj.css("height", ""); }, destroy: function () {}, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function c(t, i) { var e = { stateAttr: { pause: false }, on: { bg: null, parts: null }, }; this.opts = h.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } c.prototype = { init: function () { this.setElements(); this.buildLazyLoad(); this.outCallback("bg"); }, setElements: function () { this.wrapEl = this.opts.wrapEl; this.picture = this.opts.picture; }, buildLazyLoad: function () { var e = this; h.def(this, { lazyload: { instance: null, build: function () { if (this.instance != null) return; for (var t = 0, i = e.picture.length; t < i; t++) (function (t) { new LazyPicture(e.picture.eq(t), { offsetTarget: e.obj, }); })(t); }, }, }); this.lazyload.build(); }, reset: function () { this.obj.css("height", ""); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; this.outCallback("bg"); this.outCallback("parts"); }, resize: function () { this.obj.css("height", ""); }, destroy: function () {}, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function l(t, i) { var e = { scenePicture: ".scene-picture", canvasData: {}, customEvent: ".PcSequence" + new Date().getTime() + Math.random(), stateAttr: { pause: false }, on: { bg: null, parts: null, play: null, reset: null }, }; this.opts = h.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } l.prototype = { init: function () { this.setElements(); this.initOpts(); this.initLayout(); this.buildScrollLoad(); this.buildLazyLoad(); this.buildMotion(); this.buildShotTween(); }, setElements: function () { this.canvasSection = this.obj; this.canvasObj = this.opts.canvasObj; this.canvasWrap = this.opts.canvasWrap; this.canvasObjD = this.canvasObj[0]; this.ctx = this.canvasObjD.getContext("2d"); this.scenePictures = this.canvasWrap.find( this.opts.scenePicture ); this.jsPictures = this.scenePictures.find(this.opts.jsPicture); this.spFirst = this.jsPictures.eq(0); this.spSecond = this.jsPictures.eq(1); }, initOpts: function () { var t = this.canvasObj.data("component"); for (var i in t) this.opts.canvasData[i] = t[i]; }, initLayout: function () { TweenLite.set(this.spSecond, { opacity: 0 }); TweenLite.set(this.canvasObj, { opacity: 0 }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, buildScrollLoad: function () { var i = this; h.def(this, { scrollload: { active: false, bindEvents: function (t) { if (t) s(p).on( i.changeEvents("scroll"), this.scrollFunc.bind(this) ); else s(p).off(i.changeEvents("scroll")); }, scrollFunc: function () { this.active = true; this.bindEvents(false); }, build: function () { this.bindEvents(true); }, }, }); this.scrollload.build(); }, buildLazyLoad: function () { var i = this; h.def(this, { lazyload: { stateAttr: { first: false, second: false, canvas: false }, complete: function () { var t = this.stateAttr; if (t.first && t.second && t.canvas) if (i.motion.stateAttr.conditionIn) i.motion.build(); else { i.motion.pause(); i.motion.draw(i.motion.props.min); } }, first: function () { var t = this; new LazyPicture(i.spFirst, { on: { complete: function () { t.stateAttr.first = true; t.complete(); }, }, }); }, second: function () { var t = this; new LazyPicture(i.spSecond, { on: { complete: function () { t.stateAttr.second = true; t.complete(); }, }, }); }, build: function () { this.first(); }, }, }); this.lazyload.build(); }, buildMotion: function () { var d = this; var s = this.opts.canvasData; h.def(this, { motion: { instance: null, stateAttr: { loadstart: false, firstLoaded: false, loaded: false, complete: false, conditionIn: false, direction: null, }, props: { min: s.min, max: s.max, current: null, progress: 0, }, imgs: {}, load: function () { if (this.stateAttr.loadstart) return; this.stateAttr.loadstart = true; d.lazyload.second(); var o = this; var a = s.root; var r = s.pName; var c = "." + s.type; var l = s.hasOwnProperty("pngSet") ? s.pngSet.split(",") : []; var u = this.props.min; var h = this.props.max; var f = function () { o.stateAttr.firstLoaded = true; o.drawImage(o.props.min); o.props.current = o.props.min; }; var t = function (t) { var i = new Image(); i.onload = function () { o.imgs[t] = { dom: this, w: this.width, h: this.height, }; u++; if (t == o.props.min) f(); if (u == h + 1) p.setTimeout(function () { o.stateAttr.loaded = true; o.layout(); d.lazyload.stateAttr.canvas = true; d.lazyload.complete(); }, 30); }; var e = (function () { if (t < 10) return "00" + t; else if (t >= 10 && t < 100) return "0" + t; else return t; })(); var s = String(e); var n = l.indexOf(s) != -1; if (n) i.src = a + r + e + ".png"; else i.src = a + r + e + c; }; this.layout(); for (var i = this.props.min, e = h; i <= e; i++) t(i); }, getSize: function () { if (d.shottween == t) return { winHeight: h.winSize().h }; return d.shottween.getSize(); }, limits: function (t) { var i = 890; var e = 760; var s = {}; var n = t.width; var o = (n / i) * e; s.width = n; s.height = o; return s; }, layout: function () { var t = h.getBoundingClientRect(d.canvasSection[0]); var i = this.limits(t); var e = i.width; var s = i.height; d.canvasSection[0].style.height = s + "px"; d.canvasObjD.width = e; d.canvasObjD.height = s; }, draw: function (t) { if (this.stateAttr.loaded) this.drawImage(t); this.props.current = t; }, drawImage: function (t) { var i = this.imgs; var e = i[t]; var s = h.getBoundingClientRect(d.canvasSection[0]); var n = this.limits(s); var o = n.width; var a = n.height; var r = e.w; var c = e.h; if (e.w > o) { r = o; c = e.h * (o / e.w); } if (c > a) { r = e.w * (a / e.h); c = a; } var l = (o - r) / 2; var u = (a - c) / 2; d.ctx.clearRect(0, 0, o, a); d.ctx.drawImage(e.dom, l, u, r, c); }, resize: function () { this.layout(); if (this.stateAttr.firstLoaded) if (this.props.current != null) this.drawImage(this.props.current); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) this.pause().progress(0); } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = h.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var t = this; this.stateAttr.conditionIn = true; if (!this.stateAttr.loaded) return; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var i = this.props; if (this.instance == null) { var e = { v: i.min }; var s = new TimelineMax(); s.set(d.spFirst, { opacity: 1 }); s.set(d.spSecond, { opacity: 0 }); s.set(d.canvasObj, { opacity: 0 }); s.to({}, 0.001, {}); s.set(d.spFirst, { opacity: 0 }); s.set(d.spSecond, { y: "-16.8%", scale: 1.58, opacity: 1, }); s.to(d.spSecond, 0.7, { ease: Power0.easeNone, y: "0%", scale: 1, onStart: function () { if (!d.opts.stateAttr.pause) d.outCallback("bg"); }, }); s.set(d.canvasObj, { opacity: 1 }); s.to(e, 1.3, { ease: Power0.easeNone, v: i.max, onStart: function () { TweenLite.set(d.spSecond, { opacity: 0 }); }, onUpdate: function () { t.draw(Math.round(t.delTweenID(e).v)); if (e.v > 40) if (!d.opts.stateAttr.pause) d.outCallback("parts"); }, onComplete: function () { t.stateAttr.complete = true; }, }); this.instance = s; } else this.instance.play(); } }, }, }); }, buildShotTween: function () { var s = this; h.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false, lazyload: false }, lazyload: function () { if (this.stateAttr.lazyload) return; this.stateAttr.lazyload = true; s.motion.load(); this.instance.opts.on.beforeStandbyUpdate = null; this.instance.opts.on.afterStandbyUpdate = null; }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { s.motion.reset(); }; var i = function () { var t = 0.35; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t && i < 1) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.canvasSection, { init: false, on: { init: function () { p.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; i(); } i(); }, 350); }, in: function () { if (!s.opts.stateAttr.pause) e.lazyload(); }, out: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit); }, beforeStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if ( e.stateAttr.tweenInit && s.scrollload.active ) { e.lazyload(); s.motion.out(); } }, afterStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if ( e.stateAttr.tweenInit && s.scrollload.active ) { e.lazyload(); s.motion.out(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) i(); }, }, }); this.instance.init(); h.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, reset: function () { this.motion.reset(); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.motion.resize(); }, destroy: function () { this.motion.destroy(); this.shottween.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; function u(t, i) { var e = { scenePicture: ".scene-picture", canvasData: {}, customEvent: ".MoSequence" + new Date().getTime() + Math.random(), stateAttr: { pause: false }, on: { bg: null, parts: null, play: null, reset: null }, }; this.opts = h.def(e, i || {}); if (!(this.obj = s(t)).length) return; this.init(); } u.prototype = { init: function () { this.setElements(); this.initOpts(); this.initLayout(); this.buildScrollLoad(); this.buildLazyLoad(); this.buildMotion(); this.buildShotTween(); }, setElements: function () { this.canvasSection = this.obj; this.canvasObj = this.opts.canvasObj; this.canvasWrap = this.opts.canvasWrap; this.canvasObjD = this.canvasObj[0]; this.ctx = this.canvasObjD.getContext("2d"); this.scenePictures = this.canvasWrap.find( this.opts.scenePicture ); this.jsPictures = this.scenePictures.find(this.opts.jsPicture); this.spFirst = this.jsPictures.eq(0); this.spSecond = this.jsPictures.eq(1); }, initOpts: function () { var t = this.canvasObj.data("component"); for (var i in t) this.opts.canvasData[i] = t[i]; }, initLayout: function () { TweenLite.set(this.spSecond, { opacity: 0 }); TweenLite.set(this.canvasObj, { opacity: 0 }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, buildScrollLoad: function () { var i = this; h.def(this, { scrollload: { active: false, bindEvents: function (t) { if (t) s(p).on( i.changeEvents("scroll"), this.scrollFunc.bind(this) ); else s(p).off(i.changeEvents("scroll")); }, scrollFunc: function () { this.active = true; this.bindEvents(false); }, build: function () { this.bindEvents(true); }, }, }); this.scrollload.build(); }, buildLazyLoad: function () { var i = this; h.def(this, { lazyload: { stateAttr: { first: false, second: false, canvas: false }, complete: function () { var t = this.stateAttr; if (t.first && t.second && t.canvas) if (i.motion.stateAttr.conditionIn) i.motion.build(); else { i.motion.pause(); i.motion.draw(i.motion.props.min); } }, first: function () { var t = this; new LazyPicture(i.spFirst, { on: { complete: function () { t.stateAttr.first = true; t.complete(); }, }, }); }, second: function () { var t = this; new LazyPicture(i.spSecond, { on: { complete: function () { t.stateAttr.second = true; t.complete(); }, }, }); }, build: function () { this.first(); }, }, }); this.lazyload.build(); }, buildMotion: function () { var d = this; var s = this.opts.canvasData; h.def(this, { motion: { instance: null, stateAttr: { loadstart: false, firstLoaded: false, loaded: false, complete: false, conditionIn: false, direction: null, }, props: { min: s.min, max: s.max, current: null, progress: 0, }, imgs: {}, load: function () { if (this.stateAttr.loadstart) return; this.stateAttr.loadstart = true; d.lazyload.second(); var o = this; var a = s.root; var r = s.pName; var c = "." + s.type; var l = s.hasOwnProperty("pngSet") ? s.pngSet.split(",") : []; var u = this.props.min; var h = this.props.max; var f = function () { o.stateAttr.firstLoaded = true; o.drawImage(o.props.min); o.props.current = o.props.min; }; var t = function (t) { var i = new Image(); i.onload = function () { o.imgs[t] = { dom: this, w: this.width, h: this.height, }; u++; if (t == o.props.min) f(); if (u == h + 1) p.setTimeout(function () { o.stateAttr.loaded = true; o.layout(); d.lazyload.stateAttr.canvas = true; d.lazyload.complete(); }, 30); }; var e = (function () { if (t < 10) return "00" + t; else if (t >= 10 && t < 100) return "0" + t; else return t; })(); var s = String(e); var n = l.indexOf(s) != -1; if (n) i.src = a + r + e + ".png"; else i.src = a + r + e + c; }; this.layout(); for (var i = this.props.min, e = h; i <= e; i++) t(i); }, getSize: function () { if (d.shottween == t) return { winHeight: h.winSize().h }; return d.shottween.getSize(); }, limits: function (t) { var i = 620; var e = 680; var s = {}; var n = t.width; var o = (n / i) * e; s.width = n; s.height = o; return s; }, layout: function () { var t = h.getBoundingClientRect(d.canvasSection[0]); var i = this.limits(t); var e = i.width; var s = i.height; d.canvasSection[0].style.height = s + "px"; d.canvasObjD.width = e; d.canvasObjD.height = s; }, draw: function (t) { if (this.stateAttr.loaded) this.drawImage(t); this.props.current = t; }, drawImage: function (t) { var i = this.imgs; var e = i[t]; var s = h.getBoundingClientRect(d.canvasSection[0]); var n = this.limits(s); var o = n.width; var a = n.height; var r = e.w; var c = e.h; if (e.w > o) { r = o; c = e.h * (o / e.w); } if (c > a) { r = e.w * (a / e.h); c = a; } var l = (o - r) / 2; var u = (a - c) / 2; d.ctx.clearRect(0, 0, o, a); d.ctx.drawImage(e.dom, l, u, r, c); }, resize: function () { this.layout(); if (this.stateAttr.firstLoaded) if (this.props.current != null) this.drawImage(this.props.current); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.instance.progress(t); this.props.progress = t; return this; }, reset: function () { if (this.stateAttr.direction !== "RESET") { this.stateAttr.direction = "RESET"; if (this.instance !== null) this.pause().progress(0); } }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, delTweenID: function (t) { var i = h.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, out: function () { this.stateAttr.conditionIn = false; }, build: function () { var t = this; this.stateAttr.conditionIn = true; if (!this.stateAttr.loaded) return; if (this.stateAttr.direction !== "FORWARD") { this.stateAttr.direction = "FORWARD"; var i = this.props; if (this.instance == null) { var e = { v: i.min }; var s = new TimelineMax(); s.set(d.spFirst, { opacity: 1 }); s.set(d.spSecond, { opacity: 0 }); s.set(d.canvasObj, { opacity: 0 }); s.to({}, 0.001, {}); s.set(d.spFirst, { opacity: 0 }); s.set(d.spSecond, { y: "-12.8%", scale: 1.3, opacity: 1, }); s.to(d.spSecond, 0.7, { ease: Power0.easeNone, y: "0%", scale: 1, onStart: function () { if (!d.opts.stateAttr.pause) d.outCallback("bg"); }, }); s.set(d.canvasObj, { opacity: 1 }); s.to(e, 1.3, { ease: Power0.easeNone, v: i.max, onStart: function () { TweenLite.set(d.spSecond, { opacity: 0 }); }, onUpdate: function () { t.draw(Math.round(t.delTweenID(e).v)); if (e.v > 40) if (!d.opts.stateAttr.pause) d.outCallback("parts"); }, onComplete: function () { t.stateAttr.complete = true; }, }); this.instance = s; } else this.instance.play(); } }, }, }); }, buildShotTween: function () { var s = this; h.def(this, { shottween: { instance: null, stateAttr: { tweenInit: false, lazyload: false }, lazyload: function () { if (this.stateAttr.lazyload) return; this.stateAttr.lazyload = true; s.motion.load(); this.instance.opts.on.beforeStandbyUpdate = null; this.instance.opts.on.afterStandbyUpdate = null; }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var e = this; var t = function () { s.motion.reset(); }; var i = function () { var t = 0.35; if (e.stateAttr.tweenInit) { if (s.shottween.instance == null) return; var i = s.shottween.instance.props.allProgress; if (i > t && i < 1) s.motion.build(); else s.motion.out(); } }; this.instance = new MagicScroll(s.canvasSection, { init: false, on: { init: function () { p.setTimeout(function () { if (!s.opts.stateAttr.pause) { e.stateAttr.tweenInit = true; i(); } }, 350); }, in: function () { if (!s.opts.stateAttr.pause) e.lazyload(); }, out: function () { if (!s.opts.stateAttr.pause) if (e.stateAttr.tweenInit); }, beforeStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if ( e.stateAttr.tweenInit && s.scrollload.active ) { e.lazyload(); s.motion.out(); } }, afterStandbyUpdate: function () { if (!s.opts.stateAttr.pause) if ( e.stateAttr.tweenInit && s.scrollload.active ) { e.lazyload(); s.motion.out(); } }, allUpdate: function () { if (!s.opts.stateAttr.pause) i(); }, }, }); this.instance.init(); h.page.magicscroll.instance.push(this.instance); }, }, }); this.shottween.build(); }, reset: function () { this.motion.reset(); }, pause: function () { this.opts.stateAttr.pause = true; }, play: function () { this.opts.stateAttr.pause = false; }, resize: function () { if (this.opts.stateAttr.pause) return; this.motion.resize(); }, destroy: function () { this.motion.destroy(); this.shottween.destroy(); }, outCallback: function (t) { var i = this.opts.on[t]; if (i == null) return; i(); }, }; return n; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-intro" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsIntro(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsKv = (function () { "use strict"; var t; return (function (t) { var r = window, i = r.document, c = r.jQuery, l = r.Upbs.util, u = r.Upbs.RESPONSIVE; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { stateAttr: { destroy: false } }; this.opts = l.def(e, i || {}); if (!(this.obj = c(t)).length) return; this.init(); } s.prototype = { init: function () { this.buildNav(); }, buildNav: function () { var t = this; l.def(this, { nav: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { this.instance = new e(t.obj); }, }, }); this.nav.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; }, }; function e(t, i) { var e = { navSection: ".sc-buds-nav", navList: ".sc-buds-nav__list", classAttr: { active: "is-active" }, customEvent: ".KvNav" + new Date().getTime() + Math.random(), stateAttr: { focus: false, destroy: false, scroll: null, resize: null, }, requestAttr: { scroll: null, resize: null }, timeAttr: { scrollEnd: null, resizeEnd: null }, scrollEndTime: 60, resizeEndTime: (function () { var t = false; if (l.isDevice && !l.isIOS) t = true; return t ? 500 : 280; })(), }; this.opts = l.def(e, i || {}); if (!(this.obj = c(t)).length) return; this.init(); } e.prototype = { init: function () { this.setElements(); this.buildSwitch(); this.resizeFunc(); this.bindEvents(true); }, setElements: function () { this.navSection = this.obj.find(this.opts.navSection); this.navList = this.navSection.find(this.opts.navList); }, buildSwitch: function () { var o = this; var a = this.opts.stateAttr; var t = this.opts.classAttr; l.def(this, { switch: { off: function () { if (o.navSection.hasClass(t.active)) o.navSection.removeClass(t.active); }, on: function () { if (!o.navSection.hasClass(t.active)) o.navSection.addClass(t.active); }, build: function () { var t = c(r).scrollTop(); var i = l.winSize().w; var e = o.obj; var s = e.offset().top + e.outerHeight(true) - i * 0.8; var n = false; if (i > u.MO.WIDTH) { s = Math.max(!l.isIOS ? 50 : 100, s); n = t >= s; } else { s = !l.isIOS ? 50 : 100; n = t >= s; if (l.isIEorEdge >= 0) n = t >= 150; } if (!a.focus) if (n) this.off(); else this.on(); }, }, }); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { this.navList.on( this.changeEvents("focusin"), this.navFocus.bind(this) ); c(r).on( this.changeEvents("scroll"), this.scrollFunc.bind(this) ); c(r).on( this.changeEvents("resize orientationchange"), this.resizeFunc.bind(this) ); } else { this.navList.off(this.changeEvents("focusin")); c(r).off(this.changeEvents("scroll")); c(r).off(this.changeEvents("resize orientationchange")); } }, navOutSideBindEvents: function (t) { if (t) this.navList.on( this.changeEvents( "focusoutside mousedownoutside clickoutside" ), this.navFocusOut.bind(this) ); else this.navList.off( this.changeEvents( "focusoutside mousedownoutside clickoutside" ) ); }, navFocus: function () { if (!this.opts.stateAttr.focus) { this.opts.stateAttr.focus = true; this.navOutSideBindEvents(true); this.switch.on(); } }, navFocusOut: function () { this.navOutSideBindEvents(false); this.opts.stateAttr.focus = false; this.switch.build(); }, scrollFunc: function () { var t = this.opts.scrollEndTime; this.winTop = c(r).scrollTop(); if (this.opts.stateAttr.scroll == null) { this.opts.stateAttr.scroll = this.winTop; this.scrollAnimateFunc(); } r.clearTimeout(this.opts.timeAttr.scrollEnd); this.opts.timeAttr.scrollEnd = r.setTimeout( this.scrollEndFunc.bind(this), t ); }, scrollEndFunc: function () { this.opts.stateAttr.scroll = null; this.scrollAct(); l.cancelAFrame.call(r, this.opts.requestAttr.scroll); }, scrollAnimateFunc: function () { this.scrollAct(); this.opts.requestAttr.scroll = l.requestAFrame.call( r, this.scrollAnimateFunc.bind(this) ); }, scrollAct: function () { if (!this.opts.stateAttr.destroy) this.switch.build(); }, resizeFunc: function (t) { var i = this.opts.resizeEndTime; this.winWidth = l.winSize().w; if (this.opts.stateAttr.resize == null) { this.opts.stateAttr.resize = this.winWidth; this.resizeAnimateFunc(); } r.clearTimeout(this.opts.timeAttr.resizeEnd); this.opts.timeAttr.resizeEnd = r.setTimeout( this.resizeEndFunc.bind(this), i ); }, resizeEndFunc: function () { this.opts.stateAttr.resize = null; this.resizeAct(); l.cancelAFrame.call(r, this.opts.requestAttr.resize); }, resizeAnimateFunc: function () { this.resizeAct(); this.opts.requestAttr.resize = l.requestAFrame.call( r, this.resizeAnimateFunc.bind(this) ); }, resizeAct: function () { if (!this.opts.stateAttr.destroy) this.scrollFunc(); }, destroy: function () { this.opts.stateAttr.destroy = true; }, }; return s; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-kv" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsKv(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.SmoothSyncing = (function () { "use strict"; var t; return (function (t) { var c = window, i = c.document, l = c.jQuery, u = c.Upbs.util, e = c.Upbs.RESPONSIVE; function s(t, i) { if (!(this instanceof s)) return new s(t, i); var e = { itemWrap: ".sc-smooth-syncing__item-wrap", txtItem: ".s-obj-txt", items: ".sc-smooth-syncing__item", stateAttr: { destroy: false }, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = u.def(e, i || {}); if (!(this.obj = l(t)).length) return; this.init(); } s.prototype = { init: function () { this.setElements(); this.buildParallax(); }, setElements: function () { this.itemWrap = this.obj.find(this.opts.itemWrap); this.items = this.itemWrap .find(this.opts.items) .not(this.opts.txtItem); }, buildParallax: function () { for (var t = 0, i = this.items.length; t < i; t++) { var e = this.items.eq(t); new n(e, { even: t % 2, isDev: t == 1 }); } }, destroy: function () { this.opts.stateAttr.destroy = true; this.earmotion.destroy(); }, }; function n(t, i) { var e = { plWrap: ".js-parallax-wrap", ctaWrap: ".sc-smooth-syncing__cta", classAttr: { active: "is-active" }, stateAttr: { hover: false, focus: false, destroy: false }, customEvent: ".Parallax" + new Date().getTime() + Math.random(), }; this.opts = u.def(e, i || {}); if (!(this.obj = l(t)).length) return; this.init(); } n.prototype = { init: function () { this.setElements(); this.buildSwitch(); this.buildMotion(); this.buildMagicTween(); this.bindEvents(true); }, setElements: function () { this.plWrap = this.obj.find(this.opts.plWrap); this.ctaWrap = this.obj.find(this.opts.ctaWrap); }, changeEvents: function (t) { var i = [], e = t.split(" "); for (var s in e) i.push(e[s] + this.opts.customEvent); return i.join(" "); }, bindEvents: function (t) { if (t) { this.ctaWrap.on( this.changeEvents("mouseenter mouseleave"), this.mouseFocus.bind(this) ); this.ctaWrap.on( this.changeEvents("focusin"), this.ctaFocus.bind(this) ); } else { this.ctaWrap.off(this.changeEvents("mouseenter mouseleave")); this.ctaWrap.off(this.changeEvents("focusin")); } }, mouseFocus: function (t) { if (t.type === "mouseenter") { this.opts.stateAttr.hover = true; this.switch.on(); } else if (t.type === "mouseleave") { this.opts.stateAttr.hover = false; if (!this.opts.stateAttr.focus) this.switch.build(); } }, ctaOutSideBindEvents: function (t) { if (t) this.ctaWrap.on( this.changeEvents( "focusoutside mousedownoutside clickoutside" ), this.ctaFocusOut.bind(this) ); else this.ctaWrap.off( this.changeEvents( "focusoutside mousedownoutside clickoutside" ) ); }, ctaFocus: function () { if (!this.opts.stateAttr.focus) { this.opts.stateAttr.focus = true; this.ctaOutSideBindEvents(true); this.switch.on(); } }, ctaFocusOut: function () { this.ctaOutSideBindEvents(false); this.opts.stateAttr.focus = false; this.switch.build(); }, buildSwitch: function () { var t = this; var a = this.opts.stateAttr; var i = this.opts.classAttr; var r = t.ctaWrap; u.def(this, { switch: { opts: { range: 0.25 }, off: function () { if (t.obj.hasClass(i.active)) t.obj.removeClass(i.active); }, on: function () { if (!t.obj.hasClass(i.active)) t.obj.addClass(i.active); }, build: function () { if (!r.length) return; var t = l(c).scrollTop(); var i = u.winSize().h; var e = r.outerHeight(true); var s = r.offset().top; var n = s - i * (1 - this.opts.range) + e / 2; var o = s - i * this.opts.range + e / 2; if (!a.focus && !a.hover) if (n < t && t < o) this.on(); else this.off(); }, }, }); }, buildMotion: function () { var o = this; u.def(this, { motion: { parallax: { instance: null, opts: { range: 0.15 }, props: { 1: { min: 0, max: 1 }, progress: 0 }, tweens: { instance: null, duration: 0.3, kill: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, build: function (t) { this.kill(); var i = o.motion.parallax; var e = u.def({}, i.props); this.instance = TweenLite.to(e, this.duration, { progress: t, onUpdate: function () { i.instance.progress(e.progress); i.props.progress = e.progress; }, }); }, init: function () { if (this.duration <= 0) this.duration = 1e-4; }, }, draw: function (i) { var e = o.obj.outerHeight(true) * this.opts.range; var t = (function () { var t = e / 2 - e * i.v1; if (o.opts.even) t = -(e / 2) + e * i.v1; return t; })(); TweenLite.set(o.plWrap, { y: t }); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.tweens.build(t); return this; }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, initLayout: function () { var t = { v1: this.props["1"].min }; this.draw(t); }, build: function () { var e = o.motion; var s = this; var t = this.props; if (this.instance == null) { this.tweens.init(); this.initLayout(); var n = { v1: t["1"].min }; var i = new TimelineMax(); i.pause(); i.to(n, 0.5, { ease: Power0.easeNone, v1: t["1"].max, onUpdate: function () { var t = e.delTweenID(n).v1; var i = { v1: t }; s.draw(i); }, }); this.instance = i; } }, }, delTweenID: function (t) { var i = u.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, destroy: function () { this.parallax.destroy(); }, build: function () { this.parallax.build(); }, }, }); this.motion.build(); }, buildMagicTween: function () { var e = this; u.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { var i = this; var t = function () { if (i.stateAttr.tweenInit) { if (e.magictween.instance == null) return; var t = e.magictween.instance.props.allProgress; e.motion.parallax.progress(t); e.switch.build(); } }; this.instance = new MagicScroll(e.plWrap, { init: false, on: { init: function () { c.setTimeout(function () { i.stateAttr.tweenInit = true; t(); }, 350); }, allUpdate: function () { t(); }, }, }); this.instance.init(); u.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.magictween.destroy(); }, }; return s; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-smooth-syncing" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new SmoothSyncing(t.obj.eq(i)); }, }), new s(); })(); }), (function (t) { t.BudsSound = (function () { "use strict"; var t; return (function (t) { var s = window, i = s.document, n = s.jQuery, a = s.Upbs.util, e = s.Upbs.RESPONSIVE; function o(t, i) { if (!(this instanceof o)) return new o(t, i); var e = { plWrap: ".js-parallax-wrap", stateAttr: { destroy: false }, customEvent: ".Component" + new Date().getTime() + Math.random(), }; this.opts = a.def(e, i || {}); if (!(this.obj = n(t)).length) return; this.init(); } o.prototype = { init: function () { this.setElements(); this.buildParallax(); this.buildMagicTween(); }, setElements: function () { this.plWraps = this.obj.find(this.opts.plWrap); }, buildParallax: function () { for (var t = 0, i = this.plWraps.length; t < i; t++) { var e = this.plWraps.eq(t); new r(e); } }, buildMagicTween: function () { var t = this; a.def(this, { magictween: { instance: null, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, build: function () { this.instance = new MagicScroll(t.obj, { init: false }); this.instance.init(); a.page.magicscroll.instance.push(this.instance); }, }, }); }, destroy: function () { this.opts.stateAttr.destroy = true; }, }; function r(t, i) { var e = { jsPicture: ".js-picture", stateAttr: { destroy: false }, }; this.opts = a.def(e, i || {}); if (!(this.obj = n(t)).length) return; this.init(); } r.prototype = { init: function () { this.setElements(); this.buildMotion(); this.buildMagicTween(); }, setElements: function () { this.jsPicture = this.obj.find(this.opts.jsPicture); }, buildMotion: function () { var o = this; a.def(this, { motion: { parallax: { instance: null, props: { 1: { min: 0, max: 1 }, progress: 0 }, tweens: { instance: null, duration: 0.3, kill: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, build: function (t) { this.kill(); var i = o.motion.parallax; var e = a.def({}, i.props); this.instance = TweenLite.to(e, this.duration, { progress: t, onUpdate: function () { i.instance.progress(e.progress); i.props.progress = e.progress; }, }); }, init: function () { if (this.duration <= 0) this.duration = 1e-4; }, }, draw: function (t) { var i = o.obj.outerHeight(true); var e = o.jsPicture.outerHeight(true); var s = e - i; TweenLite.set(o.jsPicture, { y: -(s * t.v1) }); }, pause: function () { if (this.instance == null) return this; this.instance.pause(); return this; }, progress: function (t) { if (this.instance != null) this.tweens.build(t); return this; }, destroy: function () { if (this.instance == null) return; this.instance.kill(); this.instance = null; }, initLayout: function () { var t = { v1: this.props["1"].min }; this.draw(t); }, build: function () { var e = o.motion; var s = this; var t = this.props; if (this.instance == null) { this.tweens.init(); this.initLayout(); var n = { v1: t["1"].min }; var i = new TimelineMax(); i.pause(); i.to(n, 0.5, { ease: Power0.easeNone, v1: t["1"].max, onUpdate: function () { var t = e.delTweenID(n).v1; var i = { v1: t }; s.draw(i); }, }); this.instance = i; } }, }, delTweenID: function (t) { var i = a.def({}, t); if (i.hasOwnProperty("_gsTweenID")) delete i._gsTweenID; return i; }, destroy: function () { this.parallax.destroy(); }, build: function () { this.parallax.build(); }, }, }); this.motion.build(); }, buildMagicTween: function () { var e = this; a.def(this, { magictween: { instance: null, stateAttr: { tweenInit: false }, destroy: function () { if (this.instance == null) return; this.instance.destroy(); this.instance = null; }, getSize: function () { return this.instance.set.getSize; }, build: function () { var i = this; var t = function () { if (i.stateAttr.tweenInit) { if (e.magictween.instance == null) return; var t = e.magictween.instance.props.beforeProgress; e.motion.parallax.progress(t); } }; this.instance = new MagicScroll(e.obj, { init: false, on: { init: function () { s.setTimeout(function () { i.stateAttr.tweenInit = true; t(); }, 350); }, beforeUpdate: function () { t(); }, }, }); this.instance.init(); a.page.magicscroll.instance.push(this.instance); }, }, }); this.magictween.build(); }, destroy: function () { this.opts.stateAttr.destroy = true; this.magictween.destroy(); }, }; return o; })(); })(); })(this), $(function () { !(function () { var t = window, i = t.jQuery, e = t.Upbs.util; function s(t) { (this.opts = e.def({ obj: ".sc-buds-sound" }, t || {})), (this.obj = i(this.opts.obj)).length && this.init(); } (s.prototype = { init: function () { this.callComponent(); }, callComponent: function () { for (var t = this, i = 0, e = this.obj.length; i < e; i++) new BudsSound(t.obj.eq(i)); }, }), new s(); })(); }); }); document.addEventListener("DOMContentLoaded", function () { let anchors = document.querySelectorAll(".sc-buds-ai-list__anchor"); document .querySelector("#tabListId_0") .classList.add("sc-buds-ai-list__anchor--active"); }); const toggleActiveTabPanelAi = (element) => { const anchorId_0 = document.querySelector("#tabListId_0"); const anchorId_1 = document.querySelector("#tabListId_1"); const panelId_0 = document.querySelector("#tabPanelId_0"); const panelId_1 = document.querySelector("#tabPanelId_1"); if (element.id == "tabListId_0") { anchorId_1.setAttribute("aria-selected", "false"); element.setAttribute("aria-selected", "true"); onActiveAi(element); onInActiveAi(anchorId_1); panelId_1.classList.remove("sc-buds-ai-panel--active"); panelId_1.setAttribute("aria-hidden", "true"); panelId_0.classList.add("sc-buds-ai-panel--active"); panelId_0.setAttribute("aria-hidden", "false"); } else if (element.id == "tabListId_1") { anchorId_0.setAttribute("aria-selected", "false"); element.setAttribute("aria-selected", "true"); onActiveAi(element); onInActiveAi(anchorId_0); panelId_0.classList.remove("sc-buds-ai-panel--active"); panelId_0.setAttribute("aria-hidden", "true"); panelId_1.classList.add("sc-buds-ai-panel--active"); panelId_1.setAttribute("aria-hidden", "false"); } }; const onActiveAi = (anchor) => { anchor.classList.add("sc-buds-ai-list__anchor--active"); let anchorId = anchor.getAttribute("id"); let activeImage = document.querySelector( "#" + anchorId + " .sc-buds-ai-list__image--active" ); let defaultImage = document.querySelector( "#" + anchorId + " .sc-buds-ai-list__image--default" ); activeImage.style.display = "block"; defaultImage.style.display = "none"; }; const onInActiveAi = (anchor) => { if (anchor.getAttribute("aria-selected") == "true") return; let anchorId = anchor.getAttribute("id"); let activeImage = document.querySelector( "#" + anchorId + " .sc-buds-ai-list__image--active" ); let defaultImage = document.querySelector( "#" + anchorId + " .sc-buds-ai-list__image--default" ); activeImage.style.display = "none"; defaultImage.style.display = "block"; anchor.classList.remove("sc-buds-ai-list__anchor--active"); };

Galaxy Buds2 Wireless Earbuds in Graphite | Samsung Canada (2024)
Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 6694

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.