Galaxy Z Fold7
Get up to $1,000 instant trade-in creditθ
Ultra Unfolds
Meet our most innovative design, re-engineered to be our
slimmest, lightest Fold ever. With expansive screens inside and
out, it's the Ultra experience, unfolded.
Samsung devices have the highest rating in Screen Durability
Experience your content on the biggest screen on a foldable that’s both slim and durable on Samsung Galaxy, the brand ranked #1 in Screen Durability by the American Customer Satisfaction Index (ACSI® ).
Learn more
A multi-window flex
Dylan Efron stays in control of edit with Galaxy Z Fold7.
Watch now
Upgraded to fold without fear
Armored in aluminum
Thin in form but strong and durable, Galaxy Z Fold7 is wrapped in an advanced Armor Aluminum frame and comes with IP48 water and dust resistance. , ,
Enhanced Armor FlexHinge
Meet our innovative Armor FlexHinge that now
closes thinner and is more durable than ever.
Incredibly tough from front to back
For the first time on Galaxy foldables, Corning®
Gorilla® Glass Ceramic 2 provides more resilience together with Corning®
Gorilla® Glass Victus® 2.
Compare the design of Galaxy Z Fold7
Compare with
Galaxy Z Fold6
Galaxy Z Fold5
Galaxy Z Fold4
Galaxy Z Fold3
Galaxy S25 Ultra
Galaxy S24 Ultra
Galaxy S23 Ultra
Galaxy S22 Ultra
Galaxy S22 Ultra
Galaxy
Z Fold6
Galaxy
Z Fold5
Galaxy
Z Fold4
Galaxy
Z Fold3
Galaxy
S25 Ultra
Galaxy
S24 Ultra
Galaxy
S23 Ultra
Galaxy
S22 Ultra
Galaxy Z Fold7
Folded
8.9
Move to the left of the split screen border
Move to the right of the split screen border
Sleek tech in cool colors
Mint
samsung.com only
Blue Shadow
Silver Shadow
Jetblack
Angle Preset
More Option Menu close
Front
Left
Top
Back
Right
Bottom
Mint
Samsung.com only
Blue Shadow
Silver Shadow
Jetblack
Angle Preset
More Option Menu close
Front
Left
Top
Back
Right
Bottom
Our best camera. 200MP of stunning.
Ultra clear. Ultra
detailed. Now in 200MP.
200MP, plus the
most advanced ProVisual Engine on foldables
For the first time on Galaxy Z Fold, snap shots with a powerful 200MP camera for super stunning, high-resolution photos.
Capture your favorite moments and details in a way that you never thought possible with Galaxy's powerful 200MP camera.
Push the boundaries of smartphone photography with the powerful 200MP camera boosted by our next-gen ProVisual Engine for superior performance.
Let our next-gen ProVisual Engine improve color and details for clarity. Then, edit your pics using AI Photo Assist on the big screen for incredible immersion. ,
Capture
the finer points in every scene and let our next-gen ProVisual Engine do the rest.
It will improve color and details for clarity that enhances even
skin tones and textures. Later, you can unfold to view them on the big
screen, immersing yourself in your fondest memories. ,
Capture
the finer points in every scene and let ProVisual Engine do the rest. Every
shot is elevated with more detail, clarity and precision for image
quality that you have to see to believe. Then, use the big screen to view
your pics for incredible true-to-life immersion. ,
A photo of people and scenery was taken with Galaxy Z Fold7's 200MP rear
camera. Details are clear and true to life.
Captured #withGalaxy Z
Fold7
See the difference in camera specs
Compare with
Galaxy Z Fold6
Galaxy Z Fold5
Galaxy Z Fold4
Galaxy Z Fold3
Galaxy S25 Ultra
Galaxy S24 Ultra
Galaxy S23 Ultra
Galaxy S22 Ultra
Galaxy
Z Fold6
Galaxy
Z Fold5
Galaxy
Z Fold4
Galaxy
Z Fold3
Galaxy
S25 Ultra
Galaxy
S24 Ultra
Galaxy
S23 Ultra
Galaxy
S22 Ultra
Rear Camera
Front Camera
10MP
Cover Screen
10MP
Main Screen
Bring details out of the dark
Captured #withGalaxy Z
Fold7
Capture breathtaking videos even in low light. The high-resolution sensor works together with our advanced ProVisual Engine to deliver richer contrast day or night. Noise reduction ensures your shots stay sharp in the dark so you don't have to edit later. ,
Pro-level shooting, big-screen editing
The large Main Screen of Galaxy Z Fold7 provides ample space to edit videos without missing a detail. Now you can shoot, edit and share from wherever the action is.
Jaden Smith turns Galaxy Z Fold7 into his own creative studio.
Captured #withGalaxy Z
Fold7
A wider angle that makes room for everyone
Capture vivid and well-defined images with the selfie camera's sharp sensor.
The expanded viewing angle allows you to fit more friends in the frame so no one gets left out.
Captured #withGalaxy Z
Fold7
Galaxy AI meets the big screen
Galaxy AI is designed to
push the boundaries of any other smartphone's AI capabilities. Ask for advice in real time,
enhance your photos, receive personalized updates from Now Brief and more. Expand your world
like never before.
PHOTO ASSIST
Photo editing with side-by-side previews
See the difference with side-by-side previews in Photo Assist. Keep the focus on you in busy locations with Generative Edit. Just circle and hold an object to move, erase or enlarge it and then fill backgrounds.
GEMINI LIVE
Ask Gemini about what you see
Speak freely and naturally with Gemini Live to get information in
real time. Ask Gemini what symbols mean and get washing instructions for clothes, or get
information about a restaurant you saw while walking past. Share your world through
the camera to ask for advice or ideas.
NOW BRIEF
Personalized briefings with Now Brief
See how your day will unfold with Now Brief. Tailored
insights, such as the latest weather and your Energy Score, are all available at
just a glance on the immersive Main screen.
Simple summaries, smart organization
Writing Assist popup
Writing Assist
Now you can easily organize and store
large summaries from websites with Galaxy AI. Simply drag and
drop into Notes app and save for later.
Transcript Assist popup
Transcript Assist
Transcript Assist transcribes recordings and organizes them into efficient summaries, then Galaxy AI suggests reminders based on the content of your recordings.
Your privacy, secured for the era of AI
Our Personal Data Engine gathers and processes your personal
data safely. Then it encrypts that data and saves it onto your device with Knox
Vault, making it harder for anyone else to gain access.
Take control over your Galaxy AI. You decide where data used
by AI gets processed, either on-device or in the cloud.
Knox Matrix Trust Chain technology provides security across
Galaxy connected devices so you can monitor the security of your whole ecosystem
right from your Galaxy smartphone.
One UI 8. All new for Fold.
Our best, most personalized UI was built from the ground
up for both the Main Screen and the Cover Screen. With customizable wallpaper and
interactive weather and gallery widgets , make your phone uniquely yours on One UI
8. ,
Made to be your type
The 6.5" Cover Screen on Galaxy Z Fold7 may be wider, but its
slimmed-down folded body is perfectly sized for your hand , so typing feels more
natural. Get things done comfortably and with ease. ,
Accessories that keep you in the fold
Why switch to Galaxy
Why switch to Galaxy from your
iPhone
From Android to Galaxy. Get
ready to level up your phone
Imagine where our most powerful
smartphones can take you.
Your iPhone can only take you
so far.
Your phone can only take you so
far.
Discover an entire Galaxy that works smoothly with other Android devices. Make the switch and see how life opens up with Galaxy.
It's time for new adventures, new opportunities and a new Galaxy that works
just as smoothly with other iOS, Macs and PCs. Life opens up with Galaxy, and we can't wait to
show you how.
It's
time for new adventures, new opportunities and new Galaxy that works just as
smoothly with Android OS and PCs. Life opens up with Galaxy, and we can't wait to show you
how.
Smart Switch
How easy is switching?
Smart Switch
Smart Switch
How easy is switching?
Smart Switch
Switching from your current phone is easy. Thanks
to Smart Switch, you can transfer your photos, videos, contacts and apps effortlessly and
safely. , ,
Thanks to Smart Switch, you can transfer your photos, videos, contacts and apps effortlessly and safely. , ,
Switching from your current
phone is easy. With Smart Switch, you can transfer your data such as photos, videos,
contacts and apps effortlessly and safely. , ,
Learn more
Samsung Wallet
How’s Samsung’s AI tech?
Samsung Wallet
Samsung Wallet
How’s Samsung’s AI tech?
Samsung Wallet
Simplify your life with Samsung Wallet — the easy
way to make payments, access cards, earn rewards and more.
Get Galaxy AI tools you won’t find anywhere else, like Photo Assist for editing the perfect pics with no additional apps.
Simplify your life with
Samsung Wallet — the easy way to make payments, access cards, earn rewards and more.
Learn more
Learn more
Learn more
RCS
What about text messaging?
RCS
RCS
What about text messaging?
RCS
Rich Communication Services (RCS) lets you send
high-quality media, see message receipts and react in real time for enhanced messaging
between Android and iOS.
Messaging has never been easier, now that iPhone also runs on RCS. React, see read receipts, and send hi-res content seamlessly.
Rich Communication Services
(RCS) lets you send high-quality media, see message receipts and react in real time for
enhanced messaging between Android devices.
Learn more
Want to see what’s new on Galaxy? Experience
the latest Galaxy AI and One UI in the Try Galaxy app or at trygalaxy.com.
Curious about what
Galaxy is like? From Galaxy AI to the latest One UI, try it all out on your
iPhone.
Experience a whole new
world when you try out Galaxy on your phone and see what makes it so special.
Learn more
Discover the benefits of Galaxy
Trade in and save on a new device
Trade in your old device and you can get instant
discounts on your new Galaxy Z Fold7.
Learn more
Protecting your Galaxy Life
Get powerful protection for your Galaxy device covering unlimited drops, spills, and mechanical breakdowns.
Learn more
Connected living starts with Galaxy
Connect your Galaxy Z Fold7 with Galaxy Watch8 Classic and other
Galaxy devices for a smarter living experience.
Shop Galaxy Watch8 Classic
Frequently Asked Questions
How durable is Galaxy Z Fold7?
Compared to previous models in the Galaxy Z Fold Series, the Cover Screen on Galaxy Z Fold7 has been upgraded with
Corning® Gorilla® Glass Ceramic 2, a ceramic-enhanced glass that is more durable while maintaining the clarity of
the display. This is the first Z Fold model to include this innovative glass. The back glass is made of Corning®
Gorilla® Glass Victus® 2. Galaxy Z Fold7 is IP48-rated for water and dust resistance. The frame is enhanced
to be more durable as well, using Advanced Armor Aluminum for the first time on any Galaxy device. The hinge housing
is strengthened as well, with the Armor FlexHinge keeping your folds and unfolds protected. , ,
Go to Durability
How long does the battery last on Galaxy Z
Fold7?
The battery on Galaxy Z Fold7 is 4400 mAh, and with software enhancements thanks to our
powerful Snapdragon® 8 Elite processor, the battery can last all day long, giving you
hours and hours of playback time. Our pioneering mDNIe (mobile Natural Digital Image
engine) powers our brightest displays yet for an immersive video and gaming experience
without draining your battery. , ,
Go to Performance
Does Galaxy Z Fold7 support S Pen?
Galaxy Z Fold7 does not support S Pen.
What's new in the camera system of Galaxy Z
Fold7?
The camera system on Galaxy Z Fold7 includes 5 cameras: a camera on the cover screen and
the main screen and a pro-grade triple rear camera. The most impressive upgrade is the
inclusion of the high-resolution 200MP Wide-angle camera, the same camera lens available
on Galaxy S25 Ultra. With this ultra-level 200MP camera and the ProVisual Engine built
into the advanced processor, you'll be able to capture clear, crisp images in good
lighting conditions or low light.
Unfolded, the main screen camera is now 10MP with a wider angle, allowing you to include
even more of the party in the group selfie. And the expansive, immersive 8" display lets
you see the results in clear, vibrant detail, making editing and previewing even better
than before. ,
Go to Camera
Why should I switch to Galaxy Z Fold7?
If you want Galaxy's best camera, an AI companion optimized for Foldables and the best
smartphone experience in your hand, then Galaxy Z Fold7 is the phone for you.
The 200MP Wide-angle camera offers the highest megapixel count on a foldable smartphone,
and with the addition of the ProVisual Engine, your photos and videos will be bright,
clear and sharp. The colors are true to life even if you're shooting in the dark with
Nightography.
With One UI and our Google partnership, AI assists with many aspects of your Galaxy Z
Fold7 experience, making it feel more natural, more convenient and tailored to you. It's
been optimized for the dual screen experience of Galaxy Z Fold7, and is designed to
interact with you in a way that feels helpful, not intrusive.
And with the wider, larger cover screen, you can enjoy a familiar premium smartphone
experience. The adjusted display ratio makes typing easier, and the slimmed-down design
of the phone, folded or unfolded, makes it comfortable to hold in your hand.
Galaxy Z Fold7 offers the Ultra experience in a unique foldable form. , ,
Go to Switch to Galaxy
Can I transfer my data from iOS?
Yes, you can quickly and easily transfer your iOS data to Galaxy Z Fold7 using Smart
Switch. Smart Switch is a tool that simplifies transferring data from one device
to another by allowing you to seamlessly move contacts, photos, videos, notes, calendar
events and more. You can connect your new Galaxy Z Fold7 to your old device using a
cable or wirelessly using the Smart Switch app. , ,
Learn more about Smart Switch
How is Galaxy Z Fold7's design different from
Galaxy Z Fold6?
Several innovations on Galaxy Z Fold7 set it apart from not only Galaxy Z Fold6, but any
other foldable smartphone on the market. The cover screen is now 6.5" corner to corner,
while the main screen opens up an impressive 8" with a wider ratio that provides a more
seamless multitasking experience.
When folded, Galaxy Z Fold7's cover screen features a 21:9 aspect ratio, similar to that
of bar-type premium smartphones. This improved aspect ratio allows for more natural
typing. , ,
Go to Design
What processor does Galaxy Z Fold7 have?
Galaxy Z Fold7 is powered by the most advanced Snapdragon® mobile processor. It's
customized specifically for Galaxy, enhancing the performance of everything you do on
your phone — from using AI to multitasking to taking video. It also features
improved real-time ray tracing and Vulkan optimization, creating a more immersive gaming
experience with incredibly smooth and detailed graphics. This experience is even better
on large, high-resolution screens that are Galaxy's brightest and smoothest yet, with a
max brightness of 2600 nits and a refresh rate of up to 120 Hz. ,
Go to Performance
What new AI features does Galaxy Z Fold7
have?
With Galaxy's most powerful processor built in, Galaxy Z Fold7 offers multi-modal AI that
adjusts itself to suit your life, your needs and even your conversation style — a true
AI companion.
Access Gemini Live at the tap of a button. It gives you answers in real time,
even asking questions to prompt a multi-turn conversation, ensuring that you get the
information you need.
There is also a personal assistant, Now Brief that offers personalized updates
throughout the day available via the Now Bar on the cover screen. Now Brief
intelligently aligns with your daily routine, keeping you up-to-date on calendar events,
your Energy Score, and even offering a recap of your day as you wind down for the
night. , ,
Learn more about Galaxy AI
What languages does Galaxy AI support?
As of July 11, 2025, Galaxy AI's Call Assist (e.g. Live Translate), Note Assist, Browsing Assist, Interpreter, and Transcript Assist currently support 20 languages and Writing Assist supports 39 languages as listed below. Call Assist (e.g. Live Translate), Note Assist, Browsing Assist, Interpreter and Transcript Assist supported languages: Korean, English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Polish, Hindi, Thai, Vietnamese, Arabic, Indonesian, Russian, Turkish, Dutch, Swedish and Romanian. Writing Assist supported languages: English, Portuguese, Spanish, French, Korean, German, Italian, Chinese (Simplified, Traditional), Japanese, Hindi, Polish, Thai, Vietnamese, Arabic, Russian, Indonesian, Turkish, Dutch, Swedish, Romanian, Czech, Danish, Finnish, Hungarian, Ukrainian, Hebrew, Greek, Serbian, Bulgarian, Croatian, Norwegian, Slovak, Lithuanian, Slovenian, Latvian, Estonian, Bengali and Swahili.
What colors does Galaxy Z Fold7 come in?
Galaxy Z Fold7 comes in Blue Shadow, Silver Shadow or Jetblack. We also offer a
Samsung.com exclusive color, Mint.
Go to Design
What storage options are available?
Galaxy Z Fold7 has three storage options available. For people who take photos and videos
infrequently, there's a 256 GB option. If you love to use your camera for video or
download large files or apps, the 512 GB option will give your storage plenty of
breathing room.
For power users who play graphics-heavy games, download large apps or frequently record
high-resolution videos, 1 TB of storage is recommended so you don't run out of
space.
Go to Storage
Which version of One UI comes with Galaxy Z
Fold7?
The convenient user experience on Galaxy Z Fold7 is empowered by One UI 8, the most
recent version and the version optimized for our new Foldables. A redesigned UI makes
what you do on your phone more comfortable, allowing you to maximize your productivity
and multitasking on Galaxy Z Fold7's larger cover screen and main screen. You're
able to customize it even more, too, with wallpapers you can tweak to your tastes, as
well as renewed interactive widgets to add to your lock screen, keeping you informed and
on track without needing to unlock your phone.
Learn more about One UI
What benefits do I get from purchasing Galaxy
devices?
When you buy from Samsung.com, you get access to exclusive benefits including Trade-In
and Samsung Care+. If you purchase your Galaxy Z Fold7 from us, you can receive
discounts towards your new smartphone when you trade in almost any device including
smartphones, wearables and tablets. Samsung Care+ is coverage for your new device
that extends beyond the standard warranty, offering protection against accidental damage
and providing more peace of mind to our customers. ,
Learn more about Trade-In
What comes in the box with Galaxy Z Fold7?
In an effort to help reduce digital waste, every Galaxy Z Fold7 comes with only what you
need to get started: the device, a USB-C data cable and an ejection pin for the SIM
tray.
How can I accessorize Galaxy Z Fold7?
Galaxy Z Fold7 accessories are ready to add style and protection to your new phone.
Choose from a variety of cases that enhance your phone experience with built-in grips or
stands, or pick a luxurious case that enhances the phone's sleek design.
The Anti-reflecting Film is easy to install and helps protect the cover screen from
damage to keep the display fully visible.
Go to Accessories
Galaxy Z Fold7 for business
Compared to previous Galaxy Z Fold models.
Back to Location
Actual battery life varies by network environment, features and apps used, frequency of calls
and messages, the number of times charged, and many other factors. Estimated against the average
usage profile compiled by UX Connect Research. Independently assessed by UX Connect Research
between 2025.06.12-2025.06.20 in US with pre-release versions of SM-F966 under default setting
using LTE and 5G Sub6 networks. NOT tested under 5G mmWave Network.
Back to Location
Based on Samsung internal lab test conditions with pre-release version of given model
connected to earphone via Bluetooth under default settings over LTE. Estimated against battery
capacity and measured current over battery power consumption during video playback (video file
resolution 720p, saved on device). Actual video playback time may vary by network connection,
settings, video file format, screen brightness, battery condition and many other factors.
Back to Location
Typical value tested under third-party laboratory condition. Typical value is the estimated
average value considering the deviation in battery capacity among the battery samples tested
under IEC 61960 standard. Rated capacity is 4272 mAh for Galaxy Z Fold7.
Back to Location
Measured diagonally, Galaxy Z Fold7's Cover Screen size is 6.5” in the full rectangle and 6.5”
accounting for the rounded corners; actual viewable area is smaller due to the rounded corners
and camera hole.
Back to Location
Measured diagonally, Galaxy Z Fold7’s Main Screen size is 8.0” in the full rectangle and 8.0”
accounting for the rounded corners; actual viewable area is less due to the rounded
corners.
Back to Location
Color availability may vary depending on country or carrier.
Back to Location
Exclusively available on Samsung.com.
Back to Location
Advanced Armor Aluminum frame does not include volume and side keys, SIM tray or camera lens
barrel.
Back to Location
Corning® Gorilla® Glass Ceramic 2 is applied to the front of the device and Corning® Gorilla®
Glass Victus® 2 is applied to the rear.
Back to Location
Weight may vary by country or region.
Back to Location
Galaxy Z Fold3 and Galaxy Z Fold4's thickness measured from top to bottom of the glass at the
thinnest point.
Back to Location
Results may vary depending on shooting conditions including multiple subjects, being out of
focus or moving subjects.
Back to Location
Generative Edit feature for Photo Assist requires a network connection and Samsung Account
login. Editing with Generative Edit may result in a resized photo up to 12MP. A visible
watermark is overlaid on the image output upon saving in order to indicate that the image is
generated by AI. The accuracy and reliability of the generated output is not guaranteed.
Back to Location
Snapdragon branded products are products of Qualcomm Technologies, Inc. and/or its
subsidiaries.
Back to Location
AP performance improvements shown compared to Galaxy Z Fold6. Actual performance will depend
on user environment, conditions and pre-installed software and applications.
Back to Location
Storage options and availability may vary by carrier, country or region. Actual storage
availability may vary depending on pre-installed software.
Back to Location
Gemini is a trademark of Google LLC. Results for illustrative purposes. Gemini Live feature
requires internet connection and Google Account login. Service availability may vary by country,
language, device model. Features may differ depending on subscription and results may vary.
Compatible with certain features and certain accounts. Currently, you can use a personal Google
Account that you manage on your own, or a work or school account for which your administrator
has enabled access to Gemini. You must be 13 (or the applicable age in your country) or over to
use Gemini with a personal or school Google Account and 18 or over to use Gemini with a work
account.
Back to Location
Now Brief feature requires Samsung Account login. Service availability may vary by country,
language, device model, apps. Some features may require a network connection. Modes and Routines
need to be enabled to use Personal Data Engine for context-based Routines suggestions. User
needs to consent to access permissions such as photos, videos, audio files, and calendar events.
May not display moments depending upon exposure policy. The description of photos provided by
moments may not align with the user's intent. Events schedule notification is supported with
calendar apps that utilize Android calendar database and available if Samsung Calendar is
installed. Notifications for coupons only available for coupons added to Samsung Wallet with
expiration date. To check the Energy Score, the health data tracked from Samsung Galaxy Watch or
Samsung Galaxy Ring must be synchronized with the Samsung Health App. The result is for your
personal reference only and is not intended for medical purposes.
Back to Location
Writing Assist requires a network connection and Samsung Account login. Must meet length
requirements to activate feature. Service availability may vary by language. Accuracy of results
is not guaranteed.
Back to Location
Transcription and Summary features for Transcript Assist require a network connection and
Samsung Account login. Features for Transcript Assist only available on the pre-installed
Samsung Voice Recorder app or files recorded using the pre-installed Samsung Phone app, Samsung
Notes app or Samsung Interpreter app. Voice recording feature in the pre-installed Samsung Phone
app may not be supported in some countries. Audio files must be under 3 hours in duration to be
processed. Summarizing feature for Transcript Assist can be activated when a certain number of
characters is met. Service availability may vary by language. Accuracy of results is not
guaranteed.
Back to Location
The Personal Data Engine functions under the condition that the Personal Data Intelligence
menu is on. Analyzed data will be deleted once the Personal Data Intelligence menu is turned
off. Personal Data Engine recognizes select languages and certain accents/dialects, including
but not limited to Arabic, (Simplified) Chinese, Dutch, English, French, German, Hindi,
Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Spanish, Swedish,
Thai, Turkish, and Vietnamese. Personal Data Engine currently analyzes Samsung native
applications.
Back to Location
Some functional widgets may require a network connection and/or Samsung Account login.
Availability of functions supported within the apps may vary by country.
Back to Location
Weather Wallpaper feature requires network connection to receive the weather data. It can
reflect the weather data without network connection once the data is received by the device.
Reflection of real-time weather conditions may be delayed as service relies on local weather
information updates. Certain indoor, nighttime and low-resolution photos may not be compatible.
The accuracy and reliability of the generated output is not guaranteed.
Back to Location
Wired transfers from Android™ devices require the receiving device to have Android™ 5.0 or
later and the sending device to have Android™ 5.0 or later. Transfers can be completed without a
cable through a wireless connection. For wireless connections, the receiving device must have
Android™ 5.0 or later and the sending device must have Android™ 5.0 or later. Open Smart Switch
Mobile in “Settings” on the receiving Galaxy device or download the Smart Switch Mobile app from
the Galaxy Store. Data, content and apps available for transfer may vary by transmission
method.
Back to Location
Wired transfers from iOS require the receiving device to have Android™ 5.0 or later and the
sending device to have iOS 5 or later. Transfers can be completed without a cable through a
wireless connection or iCloud. For wireless connections, the receiving device must have Android™
5.0 or later and the sending device must have iOS 12 or later. iCloud transfers require the
receiving device to have Android™ 5.0 or later and the sending device to have iOS 5 or later.
Open Smart Switch Mobile in “Settings” on the receiving Galaxy device or download the Smart
Switch Mobile app from the Galaxy Store. For wireless transfers, download Smart Switch for iOS
from the App Store on your iPhone or iPad. Data, content and apps available for transfer may
vary by transmission method. Contacts, gallery, videos, calendars and reminders can be
transferred wirelessly from an iOS device.
Back to Location
It is recommended to use a wired connection when transferring diverse sets of data at
once.
Back to Location
Quick Share feature between Galaxy devices available with the following OS: smartphones and
tablets with Android OS version 10.0 (Q) and One UI 2.1 or above, PCs running Windows 10 or
later. Requires Samsung Account and Wi-Fi and Bluetooth connection. Quick Share to iOS and
Android devices available by sending shared link: individual files shared cannot exceed 10GB
(for a total of 10GB per day) and link will expire after two days; requires a Samsung Account
and internet connection.
Back to Location
RCS is the latest in messaging. Availability of RCS varies by region and carrier. For cross-OS
communication, all members must have RCS enabled. For Android, requires Google Messages. For
iPhone, requires iOS 18 or later. Availability of features may vary by market and device.
Encryption only available for Android to Android communications. Image quality may vary. Select
”Original quality” under the Media quality choice (HD+) when an image is attached for higher
resolution images. Read receipts and typing indicates only supported in 1:1 chats for cross-OS
communication. Reactions only available for text messages; photos and videos are not supported
for cross-OS communication.
Back to Location
To be eligible for trade-in, your qualifying device must meet all Trade-In Program eligibility
requirements. For detailed information, please refer to
https://www.samsung.com/us/trade-in/ .
Back to Location
Terms and conditions apply. Samsung Care+ coverage, service type and promotion details may
vary by country/region and deductible (service fee) may apply. To be eligible for Samsung Care+
promotion benefit, registration may be required. For detailed Samsung Care+ information, please
visit https://www.samsung.com/us/support/samsung-care-plus .
Back to Location
Galaxy devices each sold separately.
Back to Location
Availability of functions supported within the apps may vary by country. Some functional
widgets may require a network connection and/or Samsung Account login.
Back to Location
Only compatible with select Visa, Mastercard, American Express, and Discover cards from
participating banks and qualifying Samsung devices. Check with your bank/issuer to ensure that
your card is compatible; and check the Samsung Wallet FAQ for more information on device
compatibility.
Digital ID only for select corporate, government and educational institution partners. Student
ID only for select education institution partner. Mobile Driver's License only for TSA ID
purposes, only for Arizona and Iowa residents at select Arizona and Iowa airports and TSA
checkpoints; Mobile Driver's License for TSA ID only and does not replace physical license.
Visit the Samsung Wallet FAQ for more information.
Digital keys are available for select SmartThings-compatible smart door locks and automobiles.
Exact feature availability may vary by model and is subject to change.
Movie tickets only available with Atom Tickets currently. Must have the Atom Tickets app and an
Atom Tickets account.
Back to Location
IP48: Resists solid particles >1 mm; Tested for submersion in up to 5feet of fresh water for up to 30 minutes. Rinse residue / dry after wet.
Back to Location
Source: 2025 ACSI® Survey of customers rating their Cell Phone manufacturer. Samsung was rated #1 for Service Experience for Mobile devices. ACSI and its logo are registered trademarks of the American Customer Satisfaction Index. For more about the ACSI, visit www.theacsi.org
Back to Location
'));
}
}
}
}
return {
init: init,
}
})();
})();
(function () {
window.flagship.features.benefits = (function () {
const resize = window.flagship.common.resize;
let els = {};
let currentDevice = resize.checkResolution(),
prevDevice = null;
const init = function () {
els.section = document.querySelector('.features-benefits');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.matchHeight = els.section.querySelector('.js-match-height');
els.headline = els.section.querySelectorAll('.common-card-title');
};
const bindEvents = function () {
window.addEventListener('DOMContentLoaded', eventHandler.load, {
once: true
});
resize.add(eventHandler.resize);
};
const eventList = {
matchHeights: function () {
els.matchHeight.style.height = '';
els.headline.forEach(title => {
const maxHeight = Math.max(els.matchHeight.offsetHeight);
title.style.height = maxHeight + 'px';
});
}
}
const eventHandler = {
load: function () {
if (currentDevice == null || currentDevice.indexOf('mobile') > -1 ? 5 : 7) {
eventList.matchHeights();
}
},
resize: function (currRes) {
currentDevice = currRes;
if (currentDevice !== prevDevice) {
currentSlidesPerView = currentDevice.indexOf('mobile') > -1 ? 5 : 7;
prevDevice = currentDevice;
eventList.matchHeights();
}
}
};
return {
init: init,
}
})();
})();
(function () {
window.flagship = window.flagship || {};
window.flagship.features.cameraSpecs = window.flagship.cameraSpecs || {};
window.flagship.features.cameraSpecs = (function () {
const utils = window.flagship.common.utils;
const resize = window.flagship.common.resize;
let els = {},
objs = {},
prevDevice = null,
currDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.js-camera-specs');
if (!!els.section) {
setElements();
bindEvents();
if (currDevice === 'desktop' || currDevice === 'tablet') {
eventList.setVideo();
}
}
};
const setElements = function () {
els.textContainer = els.section.querySelector('.js-text-container');
els.item = els.section.querySelectorAll('.js-item');
els.angleItem = els.section.querySelector('.js-angle-item');
els.scrollVideoWrap = els.section.querySelector('.common-video');
els.scrollVideo = els.section.querySelector('video');
els.scrollController = els.section.querySelector('.common-video__control');
els.scrollVideo.startPoint = els.scrollController.getAttribute('data-start-point');
els.scrollVideo.reversePoint = els.scrollController.getAttribute('data-reverse-point');
els.scrollVideo.moStartPoint = els.scrollController.getAttribute('data-mo-start-point');
els.scrollVideo.moReversePoint = els.scrollController.getAttribute('data-mo-reverse-point');
};
const bindEvents = function () {
resize.add(eventList.resize);
}
const eventList = {
resize: function () {
currDevice = resize.checkResolution();
if (currDevice != prevDevice) {
prevDevice = currDevice;
if (currDevice === 'desktop' || currDevice === 'tablet') {
eventList.setVideo();
} else {
eventList.removeLines();
eventList.removeOtherLine();
eventList.setTextTabIndex();
}
}
},
setVideo: function () {
objs.scrollVideo = utils.videoHandler({
playType: 'scrollPlay',
startPoint: (currDevice.indexOf('mobile') > -1) ? els.scrollVideo.moStartPoint : els.scrollVideo.startPoint,
reversePoint: (currDevice.indexOf('mobile') > -1) ? els.scrollVideo.moreversePoint : els.scrollVideo.reversePoint,
wrap: els.scrollVideoWrap,
video: els.scrollVideo,
controller: els.scrollController,
resetCallback: function () {
eventList.hideTextContainer();
eventList.removeLines();
},
playCallback: function () {
setTagging.pause();
eventList.hideTextContainer();
eventList.removeLines();
},
pauseCallback: function () {
setTagging.play();
},
endCallback: function () {
if (els.scrollVideo.classList.contains('is-video-load-complete')) {
eventList.showTextContainer();
setTimeout(function () {
eventList.expandAngleLine();
}, 100);
}
}
})
},
showTextContainer: function () {
els.textContainer.classList.add('is-visible');
els.textContainer.removeAttribute('tabindex');
},
hideTextContainer: function () {
els.textContainer.classList.remove('is-visible');
els.textContainer.setAttribute('tabindex', '-1');
},
expandAngleLine: function () {
const angleTextWrap = els.angleItem.querySelector('.js-angle-text-wrap');
els.angleItem.classList.add('is-active');
angleTextWrap.classList.add('is-active');
setTimeout(function () {
eventList.expandOtherLine();
}, 300)
},
removeLines: function () {
const angleTextWrap = els.angleItem.querySelector('.js-angle-text-wrap');
els.angleItem.classList.remove('is-active');
angleTextWrap.classList.remove('is-active');
eventList.removeOtherLine();
},
expandOtherLine: function () {
for (let i = 0; i < els.item.length; i++) {
const textLine = els.item[i];
const textWrap = textLine.querySelector('.js-text-wrap');
textLine.classList.add('is-active');
textWrap.classList.add('is-active');
}
},
removeOtherLine: function () {
for (let i = 0; i < els.item.length; i++) {
const textLine = els.item[i];
const textWrap = textLine.querySelector('.js-text-wrap');
textLine.classList.remove('is-active');
textWrap.classList.remove('is-active');
}
},
setTextTabIndex: function () {
els.textContainer.removeAttribute('tabindex');
}
};
const setTagging = {
play: function () {
if (els.scrollController.hasAttribute('an-tr')) {
let dataOmni = els.scrollController.getAttribute('an-tr').toLowerCase();
els.scrollController.setAttribute('an-tr', dataOmni.replace('pause', 'play'));
}
if (els.scrollController.hasAttribute('an-la')) {
let gaLa = els.scrollController.getAttribute('an-la').toLowerCase();
els.scrollController.setAttribute('an-la', gaLa.replace('pause', 'play'));
}
},
pause: function () {
if (els.scrollController.hasAttribute('an-tr')) {
let dataOmni = els.scrollController.getAttribute('an-tr').toLowerCase();
els.scrollController.setAttribute('an-tr', dataOmni.replace('play', 'pause'));
}
if (els.scrollController.hasAttribute('an-la')) {
let gaLa = els.scrollController.getAttribute('an-la').toLowerCase();
els.scrollController.setAttribute('an-la', gaLa.replace('play', 'pause'));
}
}
};
return {
init: init,
}
})();
})();
;
(function () {
window.flagship.features.colorsViewer = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize,
isLow = utils.isLowNetwork();
let els = {},
currDevice = resize.checkResolution() || '',
pdViewer,
isPresetOpenDown,
isLoadEnd,
viewerInitModel,
viewerInitColor;
const init = function () {
els.viewerBtn = document.querySelector('.viewer-btn');
els.section = document.querySelector('.js-colors');
els.popup = document.querySelector('.js-viewer');
// viewer
els.viewerParent = document.querySelector('.features-colors__viewer360-content');
if (!!isLow) {
if (!els.viewerBtn) return;
els.currentWrap = els.popup;
setElements();
popupEvents.set();
bindEvents();
} else {
if (!els.section) return;
els.currentWrap = els.section;
setElements();
bindEvents();
insertViewer();
}
};
const setElements = function () {
els.wrapEl = document.querySelector('#wrap');
els.contents = document.querySelector('#contents');
// viewer
els.viewerSection = els.section.querySelector('.js-colors-viewer');
// viewer controls
els.foldBtn = els.currentWrap.querySelector('.js-fold-btn');
els.resetBtn = els.currentWrap.querySelector('.js-reset-btn');
// angle preset
els.presetOpen = els.currentWrap.querySelector('.js-preset-open');
els.presetClose = els.currentWrap.querySelector('.js-preset-close');
els.presetLayer = els.currentWrap.querySelector('.js-preset-layer');
els.angleCta = els.currentWrap.querySelectorAll('.js-angle-cta');
els.highColorhcipWrap = els.currentWrap.querySelector('.features-colors__colorchip--high');
els.colorchipButtons = els.highColorhcipWrap.querySelectorAll('.js-colorchip-button');
};
const insertViewer = function () {
const PROJECT_NAME = 'galaxy-z-fold7';
const viewerAssetsPath = `/samsung/resources/global/${PROJECT_NAME}/common/viewer/`;
const viewerBackupPath = `/samsung/resources/global/${PROJECT_NAME}/common/vendor/viewer/assets/`;
const viewerInitModel = PROJECT_NAME;
const viewerInitColor = Array.from(els.colorchipButtons).find((el) => el.classList.contains('is-active')).getAttribute('data-colors') || 'blue-shadow';
const viewerOptions = {
assetsPath: viewerAssetsPath,
backupPath: viewerBackupPath,
bgcolor: 'transparent',
gestureGuide: null,
useZoom: false,
usePan: false,
x: -180,
y: 0,
minAngleX: -180,
minAngleY: -90,
maxAngleX: 180,
maxAngleY: 90,
zoom: currDevice === 'mobile' ? 72 : 65
};
const modelOptionList = [{
modelName: viewerInitModel,
autoRotation: null,
color: viewerInitColor,
screen: true,
screenMode: 'on',
statusToggle: 0,
rotation: {
x: 0,
y: 0,
z: 0
},
position: {
x: 0,
y: 0,
z: 0
},
introPose: false,
introPoseOnce: '',
introPoseHold: 5,
introPoseHoldLimit: 9999,
},];
insertViewerHTML(els.viewerParent)
.then(() => {
const viewerLoaderImageHTML = `
`;
els.section.querySelector('.v3d-loader__background-image').innerHTML = viewerLoaderImageHTML;
// Flip Fold must be different because statusToggle has the opposite value
if (!!viewerOptions.statusToggle) {
eventList.setFoldActiveClass();
} else {
eventList.setFoldInActiveClass();
}
PDVIEWER.makeViewer(null, viewerOptions, modelOptionList);
pdViewer = PDVIEWER.getViewer();
eventHandler.doubleClick();
// Viewer Loader image lazy load
imageLoader.getLazyMedia();
imageLoader.setLazyMedia();
bgLoader.getLazyMedia();
bgLoader.setLazyMedia();
els.viewerSection.querySelector('.v3d-loader-icon').style.display = 'none';
});
}
const insertViewerHTML = function (targetEl) {
return new Promise((res) => {
const target = targetEl ? targetEl : document.body;
const viewrHTML = `
`;
target.insertAdjacentHTML('beforeend', viewrHTML);
res();
});
};
const bindEvents = function () {
eventHandler.load();
eventHandler.viewerEvents();
eventHandler.click();
eventHandler.mousedown();
eventHandler.mouseup();
if (!isLow) {
eventList.setScene();
}
};
const eventHandler = {
load: function () {
window.addEventListener('DOMContentLoaded', eventList.load, {
once: true
});
},
viewerEvents: function () {
window.addEventListener('viewerLoadEnd', eventList.viewerLoadEnd);
window.addEventListener('mixerStart', eventList.mixerStart);
},
click: function () {
els.foldBtn && els.foldBtn.addEventListener('click', eventList.clickFold);
els.resetBtn && els.resetBtn.addEventListener('click', eventList.clickReset);
els.presetOpen && els.presetOpen.addEventListener('click', eventList.openPresetPopup);
for (let i = 0; i < els.angleCta.length; i++) {
els.angleCta[i].addEventListener('click', eventList.setAngle);
}
els.contents.addEventListener('click', function (e) {
if (e.target.classList.contains('js-reset-btn') || e.target.classList.contains('js-fold-btn') || e.target.classList.contains('js-preset-open') || e.target.closest('.js-preset-layer')) return;
eventList.closePresetPopup();
});
},
mousedown: function () {
els.presetOpen.addEventListener('mousedown', eventList.presetOpenDown);
els.presetOpen.addEventListener('touchstart', eventList.presetOpenDown, {
passive: true
});
},
mouseup: function () {
els.presetOpen.addEventListener('mouseup', eventList.presetOpenUp);
els.presetOpen.addEventListener('touchend', eventList.presetOpenUp);
},
doubleClick: function () {
if (!pdViewer || !pdViewer.viewer.domElement) return;
pdViewer.viewer.domElement.addEventListener('dblclick', eventList.doubleClick);
},
presetOpen: function () {
window.addEventListener('focusin', eventList.focusInPreset);
},
presetClose: function () {
window.removeEventListener('focusin', eventList.focusInPreset);
}
};
const eventList = {
load: function () {
if (!!!isLow) { }
},
viewerLoadEnd: function () {
pdViewer.hideLoader();
eventList.setViewerAltText();
accessibility.fold.ariaLabel();
accessibility.fold.tagging();
eventList.runIntroPose();
isLoadEnd = true;
els.viewerSection.classList.add('is-loaded');
},
mixerStart: function () {
if (!pdViewer.viewer.isInit || !isLoadEnd) return;
accessibility.fold.ariaLabel();
eventList.setFoldClass();
accessibility.fold.tagging();
},
setScene: function () {
els.sceneObj = SCROLLER({
trackElement: els.section,
useFixed: false
});
},
runIntroPose: function () {
if (!isLow && els.viewerParent) {
pdViewer.runIntroPoseAll();
}
},
doubleClick: function () { },
clickFold: function () {
if (!pdViewer.getStatusToggleState()) {
pdViewer.statusToggleActive();
} else {
pdViewer.statusToggleInactive();
}
},
clickReset: function () {
if (!isLoadEnd) return;
pdViewer.reset();
},
presetOpenDown: function () {
isPresetOpenDown = true;
},
presetOpenUp: function () {
isPresetOpenDown = false;
},
focusInPreset: function () {
if (isPresetOpenDown) return;
const isAngleCtaFocus = Array.from(els.angleCta).find((el) => el === document.activeElement);
if (els.presetClose !== document.activeElement && !isAngleCtaFocus) {
eventList.closePresetPopup();
}
},
openPresetPopup: function () {
if (!els.presetLayer.classList.contains('is-active')) {
els.presetOpen.classList.add('is-open');
els.presetLayer.classList.add('is-active');
els.presetOpen.setAttribute('aria-expanded', true);
els.presetClose.focus();
eventHandler.presetOpen();
} else {
eventList.closePresetPopup();
}
els.presetClose && els.presetClose.addEventListener('click', eventList.closePresetPopup);
},
closePresetPopup: function (e) {
if (els.presetLayer.classList.contains('is-active')) {
els.presetOpen.classList.remove('is-open');
els.presetLayer.classList.remove('is-active');
els.presetOpen.setAttribute('aria-expanded', false);
if (e && e.target.classList.contains('js-preset-close')) {
els.presetOpen.focus();
}
eventHandler.presetClose();
}
},
setFoldClass: function () {
if (!isLoadEnd) return;
if (!pdViewer.getStatusToggleState()) {
this.setFoldInActiveClass();
} else {
this.setFoldActiveClass();
}
},
setFoldInActiveClass: function () {
if (els.foldBtn.classList.contains('is-fold')) els.foldBtn.classList.remove('is-fold');
els.foldBtn.classList.add('is-unfolded');
},
setFoldActiveClass: function () {
if (els.foldBtn.classList.contains('is-unfolded')) els.foldBtn.classList.remove('is-unfolded');
els.foldBtn.classList.add('is-fold');
},
setAngle: function () {
if (!isLoadEnd) return;
let target = this,
targetAngle = target.getAttribute('data-js-angle');
pdViewer.setModelDirection(targetAngle);
accessibility.selected(target);
},
setViewerAltText: function () {
let altText = '';
if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) {
altText = LOCAL_VARI.viewer.altText;
}
pdViewer.setCanvasAltText(altText);
}
};
const accessibility = {
fold: {
ariaLabel: function () {
if (!pdViewer.getStatusToggleState()) {
els.foldBtn.setAttribute('aria-label', `${els.foldBtn.getAttribute('data-unfolded')}`);
} else {
els.foldBtn.setAttribute('aria-label', `${els.foldBtn.getAttribute('data-folded')}`);
}
},
tagging: function () {
let dataOmni = els.foldBtn.getAttribute('an-tr'),
gaLa = els.foldBtn.getAttribute('an-la');
if (!pdViewer.getStatusToggleState()) {
if (dataOmni.indexOf('unfolded') === -1) {
els.foldBtn.setAttribute('an-tr', dataOmni.replace('folded', 'unfolded'));
els.foldBtn.setAttribute('an-la', gaLa.replace('folded', 'unfolded'));
}
} else {
els.foldBtn.setAttribute('an-tr', dataOmni.replace('unfolded', 'folded'));
els.foldBtn.setAttribute('an-la', gaLa.replace('unfolded', 'folded'));
}
},
},
selected: function (target) {
for (let i = 0; i < els.angleCta.length; i++) {
els.angleCta[i].removeAttribute('title');
if (els.angleCta[i].classList.contains('is-selected')) {
els.angleCta[i].classList.remove('is-selected');
}
}
if (!target.classList.contains('is-selected')) {
target.classList.add('is-selected');
}
if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) {
target.setAttribute('title', LOCAL_VARI.selected);
} else {
target.setAttribute('title', 'Selected');
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship.features.colors = (function () {
const init = function () {
let colorchips = document.querySelectorAll('.js-colorchip');
for (let i = 0; i < colorchips.length; i++) {
colorchips[i].type = colorchips[i].parentElement.classList.contains('js-popup-colorchip') ? 'popup' : 'colors';
colorchips[i].isStatic = colorchips[i].parentElement.getAttribute('data-static');
flagship.features.colorchip(colorchips[i]);
}
}
return {
init: init
}
})();
window.flagship.features.colorchip = function (colorchipWrap) {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {},
activeClass = 'is-active',
middleClass = 'is-middle',
endClass = 'is-end',
currentDevice = resize.checkResolution(),
prevDevice = null,
currentSlidesPerView = currentDevice.indexOf('mobile') > -1 ? 5 : 7,
isLoadEnd = false;
const init = function () {
els.section = document.querySelector('.js-colors');
setElements();
setProperty();
bindEvents();
};
const setElements = function () {
// panel
els.panelWrap = els.section.querySelector('.js-panel-wrap');
els.panelItems = els.panelWrap.querySelectorAll('.js-panel-item');
// colorchip
els.swiperContainer = colorchipWrap.querySelector('.js-colorchip-container');
els.colorchipButtons = colorchipWrap.querySelectorAll('.js-colorchip-button');
els.swiperArrowWrap = colorchipWrap.querySelector('.js-arrow-wrap');
els.swiperNextArrow = colorchipWrap.querySelector('.js-colorchip-next');
els.swiperPrevArrow = colorchipWrap.querySelector('.js-colorchip-prev');
els.colorchipNames = colorchipWrap.querySelectorAll('.js-colorchip-name');
// viewer
els.viewerSection = els.section.querySelector('.js-colors-viewer');
els.viewerWrap = els.viewerSection.querySelector('.features-colors__viewer360-content');
};
const setProperty = function () {
for (let i = 0; i < els.colorchipButtons.length; i++) {
els.colorchipButtons[i].index = i;
}
};
const bindEvents = function () {
eventList.checkColorchipSwiper();
let defaultColorIdx;
if (utils.isLowNetwork()) {
defaultColorIdx = Array.from(els.panelItems).findIndex((el) => el.classList.contains(activeClass)) || 0;
} else {
defaultColorIdx = Array.from(els.colorchipButtons).findIndex((el) => el.classList.contains(activeClass)) || 0;
}
eventList.setColors(defaultColorIdx);
eventHandler.click();
eventHandler.keydown();
resize.add(eventList.resize);
eventHandler.scroll();
eventHandler.viewerEvents();
};
const eventHandler = {
click: function () {
for (let i = 0; i < els.colorchipButtons.length; i++) {
els.colorchipButtons[i].addEventListener('click', eventList.clickColorchip);
}
els.swiperNextArrow.addEventListener('click', accessibility.clickArrow);
els.swiperPrevArrow.addEventListener('click', accessibility.clickArrow);
},
keydown: function () {
els.swiperNextArrow.addEventListener('keydown', accessibility.clickArrow);
els.swiperPrevArrow.addEventListener('keydown', accessibility.clickArrow);
},
scroll: function () {
window.addEventListener('scroll', eventList.scroll);
},
viewerEvents: function () {
window.addEventListener('viewerLoadEnd', eventList.viewerLoadEnd);
}
};
const eventList = {
scroll: function () {
let winOffsetBottom = window.pageYOffset + window.innerHeight,
kv = document.querySelector('.features-kv'),
kvHeight = kv.getBoundingClientRect().height + utils.getNavHeight();
if (winOffsetBottom >= kvHeight) {
// bg load
colorchipWrap.bgImgs = colorchipWrap.querySelectorAll('.js-bg-img');
if (!!colorchipWrap.bgImgs) bgLoader.setResponsiveMedia(colorchipWrap.bgImgs);
window.removeEventListener('scroll', eventList.scroll);
}
},
checkColorchipSwiper: function () {
let colorchipSwiperLength = currentDevice.indexOf('mobile') > -1 ? 6 : 8;
if (els.colorchipButtons.length >= colorchipSwiperLength) {
if (els.swiperArrowWrap.style.display == 'none') {
els.swiperArrowWrap.style.display = '';
}
swiperEvents.set();
} else {
if (els.swiperArrowWrap.style.display != 'none') {
els.swiperArrowWrap.style.display = 'none';
}
if (els.colorchipSwiper != null) {
swiperEvents.destroy();
}
}
},
setColors: function (activeIndex) {
eventList.setColorchip(activeIndex);
eventList.setPanel(activeIndex);
eventList.setColorName(activeIndex);
// viewer
if (PDVIEWER.getViewer()) {
eventList.setViewerColor(activeIndex)
}
},
resize: function (currRes) {
currentDevice = currRes;
if (currentDevice !== prevDevice) {
currentSlidesPerView = currentDevice.indexOf('mobile') > -1 ? 5 : 7;
prevDevice = currentDevice;
eventList.checkColorchipSwiper();
}
},
clickColorchip: async function () {
if (!isLoadEnd && !utils.isLowNetwork()) return;
if (!utils.isLowNetwork() && PDVIEWER.getViewer()) {
if (PDVIEWER.getViewer().viewer.isChanging) return;
if (PDVIEWER.getViewer().viewer.viewerModel.isMixerRun) return;
}
const targetColor = this;
eventList.setColors(targetColor.index);
},
setViewerColor: async function (activeIndex) {
const modelName = els.viewerSection.getAttribute('data-product-name');
const colorName = els.colorchipButtons[activeIndex].getAttribute('data-colors');
await PDVIEWER.getViewer().changeColor(modelName, colorName);
},
setColorchip: function (activeIndex) {
let targetcolorchipButton = els.colorchipButtons[activeIndex];
for (let i = 0; i < els.colorchipButtons.length; i++) {
els.colorchipButtons[i].classList.remove(activeClass);
els.colorchipButtons[i].removeAttribute('title');
}
if (!targetcolorchipButton.classList.contains(activeClass)) {
targetcolorchipButton.classList.add(activeClass);
accessibility.selected(targetcolorchipButton);
}
},
setPanel: function (activeIndex) {
if (!colorchipWrap.isStatic) return;
for (let i = 0; i < els.panelItems.length; i++) {
if (els.panelItems[i].classList.contains(activeClass)) {
els.panelItems[i].classList.remove(activeClass);
els.panelItems[i].setAttribute('aria-hidden', true);
}
}
if (!els.panelItems[activeIndex].classList.contains(activeClass)) {
els.panelItems[activeIndex].classList.add(activeClass);
els.panelItems[activeIndex].setAttribute('aria-hidden', false);
}
},
setColorName: function (activeIndex) {
for (let i = 0; i < els.colorchipNames.length; i++) {
if (i !== activeIndex) {
utils.onAccessibility(els.colorchipNames[i]);
}
if (els.colorchipNames[i].classList.contains(activeClass)) {
els.colorchipNames[i].classList.remove(activeClass);
}
}
if (!els.colorchipNames[activeIndex].classList.contains(activeClass)) {
els.colorchipNames[activeIndex].classList.add(activeClass);
utils.offAccessibility(els.colorchipNames[activeIndex]);
}
},
viewerLoadEnd: function () {
isLoadEnd = true;
}
};
const swiperEvents = {
set: function () {
if (els.colorchipSwiper == null) {
els.colorchipSwiper = new Swiper(els.swiperContainer, {
init: false,
navigation: {
nextEl: els.swiperNextArrow,
prevEl: els.swiperPrevArrow,
},
slidesPerView: currentSlidesPerView,
speed: 300,
});
els.colorchipSwiper.on('init', swiperEvents.init);
els.colorchipSwiper.on('slideChange', swiperEvents.slideChange);
els.colorchipSwiper.init();
}
},
init: function () {
let notification = this.el.querySelector('.swiper-notification');
if (!!notification) this.el.removeChild(notification);
els.swiperPrevArrow.removeAttribute('aria-label');
els.swiperPrevArrow.removeAttribute('role');
els.swiperNextArrow.removeAttribute('aria-label');
els.swiperNextArrow.removeAttribute('role');
accessibility.colorchip(els.colorchipSwiper);
accessibility.colorchipArrow(els.colorchipSwiper);
},
slideChange: function () {
accessibility.colorchip(els.colorchipSwiper);
accessibility.colorchipArrow(els.colorchipSwiper);
},
destroy: function () {
els.colorchipSwiper.destroy(true);
els.colorchipSwiper = null;
},
};
const accessibility = {
clickArrow: function (e) {
let arrowTimeout = null,
arrowStyleTimeout = null;
if ((e.type == 'keydown' && e.keyCode == 13) || e.type == 'click') {
e.preventDefault();
if (els.colorchipSwiper.isBeginning && !els.colorchipSwiper.isEnd) {
els.swiperPrevArrow.style.setProperty('display', 'block');
els.swiperContainer.parentElement.classList.remove(middleClass);
els.swiperContainer.parentElement.classList.remove(endClass);
clearTimeout(arrowTimeout);
arrowTimeout = setTimeout(function () {
els.swiperNextArrow.focus();
}, 300);
clearTimeout(arrowStyleTimeout);
arrowStyleTimeout = setTimeout(function () {
els.swiperPrevArrow.style.display = '';
}, 400);
} else if (!els.colorchipSwiper.isBeginning && els.colorchipSwiper.isEnd) {
els.swiperNextArrow.style.setProperty('display', 'block');
els.swiperContainer.parentElement.classList.remove(middleClass);
els.swiperContainer.parentElement.classList.add(endClass);
clearTimeout(arrowTimeout);
arrowTimeout = setTimeout(function () {
els.swiperPrevArrow.focus();
}, 300);
clearTimeout(arrowStyleTimeout);
arrowStyleTimeout = setTimeout(function () {
els.swiperNextArrow.style.display = '';
}, 400);
}
if (!els.colorchipSwiper.isBeginning && !els.colorchipSwiper.isEnd) {
els.swiperContainer.parentElement.classList.remove(endClass);
els.swiperContainer.parentElement.classList.add(middleClass);
}
}
},
colorchip: function (swiperObj) {
let isNotActivedColorchips = null;
for (let i = 0; i < swiperObj.slides.length; i++) {
if (currentDevice.indexOf('mobile') > -1) {
isNotActivedColorchips = (i != swiperObj.activeIndex) && (i > swiperObj.activeIndex + 4) || (swiperObj.activeIndex > i);
} else {
isNotActivedColorchips = (i != swiperObj.activeIndex) && (i > swiperObj.activeIndex + 6) || (swiperObj.activeIndex > i);
}
if (isNotActivedColorchips) {
utils.onAccessibility(swiperObj.slides[i]);
setTimeout(function () {
utils.onAccessibility(swiperObj.slides[i]);
}, 300);
} else {
utils.offAccessibility(swiperObj.slides[i]);
setTimeout(function () {
utils.offAccessibility(swiperObj.slides[i]);
}, 300);
}
}
},
colorchipArrow: function (swiperObj) {
if (swiperObj.isBeginning && !swiperObj.isEnd) {
utils.onAccessibility(els.swiperPrevArrow);
utils.offAccessibility(els.swiperNextArrow);
} else if (!swiperObj.isBeginning && !swiperObj.isEnd) {
utils.offAccessibility(els.swiperPrevArrow);
utils.offAccessibility(els.swiperNextArrow);
} else {
utils.onAccessibility(els.swiperNextArrow);
utils.offAccessibility(els.swiperPrevArrow);
}
},
selected: function (target) {
if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) {
target.setAttribute('title', LOCAL_VARI.selected);
} else {
target.setAttribute('title', 'Selected');
}
}
};
return init(colorchipWrap);
};
})();
(function () {
window.flagship.features.compares = (function () {
const init = function () {
const compares = document.querySelectorAll('.js-compare');
for (let i = 0; i < compares.length; i++) {
compares[i].type = compares[i].getAttribute('data-compare-type') || null;
flagship.features.compare(compares[i]);
}
}
return {
init: init
}
})();
window.flagship.features.compare = function (compareWrap) {
const resize = window.flagship.common.resize,
compareOption = window.flagship.features.compareOption;
let els = {},
prevDevice = null,
currDevice = resize.checkResolution(),
oldValue = null,
isMousedown = false,
agent = navigator.userAgent.toLowerCase(),
maxOs = agent.indexOf('mac os') > -1,
touchDevice = ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch));
const compareData = {
"SM-F956": {
modelName: 'galaxy-z-fold6',
modelText: 'Galaxy Z Fold6',
weight: {
A: '-24',
B: '-24',
},
thickness: '12.1',
foldedValue: '-3.2',
mp: '50',
hrs: '+1'
},
'SM-F946': {
modelName: 'galaxy-z-fold5',
modelText: 'Galaxy Z Fold5',
weight: {
A: '-38',
B: '-38',
},
thickness: '13.4',
foldedValue: '-4.5',
mp: '50',
hrs: '+3'
},
'SM-F936': {
modelName: 'galaxy-z-fold4',
modelText: 'Galaxy Z Fold4',
weight: {
A: '-48',
B: '-48',
},
thickness: '14.2',
foldedValue: '-5.3',
mp: '50',
hrs: '+4'
},
'SM-F926': {
modelName: 'galaxy-z-fold3',
modelText: 'Galaxy Z Fold3',
weight: {
A: '-56',
B: '-56',
},
thickness: '14.4',
foldedValue: '-5.5',
mp: '12',
hrs: '+6'
},
'SM-S938': {
modelName: 'galaxy-s25-ultra',
modelText: 'Galaxy S25 Ultra',
weight: {
A: '-3',
B: '-3',
},
thickness: '8.2',
foldedValue: '+0.7',
mp: '200'
},
'SM-S928': {
modelName: 'galaxy-s24-ultra',
modelText: 'Galaxy S24 Ultra',
weight: {
A: '-18',
B: '-17',
},
thickness: '8.6',
foldedValue: '+0.3',
mp: '200'
},
'SM-S918': {
modelName: 'galaxy-s23-ultra',
modelText: 'Galaxy S23 Ultra',
weight: {
A: '-19',
B: '-18',
},
thickness: '8.9',
foldedValue: '0.0',
mp: '200'
},
'SM-S908': {
modelName: 'galaxy-s22-ultra',
modelText: 'Galaxy S22 Ultra',
weight: {
A: '-14',
B: '-13',
},
thickness: '8.9',
foldedValue: '0.0',
mp: '108'
}
}
const init = function () {
els.section = compareWrap;
if (!!els.section) {
setElements();
setProperty();
bindEvents();
eventList.setCompareVari();
eventList.getDeviceInfo().then((modelCode) => {
const isSseries = (modelCode == 'SM-S938' || modelCode == 'SM-S928' || modelCode == 'SM-S918' || modelCode == 'SM-S908') && (els.section.type == 'battery');
if (!modelCode || !Object.keys(compareData).find((sku) => sku === modelCode) || isSseries) {
modelCode = 'SM-F956';
}
eventList.selectItem(modelCode);
eventList.setDefault(modelCode);
});
}
};
const setElements = function () {
els.dropdown = els.section.querySelector('.js-dropdown');
if (els.section.type === 'design') {
els.weightValue = els.section.querySelector('.js-weight-value');
els.modelName = els.section.querySelector('.js-model-name');
els.compareThickness = els.section.querySelector('.js-thickness-value');
els.thicknessUnits = els.section.querySelectorAll('.js-thickness-unit');
els.weightUnit = els.section.querySelectorAll('.js-weight-unit');
els.foldedValue = els.section.querySelector('.js-folded-value');
els.foldedText = els.section.querySelector('.js-folded-text')
} else if (els.section.type === 'camera') {
els.wideAngleTexts = els.section.querySelectorAll('.js-copy-wideangle');
els.compareMp = els.section.querySelector('.js-mp-value');
els.cameraUnits = els.section.querySelectorAll('.js-camera-unit');
els.modelName = els.section.querySelector('.js-model-name');
} else if (els.section.type === 'battery') {
els.batteryValue = els.section.querySelector('.js-battery-value');
els.batteryUnit = els.section.querySelectorAll('.js-battery-unit');
els.modelName = els.section.querySelector('.js-model-name');
}
};
const setProperty = function () {
els.dropdown.selectBox = els.dropdown.querySelector('.js-select-box');
els.dropdown.button = els.dropdown.querySelector('.js-select-button');
els.dropdown.list = els.dropdown.querySelector('.js-select-list');
els.dropdown.listItem = els.dropdown.list.querySelectorAll('.js-select-item');
if (els.section.type === 'design') {
for (let i = 0; i < els.thicknessUnits.length; i++) {
els.thicknessUnits[i].key = 'mm';
els.thicknessUnits[i].defaultText = 'mm';
}
for (let i = 0; i < els.weightUnit.length; i++) {
els.weightUnit[i].key = 'g';
els.weightUnit[i].defaultText = 'g';
}
} else if (els.section.type === 'camera') {
for (let i = 0; i < els.wideAngleTexts.length; i++) {
els.wideAngleTexts[i].key = 'wideAngle';
els.wideAngleTexts[i].defaultText = 'Wide Camera';
}
for (let i = 0; i < els.cameraUnits.length; i++) {
els.cameraUnits[i].key = 'mp';
els.cameraUnits[i].defaultText = 'MP';
}
} else if (els.section.type === 'battery') {
for (let i = 0; i < els.batteryUnit.length; i++) {
els.batteryUnit[i].key = 'hrs';
els.batteryUnit[i].defaultText = 'hrs';
}
}
};
const bindEvents = function () {
resize.add(eventList.resize);
eventHandler.click();
eventHandler.mousedown();
eventHandler.mouseup();
eventHandler.change();
eventHandler.resize();
eventHandler.offFocusSelect()
eventHandler.innerScrollHandler();
};
const eventHandler = {
click: function () {
els.section.addEventListener('click', function (event) {
const isButton = event.target.classList.contains('js-select-button');
const isOption = event.target.classList.contains('js-select-item');
if (isButton) {
eventHandler.onDropdownClickCheck(event);
eventList.dropdowntoggle(event);
accessibility.changeAiraHidden();
} else if (isOption) {
eventList.clickCompareModel(event.target);
eventList.clickOption(event.target);
eventList.dropdownClose();
accessibility.dropdownFocus();
}
});
els.dropdown.selectBox.addEventListener("click", eventList.clickSelect)
},
change: function () {
els.dropdown.selectBox.addEventListener('change', function (event) {
eventList.clickOption(event.target);
eventList.changeSelectBox(event.target);
});
},
resize: function () {
window.addEventListener('resize', function () {
accessibility.changeAiraHidden();
});
},
mousedown: function () {
els.dropdown.button.addEventListener('mousedown', function () {
isMousedown = true;
});
},
mouseup: function () {
els.dropdown.button.addEventListener('mouseup', function () {
isMousedown = false;
});
},
onDropdownClickCheck: function () {
document.addEventListener('click', eventList.checkDropdownClick);
},
offDropdownClickCheck: function () {
document.removeEventListener('click', eventList.checkDropdownClick);
},
onFocusInDropdown: function () {
eventHandler.offFocusInDropdown();
document.addEventListener('focusin', eventList.focusInDropdown);
},
offFocusInDropdown: function () {
document.removeEventListener('focusin', eventList.focusInDropdown);
},
offFocusSelect: function () {
els.dropdown.selectBox.addEventListener('blur', eventList.offFocusSelect)
},
innerScrollHandler: function () {
if (!maxOs && !touchDevice) {
els.dropdown.list.addEventListener('mouseenter', function () {
scrollController.destroy(true);
}, { capture: true });
els.dropdown.list.addEventListener('mouseleave', function () {
scrollController.init({
speed: 120,
duration: 0.5
});
}, { capture: true });
}
}
}
const eventList = {
isDropdownSelect: function () {
return els.dropdown.selectBox.clientHeight > 0;
},
dropdowntoggle: function (event) {
let isExpanded = event.target.getAttribute('aria-expanded') === 'true';
event.target.setAttribute('aria-expanded', !isExpanded);
if (!isExpanded) {
event.target.classList.add('is-active');
eventHandler.onFocusInDropdown();
setTagging.close(event.target);
} else {
event.target.classList.remove('is-active');
setTagging.open(event.target);
}
},
checkDropdownClick: function (event) {
const isButton = event.target.classList.contains('js-select-button');
const isOption = event.target.classList.contains('js-select-item');
if (!isButton && !isOption) {
eventList.dropdownClose();
}
},
dropdownClose: function () {
els.dropdown.button.setAttribute('aria-expanded', 'false');
els.dropdown.button.classList.remove('is-active');
if (!(els.dropdown.button.getAttribute('aria-expanded') === 'true')) {
setTagging.open(els.dropdown.button);
}
eventHandler.mouseup();
eventHandler.offDropdownClickCheck();
eventHandler.offFocusInDropdown();
accessibility.changeAiraHidden();
},
focusInDropdown: function (event) {
const isInList = event.target.closest('.js-select-list');
const isButton = event.target.classList.contains('js-select-button');
if (!isInList && !(isButton && isMousedown)) {
eventList.dropdownClose();
}
},
clickOption: function (target) {
const targetParent = target.closest('.js-dropdown');
targetParent.selectBoxButton = targetParent.querySelector('.js-select-button');
if (eventList.isDropdownSelect()) {
const selectIndex = targetParent.selectBox.selectedIndex,
optionList = targetParent.selectBox.options;
Array.from(optionList).forEach(option => option.removeAttribute('selected'));
optionList[selectIndex].setAttribute('selected', true)
targetParent.button.textContent = optionList[selectIndex].textContent;
} else {
const selectItemDataValue = target.getAttribute('data-value');
Array.from(targetParent.selectBox.children).forEach((optionEl) => {
const value = optionEl.getAttribute('value');
if (value !== selectItemDataValue) {
optionEl.removeAttribute('selected');
} else {
optionEl.setAttribute('selected', 'true');
}
});
targetParent.selectBox.value = selectItemDataValue;
targetParent.button.textContent = target.textContent;
}
},
setDefault: function (modelValue) {
const {
modelText
} = compareData[modelValue];
els.dropdown.button.innerText = modelText;
accessibility.changeAiraHidden();
},
clickCompareModel: function (optionEl) {
const modelValue = optionEl.getAttribute('data-value') || '';
eventList.selectItem(modelValue);
},
changeSelectBox: function (selectEl) {
const selectedEl = Array.from(selectEl.childNodes).find((el) => el.selected);
const modelValue = selectedEl.value;
eventList.selectItem(modelValue);
},
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.responsive();
prevDevice = currDevice;
}
eventList.dropdownClose();
els.dropdown.selectBox.classList.remove("is-active");
},
responsive: function () { },
getDeviceInfo: function () {
return new Promise((resolve, reject) => {
if (navigator.userAgentData) {
navigator.userAgentData.getHighEntropyValues(['model']).then((uaData) => {
const modelCode = uaData.model ? uaData.model.slice(0, 7) : null;
resolve(modelCode);
}).catch((err) => reject(err));
} else {
const compareModelList = Object.keys(compareData);
const sku = compareModelList.find((sku) => navigator.userAgent.includes(sku));
resolve(sku);
}
});
},
setCompareVari: function () {
let targetTexts = [];
if (els.section.type === 'design') {
targetTexts = Array.from(els.thicknessUnits)
.concat(Array.from(els.weightUnit));
} else if (els.section.type === 'camera') {
targetTexts = Array.from(els.cameraUnits)
.concat(Array.from(els.wideAngleTexts));
} else if (els.section.type === 'battery') {
targetTexts = Array.from(els.batteryUnit);
}
targetTexts.forEach((el) => {
const {
key,
defaultText
} = el;
if (typeof COMPARE_VARI != 'undefined' && !!COMPARE_VARI) {
el.innerText = COMPARE_VARI[key] || defaultText;
} else {
el.innerText = defaultText;
}
});
},
setCompareValueText: function (modelValue) {
const {
thickness,
foldedValue,
weight,
modelText,
mp,
hrs
} = compareData[modelValue];
if (els.section.type === 'design') {
els.modelName.innerText = modelText;
els.compareThickness.innerText = thickness;
els.foldedValue.innerText = foldedValue;
const weightType = weight[compareOption.type] ? weight[compareOption.type] : weight['B'];
els.weightValue.innerText = weightType;
if (els.compareThickness.innerText === '' || els.compareThickness.innerText === 'undefined') {
const parentItem = els.compareThickness.closest('.features-design-compare__textbox-spec');
if (parentItem) {
parentItem.style.display = 'none';
}
} else {
const parentItem = els.compareThickness.closest('.features-design-compare__textbox-spec');
if (parentItem) {
parentItem.style.display = 'block';
}
}
} else if (els.section.type === 'camera') {
els.compareMp.innerText = mp;
els.modelName.innerText = modelText;
} else if (els.section.type === 'battery') {
els.batteryValue.innerText = hrs;
els.modelName.innerText = modelText;
}
},
selectItem: function (modelValue) {
eventList.setCompareValueText(modelValue);
accessibility.changeSelected(modelValue);
eventList.changeSup(modelValue);
eventList.deleteText(modelValue);
if (oldValue && oldValue !== modelValue) {
const textAreaList = els.section.querySelectorAll('.js-text-change');
textAreaList.forEach((textEl) => textEl.classList.remove('is-active'));
setTimeout(() => textAreaList.forEach((textEl) => textEl.classList.add('is-active')), 0);
}
oldValue = modelValue;
},
changeSup: function (modelCode) {
const supItems = els.section.querySelectorAll('.js-sup');
supItems.forEach(item => {
const supItemsValue = item.getAttribute('data-value');
if (!supItemsValue) {
item.style.display = 'none';
eventList.moveToOriginalPosition(item);
return;
}
const isMatch = supItemsValue.includes(',') ? supItemsValue.split(',').includes(modelCode) : supItemsValue === modelCode;
if (isMatch) {
item.style.display = 'inline-block';
eventList.moveElementToContainer(item);
} else {
item.style.display = 'none';
eventList.moveToOriginalPosition(item);
}
})
},
moveElementToContainer: function (element) {
const parent = element.closest('.js-value-title');
if (!parent) return;
const text = parent.querySelector('.js-value-text');
if (!text) return;
if (element.parentElement === text) return;
text.appendChild(element);
},
moveToOriginalPosition: function (element) {
const text = element.closest('.js-value-text');
if (!text) return;
const parent = text.closest('.js-value-title');
if (!parent) return;
parent.appendChild(element);
},
deleteText: function (modelCode) {
const targetOption = Array.from(els.dropdown.selectBox.options).find((optionEl) => optionEl.getAttribute('value') === modelCode);
const targetVelue = targetOption.value;
const sSeries = ['SM-S908', 'SM-S918', 'SM-S928', 'SM-S938'];
if (els.section.type === 'design') {
if (sSeries.includes(targetVelue)) {
els.foldedText.style.display = 'none';
} else {
els.foldedText.style.display = 'inline-block';
}
}
},
clickSelect: function () {
els.dropdown.selectBox.classList.toggle("is-active");
},
offFocusSelect: function () {
if (els.dropdown.selectBox.classList.contains("is-active")) {
els.dropdown.selectBox.classList.remove("is-active");
}
}
};
const accessibility = {
changeSelected: function (modelCode) {
const targetOption = Array.from(els.dropdown.selectBox.options).find((optionEl) => optionEl.getAttribute('value') === modelCode);
const targetDropdownList = els.dropdown.list;
const targetDropdownItem = targetDropdownList.querySelectorAll('.js-select-item');
const target = Array.from(targetDropdownItem).find((el) => el.getAttribute('data-value') === modelCode);
targetOption.setAttribute('selected', true);
for (let i = 0; i < els.dropdown.selectBox.options.length; i++) {
const optionValue = els.dropdown.selectBox.options[i].getAttribute('value');
if (optionValue !== modelCode) {
els.dropdown.selectBox.options[i].removeAttribute('selected');
} else {
els.dropdown.selectBox.options[i].setAttribute('selected', true)
}
}
for (let i = 0; i < targetDropdownItem.length; i++) {
if (targetDropdownItem[i] !== target) {
targetDropdownItem[i].removeAttribute('title');
} else {
accessibility.selected(target);
}
}
},
changeAiraHidden: function () {
eventList.isDropdownSelect();
if (eventList.isDropdownSelect()) {
accessibility.ariaHiddenTrue(els.dropdown.list);
accessibility.ariaHiddenTrue(els.dropdown.button);
if (els.dropdown.selectBox.hasAttribute('aria-hidden')) {
accessibility.ariaHiddenFalse(els.dropdown.selectBox);
}
} else {
const isOpened = els.dropdown.button.getAttribute('aria-expanded') === 'true';
setTimeout(() => {
// Console warning on aria-hidden on focus element
accessibility.ariaHiddenTrue(els.dropdown.selectBox);
accessibility.ariaHiddenFalse(els.dropdown.button);
if (isOpened) {
accessibility.ariaHiddenFalse(els.dropdown.list);
} else {
accessibility.ariaHiddenTrue(els.dropdown.list);
}
});
}
},
ariaHiddenTrue: function (element) {
element.setAttribute('aria-hidden', true);
element.setAttribute('tabindex', '-1');
},
ariaHiddenFalse: function (element) {
element.removeAttribute('aria-hidden');
element.removeAttribute('tabindex');
},
dropdownFocus: function () {
els.dropdown.button.focus();
},
selected: function (target) {
if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) {
target.setAttribute('title', LOCAL_VARI.selected);
} else {
target.setAttribute('title', 'Selected');
}
}
}
const setTagging = {
open: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('close', 'open'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('close', 'open'));
}
},
close: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('open', 'close'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('open', 'close'));
}
}
};
return init(compareWrap);
};
})();
(function () {
window.flagship.features.formfactor = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {},
obj = {},
prevDevice = null,
currDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.js-formfactor');
if (els.section != null) {
setElement();
bindEvents();
}
}
const setElement = function () {
els.scrollContent = els.section.querySelector('.js-scroll-content');
els.headline = els.section.querySelector('.js-scroll-headline');
els.onImage = els.section.querySelector('.js-on-image');
}
const bindEvents = function () {
resize.add(eventList.resize);
objList.setScene();
eventHandler.scroll();
}
const objList = {
setScene: function () {
obj.scene = SCROLLER({
trackElement: els.section,
useFixed: false,
resize: utils.detector.isTouchDevice ? false : true
});
}
}
const eventHandler = {
scroll: function () {
window.addEventListener('scroll', eventList.setTrackEvent);
}
}
const eventList = {
setTrackEvent: function () {
obj.scene.trackAnimation(function () {
let progress = this.progress;
eventList.setScrollEvent(progress)
});
},
setScrollEvent: function (progress) {
let imageDownCaleRange = utils.calRange({
targetValue: currDevice.indexOf('mobile') > -1 ? 15 : 13,
progress: progress,
startPoint: 10,
endPoint: currDevice.indexOf('mobile') > -1 ? 30 : 40,
}),
imageDownValue = currDevice.indexOf('mobile') > -1 ? -15 + imageDownCaleRange : -13 + imageDownCaleRange; // 0
const imageOpacity = utils.calRange({
targetValue: 1,
progress: progress,
startPoint: 27,
endPoint: 44
});
eventList.setScrollDown(progress, imageDownValue, imageOpacity);
},
setScrollDown: function (progress, contentPosition, contentOpacity) {
if (progress >= 10 && progress <= 40) {
TweenMax.to(els.scrollContent, 0.3, {
y: `${contentPosition}%`,
x: '-10%'
});
}
if (progress >= 27 & progress <= 44) {
TweenMax.to(els.onImage, 0.3, {
opacity: 0 + contentOpacity
});
}
},
resize: function () {
currDevice = resize.checkResolution();
if (currDevice != prevDevice) {
prevDevice = currDevice;
}
}
}
return {
init: init
}
})();
})();
;
(function () {
window.flagship.features.faq = (function () {
const resize = window.flagship.common.resize,
utils = window.flagship.common.utils;
let els = {},
prevDevice = null,
currDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.js-faq');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.faqList = els.section.querySelector('.js-faq-list');
};
const bindEvents = function () {
resize.add(eventList.resize);
eventList.setAccordion();
};
const eventList = {
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.responsive();
prevDevice = currDevice;
}
},
responsive: function () {
let isOpenedItems = els.faqList.querySelectorAll('.js-faq-item.is-open');
if (isOpenedItems.length > 0) {
for (let i = 0; i < isOpenedItems.length; i++) {
let isOpenedItemContent = isOpenedItems[i].querySelector('.js-faq-answer'),
clientHeight = isOpenedItemContent.children[0].clientHeight;
isOpenedItemContent.style.height = `${clientHeight}px`;
}
}
},
setAccordion: function () {
els.accordion = new window.flagship.common.accordion({
wrap: els.faqList,
classList: {
item: 'js-faq-item',
button: 'js-faq-open',
contents: 'js-faq-answer',
activeClass: 'is-open'
},
open: {
start: function (target) {
let targetInnerCta = target.querySelector('.js-featue-cta');
if (targetInnerCta) targetInnerCta.addEventListener('click', accessibility.moveFocus);
}
}
});
els.accordion.init();
},
};
const accessibility = {
moveFocus: function (e) {
if (this.getAttribute('href').indexOf('#') > -1) {
e.preventDefault();
let sectionId = this.getAttribute('href'),
section = document.querySelector(`${sectionId}`),
sectionTop = section.getBoundingClientRect().top,
movePosition = (sectionTop + window.pageYOffset) - utils.getNavHeight(),
clickable = section.querySelectorAll('a, button'),
title = section.querySelector('h2') || section.querySelector('h3');
if (!!title) {
let _focusOut = function () {
title.removeAttribute('tabindex');
title.removeEventListener('focusout', _focusOut);
};
title.addEventListener('focusout', _focusOut);
title.setAttribute('tabindex', 0);
title.focus();
} else {
clickable[0].focus();
}
window.scrollTo(0, movePosition);
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship.features.aiProactiveSuggestion = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {};
let currDevice = resize.checkResolution(),
prevDevice = resize.checkResolution(),
isButtonControl = false,
isInit = false,
anchorList = [],
isreverse = null,
agent = navigator.userAgent.toLowerCase(),
maxOs = agent.indexOf('mac os') > -1,
touchDevice = ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch));
const init = function () {
els.feature = document.querySelector('.features-galaxy-ai-experience');
els.popup = document.querySelector('.js-galaxy-ai-experience-popup');
els.under = document.querySelector('.js-galaxy-ai-experience-under');
if (!!els.feature) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.contents = document.querySelector('#contents');
els.underSwiperContainer = els.under.querySelector('.swiper-container');
els.underSwiperSlides = els.under.querySelectorAll('.js-swiper-slide');
els.expandButton = document.querySelectorAll('.js-expand-button');
els.paginationWrap = els.feature.querySelector('.common-carousel__pagination-wrap');
els.scrollBox = els.under.querySelectorAll('.features-galaxy-ai-experience__text-transform')
els.popupOpener = document.querySelectorAll('.js-focus-custom-opener');
els.popupSwiperContainer = els.popup.querySelector('.swiper-container');
els.popupSwiperSlide = els.popup.querySelectorAll('.js-swiper-slide');
els.closeCta = document.querySelectorAll('.js-popup-close-button');
els.dimmed = document.querySelector('.js-galaxy-ai-experience-popup-dimmed');
els.popupImage = els.popup.querySelectorAll('.js-popup-res-img');
els.supClicker = els.popup.querySelectorAll('a.click_sup');
};
const bindEvents = function () {
resize.add(eventList.resize);
eventList.setPopup();
setProperty.swiperSlide();
eventList.setDefault();
eventHandler.innerScrollHandler();
eventHandler.expandButtonClick();
eventHandler.supClick();
eventHandler.anchorHandler();
};
const eventHandler = {
expandButtonClick: function () {
for (let i = 0; i < els.expandButton.length; i++) {
els.expandButton[i].addEventListener('click', function (event) {
eventList.slideOpen(event.target.closest('.swiper-slide'));
});
}
},
anchorHandler: function () {
window.addEventListener('DOMContentLoaded', eventList.enterAnchor)
window.addEventListener('hashchange', eventList.enterAnchor);
},
supClick: function () {
for (let i = 0; i < els.supClicker.length; i++) {
if (!!els.supClicker) {
els.supClicker[i].addEventListener('click', eventList.onClickSup);
}
}
},
innerScrollHandler: function () {
for (let i = 0; i < els.scrollBox.length; i++) {
if (!maxOs && !touchDevice) {
els.scrollBox[i].addEventListener('mouseenter', function () {
scrollController.destroy(true);
}, {
capture: true
});
els.scrollBox[i].addEventListener('mouseleave', function () {
scrollController.init({
speed: 120,
duration: 0.5
});
}, {
capture: true
});
}
}
}
};
const setProperty = {
swiperSlide: function () {
els.underSwiperSlides.forEach((slide, index) => {
slide.slideIndex = index;
slide.expandButton = els.expandButton[index];
slide.expandButtonText = els.expandButton[index].querySelector('.js-expand-button-text');
slide.otherSlide = slide.nextElementSibling ? slide.nextElementSibling : slide.previousElementSibling;
slide.expandImage = slide.querySelectorAll('.js-expand-load-img');
slide.defaultImage = slide.querySelectorAll('.js-res-img');
})
}
};
const eventList = {
setDefault: function () {
const _setButtonText = function () {
for (let i = 0; i < els.underSwiperSlides.length; i++) {
const openText = els.underSwiperSlides[i].expandButtonText.getAttribute('data-open-text');
els.underSwiperSlides[i].expandButtonText.textContent = openText;
}
};
const _setAriaExpanded = function () {
for (let i = 0; i < els.underSwiperSlides.length; i++) {
els.underSwiperSlides[i].expandButton.setAttribute('aria-expanded', false);
}
};
const _setSwiperUpdate = function () {
els.underSwiperContainer.swiper.params.slidesPerView = 1;
els.underSwiperContainer.swiper.update();
};
const _setAnchor = function () {
for (let i = 0; i < els.underSwiperSlides.length; i++) {
const anchor = '#' + els.feature.querySelectorAll('.js-swiper-slide')[i].id;
anchorList.push(anchor);
}
};
const _setAccessibility = function () {
if (!!!(currDevice.indexOf('mobile') > -1)) {
els.underSwiperSlides.forEach((slide) => {
utils.offAccessibility(slide)
})
}
};
const _setSlideMoveEvent = function () {
els.underSwiperContainer.swiper.on('slideChange', function () {
if (currDevice.indexOf('mobile') > -1) return;
if (isButtonControl) {
isButtonControl = false;
} else {
let targetSlide = els.underSwiperContainer.swiper.slides[els.underSwiperContainer.swiper.activeIndex];
targetSlide.classList.add('is-expanded');
targetSlide.classList.remove('is-dimmed');
setButtonText.close(targetSlide.expandButtonText);
setTagging.close(els.expandButton[targetSlide.slideIndex]);
targetSlide.expandButton.setAttribute('aria-expanded', true);
targetSlide.otherSlide.classList.remove('is-expanded');
targetSlide.otherSlide.classList.add('is-dimmed');
setButtonText.open(targetSlide.otherSlide.expandButtonText);
setTagging.open(els.expandButton[targetSlide.otherSlide.slideIndex]);
targetSlide.otherSlide.expandButton.setAttribute('aria-expanded', false);
eventList.itemImageLoader(targetSlide.expandImage);
els.paginationWrap.classList.add('is-show');
targetSlide.defaultImage[0].setAttribute('aria-hidden', true);
targetSlide.expandImage[0].setAttribute('aria-hidden', false);
targetSlide.otherSlide.defaultImage[0].setAttribute('aria-hidden', false);
targetSlide.otherSlide.expandImage[0].setAttribute('aria-hidden', true);
}
});
};
const _setSlideMatchEvent = function () {
els.popupSwiperContainer.swiper.on('slideChange', function () {
if (currDevice.indexOf('mobile') > -1) {
const realIndex = els.popupSwiperContainer.swiper.activeIndex;
els.underSwiperContainer.swiper.slideTo(realIndex, 0);
}
});
els.underSwiperContainer.swiper.on('slideChange', function () {
if (currDevice.indexOf('mobile') > -1) {
const realIndex = els.underSwiperContainer.swiper.activeIndex;
els.popupSwiperContainer.swiper.slideTo(realIndex, 0);
}
});
};
_setButtonText();
_setAriaExpanded();
_setSwiperUpdate();
_setAnchor();
_setSlideMoveEvent();
_setAccessibility();
_setSlideMatchEvent();
},
slideOpen: function (targetSlide) {
if (currDevice.indexOf('mobile') > -1) return;
if (targetSlide.classList.contains('is-expanded')) {
if (targetSlide.classList.contains('swiper-slide-active')) {
setTimeout(() => {
els.underSwiperContainer.swiper.slideTo(0, 500)
}, 400);
}
isButtonControl = targetSlide.slideIndex == els.underSwiperContainer.swiper.slides.length - 1 ? true : false;
targetSlide.classList.remove('is-expanded');
targetSlide.expandButton.setAttribute('aria-expanded', false);
targetSlide.expandImage[0].setAttribute('aria-hidden', true);
targetSlide.defaultImage[0].setAttribute('aria-hidden', false);
targetSlide.otherSlide.classList.remove('is-dimmed');
setButtonText.open(targetSlide.expandButtonText);
els.paginationWrap.classList.remove('is-show');
setTagging.open(els.expandButton[targetSlide.slideIndex])
els.underSwiperSlides.forEach((slide) => {
setTimeout(() => {
utils.offAccessibility(slide);
}, 400);
});
} else {
if (!targetSlide.classList.contains('swiper-slide-active')) {
els.underSwiperContainer.swiper.slideTo(targetSlide.slideIndex, 500)
}
targetSlide.classList.add('is-expanded');
targetSlide.expandButton.setAttribute('aria-expanded', true);
targetSlide.otherSlide.classList.add('is-dimmed');
els.paginationWrap.classList.add('is-show');
setButtonText.close(targetSlide.expandButtonText);
eventList.itemImageLoader(targetSlide.expandImage);
setTagging.close(els.expandButton[targetSlide.slideIndex])
utils.onAccessibility(targetSlide.otherSlide);
targetSlide.defaultImage[0].setAttribute('aria-hidden', true);
targetSlide.expandImage[0].setAttribute('aria-hidden', false);
}
},
setPopup: function () {
if (currDevice.indexOf('mobile') > -1) {
if (!!!isInit) {
for (let i = 0; i < els.popupOpener.length; i++) {
utils.layerPopup({
layerPopup: els.popup,
layerPopupClass: '.js-galaxy-ai-experience-popup',
openerEvent: {
element: els.popupOpener[i],
},
closeCtas: els.closeCta,
dimmed: els.dimmed,
moveTarget: document.documentElement,
contents: els.contents,
show: {
start: function (target) {
els.popup.classList.add('is-init');
els.popup.removeAttribute('aria-hidden');
els.popup.removeAttribute('tabindex');
els.closeCta.forEach((cta) => {
cta.classList.add('is-bg-load-complete')
});
eventList.itemImageLoader(els.popupImage);
},
end: function (target) {
setTimeout(() => {
accessibility.popup();
}, 300)
els.popup.classList.add('is-open');
}
},
hide: {
start: function () {
els.popup.classList.remove('is-open');
},
end: function (target) {
if (utils.detector.isIosDevice) target.openerCta.style.display = '';
const activeIndex = els.popupSwiperContainer.swiper.activeIndex;
const oldIndex = activeIndex == 1 ? 0 : 1;
setTimeout(function () {
els.popup.classList.remove('is-init');
els.popup.children[0].scrollTop = 0;
utils.offAccessibility(els.underSwiperSlides[oldIndex])
utils.offAccessibility(els.underSwiperSlides[activeIndex])
utils.onAccessibility(els.underSwiperSlides[oldIndex]);
els.popupOpener[activeIndex].focus();
}, 300);
}
}
});
}
}
isInit = true;
} else {
if (els.popup.classList.contains('is-init') || els.popup.classList.contains('is-open')) {
els.popup.hide();
}
}
},
resize: function (currRes) {
currDevice = currRes;
if (prevDevice != currDevice) {
eventList.resetSlide();
eventList.setPopup();
prevDevice = currDevice;
}
},
itemImageLoader: function (target) {
for (let i = 0; i < target.length; i++) {
if (!target[i].classList.contains('is-img-load-complete')) {
imageLoader.setResponsiveMedia(target);
}
}
},
resetSlide: function () {
els.underSwiperContainer.swiper.slideTo(0);
if (currDevice.indexOf('mobile') > -1) {
for (let i = 0; i < els.underSwiperSlides.length; i++) {
els.underSwiperSlides[i].classList.remove('is-expanded');
els.underSwiperSlides[i].defaultImage[0].setAttribute('aria-hidden', false);
}
} else {
for (let i = 0; i < els.underSwiperSlides.length; i++) {
utils.offAccessibility(els.underSwiperSlides[i]);
if (els.underSwiperSlides[i].classList.contains('is-expanded')) {
els.underSwiperSlides[i].classList.remove('is-expanded');
}
if (els.underSwiperSlides[i].classList.contains('is-dimmed')) {
els.underSwiperSlides[i].classList.remove('is-dimmed');
}
setButtonText.open(els.underSwiperSlides[i].expandButtonText);
els.underSwiperSlides[i].defaultImage[0].setAttribute('aria-hidden', false);
els.underSwiperSlides[i].expandImage[0].setAttribute('aria-hidden', true);
}
}
},
onClickSup: function () {
if (currDevice.indexOf('mobile') > -1) {
els.popup.hide();
}
},
enterAnchor: function () {
for (let i = 0; i < anchorList.length; i++) {
if (location.hash === anchorList[i]) {
if (els.popup.classList.contains('is-init')) return;
if (currDevice.indexOf('mobile') > -1) {
els.popupOpener[i].click();
} else {
if (i == 0) {
els.expandButton[0].click();
}
setTimeout(() => {
els.underSwiperSlides[els.underSwiperContainer.swiper.activeIndex].expandButton.focus();
}, 300);
}
els.underSwiperContainer.swiper.slideTo(i);
}
}
},
};
const setButtonText = {
open: function (target) {
const openText = target.getAttribute('data-open-text');
target.textContent = openText;
},
close: function (target) {
const closeText = target.getAttribute('data-close-text');
target.textContent = closeText;
}
};
const setTagging = {
open: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('close', 'open'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('close', 'open'));
}
},
close: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('open', 'close'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('open', 'close'));
}
}
};
const accessibility = {
popup: function () {
for (let i = 0; i < els.popupSwiperSlide.length; i++) {
utils.onAccessibility(els.popupSwiperSlide[i]);
}
const activeIndex = els.popupSwiperContainer.swiper.activeIndex;
utils.offAccessibility(els.popupSwiperSlide[activeIndex]);
},
};
return {
init: init,
}
})();
})();
(function () {
window.flagship.features.highResolution = (function () {
const utils = window.flagship.common.utils,
resize = flagship.common.resize;
let els = {};
let currDevice = resize.checkResolution();
let prevDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.js-high-resolution');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.fixedTrack = els.section.querySelector('.js-fixed-track');
els.fixedInner = document.querySelector('.js-fixed-inner');
els.textWrap = els.section.querySelector('.js-text-wrap');
els.textInner = els.section.querySelector('.js-text-inner');
els.imgWrap = els.section.querySelector('.js-img-wrap');
els.maskBox = els.section.querySelector('.js-mask-box');
els.maskBoxWrap = els.section.querySelector('.js-mask-box-wrap');
els.cropImg = els.section.querySelector('.js-crop-img');
els.contentInner = els.section.querySelector('.js-content-inner');
els.img = els.section.querySelector('.js-img');
};
const bindEvents = function () {
resize.add(eventList.resize);
eventList.setScene()
eventList.setContentCropping();
eventHandler.scroll();
eventList.setBrokenFixed();
};
const eventHandler = {
scroll: function () {
window.addEventListener('scroll', function () {
eventList.moveMotion();
})
}
};
const eventList = {
resize: function (currRes) {
eventList.setBrokenFixed();
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.setScene();
eventList.setStyleInit(currDevice);
eventList.setContentCropping();
prevDevice = currDevice;
}
},
setScene: function () {
if ((resize.checkResolution() == 'desktop') || (resize.checkResolution() == 'tablet')) {
els.scene = SCROLLER({
trackElement: els.fixedTrack,
fixedElement: els.fixedInner,
useFixed: true,
useFixedStyle: false,
trackHeight: 2,
});
} else {
els.moScene = SCROLLER({
trackElement: els.fixedTrack,
fixedElement: els.fixedInner,
useFixed: true,
useFixedStyle: false,
trackHeight: 1.7,
});
els.sectionScene = SCROLLER({
trackElement: els.section,
useFixed: false,
});
}
},
setStyleInit: function (currDevice) {
if (currDevice.indexOf('mobile') > -1) {
els.textWrap.style.removeProperty('transform');
els.imgWrap.style.removeProperty('transform');
els.maskBox.style.removeProperty('transform');
els.maskBox.style.removeProperty('height');
els.maskBoxWrap.style.removeProperty('transform');
els.imgWrap.style.removeProperty('opacity');
els.img.style.opacity = eventList.checkTrackPosition() == 'prev' ? `0` : `1`
} else {
els.textInner.style.removeProperty('transform');
els.textInner.style.opacity = `1`;
els.img.style.removeProperty('transform');
els.img.style.opacity = `1`;
}
},
checkTrackPosition: function () {
const sectionPosition = els.section.getBoundingClientRect().top;
if (sectionPosition > 0) {
return 'prev';
} else {
return 'next'
}
},
setContentCropping: function () {
const contentHeightPx = window.innerHeight * 1 - 96;
const contentWidthPx = window.innerWidth * 0.6597222;
if (contentHeightPx > contentWidthPx) {
els.contentInner.classList.add('is-crop');
} else {
els.contentInner.classList.remove('is-crop');
}
},
moveMotion: function () {
if ((resize.checkResolution() == 'desktop') || (resize.checkResolution() == 'tablet')) {
if (els.scene != null) {
els.scene.trackAnimation(function () {
let progress = this.progress;
let textWrapScaleValue = utils.calRange({
targetValue: 21.46,
progress: progress,
startPoint: 0,
endPoint: 70
})
let imageWrapScaleValue = utils.calRange({
targetValue: 0.7,
progress: progress,
startPoint: 0,
endPoint: 70
})
let zeroBigScaleValue = utils.calRange({
targetValue: 30,
progress: progress,
startPoint: 66,
endPoint: 95
})
let imageOpacityValue = utils.calRange({
targetValue: 1,
progress: progress,
startPoint: 0,
endPoint: 30
})
if (progress >= 50) {
if (els.cropImg.classList.contains('is-active')) {
els.cropImg.classList.remove('is-active');
}
}
if (progress >= 100) {
if (!els.cropImg.classList.contains('is-active')) {
els.cropImg.classList.add('is-active');
}
}
TweenMax.to(els.maskBoxWrap, 0.65, {
y: `-50%`,
x: `-50%`,
scale: `${0.3 + imageWrapScaleValue}`
})
TweenMax.to(els.textWrap, 0.2, {
scale: `${1 + textWrapScaleValue}`
})
TweenMax.to(els.imgWrap, 0.45, {
opacity: `${imageOpacityValue}`,
y: `-50%`,
x: `-50%`,
})
if (progress >= 66) {
TweenMax.to(els.textWrap, 0.35, {
scale: `${22.46 + zeroBigScaleValue}%`
})
}
})
}
} else {
if ((els.moScene != null) && (els.sectionScene != null)) {
els.moScene.trackAnimation(function () {
let progress = this.progress;
let textWrapScaleValue2 = utils.calRange({
targetValue: 35,
progress: progress,
startPoint: 0,
endPoint: 85
})
let textWrapOpacityValue = utils.calRange({
targetValue: 1,
progress: progress,
startPoint: 95,
endPoint: 100
})
let imgScaleValue = utils.calRange({
targetValue: 0.7,
progress: progress,
startPoint: 5,
endPoint: 50
})
let imgOpacityValue = utils.calRange({
targetValue: 1,
progress: progress,
startPoint: 5,
endPoint: 15
})
TweenMax.to(els.textInner, 0.2, {
opacity: `${1 - textWrapOpacityValue}`
})
if (progress >= 0) {
TweenMax.to(els.textInner, 0.1, {
scale: `${1.2 + textWrapScaleValue2}`,
})
}
TweenMax.to(els.img, 0.2, {
opacity: `${imgOpacityValue}`,
scale: `${0.3 + imgScaleValue}`
})
})
els.sectionScene.trackAnimation(function () {
let progress = this.progress;
let textWrapScaleValue0 = utils.calRange({
targetValue: 0.5,
progress: progress,
startPoint: 15,
endPoint: 25
})
if (progress >= 15 && progress <= 25) {
TweenMax.to(els.textInner, 0.2, {
scale: `${0.7 + textWrapScaleValue0}`
})
}
if (progress <= 30) {
if (els.cropImg.classList.contains('is-active')) {
els.cropImg.classList.remove('is-active');
}
}
if (progress >= 55) {
if (!els.cropImg.classList.contains('is-active')) {
els.cropImg.classList.add('is-active');
}
}
})
}
}
},
setBrokenFixed: function () {
let isBroken = null;
let contentHeightVw = 36.66667;
let contentHeightPx = window.innerWidth / 100 * contentHeightVw;
const navHeight = resize.checkResolution().indexOf('mobile') > -1 ? window.innerWidth * 0.2666666667 : 96;
const innerHeight = window.innerHeight - navHeight;
if (!(resize.checkResolution().indexOf('mobile') > -1)) {
isBroken = contentHeightPx >= innerHeight;
} else {
isBroken = window.innerHeight < navHeight + 480 ? true : null;
}
if (isBroken) {
els.section.classList.add('is-broken-fixed');
} else {
els.section.classList.remove('is-broken-fixed');
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship = window.flagship || {};
window.flagship.features = window.flagship.features || {};
window.flagship.features.highlightsZone = (function () {
const utils = flagship.common.utils,
resize = flagship.common.resize,
Swiper = flagship.Swiper;
let els = {
scrollVideoWraps: []
},
obj = {
scrollVideo: [],
scene: [],
};
let swiperObj = {};
let brokenFixedStatus = null;
const isRtl = document.documentElement.classList.contains('rtl');
const lowNetwork = document.documentElement.classList.contains('low_network');
let prevDevice = resize.checkResolution();
let currDevice = resize.checkResolution();
let cardButtons = [];
const init = function () {
els.section = document.querySelector(".features-highlights");
if (!!els.section) {
setElements();
setProperty();
bindEvents();
}
};
const setElements = function () {
els.trackEl = els.section.querySelector('.js-scroll-track');
els.fixedEl = els.section.querySelector('.js-scroll-fixed');
els.titleEl = els.section.querySelector('.js-slide-text');
els.cardWrap = els.section.querySelector('.js-slide-wrap');
els.cardEl = els.section.querySelectorAll('.js-slide-card');
els.cardContent = els.section.querySelectorAll('.js-slide-content');
els.pagiNationEl = els.section.querySelector('.js-slide-pagination');
els.featureTagging = els.cardWrap.getAttribute('data-tagging-feature');
els.scrollVideoWraps = els.section.querySelectorAll('.js-scroll-video-mobile');
};
const setProperty = function () {
let totalCards = els.cardEl.length;
for (let i = 0; i < totalCards; i++) {
els.cardEl[i].isVideo = els.cardEl[i].classList.contains('is-video');
els.cardEl[i].isImage = els.cardEl[i].classList.contains('is-image');
if (els.cardEl[i].isVideo) {
els.cardEl[i].videoWrap = els.cardEl[i].querySelector('.js-video-wrap');
els.cardEl[i].video = els.cardEl[i].querySelector('.common-video__video');
els.cardEl[i].controller = els.cardEl[i].querySelector('.js-video-control');
els.cardEl[i].controller.video = els.cardEl[i].video;
} else if (els.cardEl[i].isImage) {
els.cardEl[i].img = els.cardEl[i].querySelector('.js-res-img');
}
}
for (let i = 0; i < els.scrollVideoWraps.length; i++) {
els.scrollVideoWraps[i].video = els.scrollVideoWraps[i].querySelector('video');
els.scrollVideoWraps[i].controller = els.scrollVideoWraps[i].querySelector('.js-video-control');
els.scrollVideoWraps[i].controller.video = els.scrollVideoWraps[i].video;
els.scrollVideoWraps[i].startPoint = !!els.scrollVideoWraps[i].getAttribute('data-start-point') ? parseInt(els.scrollVideoWraps[i].getAttribute('data-start-point')) : undefined;
els.scrollVideoWraps[i].reversePoint = !!els.scrollVideoWraps[i].getAttribute('data-reverse-point') ? parseInt(els.scrollVideoWraps[i].getAttribute('data-reverse-point')) : undefined;
els.scrollVideoWraps[i].moStartPoint = !!els.scrollVideoWraps[i].getAttribute('data-mo-start-point') ? parseInt(els.scrollVideoWraps[i].getAttribute('data-mo-start-point')) : undefined;
els.scrollVideoWraps[i].moReversePoint = !!els.scrollVideoWraps[i].getAttribute('data-mo-reverse-point') ? parseInt(els.scrollVideoWraps[i].getAttribute('data-mo-reverse-point')) : undefined;
}
}
const bindEvents = function () {
eventList.load();
resize.add(eventList.resize);
};
const clearResources = function () {
window.removeEventListener("scroll", eventList.scroll);
obj.scene.forEach((sceneObj) => {
if (sceneObj && typeof sceneObj.destroy === "function") {
sceneObj.destroy();
}
})
obj.scene = [];
}
const eventHandler = {
scroll: function () {
window.addEventListener('scroll', eventList.setMotion);
},
};
const eventList = {
load: function () {
const desktopStatus = currDevice === 'desktop' || currDevice === 'tablet';
eventList.updateBrokenStatus();
if (desktopStatus) {
if (brokenFixedStatus) {
swiperEvents.set();
} else {
accessibility.setInitialActiveCard();
eventList.setScene();
eventList.setCopyScene();
eventHandler.scroll();
eventList.setMotion();
scrollerMotion.bindFocusEvent();
}
clearResources();
} else {
eventList.setVideo();
eventList.obsSetScene();
window.addEventListener("scroll", eventList.scroll);
eventList.resizeVideo();
}
},
resize: function () {
currDevice = resize.checkResolution();
const desktopStatus = currDevice === 'desktop' || currDevice === 'tablet';
eventList.updateBrokenStatus();
if (desktopStatus) {
if (brokenFixedStatus) {
scrollerMotion.destroy();
swiperEvents.set();
} else {
swiperEvents.destroy();
eventList.setScene();
eventList.setCopyScene();
eventHandler.scroll();
eventList.setMotion();
scrollerMotion.bindFocusEvent();
}
}
if (currDevice != prevDevice) {
if (desktopStatus) {
if (brokenFixedStatus) {
scrollerMotion.destroy();
swiperEvents.set();
} else {
accessibility.setInitialActiveCard();
swiperEvents.destroy();
eventList.setScene();
eventList.setCopyScene();
eventHandler.scroll();
eventList.setMotion();
scrollerMotion.bindFocusEvent();
}
clearResources();
} else {
swiperEvents.destroy();
scrollerMotion.destroy();
eventList.setVideo();
eventList.obsSetScene();
window.addEventListener("scroll", eventList.scroll);
eventList.resizeVideo();
}
prevDevice = currDevice;
}
},
updateBrokenStatus: function () {
const usedFixedClass = els.section.classList.contains('is-used-fixed');
const isMobile = currDevice.indexOf('mobile') > -1
const contentHeightVw = 47.91667;
const contentHeightPx = 700;
let contentHeight = window.innerWidth >= 1440 ? contentHeightPx : window.innerWidth / 100 * contentHeightVw;
let navHeight = isMobile ? window.innerWidth * 0.2666666667 : 96;
const innerHeight = window.innerHeight - navHeight;
checkbrokenFixed = contentHeight >= innerHeight && !isMobile;
if (checkbrokenFixed || !usedFixedClass || lowNetwork) {
els.section.classList.add('is-broken-fixed');
brokenFixedStatus = true;
} else {
els.section.classList.remove('is-broken-fixed');
brokenFixedStatus = false;
}
},
setScene: function () {
const {
trackHeight
} = scrollerMotion.scrollSettings();
if (!els.trackEl.scene || els.trackEl.scene == null) {
els.trackEl.scene = SCROLLER({
trackElement: els.trackEl,
fixedElement: els.fixedEl,
useFixed: true,
useFixedStyle: false,
trackHeight: trackHeight,
correction: 0.5,
resize: utils.detector.isTouchDevice ? false : true
});
scrollerMotion.createPagination();
}
},
setCopyScene: function () {
if (!els.cardWrap.scene || els.cardWrap.scene == null) {
els.cardWrap.scene = SCROLLER({
trackElement: els.cardWrap,
resize: utils.detector.isTouchDevice ? false : true
});
}
},
setVideo: function () {
for (let i = 0; i < els.scrollVideoWraps.length; i++) {
obj.scrollVideo[i] = utils.videoHandler({
playType: 'scrollPlay',
startPoint: (currDevice.indexOf('mobile') > -1) ? els.scrollVideoWraps[i].moStartPoint : els.scrollVideoWraps[i].startPoint,
reversePoint: (currDevice.indexOf('mobile') > -1) ? els.scrollVideoWraps[i].moReversePoint : els.scrollVideoWraps[i].reversePoint,
wrap: els.scrollVideoWraps[i],
video: els.scrollVideoWraps[i].video,
controller: els.scrollVideoWraps[i].controller,
resetCallback: function () { },
playCallback: function () {
setTagging.pause(this.controller);
},
pauseCallback: function () {
setTagging.play(this.controller);
},
endCallback: function () { }
});
}
},
obsSetScene: function () {
for (let i = 0; i < els.scrollVideoWraps.length; i++) {
obj.scene[i] = SCROLLER({
trackElement: els.scrollVideoWraps[i].video,
useFixed: false,
resize: utils.detector.isTouchDevice ? false : true
});
}
},
scroll: function () {
for (let i = 0; i < els.scrollVideoWraps.length; i++) {
obj.scene[i].trackAnimation(function () {
obj.scrollVideo[i].scrollActive(this.progress);
});
}
},
resizeVideo: function () {
for (let i = 0; i < els.cardEl.length; i++) {
let videoWrap = els.cardEl[i].querySelector('.js-video-wrap');
let video = els.cardEl[i].querySelector('.js-video-wrap video')
if (videoWrap) {
video.removeEventListener('canplay', eventList.playVideoOnce);
videoWrap.classList.remove('is-started');
videoWrap.classList.remove('is-playing');
videoWrap.classList.remove('is-paused');
}
}
},
playVideo: function (video) {
for (let i = 0; i < els.cardEl.length; i++) {
if (els.cardEl[i].isVideo && video.readyState >= 4) {
video.play();
} else {
video.addEventListener('canplay', eventList.playVideoOnce, {
once: true
});
}
}
},
pauseVideo: function (video) {
for (let i = 0; i < els.cardEl.length; i++) {
if (els.cardEl[i].isVideo) {
if (!video.paused) {
video.pause();
}
}
}
},
playVideoOnce: function () {
this.play();
},
setMotion: function () {
if (els.trackEl.scene && els.cardWrap.scene) {
els.cardWrap.scene.trackAnimation(function () {
let progress = this.progress;
scrollerMotion.copyMotion(progress);
});
els.trackEl.scene.trackAnimation(function () {
let progress = this.progress;
scrollerMotion.cardMotion(progress);
});
}
},
};
const scrollerMotion = {
scrollSettings: function () {
const cards = els.cardContent;
const totalCards = cards.length;
const isTablet = window.innerWidth >= 535 && window.innerWidth <= 768;
const trackHeight = isTablet ? (totalCards === 5 ? 6 : totalCards === 4 ? 5.3 : 4) : (totalCards === 5 ? 4 : totalCards === 4 ? 3 : 2.8);
let cardSettings = [{
defaultMoveValue: 50,
defaultScaleValue: 1.8,
targetMoveValue: 50,
targetScaleValue: 0.8,
targetOpacityValue: 1,
cardInStart: 0,
cardInEnd: totalCards === 5 ? 13 : totalCards === 4 ? 18 : 17,
cardInOpacity: totalCards === 5 ? 1 : totalCards === 4 ? 1 : 1,
cardOutstart: totalCards === 5 ? 21 : totalCards === 4 ? 25 : 33,
cardOutend: totalCards === 5 ? 36 : totalCards === 4 ? 45 : 60,
cardEndCorrection: totalCards === 5 ? 5.1 : totalCards === 4 ? 7 : 16,
paginationCorrection: totalCards === 5 ? 1 : totalCards === 4 ? 1.3 : 1.3,
videoStartPoint: totalCards === 5 ? 9 : totalCards === 4 ? 14 : 13,
},
{
defaultMoveValue: 150,
defaultScaleValue: 1.6,
targetMoveValue: 150,
targetScaleValue: 0.6,
targetOpacityValue: 1,
cardInStart: totalCards === 5 ? 18.1 : totalCards === 4 ? 25.1 : 33,
cardInEnd: totalCards === 5 ? 33 : totalCards === 4 ? 43 : 50,
cardInOpacity: totalCards === 5 ? 19 : totalCards === 4 ? 26 : 34,
cardOutstart: totalCards === 5 ? 41 : totalCards === 4 ? 50 : 66,
cardOutend: totalCards === 5 ? 56 : totalCards === 4 ? 75 : 92.4,
cardEndCorrection: totalCards === 5 ? 5 : totalCards === 4 ? 7 : 16,
paginationCorrection: totalCards === 5 ? 1 : totalCards === 4 ? 1.1 : 1.1,
videoStartPoint: totalCards === 5 ? 29 : totalCards === 4 ? 38 : 45,
},
{
defaultMoveValue: 150,
defaultScaleValue: 1.6,
targetMoveValue: 150,
targetScaleValue: 0.6,
targetOpacityValue: 1,
cardInStart: totalCards === 5 ? 38 : totalCards === 4 ? 50 : 66,
cardInEnd: totalCards === 5 ? 53 : totalCards === 4 ? 68 : 83,
cardInOpacity: totalCards === 5 ? 39 : totalCards === 4 ? 51 : 67,
cardOutstart: totalCards === 5 ? 61 : totalCards === 4 ? 75 : 100,
cardOutend: totalCards === 5 ? 76 : totalCards === 4 ? 95 : 100,
cardEndCorrection: totalCards === 5 ? 5 : totalCards === 4 ? 7 : 16,
paginationCorrection: totalCards === 5 ? 1 : totalCards === 4 ? 1.05 : 1.1,
videoStartPoint: totalCards === 5 ? 49 : totalCards === 4 ? 63 : 78,
},
{
defaultMoveValue: 150,
defaultScaleValue: 1.6,
targetMoveValue: 150,
targetScaleValue: 0.6,
targetOpacityValue: 1,
cardInStart: totalCards === 5 ? 58 : totalCards === 4 ? 75 : 66,
cardInEnd: totalCards === 5 ? 73 : totalCards === 4 ? 93 : 83,
cardInOpacity: totalCards === 5 ? 59 : totalCards === 4 ? 76 : 67,
cardOutstart: totalCards === 5 ? 81 : totalCards === 4 ? 100 : 100,
cardOutend: totalCards === 5 ? 96 : totalCards === 4 ? 100 : 100,
cardEndCorrection: totalCards === 5 ? 5 : totalCards === 4 ? 0 : 0,
paginationCorrection: totalCards === 5 ? 1 : totalCards === 4 ? 1.1 : 1,
videoStartPoint: totalCards === 5 ? 69 : totalCards === 4 ? 88 : null,
},
{
defaultMoveValue: 150,
defaultScaleValue: 1.6,
targetMoveValue: 150,
targetScaleValue: 0.6,
targetOpacityValue: 1,
cardInStart: 78,
cardInEnd: 93,
cardInOpacity: 79,
cardOutstart: null,
cardOutend: null,
cardEndCorrection: totalCards === 5 ? 5 : totalCards === 4 ? 0 : 0,
paginationCorrection: totalCards === 5 ? 1 : totalCards === 4 ? 1 : 1,
videoStartPoint: totalCards === 5 ? 89 : totalCards === 4 ? null : null,
},
];
return {
cards,
totalCards,
isTablet,
trackHeight,
cardSettings
}
},
copyMotion: function (progress) {
const {
totalCards,
} = scrollerMotion.scrollSettings();
let introOpacity = utils.calRange({ // copyMotion : step 1 - start opacity
targetValue: 1,
progress: progress,
startPoint: 5,
endPoint: 20
});
let scaleValue = utils.calRange({ // copyMotion : step 1 - scale zoom out
targetValue: 1.3,
progress: progress,
startPoint: totalCards === 5 ? 20 : totalCards === 4 ? 25 : 25,
endPoint: totalCards === 5 ? 43 : totalCards === 4 ? 38 : 38
});
let positionValue = utils.calRange({ // copyMotion : step 2 - coordinate move
targetValue: 50,
progress: progress,
startPoint: totalCards === 5 ? 20 : totalCards === 4 ? 25 : 25,
endPoint: totalCards === 5 ? 43 : totalCards === 4 ? 38 : 38
});
if (isRtl) {
TweenMax.to(els.titleEl, .2, {
opacity: 0 + introOpacity,
x: `${50 - positionValue}%`,
right: `${50 - positionValue}%`,
scale: `${2.3 - scaleValue}`,
});
} else {
TweenMax.to(els.titleEl, .2, {
opacity: 0 + introOpacity,
x: `${-50 + positionValue}%`,
left: `${50 - positionValue}%`,
scale: `${2.3 - scaleValue}`,
});
}
},
cardMotion: function (progress) {
const {
cards,
cardSettings,
} = scrollerMotion.scrollSettings();
cardSettings.slice(0, cards.length).forEach(function (setting, index) {
let moveIn = utils.calRange({
targetValue: setting.targetMoveValue,
progress: progress,
startPoint: setting.cardInStart,
endPoint: setting.cardInEnd
});
let scaleIn = utils.calRange({ // cardMotion : step 1 - scale zoom out
targetValue: setting.targetScaleValue,
progress: progress,
startPoint: setting.cardInStart,
endPoint: setting.cardInEnd
});
let opacityIn = utils.calRange({ // cardMotion : step 1 - opacity plus (exposure)
targetValue: setting.targetOpacityValue,
progress: progress,
startPoint: setting.cardInStart,
endPoint: setting.cardInOpacity
});
let opacityOut = utils.calRange({ // cardMotion : step 2 - opacity minus (hiding)
targetValue: setting.targetOpacityValue,
progress: progress,
startPoint: setting.cardOutstart,
endPoint: setting.cardOutend
});
let scaleOut = utils.calRange({ // cardMotion : step 2 - scale zoom out
targetValue: setting.targetScaleValue,
progress: progress,
startPoint: setting.cardOutstart,
endPoint: setting.cardOutend
});
let cardMotionOptinons = {
y: (setting.defaultMoveValue - moveIn) + '%',
scale: setting.defaultScaleValue - scaleIn,
opacity: 0 + opacityIn,
ease: "power4.in"
}
let isLastCard = index === cards.length - 1;
if (!isLastCard) { // Only on the last slide
cardMotionOptinons.scale -= scaleOut;
cardMotionOptinons.opacity -= opacityOut;
}
TweenMax.to(cards[index], .2, cardMotionOptinons);
});
scrollerMotion.updateCardStatus(progress, cardSettings);
scrollerMotion.updateVideoStatus(progress, cardSettings);
scrollerMotion.showPagination(progress);
scrollerMotion.clickPagination(cardSettings);
},
updateCardStatus: function (progress, cardSettings) {
const {
totalCards,
} = scrollerMotion.scrollSettings();
let currentIndex;
for (let i = 0; i < totalCards; i++) {
let inStart = cardSettings[i].cardInStart;
let inEnd = cardSettings[i].cardInEnd + cardSettings[i].cardEndCorrection;
let isFirst = i === 0;
let isLast = i === totalCards - 1;
let checkActiveCard = progress >= inStart && progress < inEnd;
let checkFirstCard = isFirst && progress < inEnd;
let checkLastCard = isLast && progress >= inEnd;
let isIndexChange = (checkActiveCard || checkFirstCard || checkLastCard);
if (isIndexChange) {
currentIndex = i;
break;
}
};
scrollerMotion.updatePaginationStatus(currentIndex);
accessibility.card(currentIndex);
},
updateVideoStatus: function (progress, cardSettings) {
for (let i = 0; i < els.cardEl.length; i++) {
let videoStart = cardSettings[i].videoStartPoint;
let videoEnd = cardSettings[i].cardInEnd + cardSettings[i].cardEndCorrection;
let isVideoPlay = progress >= videoStart && progress < videoEnd;
if (isVideoPlay) {
if (els.cardEl[i].video) {
eventList.playVideo(els.cardEl[i].video);
}
} else {
if (els.cardEl[i].video) {
eventList.pauseVideo(els.cardEl[i].video);
}
}
};
},
createPagination: function () {
const {
totalCards,
} = scrollerMotion.scrollSettings();
let paginNtion = els.pagiNationEl;
let html = '';
for (let i = 0; i < totalCards; i++) {
const cardTagging = els.cardEl[i].getAttribute('data-card-name') || '';
const cardTitle = els.cardEl[i].getAttribute('data-card-title') || '';
const tagging = {
omniType: "microsite_contentinter",
actionType: "gallery",
contentType: "feature gallery",
taggingValue: els.featureTagging + ":index:" + `${cardTagging}`
}
const attrs = utils.setTagging(tagging);
html += ``;
};
paginNtion.innerHTML = html;
},
updatePaginationStatus: function (currentIndex) {
let pagiNationList = els.pagiNationEl.querySelectorAll('li');
pagiNationList.forEach(function (item, idx) {
const itemButton = item.querySelector('button');
const cardTitle = els.cardEl[idx].getAttribute('data-card-title') || '';
if (idx === currentIndex) {
item.classList.add('is-active');
itemButton.setAttribute('aria-label', `${LOCAL_VARI.slide}${idx + 1} ${LOCAL_VARI.selected}: ${cardTitle}`);
} else {
item.classList.remove('is-active');
itemButton.setAttribute('aria-label', `${LOCAL_VARI.slide}${idx + 1}: ${cardTitle}`);
}
});
},
showPagination: function (progress) {
if (progress < 5) {
els.pagiNationEl.parentElement.classList.remove('is-show');
} else if (progress >= 6) {
els.pagiNationEl.parentElement.classList.add('is-show');
}
},
clickPagination: function (cardSettings) {
const buttons = els.section.querySelectorAll('.features-highlights__pagination-button');
buttons.forEach(function (btn, index) {
const track = els.trackEl;
let startOffset = (track.getBoundingClientRect().top + window.scrollY) - (window.innerHeight / 2);
let realPercentValue = (Math.round((track.clientHeight - window.innerHeight) / 100));
btn.addEventListener('click', function () {
let moveSize = startOffset + realPercentValue * cardSettings[index].cardInEnd * cardSettings[index].paginationCorrection;
window.scrollTo({
top: moveSize,
behavior: 'smooth'
});
});
});
},
bindFocusEvent: function () {
const desktopStatus = currDevice === 'desktop' || currDevice === 'tablet';
if (!brokenFixedStatus && desktopStatus && cardButtons.length === 0) {
const {
totalCards,
cardSettings
} = scrollerMotion.scrollSettings();
const track = els.trackEl;
let startOffset = (track.getBoundingClientRect().top + window.scrollY) - (window.innerHeight / 2);
let realPercentValue = (Math.round((track.clientHeight - window.innerHeight) / 100));
cardButtons = [];
cardButtons.length = 0;
for (let i = 0; i < totalCards; i++) {
let focusButton = els.cardEl[i].controller;
if (!focusButton) continue;
let moveSize = startOffset + realPercentValue * cardSettings[i].cardInEnd * cardSettings[i].paginationCorrection;
let onFocusIn = (function (btn, offset) {
return function () {
setTimeout(() => {
if ((currDevice.indexOf('mobile') > -1)) return;
window.scrollTo({
top: offset,
behavior: 'smooth'
});
btn.focus();
}, 100);
}
})(focusButton, moveSize);
focusButton.addEventListener('focusin', onFocusIn);
cardButtons.push({
el: focusButton,
inHandler: onFocusIn
});
}
}
},
unbindFocusEvent: function () {
cardButtons.forEach(function (item) {
item.el.removeEventListener('focusin', item.inHandler);
});
cardButtons = [];
cardButtons.length = 0;
},
destroy: function () {
if (els.trackEl.scene && els.cardWrap.scene) {
els.trackEl.scene.destroy();
els.cardWrap.scene.destroy();
els.trackEl.scene = null;
els.cardWrap.scene = null;
els.pagiNationEl.parentElement.classList.remove('is-show');
setTimeout(() => {
els.titleEl.removeAttribute('style');
els.cardContent.forEach(function (card) {
card.removeAttribute('style');
});
}, 100);
window.removeEventListener('scroll', eventList.setMotion);
scrollerMotion.unbindFocusEvent();
accessibility.cardReset();
}
}
};
const swiperEvents = {
set: function () {
if (swiperObj.main == null) {
swiperObj.main = new Swiper(els.cardWrap, {
effect: 'creative',
direction: 'vertical',
speed: 600,
slidesPerView: 1,
a11y: false,
creativeEffect: {
prev: {
translate: [0, "-100%", 0, -1],
},
next: {
translate: [0, "100%", 0, 0],
},
},
pagination: {
el: els.pagiNationEl,
clickable: true,
renderBullet: function (index, className) {
const slide = this.slides[index];
const cardTagging = slide.getAttribute('data-card-name') || '';
const slideTitle = slide.getAttribute('data-card-title') || '';
const tagging = {
omniType: "microsite_contentinter",
actionType: "gallery",
contentType: "feature gallery",
taggingValue: els.featureTagging + ":index:" + `${cardTagging}`
}
this.slideTitle = slideTitle;
return `
`;
}
},
on: {
init: function () {
accessibility.card(this.activeIndex);
},
slideChange: function () {
accessibility.card(this.activeIndex);
},
}
});
}
},
destroy: function () {
if (swiperObj.main) {
swiperObj.main.destroy(true);
swiperObj.main = null;
accessibility.cardReset();
}
},
};
const setTagging = {
play: function (targetController) {
if (targetController.hasAttribute('an-tr')) {
let dataOmni = targetController.getAttribute('an-tr').toLowerCase();
targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play'));
}
if (targetController.hasAttribute('an-la')) {
let gaLa = targetController.getAttribute('an-la').toLowerCase();
targetController.setAttribute('an-la', gaLa.replace('pause', 'play'));
}
},
pause: function (targetController) {
if (targetController.hasAttribute('an-tr')) {
let dataOmni = targetController.getAttribute('an-tr').toLowerCase();
targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause'));
}
if (targetController.hasAttribute('an-la')) {
let gaLa = targetController.getAttribute('an-la').toLowerCase();
targetController.setAttribute('an-la', gaLa.replace('play', 'pause'));
}
}
};
const accessibility = {
card: function (currentIndex) {
els.cardEl.forEach(function (carditem, index) {
if (index === currentIndex) {
utils.offAccessibility(carditem);
} else {
utils.onAccessibility(carditem);
}
});
},
cardReset: function () {
els.cardEl.forEach(function (carditem) {
utils.offAccessibility(carditem);
});
},
setInitialActiveCard: function () {
const {
cards,
totalCards,
} = scrollerMotion.scrollSettings();
if (!cards || !totalCards) return;
els.cardEl.forEach(function (carditem, index) {
if (index === 0) {
carditem.classList.add('is-active');
utils.offAccessibility(carditem);
} else {
carditem.classList.remove('is-active');
utils.onAccessibility(carditem);
}
});
}
};
return {
init: init,
};
})();
})();
;
(function () {
window.flagship.features.kv = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {},
obj = {},
currDevice = resize.checkResolution(),
prevDevice = null,
isTabletRatio = null;
const init = function () {
els.section = document.querySelector('.js-kv');
els.hasOffer = document.querySelector('.features-kv__anchor');
if (!!els.section) {
setElements();
bindEvents();
}
if (!!els.hasOffer) {
setElementsOffer();
bindEventsOffer();
}
};
const setElementsOffer = function () {
els.kvDropdown = els.section.querySelector('.js-kv-dropdown');
els.kvDropdownItem = els.section.querySelector('.features-kv__description');
els.kvDropdownSpan = els.section.querySelector('.js-button-text');
els.kvDropdownDataOmni = els.kvDropdown.getAttribute('an-tr');
els.kvDropdownGaLa = els.kvDropdown.getAttribute('an-la');
els.kvDropdownItemArrow = els.section.querySelector('.js-kv-dropdown svg');
};
const setElements = function () {
els.kvInner = els.section.querySelector('.js-kv-inner');
};
const bindEventsOffer = function () {
eventHandler.click();
eventList.defaultText();
eventList.getSpanHeight();
};
const bindEvents = function () {
objList.setScene();
resize.add(eventList.resize);
eventHandler.scroll();
};
const objList = {
setScene: function () {
obj.scene = SCROLLER({
trackElement: els.kvInner,
useFixed: false,
resize: utils.detector.isTouchDevice ? false : true
})
}
}
const eventHandler = {
click: function () {
els.kvDropdown.addEventListener('click', eventList.click);
},
scroll: function () {
window.addEventListener('scroll', eventList.setTrack);
}
}
const eventList = {
defaultText: function () {
const openText = els.kvDropdownSpan.getAttribute('data-open-text');
els.kvDropdownSpan.textContent = openText;
},
click: function () {
const openText = els.kvDropdownSpan.getAttribute('data-open-text');
const closeText = els.kvDropdownSpan.getAttribute('data-close-text');
if (els.kvDropdownItem.classList.contains('is-open')) {
els.kvDropdownItem.classList.remove('is-open');
els.kvDropdown.classList.remove('is-active');
els.kvDropdown.setAttribute('an-la', els.kvDropdownDataOmni.replace('close', 'open'));
els.kvDropdown.setAttribute('an-tr', els.kvDropdownGaLa.replace('close', 'open'));
els.kvDropdownSpan.textContent = openText;
} else {
els.kvDropdownItem.classList.add('is-open');
els.kvDropdown.classList.add('is-active');
els.kvDropdown.setAttribute('an-la', els.kvDropdownDataOmni.replace('open', 'close'));
els.kvDropdown.setAttribute('an-tr', els.kvDropdownGaLa.replace('open', 'close'));
els.kvDropdownSpan.textContent = closeText;
}
},
getSpanHeight: function () {
els.kvDropdownItem.classList.remove('features-kv__description');
els.kvDropdownItem.classList.add('full-text');
const originalHeight = els.kvDropdownItem.offsetHeight;
els.kvDropdownItem.classList.add('features-kv__description');
els.kvDropdownItem.classList.remove('full-text');
if (originalHeight < 25) {
els.kvDropdown.setAttribute('role', 'presentation');
els.kvDropdown.setAttribute('disabled', 'true');
} else {
els.kvDropdownItemArrow.style.display = 'block';
}
},
setTrack: function () {
obj.scene.trackAnimation(function () {
let progress = this.progress;
eventList.setTrackEvent(progress);
});
},
setTrackEvent: function (progress) {
eventList.getRatio();
let fadeOut = utils.calRange({
targetValue: 1,
progress: progress,
startPoint: isTabletRatio ? 68 : 55,
endPoint: isTabletRatio ? 73 : 70
});
TweenMax.to(els.kvInner, 0, {
opacity: 1 - fadeOut
})
},
getRatio: function () {
let aspectRatio = Math.max(window.innerWidth, window.innerHeight) / Math.min(window.innerWidth, window.innerHeight);
if (aspectRatio >= 1.33 && aspectRatio <= 1.6) {
isTabletRatio = true;
} else {
isTabletRatio = false;
};
},
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.setTrack();
prevDevice = currDevice;
}
},
};
return {
init: init
}
})();
})();
(function () {
window.flagship.features.mediaQuote = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let currDevice = resize.checkResolution();
let els = {};
const init = function () {
els.section = document.querySelector('.features-media-quote');
if (!!els.section) {
setElements();
bindEvents();
};
};
const setElements = function () {
els.carousel = els.section.querySelector('.common-carousel');
els.container = els.section.querySelector('.common-carousel__container');
els.carouselItems = els.carousel.querySelectorAll('.swiper-slide');
};
const bindEvents = function () {
eventHandler.slideChange();
eventList.slideDimmed();
};
const eventHandler = {
slideChange: function () {
els.container.swiper.on('slideChange', eventList.slideDimmed);
}
};
const eventList = {
slideDimmed: function () {
if (currDevice === 'mobile') {
const activeIndex = els.container.swiper.activeIndex;
for (let i = 0; i < els.carouselItems.length; i++) {
const activeItem = i === activeIndex;
if (!activeItem) {
els.carouselItems[i].setAttribute('tabindex', '-1');
els.carouselItems[i].setAttribute('aria-hidden', 'true');
} else {
els.carouselItems[i].removeAttribute('tabindex');
els.carouselItems[i].removeAttribute('aria-hidden');
}
}
} else {
const activeIndex = els.container.swiper.activeIndex;
const visibleItems = 3;
for (let i = 0; i < els.carouselItems.length; i++) {
const isVisible = i >= activeIndex && i < activeIndex + visibleItems;
if (isVisible) {
els.carouselItems[i].classList.add('is-active-slide');
els.carouselItems[i].removeAttribute('tabindex');
els.carouselItems[i].removeAttribute('aria-hidden');
els.carouselItems[i].classList.remove('is-active');
} else {
els.carouselItems[i].classList.remove('is-active-slide');
els.carouselItems[i].setAttribute('tabindex', '-1');
els.carouselItems[i].setAttribute('aria-hidden', 'true');
}
}
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship = window.flagship || {};
window.flagship.features.nightography = window.flagship.features.nightography || {};
window.flagship.features.nightography = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {};
let objs = {};
const init = function () {
els.section = document.querySelector('.js-nighto-container');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.contents = els.section.querySelector('.js-nighto-contents');
els.fullVideo = els.section.querySelector('.js-full-video .common-video video');
els.fullVideoController = els.section.querySelector('.js-full-video .common-video .js-video-control');
els.device = els.contents.querySelector('.js-device');
els.deviceVideo = els.section.querySelector('.js-device-video video');
els.headline = els.section.querySelector('.js-nighto-headline');
};
const bindEvents = function () {
eventHandler.play();
eventHandler.pause();
eventList.setScene();
window.addEventListener('scroll', function () {
eventHandler.scroll();
});
};
const eventList = {
deviceVideoPlay: function () {
if (els.deviceVideo.readyState >= 4) {
els.deviceVideo.play();
} else {
els.deviceVideo.addEventListener('canplay', function () {
this.play();
}, {
once: true
});
}
},
deviceVideoPause: function (target) {
if (target.currentTime == 0) {
els.deviceVideo.pause();
els.deviceVideo.currentTime = 0;
} else if (target.currentTime != target.duration) {
els.deviceVideo.pause();
}
},
setScene: function () {
objs.scene = SCROLLER({
trackElement: els.section,
useFixed: false,
useStrictMode: false,
resize: utils.detector.isTouchDevice ? false : true
});
},
activeHeadline: function (progress) {
if (progress > 5) {
if (!els.headline.classList.contains('is-active')) {
els.headline.classList.add('is-active');
}
} else if (progress < 10) {
els.headline.classList.remove('is-active');
}
},
activeImage: function (progress) {
if (progress > 45) {
if (!els.device.classList.contains('is-active')) {
els.device.classList.add('is-active');
}
} else if (progress == 0) {
els.device.classList.remove('is-active');
}
},
scrollContents: function (progress) {
if (!!!(resize.checkResolution().indexOf('mobile') > -1)) {
if (progress < 15 || progress > 85) {
if (!!!els.fullVideo.classList.contains('is-paused')) {
setTimeout(() => {
els.fullVideo.currentTime = 0 ? els.deviceVideo.currentTime = 0 : els.deviceVideo.currentTime = els.fullVideo.currentTime;
}, 100);
}
}
let contentsTransformValue = utils.calRange({
targetValue: 20,
progress: progress,
startPoint: 10,
endPoint: 20
})
const targetY = 20 - (contentsTransformValue);
TweenMax.to(els.contents, 0.35, {
yPercent: targetY
});
} else {
let contentsTransformValue = utils.calRange({
targetValue: 20,
progress: progress,
startPoint: 15,
endPoint: 30
})
const targetY = 20 - (contentsTransformValue);
TweenMax.to(els.contents, 0.35, {
yPercent: targetY
});
}
}
};
const eventHandler = {
scroll: function () {
objs.scene.trackAnimation(function () {
let progress = this.progress;
eventList.activeHeadline(progress);
eventList.activeImage(progress);
eventList.scrollContents(progress)
});
},
play: function () {
els.fullVideo.addEventListener('play', function () {
eventList.deviceVideoPlay();
})
},
pause: function () {
els.fullVideo.addEventListener('pause', function (e) {
eventList.deviceVideoPause(e.target);
})
}
};
return {
init: init,
}
})();
})();
(function () {
window.flagship.features.privacy = (function () {
const utils = window.flagship.common.utils,
resize = flagship.common.resize;
let els = {},
prevDevice = resize.checkResolution(),
currDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.features-privacy');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.deviceImageBlur = els.section.querySelector('.js-device-blur');
els.deviceImage = els.section.querySelector('.js-device-img');
els.guardImage = els.section.querySelector('.js-guard-img');
els.privacyList = els.section.querySelector('.js-privacy-list');
els.switchTexts = els.section.querySelectorAll('.js-privacy-change');
els.safari = document.querySelector('.safari') !== null;
};
const bindEvents = function () {
resize.add(eventList.resize);
eventList.setScene();
eventList.initText();
eventHandler.load();
eventHandler.scroll();
};
const eventHandler = {
load: function () {
window.addEventListener('load', function () {
if (currDevice.indexOf('mobile') > -1) {
eventList.setAccordion();
}
})
},
scroll: function () {
window.addEventListener('scroll', function () {
eventList.moveMotion();
});
}
};
const eventList = {
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.changeText();
eventList.checkAccordionInit();
prevDevice = currDevice;
}
},
checkAccordionInit: function () {
if (currDevice.indexOf('mobile') > -1) {
if (!els.accordion) {
const items = els.privacyList.querySelectorAll('.js-privacy-item');
items[0].classList.add('is-open');
eventList.setAccordion();
}
} else {
if (els.accordion) {
eventList.destroyAccordion();
}
}
},
setAccordion: function () {
els.accordion = new window.flagship.common.accordion({
wrap: els.privacyList,
classList: {
item: 'js-privacy-item',
button: 'js-privacy-open',
contents: 'js-privacy-answer',
activeClass: 'is-open'
},
openType: 'single',
open: {
start: function (target) {
let targetInnerCta = target.querySelector('.js-featue-cta');
if (targetInnerCta) targetInnerCta.addEventListener('click', accessibility.moveFocus);
setTagging.close(target)
}
},
close: {
start: function (target) {
setTagging.open(target)
}
}
});
els.accordion.init();
},
changeText: function () {
els.switchTexts.forEach(text => {
const headTitle = text.querySelector('.common-text');
const buttonTitle = text.nextElementSibling.querySelector('.common-text');
if (currDevice.indexOf('mobile') > -1) {
buttonTitle.innerText = text.titleText;
headTitle.innerText = text.emptyText;
} else {
headTitle.innerText = text.titleText;
buttonTitle.innerText = text.emptyText;
}
});
},
initText: function () {
els.switchTexts.forEach(text => {
text.titleText = text.querySelector('.common-text').innerText;
text.emptyText = '';
const headTitle = text.querySelector('.common-text');
const buttonTitle = text.nextElementSibling.querySelector('.common-text');
if (currDevice.indexOf('mobile') > -1) {
headTitle.innerText = text.emptyText;
buttonTitle.innerText = text.titleText;
}
});
},
destroyAccordion: function () {
if (els.accordion) {
els.accordion.destroy();
els.accordion = null;
}
},
setScene: function () {
els.scene = SCROLLER({
trackElement: els.section,
useFixed: false,
resize: utils.detector.isTouchDevice ? false : true
});
},
moveMotion: function () {
els.scene.trackAnimation(function () {
let progress = this.progress;
let pointProgress = resize.checkResolution().indexOf('mobile') > -1 ? 28 : 35;
if (progress == 0) {
els.guardImage.classList.remove('is-active');
if (els.safari) {
els.deviceImageBlur.classList.remove('is-active');
} else {
els.deviceImage.classList.remove('is-active');
}
};
if (progress >= pointProgress) {
els.guardImage.classList.add('is-active');
if (els.safari) {
els.deviceImageBlur.classList.add('is-active');
} else {
els.deviceImage.classList.add('is-active');
}
};
});
}
};
const setTagging = {
open: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('close', 'open'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('close', 'open'));
}
},
close: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('open', 'close'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('open', 'close'));
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship.features.compareSlider = (function () {
const init = function () {
const compareSlider = document.querySelectorAll('.js-slider');
for (let i = 0; i < compareSlider.length; i++) {
flagship.features.slider(compareSlider[i]);
};
}
return {
init: init
}
})();
window.flagship.features.slider = function (sliderWrap) {
const resize = window.flagship.common.resize;
let currDevice = resize.checkResolution();
let els = {};
let stateSet = {
WRAP_WIDTH: 200,
STEP: 20,
leftWidth: 100,
rightWidth: 100,
isDragging: false,
justDragged: false,
isTap: false,
mouseEvent: true,
startX: 0
};
const init = function () {
els.slider = sliderWrap;
if (!!els.slider) {
setElements();
bindEvents();
};
};
const setElements = function () {
els.commonCompare = els.slider.querySelector('.features-design-compare__content');
els.content = els.slider.querySelector('.features-design-compare__content-item');
els.defaultImage = els.slider.querySelector('.features-design-compare__default-image');
els.changeImage = els.slider.querySelectorAll('.features-design-compare__changes-image img');
els.compareImage = els.slider.querySelector('.features-design-compare__changes-image');
els.imageWrap = els.slider.querySelector('.features-design-compare__image-wrap');
els.textWrap = els.slider.querySelector('.features-design-compare__content-item');
els.controlButton = els.slider.querySelector('.features-design-compare__button');
els.tapLeft = els.slider.querySelector('.features-design-compare__tap--left');
els.tapRight = els.slider.querySelector('.features-design-compare__tap--right');
els.tapLeftBtn = els.tapLeft.querySelector('button');
els.tapRightBtn = els.tapRight.querySelector('button');
els.selectBox = els.slider.querySelector('.js-select-box');
els.rtl = document.querySelector('.rtl') !== null;
};
const bindEvents = function () {
eventHandler.scroll();
eventList.updateWidths(stateSet.leftWidth);
eventList.updateImage();
eventHandler.touches();
eventHandler.drag();
eventHandler.key();
eventHandler.select();
eventHandler.clickTap();
};
const eventHandler = {
scroll: function () {
window.addEventListener('scroll', eventList.onScrollHandler);
},
touches: function () {
els.controlButton.addEventListener('touchstart', eventList.onStart, {
passive: true
});
els.controlButton.addEventListener('touchmove', eventList.onMove, {
passive: false
});
els.controlButton.addEventListener('touchend', eventList.onEnd);
},
clickTap: function () {
els.tapLeft.addEventListener('click', eventList.leftButtonClick);
els.tapRight.addEventListener('click', eventList.rightButtonClick);
},
drag: function () {
els.controlButton.addEventListener('mousedown', eventList.onStart);
els.slider.addEventListener('mousemove', eventList.onMove);
els.slider.addEventListener('mouseup', eventList.onEnd);
els.slider.addEventListener('mouseleave', eventList.onEnd);
},
select: function () {
els.slider.addEventListener('click', function (e) {
const isOption = e.target.classList.contains('js-select-item');
if (isOption) {
eventList.updateWidths(100);
eventList.updateImage();
}
});
},
key: function () {
els.tapLeftBtn.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
eventList.leftButtonClick();
}
});
els.tapRightBtn.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
eventList.rightButtonClick();
}
});
}
};
const eventList = {
updateWidths: function (leftPercent) {
stateSet.leftWidth = Math.max(0, Math.min(stateSet.WRAP_WIDTH, leftPercent));
stateSet.rightWidth = stateSet.WRAP_WIDTH - stateSet.leftWidth;
els.tapLeft.style.width = `${stateSet.leftWidth}%`;
els.tapRight.style.width = `${stateSet.rightWidth}%`;
if (!els.rtl) {
els.defaultImage.style.width = `${stateSet.leftWidth / 2}%`;
} else {
els.compareImage.style.width = `${stateSet.leftWidth / 2}%`;
els.compareImage.classList.add('is-rtl');
els.defaultImage.classList.add('is-rtl');
}
let controlLeft = (stateSet.leftWidth / stateSet.WRAP_WIDTH) * 100;
els.controlButton.style.left = `${controlLeft}%`;
accessibility.updateButtonState();
},
updateImage: function () {
const value = els.selectBox.value;
els.changeImage.forEach(img => {
if (img.dataset.value === value) {
img.classList.add('is-active');
const imageList = [];
imageList.push(img);
eventList.loadImages(imageList);
} else {
img.classList.remove('is-active');
};
});
},
rightButtonClick: function () {
if (stateSet.rightWidth <= 0) return;
eventList.updateWidths(stateSet.leftWidth + stateSet.STEP);
},
leftButtonClick: function () {
if (stateSet.leftWidth <= 0) return;
eventList.updateWidths(stateSet.leftWidth - stateSet.STEP);
},
onStart: function (e) {
stateSet.isDragging = true;
stateSet.mouseEvent = e.type !== 'touchstart';
stateSet.startX = e.type === 'touchstart' ? e.touches[0].clientX : e.clientX;
els.imageWrap.style.userSelect = 'none';
els.textWrap.style.userSelect = 'none';
},
onMove: function (e) {
if (!stateSet.isDragging) return;
if (e.cancelable) e.preventDefault();
stateSet.isTap = true;
const clientX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX;
const deltaX = Math.abs(clientX - stateSet.startX);
if (deltaX > 1) stateSet.isTap = false;
const contentRect = els.content.getBoundingClientRect();
const contentWidth = contentRect.width;
let percent = ((clientX - contentRect.left) / contentWidth) * 100;
percent = Math.round(percent);
percent = Math.max(0, Math.min(percent, 100));
eventList.updateWidths((percent / 100) * stateSet.WRAP_WIDTH);
},
onEnd: function () {
stateSet.isDragging = false;
stateSet.mouseEvent = false;
stateSet.justDragged = true;
setTimeout(function () {
stateSet.justDragged = false;
}, 300);
els.imageWrap.style.userSelect = 'auto';
els.textWrap.style.userSelect = 'auto';
},
loadImages: function (target) {
for (let i = 0; i < target.length; i++) {
if (target[i].classList.contains('js-compare-img') || target[i].classList.contains('js-res-img js-img-src')) {
imageLoader.setResponsiveMedia(target);
}
}
}
};
const accessibility = {
updateButtonState: function () {
if (stateSet.leftWidth <= 0) {
els.tapLeftBtn.setAttribute('disabled', '');
els.tapRightBtn.focus();
} else if (stateSet.rightWidth <= 0) {
els.tapRightBtn.setAttribute('disabled', '');
els.tapLeftBtn.focus();
} else {
els.tapRightBtn.removeAttribute('disabled');
els.tapLeftBtn.removeAttribute('disabled');
}
}
};
init(sliderWrap);
};
})();
(function () {
window.flagship = window.flagship || {};
window.flagship.features = window.flagship.features || {};
window.flagship.features.switchToGalaxy = (function () {
const resize = window.flagship.common.resize,
utils = window.flagship.common.utils;
accordion = flagship.common.Accordion;
let els = {},
prevDevice = resize.checkResolution(),
currDevice = resize.checkResolution();
const init = function () {
els.section = document.querySelector('.js-switch');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.switchList = els.section.querySelector('.js-switch-list');
els.rotate = els.section.querySelector('.js-roate');
els.switchTexts = els.section.querySelectorAll('.js-switch-change');
};
const bindEvents = function () {
resize.add(eventList.resize);
eventHandler.load();
eventList.initText();
};
const eventHandler = {
load: function () {
window.addEventListener('load', function () {
if (currDevice.indexOf('mobile') > -1) {
eventList.setAccordion();
}
})
}
};
const eventList = {
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.changeText();
eventList.checkAccordionInit();
prevDevice = currDevice;
}
},
checkAccordionInit: function () {
if (currDevice.indexOf('mobile') > -1) {
if (!els.accordion) {
const items = els.switchList.querySelectorAll('.js-switch-item');
items[0].classList.add('is-open');
eventList.setAccordion();
}
} else {
if (els.accordion) {
eventList.destroyAccordion();
}
}
},
setAccordion: function () {
els.accordion = new window.flagship.common.accordion({
wrap: els.switchList,
classList: {
item: 'js-switch-item',
button: 'js-switch-open',
contents: 'js-switch-answer',
activeClass: 'is-open'
},
openType: 'single',
open: {
start: function (target) {
let targetInnerCta = target.querySelector('.js-featue-cta');
if (targetInnerCta) targetInnerCta.addEventListener('click', accessibility.moveFocus);
setTagging.close(target);
}
},
close: {
start: function (target) {
setTagging.open(target);
}
}
});
els.accordion.init();
},
changeText: function () {
els.switchTexts.forEach(text => {
const headTitle = text.querySelector('.common-text');
const buttonTitle = text.nextElementSibling.querySelector('.common-text');
if (currDevice.indexOf('mobile') > -1) {
buttonTitle.innerText = text.titleText;
headTitle.innerText = text.emptyText;
} else {
headTitle.innerText = text.titleText;
buttonTitle.innerText = text.emptyText;
}
});
},
initText: function () {
els.switchTexts.forEach(text => {
text.titleText = text.querySelector('.common-text').innerText;
text.emptyText = '';
const headTitle = text.querySelector('.common-text');
const buttonTitle = text.nextElementSibling.querySelector('.common-text');
if (currDevice.indexOf('mobile') > -1) {
headTitle.innerText = text.emptyText;
buttonTitle.innerText = text.titleText;
}
});
},
destroyAccordion: function () {
if (els.accordion) {
els.accordion.destroy();
els.accordion = null;
}
}
};
const setTagging = {
open: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('close', 'open'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('close', 'open'));
}
},
close: function (target) {
if (target.hasAttribute('an-tr')) {
let dataOmni = target.getAttribute('an-tr').toLowerCase();
target.setAttribute('an-tr', dataOmni.replace('open', 'close'));
}
if (target.hasAttribute('an-la')) {
let gaLa = target.getAttribute('an-la').toLowerCase();
target.setAttribute('an-la', gaLa.replace('open', 'close'));
}
}
};
const accessibility = {
moveFocus: function (e) {
if (desktopStatus) return;
if (this.getAttribute('href').indexOf('#') > -1) {
e.preventDefault();
let sectionId = this.getAttribute('href'),
section = document.querySelector(`${sectionId}`),
sectionTop = section.getBoundingClientRect().top,
movePosition = (sectionTop + window.pageYOffset) - utils.getNavHeight(),
clickable = section.querySelectorAll('a, button'),
title = section.querySelector('h2') || section.querySelector('h3');
if (!!title) {
let _focusOut = function () {
title.removeAttribute('tabindex');
title.removeEventListener('focusout', _focusOut);
};
title.addEventListener('focusout', _focusOut);
title.setAttribute('tabindex', 0);
title.focus();
} else {
clickable[0].focus();
}
window.scrollTo(0, movePosition);
}
}
};
return {
init: init
}
})();
})();
(function () {
window.flagship = window.flagship || {};
window.flagship.features = window.flagship.features || {};
window.flagship.features.unveiling = (function () {
const utils = window.flagship.common.utils,
resize = window.flagship.common.resize;
let els = {},
obj = {},
wheelDirection,
currDevice = resize.checkResolution(),
prevDevice = null,
isPointerDown = false,
isMobile = true,
isTablet = window.innerWidth >= 535 && window.innerWidth <= 768;
const init = function () {
els.section = document.querySelector('.js-unveiling');
if (!!els.section) {
setElements();
bindEvents();
}
};
const setElements = function () {
els.headline = els.section.querySelector('.js-unveiling-headline');
els.desc = els.section.querySelector('.js-unveiling-desc');
els.clickable = els.section.querySelectorAll('a, button');
els.videoOpacity = els.section.querySelector('.js-video-opacity');
els.videoWrap = els.section.querySelector('.js-scroll-video');
els.video = els.videoWrap.querySelector('video');
};
const bindEvents = function () {
resize.add(eventList.resize);
eventList.checkDevice();
objList.setScene();
eventHandler.scroll();
eventHandler.focus();
eventHandler.pointerdown();
eventHandler.pointerup();
};
const eventHandler = {
scroll: function () {
window.addEventListener('scroll', eventList.scroll);
},
focus: function (e) {
for (let i = 0; i < els.clickable.length; i++) {
els.clickable[i].addEventListener('focusin', accessibility.focus);
}
},
pointerdown: function () {
window.addEventListener('mousedown', function () {
isPointerDown = true;
});
window.addEventListener('touchstart', function () {
isPointerDown = true;
}, {
passive: true
});
},
pointerup: function () {
window.addEventListener('mouseup', function () {
isPointerDown = false;
});
window.addEventListener('touchend', function () {
isPointerDown = false;
});
}
}
const objList = {
setScene: function () {
obj.scene = SCROLLER({
trackElement: els.section,
resize: utils.detector.isTouchDevice ? false : true
});
}
}
const eventList = {
scroll: function () {
obj.scene.trackAnimation(function () {
let progress = this.progress;
wheelDirection = this.wheelDirection;
eventList.setTitleInteraction(progress);
eventList.setDescInteraction(progress);
eventList.setVideoTrackEvent(progress);
});
},
getCalRange: function (target, progress, start, end) {
return utils.calRange({
targetValue: target,
progress: progress,
startPoint: start,
endPoint: end
})
},
setTitleInteraction: function (progress) {
const fadeIn = eventList.getCalRange(1, progress, 17, 20);
const fadeOut = eventList.getCalRange(1, progress, 31, 35);
if (progress >= 17) {
if (!els.headline.classList.contains('is-active')) {
els.headline.classList.add('is-active');
};
} else if (progress < 24) {
if (els.headline.classList.contains('is-active')) {
els.headline.classList.remove('is-active');
};
};
TweenMax.to(els.headline, 0, {
opacity: 0 + fadeIn,
});
if (!isMobile && !isTablet) {
if (progress > 23) {
TweenMax.to(els.headline, 0, {
opacity: 1 - fadeOut,
top: 0
});
}
}
},
setDescInteraction: function (progress) {
let opacityValue1 = !isMobile ? 62 : 43;
let opacityValue2 = !isMobile ? 70 : 50;
if (progress > opacityValue1) {
if (!els.desc.classList.contains('is-active')) {
els.desc.classList.add('is-active');
TweenMax.to(els.desc, 1, {
opacity: 1
});
};
} else if (progress < opacityValue2) {
if (els.desc.classList.contains('is-active')) {
els.desc.classList.remove('is-active');
TweenMax.to(els.desc, .5, {
opacity: 0
});
};
};
if (progress > 70) {
const fadeOut = eventList.getCalRange(1, progress, 70, 78);
TweenMax.to(els.desc, 0, {
opacity: 1 - fadeOut
})
}
},
setVideoTrackEvent: function (progress) {
const fadeOut = eventList.getCalRange(1, progress, 70, 78);
if (!isMobile && !isTablet) {
if (progress > 36 && progress < 70) {
if (els.videoWrap.controller.classList.contains('is-hidden')) els.videoWrap.controller.classList.remove('is-hidden');
} else {
if (!els.videoWrap.controller.classList.contains('is-hidden')) els.videoWrap.controller.classList.add('is-hidden');
}
}
if (!isMobile && !isTablet) {
let videoFadeOut = TweenMax.to(els.videoOpacity, 0, {
opacity: 1 - fadeOut
});
if (progress < 1) {
videoFadeOut.restart();
}
}
eventList.resetVideoEvent(progress);
},
resetVideoEvent: function (progress) {
if (isMobile || isTablet) {
if (progress < 14 && wheelDirection == 'up') {
if (!els.video.paused) els.video.pause();
setTimeout(() => {
els.videoWrap.classList.remove('is-started');
els.videoWrap.classList.remove('is-paused');
els.videoWrap.classList.remove('is-ended');
els.video.currentTime = 0;
}, 300);
}
} else {
if (progress < 36) {
if (els.videoWrap.classList.contains('is-playing', 'is-started')) {
els.videoWrap.classList.remove('is-started');
setTimeout(function () {
els.video.pause();
els.video.currentTime = 0;
}, 300);
}
if (els.videoWrap.classList.contains('is-ended')) {
els.videoWrap.classList.remove('is-ended');
setTimeout(function () {
els.video.currentTime = 0;
}, 300);
}
}
if (progress > 38 && els.videoWrap.classList.contains('is-paused')) {
els.videoWrap.classList.remove('is-paused')
}
}
},
checkDevice: function () {
if (currDevice == 'mobile' || currDevice == 'mobileS') {
isMobile = true;
} else {
isMobile = false;
}
},
resize: function (currRes) {
currDevice = currRes;
if (currDevice != prevDevice) {
eventList.checkDevice();
currDevice = prevDevice;
}
}
}
const accessibility = {
focus: function (e) {
if (isPointerDown) return;
let self = this;
els.desc.style.translateY = 0;
els.desc.style.opacity = 1;
if (self == els.videoWrap.controller) {
self.scrollIntoView(false);
els.videoOpacity.style.opacity = 1;
}
}
}
return {
init: init,
};
})();
})();
flagship.features.initialize = (function () {
window.flagship.common.resize.bindEvent();
const init = function () {
flagship.features.carousel.init();
flagship.features.clickToVideo.init();
flagship.features.highlightsZone.init();
flagship.features.mediaQuote.init();
flagship.features.highResolution.init();
flagship.features.headline.init();
flagship.features.scrollVideo.init();
flagship.features.cameraSpecs.init();
flagship.features.faq.init();
flagship.features.colorsViewer.init();
flagship.features.colors.init();
flagship.features.accessories.init();
flagship.features.aiOverview.init();
flagship.features.arBanner.init();
flagship.features.accordion.init();
flagship.features.aiProactiveSuggestion.init();
flagship.features.compares.init();
flagship.features.compareSlider.init();
flagship.features.switchToGalaxy.init();
flagship.features.kv.init();
flagship.features.unveiling.init();
flagship.features.nightography.init();
flagship.features.formfactor.init();
flagship.features.privacy.init();
flagship.features.benefits.init();
};
return {
init: init
}
})();
flagship.features.initialize.init();
// Floating Nav Dropdown Tagging
setTimeout(function () {
let dropdowns = document.querySelectorAll(
".floating-navigation__headline .menu__list-option-wrap"
);
let spanElements = document.querySelectorAll(
".floating-navigation__headline .menu__list-option-wrap .menu__list-option-text"
);
let spanValues = [];
if (dropdowns && dropdowns.length) {
for (let i = 0; i < spanElements.length; i++) {
spanValues.push(spanElements[i].textContent.toLowerCase());
}
for (let i = 0; i < dropdowns.length; i++) {
dropdowns[i].setAttribute("an-tr", "hd01_mlp navagation-cta");
dropdowns[i].setAttribute("an-ca", "navigation");
dropdowns[i].setAttribute("an-ac", "secondary navi");
dropdowns[i].setAttribute("an-la", `drop down:${spanValues[i]}`);
}
}
}, 5000);
// Shopapp Changes
if (window.EcommFlutterClient || window.location.href.indexOf('/app') > -1) {
if (document.getElementsByClassName('nv00-gnb-v3') && document.getElementsByClassName('nv00-gnb-v3')[0]) {
document.getElementsByClassName('nv00-gnb-v3')[0].style.display = 'none'
}
if (document.getElementsByClassName('nv00-gnb-v4') && document.getElementsByClassName('nv00-gnb-v4')[0]) {
document.getElementsByClassName('nv00-gnb-v4')[0].style.display = 'none'
}
if (document.getElementsByClassName('footer') && document.getElementsByClassName('footer')[0]) {
document.getElementsByClassName('footer')[0].style.display = 'none'
}
if (
document.getElementsByClassName("lvc-popup-stream-container") &&
document.getElementsByClassName("lvc-popup-stream-container")[0]
) {
document.getElementsByClassName(
"lvc-popup-stream-container"
)[0].style.display = "none";
}
if (document.getElementById("header")) {
document.getElementById("header").style.display = "none";
}
if (
document.getElementsByClassName("idz_online_mweb-container") &&
document.getElementsByClassName("idz_online_mweb-container")[0]
) {
document.getElementsByClassName(
"idz_online_mweb-container"
)[0].style.display = "none";
}
}
});
}