define('helper',['jquery'], function (jquery) { var huawei = huawei || {}; jquery.fn.imagesloaded = function (selector) { selector = selector || "img"; var def = $.deferred(); var def_list = []; this.find(selector).each(function (i, o) { var _def = $.deferred(); (function (d) { $(o).on("load", function (e) { d.resolve(e.target); }); }(_def)); if (o.complete && !$(o).attr("data-src")) settimeout(function () { _def.resolve(o); }, 0); def_list.push(_def.promise()); }); $.when.apply(this, def_list).always(function (d) { def.resolve.apply(this, arguments); }); settimeout(function () { def.resolve(this); }, 1000 * 10); return def.promise(); }; huawei.debounce = function debounce(func, wait) { var timeout; return function () { var context = this; var args = arguments; if (timeout) cleartimeout(timeout); timeout = settimeout(function () { func.apply(context, args); }, wait); }; }; jquery.debounce = huawei.debounce; jquery.fn.hoverintent = function (hoverin, hoverout, selector) { var timer1 = 0; var timer2 = 0; var delay = 250; this.on("mouseenter", selector, function (e) { cleartimeout(timer1); timer1 = 0; var that = this; (function (th, _e) { timer1 = settimeout(function () { hoverin.apply(th, [_e]); }, delay); }(that, e)); }).on("mouseleave", selector, function (e) { cleartimeout(timer1); timer1 = 0; var that = this; (function (th, _e) { settimeout(function () { hoverout.apply(th, [_e]); }, delay); }(that, e)); }); return this; }; function calculatetruncation(el) { var ellipsis = "..."; var $el = $(el); var text; var doted = false; var $contents = $el.contents(); var lasttext; var limit = 800; while (el.clientheight + 2 < el.scrollheight) { if (limit <= 0) break; limit -= 1; text = $el.text().trim(); if (!text) { break; } var last = $contents.last(); text = last.text().trim(); lasttext = text; if (!text || text == ellipsis) { last.remove(); $contents = $el.contents(); continue; } // 替换英文单词 text = text.replace(/\s?\b([\w\.])*$/, ellipsis); // 替换中文文字 if (text === lasttext) text = text.replace(/[\u2e80-\u9fff_\s](\.{3})?$/, ellipsis); // 替换任意最后一个字符 if (text === lasttext) text = text.replace(/[\s\s](\.{3})?$/, ellipsis); var n = last.get(0); if (n.nodetype != 3) last.text(text); else n.nodevalue = text; doted = true; } return doted; } jquery.fn.dotdotdot = function () { this.each(function () { var $t = $(this); if ($t.is(":hidden") || this.doted) return; $t.css({ "word-break": "break-word", "overflow": "hidden", "overflow-wrap": "break-word" }).data("children", $t.contents().clone(true)); $t.on("restore-content", function (e) { $t.empty().append($t.data("children")); $t.removeclass("doted is-truncated").removeattr("style"); }); var truncationel = this; var r = calculatetruncation(truncationel); if (r) { this.doted = true; $(this).addclass("doted is-truncated"); } }); }; jquery.fn.tabresponsive = function (_options) { var defaults = { offset: 0, collapseclass: "tab-content-collapse", animatecomplete: function () { } }; var options = jquery.extend({}, defaults, _options); this.each(function () { var $t = $(this); $t.addclass("hidden-xs"); $t.find('[data-toggle="tab"]').each(function () { var $clone = $(this).clone(); $clone.removeattr("id").addclass("hidden-lg hidden-md hidden-sm collapsed") .attr("data-toggle", "collapse") .insertbefore($($clone.attr("href"))); }); }); var $tabs = this; $(window).off("resize.tabresponsive").on("resize.tabresponsive", function (e) { $tabs.each(function () { var $tabcontent = $($(this).find('[data-toggle="tab"]').eq(0).attr("href")).parent(); if ($(window).width() < 768) { $tabcontent.removeclass("tab-content").addclass(options.collapseclass) .children(".tab-pane").removeclass("active") .addclass("collapse"); } else { $tabcontent.removeclass(options.collapseclass).addclass("tab-content") .children(".tab-pane").removeclass("collapse") .eq(0) .addclass("active"); } }); }); settimeout(function () { $(window).trigger("resize.tabresponsive"); }, 100); $(document).off("click", '.tab-content-collapse [data-toggle="collapse"]') .on("click", '.tab-content-collapse [data-toggle="collapse"]', function (e) { var $t = $(this); if ($t.hasclass("collapsed")) return; var $brothers = $t.siblings('.tab-pane').not($t.attr("href")).collapse('hide'); settimeout(function () { var _offset = typeof options.offset == "function" ? options.offset() : options.offset; $("html, body").animate({ scrolltop: $(e.currenttarget).offset().top - _offset }, function () { settimeout(function () { options.animatecomplete(); }, 100); }); }, 500); }); }; jquery.loading = function (showorclose, options) { var msg = /(\/zh|cn\/)/.test(document.url) ? "加载中..." : "loading..."; if ($("#hidloadingmessage").length) msg = $("#hidloadingmessage").val(); options = options || {}; options.loadingid = options.loadingid || "js-loading"; showorclose ? openloading() : closeloading(); function openloading() { var $loadingel = $("#" + options.loadingid); if (!$loadingel.length) { $loadingel = $('
\

' + msg + '

\
' + msg + '
').appendto("body"); } $loadingel.addclass("show"); } function closeloading() { var $loadingel = $("#js-loading"); $loadingel.removeclass("show"); } }; jquery.cache = { get: function (key) { var val; try { val = json.parse(decodeuricomponent(localstorage.getitem(key))); } catch (_e) { } return val; }, set: function (key, _value, expiredays) { var value = _value; if (!value) return; if (typeof value !== "object") { value = { value: _value }; } var d = new date(); d.settime(d.gettime() + 24 * 60 * 60 * 1000 * expiredays); var expire = d; value.expire = expire; localstorage.setitem(key, encodeuricomponent(json.stringify(value))); }, del: function (key) { localstorage.removeitem(key); }, }; jquery.dialog = function (id, content, showorclose, options) { options = options || {}; options.loadingid = id || "js-dialog-box"; function show() { var $loadingel = $("#" + options.loadingid); if (!$loadingel.length) { $loadingel = $('').appendto("body"); $loadingel.on("click", ".js-close-dialog", function (_e) { hide(); }); } if (/^[#.]/.test(content)) content = $(content); $loadingel.find(".modal-body").append(content); $loadingel.addclass("show").fadein(); $("body").addclass("dialog-has-open"); } function hide() { var $loadingel = $("#" + options.loadingid); $loadingel.removeclass("show").fadeout(); $("body").removeclass("dialog-has-open"); } if (showorclose !== false) show(); else hide(); }; return huawei; }); define('panelimg',['helper'], function () { function panelimg(obj) { this.obj = $(obj); this.panelimg = this.obj.find('.panel-img-box'); this.init(); } panelimg.prototype = { init: function () { var self = this; this.resize(); var timer = 0; $(window).resize(function () { cleartimeout(timer); timer = settimeout(function () { self.resize(); }, 200) }); settimeout(function () { self.resize(); }, 1000); /* var $imgs = $('.panel-img-box.mr .img-box img.hidden-xs'); var i = 1, l = $imgs.length; $imgs.on('load', function (e) { i += 1; if (i >= l) self.resize(); }); */ $('.panel-img-box.mr .img-box').imagesloaded('img:visible').then(function(){ self.resize(); }); }, resize: function () { var self = this; if (window.innerwidth < 992) { self.panelimg.removeattr('style'); return; } var tempwidth = 0; self.panelimg.each(function (index) { if ($(this).hasclass('big-w')) { tempwidth = self.obj.width() - 30 - (self.obj.width() - 60) / 3; } else { tempwidth = (self.obj.width() - 60) / 3; } $(this).css({ width: tempwidth - 0.5, height: $(this).prev().hasclass('mr') ? $(this).prev().height() : 'auto' }); }); } } return panelimg; }); /*! js-cookie v2.2.1 | mit */ !function(a){var b;if("function"==typeof define&&define.amd&&(define('vendor/js.cookie-2.2.1.min',a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.cookies,d=window.cookies=a();d.noconflict=function(){return window.cookies=c,d}}}(function(){function a(){for(var a=0,b={};a"); s = s.replace(/ /g, " "); s = s.replace(/'/g, "\'"); s = s.replace(/"/g, "\""); s = s.replace(/
/g, ""); return s; } $(function ($) { settimeout(function () { huawei.text_dot(); huawei.text_dot_more_less(); huawei.tab_change_text_dot(); }, 500); $(document).on("text-dotdotdot", function (e) { settimeout(function () { huawei.text_dot(); }, 200); }); }); huawei.text_dot = function () { $(".js-text-dot-en").filter(":visible").not(".is-truncated").removeattr("style").dotdotdot({ after: '.toggle', callback: dotdotdotcallback // wrap: 'letter' }); $(".js-text-dot-cn").filter(":visible").not(".is-truncated").removeattr("style").dotdotdot({ wrap: 'letter', //注:中文必须改为letter ellipsis: "...", after: '.toggle', callback: dotdotdotcallback }); }; huawei.text_dot_more_less = function () { $(document).on('click', '.js-text-dot-en .toggle, .js-text-dot-cn .toggle', function () { var $t = $(this); var $p = $t.closest('.js-text-dot-en, .js-text-dot-cn'); if ($p.hasclass("is-truncated")) { $p.trigger('destroy').css('max-height', 'none').css("height", "auto"); $p.find(".toggle").html($t.attr("data-less-text") || "less"); return false; } var ops = { ellipsis: "...", after: ".toggle", callback: dotdotdotcallback }; if ($p.hasclass("js-text-dot-cn")) ops["wrap"] = 'letter'; $p.css("max-height", "").height(""); settimeout(function () { $p.dotdotdot(ops); }, 100); // $p.find(".toggle").html($t.attr("data-more-text")||"more"); return false; }); }; function dotdotdotcallback(istruncated, originalcontent) { var $tog = $(".toggle", this); if (!istruncated) { $tog.remove(); } else { $tog.html($tog.attr("data-more-text") || "more"); } } huawei.tab_change_text_dot = function () { $(document).on("shown.bs.tab shown.bs.collapse", ".js-tab-dot a", function () { $(document).trigger("text-dotdotdot"); }); }; return huawei; }); /*! * jquery mobile virtual mouse @version * http://jquerymobile.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: virtual mouse (vmouse) bindings //>>group: core //>>description: normalizes touch/mouse events. //>>docs: http://api.jquerymobile.com/?s=vmouse // this plugin is an experiment for abstracting away the touch and mouse // events so that developers don't have to worry about which method of input // the device their document is loaded on supports. // // the idea here is to allow the developer to register listeners for the // basic mouse events, such as mousedown, mousemove, mouseup, and click, // and the plugin will take care of registering the correct listeners // behind the scenes to invoke the listener at the fastest possible time // for that device, while still retaining the order of event firing in // the traditional mouse environment, should multiple handlers be registered // on the same element for different events. // // the current version exposes the following virtual events to jquery bind methods: // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" ( function( factory ) { if ( typeof define === "function" && define.amd ) { // amd. register as an anonymous module. define( 'jquery.mobile.vmouse',[ "jquery" ], factory ); } else { // browser globals factory( jquery ); } } )( function( $ ) { var datapropertyname = "virtualmousebindings", touchtargetpropertyname = "virtualtouchid", toucheventprops = "clientx clienty pagex pagey screenx screeny".split( " " ), virtualeventnames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ), generalprops = ( "altkey bubbles cancelable ctrlkey currenttarget detail eventphase " + "metakey relatedtarget shiftkey target timestamp view which" ).split( " " ), mousehookprops = $.event.mousehooks ? $.event.mousehooks.props : [], mouseeventprops = generalprops.concat( mousehookprops ), activedochandlers = {}, resettimerid = 0, startx = 0, starty = 0, didscroll = false, clickblocklist = [], blockmousetriggers = false, blocktouchtriggers = false, eventcapturesupported = "addeventlistener" in document, $document = $( document ), nexttouchid = 1, lasttouchid = 0, threshold, i; $.vmouse = { movedistancethreshold: 10, clickdistancethreshold: 10, resettimerduration: 1500, maximumtimebetweentouches: 100 }; function getnativeevent( event ) { while ( event && typeof event.originalevent !== "undefined" ) { event = event.originalevent; } return event; } function createvirtualevent( event, eventtype ) { var t = event.type, oe, props, ne, prop, ct, touch, i, j, len; event = $.event( event ); event.type = eventtype; oe = event.originalevent; props = generalprops; // addresses separation of $.event.props in to $.event.mousehook.props and issue 3280 // https://github.com/jquery/jquery-mobile/issues/3280 if ( t.search( /^(mouse|click)/ ) > -1 ) { props = mouseeventprops; } // copy original event properties over to the new event // this would happen if we could call $.event.fix instead of $.event // but we don't have a way to force an event to be fixed multiple times if ( oe ) { for ( i = props.length; i; ) { prop = props[ --i ]; event[ prop ] = oe[ prop ]; } } // make sure that if the mouse and click virtual events are generated // without a .which one is defined if ( t.search( /mouse(down|up)|click/ ) > -1 && !event.which ) { event.which = 1; } if ( t.search( /^touch/ ) !== -1 ) { ne = getnativeevent( oe ); t = ne.touches; ct = ne.changedtouches; touch = ( t && t.length ) ? t[ 0 ] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined ); if ( touch ) { for ( j = 0, len = toucheventprops.length; j < len; j++ ) { prop = toucheventprops[ j ]; event[ prop ] = touch[ prop ]; } } } return event; } function getvirtualbindingflags( element ) { var flags = {}, b, k; while ( element ) { b = $.data( element, datapropertyname ); for ( k in b ) { if ( b[ k ] ) { flags[ k ] = flags.hasvirtualbinding = true; } } element = element.parentnode; } return flags; } function getclosestelementwithvirtualbinding( element, eventtype ) { var b; while ( element ) { b = $.data( element, datapropertyname ); if ( b && ( !eventtype || b[ eventtype ] ) ) { return element; } element = element.parentnode; } return null; } function enabletouchbindings() { blocktouchtriggers = false; } function disabletouchbindings() { blocktouchtriggers = true; } function enablemousebindings() { lasttouchid = 0; clickblocklist.length = 0; blockmousetriggers = false; // when mouse bindings are enabled, our // touch bindings are disabled. disabletouchbindings(); } function disablemousebindings() { // when mouse bindings are disabled, our // touch bindings are enabled. enabletouchbindings(); } function clearresettimer() { if ( resettimerid ) { cleartimeout( resettimerid ); resettimerid = 0; } } function startresettimer() { clearresettimer(); resettimerid = settimeout( function() { resettimerid = 0; enablemousebindings(); }, $.vmouse.resettimerduration ); } function triggervirtualevent( eventtype, event, flags ) { var ve; if ( ( flags && flags[ eventtype ] ) || ( !flags && getclosestelementwithvirtualbinding( event.target, eventtype ) ) ) { ve = createvirtualevent( event, eventtype ); $( event.target ).trigger( ve ); } return ve; } function mouseeventcallback( event ) { var touchid = $.data( event.target, touchtargetpropertyname ), ve; // it is unexpected if a click event is received before a touchend // or touchmove event, however this is a known behavior in mobile // safari when mobile voiceover (as of ios 8) is enabled and the user // double taps to activate a link element. in these cases if a touch // event is not received within the maximum time between touches, // re-enable mouse bindings and call the mouse event handler again. if ( event.type === "click" && $.data( event.target, "lasttouchtype" ) === "touchstart" ) { settimeout( function() { if ( $.data( event.target, "lasttouchtype" ) === "touchstart" ) { enablemousebindings(); delete $.data( event.target ).lasttouchtype; mouseeventcallback( event ); } }, $.vmouse.maximumtimebetweentouches ); } if ( !blockmousetriggers && ( !lasttouchid || lasttouchid !== touchid ) ) { ve = triggervirtualevent( "v" + event.type, event ); if ( ve ) { if ( ve.isdefaultprevented() ) { event.preventdefault(); } if ( ve.ispropagationstopped() ) { event.stoppropagation(); } if ( ve.isimmediatepropagationstopped() ) { event.stopimmediatepropagation(); } } } } function handletouchstart( event ) { var touches = getnativeevent( event ).touches, target, flags, t; if ( touches && touches.length === 1 ) { target = event.target; flags = getvirtualbindingflags( target ); $.data( event.target, "lasttouchtype", event.type ); if ( flags.hasvirtualbinding ) { lasttouchid = nexttouchid++; $.data( target, touchtargetpropertyname, lasttouchid ); clearresettimer(); disablemousebindings(); didscroll = false; t = getnativeevent( event ).touches[ 0 ]; startx = t.pagex; starty = t.pagey; triggervirtualevent( "vmouseover", event, flags ); triggervirtualevent( "vmousedown", event, flags ); } } } function handlescroll( event ) { if ( blocktouchtriggers ) { return; } if ( !didscroll ) { triggervirtualevent( "vmousecancel", event, getvirtualbindingflags( event.target ) ); } $.data( event.target, "lasttouchtype", event.type ); didscroll = true; startresettimer(); } function handletouchmove( event ) { if ( blocktouchtriggers ) { return; } var t = getnativeevent( event ).touches[ 0 ], didcancel = didscroll, movethreshold = $.vmouse.movedistancethreshold, flags = getvirtualbindingflags( event.target ); $.data( event.target, "lasttouchtype", event.type ); didscroll = didscroll || ( math.abs( t.pagex - startx ) > movethreshold || math.abs( t.pagey - starty ) > movethreshold ); if ( didscroll && !didcancel ) { triggervirtualevent( "vmousecancel", event, flags ); } triggervirtualevent( "vmousemove", event, flags ); startresettimer(); } function handletouchend( event ) { if ( blocktouchtriggers || $.data( event.target, "lasttouchtype" ) === undefined ) { return; } disabletouchbindings(); delete $.data( event.target ).lasttouchtype; var flags = getvirtualbindingflags( event.target ), ve, t; triggervirtualevent( "vmouseup", event, flags ); if ( !didscroll ) { ve = triggervirtualevent( "vclick", event, flags ); if ( ve && ve.isdefaultprevented() ) { // the target of the mouse events that follow the touchend // event don't necessarily match the target used during the // touch. this means we need to rely on coordinates for blocking // any click that is generated. t = getnativeevent( event ).changedtouches[ 0 ]; clickblocklist.push( { touchid: lasttouchid, x: t.clientx, y: t.clienty } ); // prevent any mouse events that follow from triggering // virtual event notifications. blockmousetriggers = true; } } triggervirtualevent( "vmouseout", event, flags ); didscroll = false; startresettimer(); } function hasvirtualbindings( ele ) { var bindings = $.data( ele, datapropertyname ), k; if ( bindings ) { for ( k in bindings ) { if ( bindings[ k ] ) { return true; } } } return false; } function dummymousehandler() { } function getspecialeventobject( eventtype ) { var realtype = eventtype.substr( 1 ); return { setup: function( /* data, namespace */ ) { // if this is the first virtual mouse binding for this element, // add a bindings object to its data. if ( !hasvirtualbindings( this ) ) { $.data( this, datapropertyname, {} ); } // if setup is called, we know it is the first binding for this // eventtype, so initialize the count for the eventtype to zero. var bindings = $.data( this, datapropertyname ); bindings[ eventtype ] = true; // if this is the first virtual mouse event for this type, // register a global handler on the document. activedochandlers[ eventtype ] = ( activedochandlers[ eventtype ] || 0 ) + 1; if ( activedochandlers[ eventtype ] === 1 ) { $document.bind( realtype, mouseeventcallback ); } // some browsers, like opera mini, won't dispatch mouse/click events // for elements unless they actually have handlers registered on them. // to get around this, we register dummy handlers on the elements. $( this ).bind( realtype, dummymousehandler ); // for now, if event capture is not supported, we rely on mouse handlers. if ( eventcapturesupported ) { // if this is the first virtual mouse binding for the document, // register our touchstart handler on the document. activedochandlers[ "touchstart" ] = ( activedochandlers[ "touchstart" ] || 0 ) + 1; if ( activedochandlers[ "touchstart" ] === 1 ) { $document.bind( "touchstart", handletouchstart ) .bind( "touchend", handletouchend ) // on touch platforms, touching the screen and then dragging your finger // causes the window content to scroll after some distance threshold is // exceeded. on these platforms, a scroll prevents a click event from being // dispatched, and on some platforms, even the touchend is suppressed. to // mimic the suppression of the click event, we need to watch for a scroll // event. unfortunately, some platforms like ios don't dispatch scroll // events until *after* the user lifts their finger (touchend). this means // we need to watch both scroll and touchmove events to figure out whether // or not a scroll happenens before the touchend event is fired. .bind( "touchmove", handletouchmove ) .bind( "scroll", handlescroll ); } } }, teardown: function( /* data, namespace */ ) { // if this is the last virtual binding for this eventtype, // remove its global handler from the document. --activedochandlers[eventtype]; if ( !activedochandlers[ eventtype ] ) { $document.unbind( realtype, mouseeventcallback ); } if ( eventcapturesupported ) { // if this is the last virtual mouse binding in existence, // remove our document touchstart listener. --activedochandlers["touchstart"]; if ( !activedochandlers[ "touchstart" ] ) { $document.unbind( "touchstart", handletouchstart ) .unbind( "touchmove", handletouchmove ) .unbind( "touchend", handletouchend ) .unbind( "scroll", handlescroll ); } } var $this = $( this ), bindings = $.data( this, datapropertyname ); // teardown may be called when an element was // removed from the dom. if this is the case, // jquery core may have already stripped the element // of any data bindings so we need to check it before // using it. if ( bindings ) { bindings[ eventtype ] = false; } // unregister the dummy event handler. $this.unbind( realtype, dummymousehandler ); // if this is the last virtual mouse binding on the // element, remove the binding data from the element. if ( !hasvirtualbindings( this ) ) { $this.removedata( datapropertyname ); } } }; } // expose our custom events to the jquery bind/unbind mechanism. for ( i = 0; i < virtualeventnames.length; i++ ) { $.event.special[ virtualeventnames[ i ] ] = getspecialeventobject( virtualeventnames[ i ] ); } // add a capture click handler to block clicks. // note that we require event capture support for this so if the device // doesn't support it, we punt for now and rely solely on mouse events. if ( eventcapturesupported ) { document.addeventlistener( "click", function( e ) { var cnt = clickblocklist.length, target = e.target, x, y, ele, i, o, touchid; if ( cnt ) { x = e.clientx; y = e.clienty; threshold = $.vmouse.clickdistancethreshold; // the idea here is to run through the clickblocklist to see if // the current click event is in the proximity of one of our // vclick events that had preventdefault() called on it. if we find // one, then we block the click. // // why do we have to rely on proximity? // // because the target of the touch event that triggered the vclick // can be different from the target of the click event synthesized // by the browser. the target of a mouse/click event that is synthesized // from a touch event seems to be implementation specific. for example, // some browsers will fire mouse/click events for a link that is near // a touch event, even though the target of the touchstart/touchend event // says the user touched outside the link. also, it seems that with most // browsers, the target of the mouse/click event is not calculated until the // time it is dispatched, so if you replace an element that you touched // with another element, the target of the mouse/click will be the new // element underneath that point. // // aside from proximity, we also check to see if the target and any // of its ancestors were the ones that blocked a click. this is necessary // because of the strange mouse/click target calculation done in the // android 2.1 browser, where if you click on an element, and there is a // mouse/click handler on one of its ancestors, the target will be the // innermost child of the touched element, even if that child is no where // near the point of touch. ele = target; while ( ele ) { for ( i = 0; i < cnt; i++ ) { o = clickblocklist[ i ]; touchid = 0; if ( ( ele === target && math.abs( o.x - x ) < threshold && math.abs( o.y - y ) < threshold ) || $.data( ele, touchtargetpropertyname ) === o.touchid ) { // xxx: we may want to consider removing matches from the block list // instead of waiting for the reset timer to fire. e.preventdefault(); e.stoppropagation(); return; } } ele = ele.parentnode; } } }, true ); } } ); define('photo',[ 'require', 'jquery.mobile.vmouse' ], function (require, mobile) { 'use strict'; var huawei = huawei || {}; $(function ($) { if ($(window).width() > 768) return; if (!/msie [6-8]/i.test(navigator.useragent)) { jquery.loadcss("https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css"); $.loadjs('https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js').then(function () { huawei.image_pinchzoom(); }); } }); huawei.image_pinchzoom = function () { if ($(window).width() > 768) return; var closeable = true; var close_timer = null; var oldtime = 0; // $.fancybox = undefined; // $.fn.fancybox = undefined; $.loadjs('https://cdn.jsdelivr.net/npm/hammerjs@2.0.8/hammer.min.js').then(function(d){ d && (hammer=d); }); $(document).off('vclick.zoom', 'img') .on('vclick.zoom', 'img', function (e) { if ($(this).prop('naturalwidth') < 200) return; if ($(this).hasclass('js-no-zoom')) return; if ($(this).closest('.fancybox-container').length > 0 || $(this).closest('a').length > 0) return; closeable = false; settimeout(function () { closeable = true }, 800); $.fancybox.open([{ src: this.src, opts: { // caption: 'first caption', // thumb: '1_s.jpg' } }], { toolbar: false, loop: false }); $('.fancybox-container').addclass('mobile-big-img-container'); var myelement = $('.fancybox-container').get(0); var mc = new hammer(myelement, {}); var singletap = new hammer.tap({ event: 'tap' }); var doubletap = new hammer.tap({ event: 'doubletap', taps: 2 }); var tripletap = new hammer.tap({ event: 'tripletap', taps: 3 }); mc.add([tripletap, doubletap, singletap]); tripletap.recognizewith([doubletap, singletap]); doubletap.recognizewith(singletap); doubletap.requirefailure(tripletap); singletap.requirefailure([tripletap, doubletap]); // listen to events... mc.on('tap', function (ev) { // console.log(ev); $('.fancybox-button--close').trigger('click'); } ); return; }); }; return huawei; }); define('plugins/videojs-plugins',[ ], function() { 'use strict'; $(document).on("videojs-loaded.videojs-resolution-switcher", function(){ $("") .prependto("head"); /*! videojs-resolution-switcher - 2015-7-26 * copyright (c) 2016 kasper moskwiak * modified by pierre kraft * licensed under the apache-2.0 license. */ !function(){"use strict";var e=null;e=void 0===window.videojs&&"function"==typeof require?require("video.js"):window.videojs,function(e,t){var l,s={},r={},i={};function o(e,t,l,s){return r={label:l,sources:t},"function"==typeof s?s(e,t,l):(e.src(t.map(function(e){return{src:e.src,type:e.type,res:e.res}})),e)}var n=t.getcomponent("menuitem"),a=t.extend(n,{constructor:function(e,t,l,s){this.onclicklistener=l,this.label=s,n.call(this,e,t),this.src=t.src,this.on("click",this.onclick),this.on("touchstart",this.onclick),t.initialyselected&&(this.showaslabel(),this.selected(!0),this.addclass("vjs-selected"))},showaslabel:function(){this.label&&(this.label.innerhtml=this.options_.label)},onclick:function(e){this.onclicklistener(this);var t=this.player_.currenttime(),l=this.player_.paused(),s=this.player_.playbackrate(),r=this.player_.options_.poster;this.showaslabel(),this.addclass("vjs-selected");var i=this.player_;settimeout(function(){i.play()},500),l?this.player_.bigplaybutton.show():(this.player_.bigplaybutton.hide(),r&&this.player_.posterimage.setsrc("")),"function"!=typeof e&&"function"==typeof this.options_.customsourcepicker&&(e=this.options_.customsourcepicker);var n="loadeddata";"youtube"!==this.player_.techname_&&"none"===this.player_.preload()&&"flash"!==this.player_.techname_&&(n="timeupdate"),o(this.player_,this.src,this.options_.label,e).one(n,function(){this.player_.currenttime(t),l||(this.player_.playbackrate(s),this.player_.play(),this.player_.posterimage.setsrc(r)),this.player_.trigger("resolutionchange")})}}),c=t.getcomponent("menubutton"),u=t.extend(c,{constructor:function(e,l,s,r){if(this.sources=l.sources,this.label=r,this.label.innerhtml=l.initialyselectedlabel,c.call(this,e,l,s),this.controltext("quality"),s.dynamiclabel)this.el().appendchild(r);else{var i=document.createelement("span");t.dom.appendcontent(i,l.initialyselectedlabel),t.dom.addclass(i,"vjs-resolution-button-staticlabel"),this.el().appendchild(i)}},createitems:function(){var e=[],t=this.sources&&this.sources.label||{},l=function(t){e.map(function(e){e.selected(e===t),e.removeclass("vjs-selected")})};for(var s in t)t.hasownproperty(s)&&(e.push(new a(this.player_,{label:s,src:t[s],initialyselected:s===this.options_.initialyselectedlabel,customsourcepicker:this.options_.customsourcepicker},l,this.label)),i[s]=e[e.length-1]);return e}});l=function(e){var l=t.mergeoptions(s,e),n=this,a=document.createelement("span"),c={};function h(e,t){return e.res&&t.res?+t.res-+e.res:0}function d(e){var t={label:{},res:{},type:{}};return e.map(function(e){p(t,"label",e),p(t,"res",e),p(t,"type",e),y(t,"label",e),y(t,"res",e),y(t,"type",e)}),t}function p(e,t,l){null==e[t][l[t]]&&(e[t][l[t]]=[])}function y(e,t,l){e[t][l[t]].push(l)}t.dom.addclass(a,"vjs-resolution-button-label"),this.el().appendchild(a),n.updatesrc=function(e){if(!e)return n.src();n.controlbar.resolutionswitcher&&(n.controlbar.resolutionswitcher.dispose(),delete n.controlbar.resolutionswitcher),e=e.sort(h);var s=function(e,t){var s=l.default,r="";"high"===s?(s=t[0].res,r=t[0].label):"low"!==s&&null!=s&&e.res[s]?e.res[s]&&(r=e.res[s][0].label):(s=t[t.length-1].res,r=t[t.length-1].label);return{res:s,label:r,sources:e.res[s]}}(c=d(e),e),r=new u(n,{sources:c,initialyselectedlabel:s.label,initialyselectedres:s.res,customsourcepicker:l.customsourcepicker},l,a);return t.dom.addclass(r.el(),"vjs-resolution-button"),n.controlbar.resolutionswitcher=n.controlbar.el_.insertbefore(r.el_,n.controlbar.getchild("fullscreentoggle").el_),n.controlbar.resolutionswitcher.dispose=function(){this.parentnode.removechild(this)},o(n,s.sources,s.label)},n.currentresolution=function(e,t){return console.log("currentresolution: ",e),null==e?r:(console.log("currentresolution: ",i[e]),null!=i[e]&&i[e].onclick(t),n)},n.getgroupedsrc=function(){return c},n.ready(function(){n.options_.sources.length>1&&n.updatesrc(n.options_.sources),"youtube"===n.techname_&&function(e){e.tech_.ytplayer.setplaybackquality("default"),e.tech_.ytplayer.addeventlistener("onplaybackqualitychange",function(){e.trigger("resolutionchange")}),e.one("play",function(){var t=e.tech_.ytplayer.getavailablequalitylevels(),s={highres:{res:1080,label:"1080",yt:"highres"},hd1080:{res:1080,label:"1080",yt:"hd1080"},hd720:{res:720,label:"720",yt:"hd720"},large:{res:480,label:"480",yt:"large"},medium:{res:360,label:"360",yt:"medium"},small:{res:240,label:"240",yt:"small"},tiny:{res:144,label:"144",yt:"tiny"},auto:{res:0,label:"auto",yt:"default"}},r=[];t.map(function(t){r.push({src:e.src().src,type:e.src().type,label:s[t].label,res:s[t].res,_yt:s[t].yt})});var i="auto",o=0,n=((c=d(r)).label.auto,new u(e,{sources:c,initialyselectedlabel:i,initialyselectedres:o,customsourcepicker:function(t,l,s){return e.tech_.ytplayer.setplaybackquality(l[0]._yt),e}},l,a));n.el().classlist.add("vjs-resolution-button"),e.controlbar.resolutionswitcher=e.controlbar.addchild(n)})}(n)})},(t.registerplugin||t.plugin)("videojsresolutionswitcher",l)}(window,e)}(); }); $(document).on("videojs-loaded.videojs-ga", function(){ (function(){var e=[].indexof||function(e){for(var t=0,n=this.length;t=0&&t("loadedmetadata",!0)},w=function(){var t,n,a,i,r;for(t=math.round(this.currenttime()),n=math.round(this.duration()),i=math.round(t/n*100),a=r=0;r<=99;a=r+=f)i>=a&&e.call(v,a)<0&&(e.call(s,"start")>=0&&0===a&&i>0?t("start",!1):e.call(s,"percentsplayed")>=0&&0!==i&&t("percent played",!1,a),i>0&&v.push(a));e.call(s,"seek")>=0&&(m=y,y=t,math.abs(m-y)>1&&(m=!0,t("seek start",!1,m),t("seek end",!1,y)))},i=function(){t("end",!1)},g=function(){var e;e=math.round(this.currenttime()),t("play",!1,e),m=!1},h=function(){var e;(e=math.round(this.currenttime()))===math.round(this.duration())||m||t("pause",!1,e)},b=function(){var e;e=!0===this.muted()?0:this.volume(),t("volume change",!1,e)},p=function(){t("resize - "+this.width()+"*"+this.height(),!0)},r=function(){var e;e=math.round(this.currenttime()),t("error",!0,e)},u=function(){var e;e=math.round(this.currenttime()),("function"==typeof this.isfullscreen?this.isfullscreen():void 0)||("function"==typeof this.isfullscreen?this.isfullscreen():void 0)?t("enter fullscreen",!1,e):t("exit fullscreen",!1,e)};var q=function(){var e;e=math.round(this.currenttime()),t("downloadvideo",!1,e)},k=this;return t=function(e,n,a){l=k.currentsrc().split("/").slice(-1)[0]+"|"+location.pathname+location.search,window.ga?ga("send","event",{eventcategory:o,eventaction:e,eventlabel:l,eventvalue:a,noninteraction:n}):window._gaq?_gaq.push(["_trackevent",o,e,l,a,n]):t.debug&&console.log("google analytics not detected")},this.ready(function(){if(this.on("loadedmetadata",c),this.on("timeupdate",w),this.on("qualityrequested",function(){var e=math.round(this.currenttime());t("qualityrequested",!1,e)}),this.on("qualityselected",function(){var e=math.round(this.currenttime());t("qualityselected",!1,e)}),e.call(s,"downloadvideo")>=0&&this.on("downloadvideo",q),e.call(s,"end")>=0&&this.on("ended",i),e.call(s,"play")>=0&&this.on("play",g),e.call(s,"pause")>=0&&this.on("pause",h),e.call(s,"volumechange")>=0&&this.on("volumechange",b),e.call(s,"resize")>=0&&this.on("resize",p),e.call(s,"error")>=0&&this.on("error",r),e.call(s,"fullscreen")>=0)return this.on("fullscreenchange",u)}),{sendbeacon:t}})}).call(this); }); $(document).on("videojs-loaded.videojs-language", function(){ videojs.addlanguage('zh-cn', { "play": "播放", "pause": "暂停", "current time": "当前时间", "duration": "时长", "remaining time": "剩余时间", "stream type": "媒体流类型", "live": "直播", "loaded": "加载完成", "progress": "进度", "fullscreen": "全屏", "non-fullscreen": "退出全屏", "picture-in-picture": "画中画", "exit picture-in-picture": "退出画中画", "mute": "静音", "unmute": "取消静音", "playback rate": "播放速度", "subtitles": "字幕", "subtitles off": "关闭字幕", "captions": "内嵌字幕", "captions off": "关闭内嵌字幕", "chapters": "节目段落", "close modal dialog": "关闭弹窗", "descriptions": "描述", "descriptions off": "关闭描述", "audio track": "音轨", "you aborted the media playback": "视频播放被终止", "a network error caused the media download to fail part-way.": "网络错误导致视频下载中途失败。", "the media could not be loaded, either because the server or network failed or because the format is not supported.": "视频因格式不支持或者服务器或网络的问题无法加载。", "the media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。", "no compatible source was found for this media.": "无法找到此视频兼容的源。", "the media is encrypted and we do not have the keys to decrypt it.": "视频已加密,无法解密。", "play video": "播放视频", "close": "关闭", "modal window": "弹窗", "this is a modal window": "这是一个弹窗", "this modal can be closed by pressing the escape key or activating the close button.": "可以按esc按键或启用关闭按钮来关闭此弹窗。", ", opens captions settings dialog": ", 开启标题设置弹窗", ", opens subtitles settings dialog": ", 开启字幕设置弹窗", ", opens descriptions settings dialog": ", 开启描述设置弹窗", ", selected": ", 选择", "captions settings": "字幕设定", "audio player": "音频播放器", "video player": "视频播放器", "replay": "重新播放", "progress bar": "进度条", "volume level": "音量", "subtitles settings": "字幕设定", "descriptions settings": "描述设定", "text": "文字", "white": "白", "black": "黑", "red": "红", "green": "绿", "blue": "蓝", "yellow": "黄", "magenta": "紫红", "cyan": "青", "background": "背景", "window": "窗口", "transparent": "透明", "semi-transparent": "半透明", "opaque": "不透明", "font size": "字体尺寸", "text edge style": "字体边缘样式", "none": "无", "raised": "浮雕", "depressed": "压低", "uniform": "均匀", "dropshadow": "下阴影", "font family": "字体库", "proportional sans-serif": "比例无细体", "monospace sans-serif": "单间隔无细体", "proportional serif": "比例细体", "monospace serif": "单间隔细体", "casual": "舒适", "script": "手写体", "small caps": "小型大写字体", "reset": "重置", "restore all settings to the default values": "恢复全部设定至预设值", "done": "完成", "caption settings dialog": "字幕设定窗口", "beginning of dialog window. escape will cancel and close the window.": "打开对话窗口。escape键将取消并关闭对话窗口", "end of dialog window.": "结束对话窗口", "seek to live, currently behind live": "尝试直播,当前为延时播放", "seek to live, currently playing live": "尝试直播,当前为实时播放", "progress bar timing: currenttime={1} duration={2}": "{1}/{2}", "{1} is loading.": "正在加载 {1}。" }); }); }); define('plugins/old-player-compat',[ ], function () { "use strict"; // 旧版播放器结构兼容处理 (function __playersetup(videobox) { function ismobile() { var ismobile = { android: function () { return navigator.useragent.match(/android/i); }, blackberry: function () { return navigator.useragent.match(/blackberry/i); }, ios: function () { return navigator.useragent.match(/iphone|ipad|ipod/i); }, opera: function () { return navigator.useragent.match(/opera mini/i); }, windows: function () { return navigator.useragent.match(/iemobile/i); }, any: function () { return (ismobile.android() || ismobile.blackberry() || ismobile.ios() || ismobile.opera() || ismobile.windows()); } }; return ismobile.any(); } // bof jwplayer (function ($) { // $(function ($) { // bof dom ready // 旧版弹窗播放视频结构兼容性处理 $("a.js_video_player").not("[data-play-nopop]").each(function () { var $t = $(this); $t.removeclass("js_video_player").addclass("btn-play").append(""); var s = json.stringify(($t.data("options") || {})["sources"]); $t.attr("default-src", $t.attr("data-video-path")).attr("video-src", s); }); var playerinstance = null; function pausevideo(e) { try { if (playerinstance) playerinstance.remove(); } catch (_e) { } } $(document).off("vclick", ".js_video_player, .js-play-btn"); $(document).off("click", ".js_video_player, .js-play-btn").on("click", ".js_video_player, .js-play-btn", function (e) { if (typeof videojs == "undefined") { if (window.console) console.log("player 还未加载"); return false; } var playerid = $(this).attr("data-player-id") || "playercontainer"; var video_path = $(this).attr("data-video-path"); var video_name = $(this).attr("data-video-name"); // 增加视频名称 if (video_name == "" || video_name == undefined) { video_name = video_path; //视频名称为空,去取path } var autostart = ($(this).attr("data-player-autostart") || "1") == "1"; var ismobile = ismobile(); if (ismobile) video_path = $(this).attr("data-video-path-mobile") || video_path; if (video_path && video_path.indexof("//") == 0) video_path = location.protocol + video_path; var player_options = $(this).data("option") || $(this).data("options") || {}; player_options["sources"] = player_options["sources"] || []; player_options["gaevent"] = $(this).attr("data-onclick"); var video_sources = []; var vlist = $(this).attr("data-video-sources"); if (vlist) { vlist = vlist.split(","); for (var i = 0; i < vlist.length; i++) { var v_info = vlist[i].split("|"); var label = $.trim(v_info[1] || "default"); video_sources[i] = { file: $.trim(v_info[0]), label: label }; video_sources[i]["src"] = video_sources[i]["file"]; if (!ismobile && label.indexof("720") >= 0) video_sources[i]["default"] = true; else if (ismobile && label.indexof("360") >= 0) video_sources[i]["default"] = true; } if (ismobile) { var md = $.grep(video_sources, function (v) { return v["default"]; }); if (!md.length) video_sources[video_sources.length - 1]["default"] = true; } } player_options["sources"] = video_sources.concat(player_options["sources"]); if (player_options["sources"].length == 0 && video_sources.length > 0) player_options["sources"] = video_sources; else if (video_path && video_sources.length == 0 && player_options["sources"].length == 0) player_options["sources"] = [{ "src": video_path, label: "default" }]; else if (!video_path && video_sources.length == 0 && player_options["sources"].length == 0 && $(this).attr("data-url")) player_options["sources"] = [{ "src": $(this).attr("data-url"), label: "default" }]; if (player_options["sources"].length > 1) { var sourceobj = {}; $.each(player_options["sources"], function (i, o) { sourceobj[o.label.tolocalelowercase()] = o; }); var defaultv = ismobile ? sourceobj["360p"] : sourceobj["720p"]; if (!defaultv) { defaultv = player_options["sources"][0]; } defaultv["selected"] = true; defaultv["res"] = 720; } player_options["poster"] = player_options["poster"] || $(this).attr("data-img-path"); player_options["autoplay"] = typeof player_options["autoplay"] == "boolean" ? player_options["autoplay"] : autostart; if ($(this).attr("data-play-nopop")) { //$(this).next("img").fadeout(); playerinstance = initplayer(playerid, player_options); $(this).addclass("invisible"); return false; } // 采用新版弹框播放 var play_html = $("
"); var $t = $(this); bootstrapdialog.show({ message: play_html, cssclass: "video-dialog", onshown: function () { playerinstance = initplayer(playerid, player_options); playerinstance.onfullscreen = function (e) { if (window.console) console.log(e); }; settimeout(function () { $(".bootstrap-dialog.video-dialog").off("keyup"); // if (!ismobile) // playerinstance && playerinstance.play(true); }, 2000); }, onhide: function (dialogref) { //playerinstance && playerinstance.play(false);// && playerinstance.remove(); //alert('dialog is popping down, its message is ' + dialogref.getmessage()); playerinstance && playerinstance.dispose(); } }); return false; }); // eof dom ready // }); })(jquery); // eof })(); window.initplayer = function (playerid, options) { options = options || {}; $("
") .replaceall($("#" + playerid)); var player_options = { controls: true, autoplay: true, preload: "none", "fluid": true, sources: [], aspectratio: "16:9", muted: false, plugins: {}, "language": window["videojslanguage"] }; options["aspectratio"] = options["aspectratio"] || options["aspectratio"] || "16:9"; options["muted"] = options["muted"] || options["mute"] || false; options["loop"] = options["loop"] || options["repeat"] || false; if (videojs.getplugin && videojs.getplugin("vjsdownload")) { player_options.plugins["vjsdownload"] = { beforeelement: "playbackratemenubutton", textcontrol: window["playerlang"][window["lang"]]["download-video"], name: "downloadbutton", //downloadurl: 'https://insert_source_here.mp4' //optional if you need a different download url than the source }; } $.extend(player_options, options); var player = videojs.getplayers()[playerid]; if (player) player.dispose(); var player = videojs(playerid, player_options); if (player_options["autoplay"]) settimeout(function () { player.play(); }, 1000); if (videojs.getcomponent("qualityselector")) { player.controlbar.addchild("qualityselector", { textcontrol: "quality", }).controltext(window["playerlang"][window["lang"]]["switch-quality"]); } if (player.ga) player.ga(); if (player_options.gaevent) { var flag = false; var evt = function (e) { if (flag) return; flag = true; var gaevent = new function("e", player_options.gaevent); gaevent.apply(e) }; if (player.one) player.one("play", evt); else player.on("play", evt); } var hassend = false; player.on("play", function (e) { if (hassend) return; hassend = true; var url = player.currentsrc(); try { utag.link({ "tealium_event": "video_clicked", "video_id": url, "video_name": "" }); } catch (e) { } }); return player; }; }); define("global/window", [], function () { return window; }); define("global/document", [], function () { return document; }); if (!window.location.origin) { window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); } var origin = window.location.origin; var langcn = $("html").is('[lang="zh"]') || document.url.indexof("/cn/") >= 0; (function videojs5to7() { if (langcn) { $("video.video-js[data-setup]").each(function () { $(this) .data("setup", $(this).data("setup")) .removeattr("data-setup") .addclass("language-cn"); }); } $("video[src]").each(function () { var $t = $(this); $t.append(""); }); }()); define('videobox',["plugins/videojs-plugins", "plugins/old-player-compat"], function () { var videodef = $.deferred(); var videojs; // 视频播放器组件 var videojspromise = function () { var videojsie8 = $.when(); return videojsie8 .then(function () { $("") .prependto("head"); if (typeof window.videojs !== "undefined") return $.when(); // return $.loadjs(origin + "/assets/corp/2020/js/lib/vendor/video.js/video.min.js"); return $.loadjs("https://www.huawei.com/assets/corp/2020/js/lib/vendor/video.js/video.min.js"); }) .then(function (_videojs) { if (typeof _videojs === "function") (window.videojs = _videojs); videojs = _videojs || window.videojs; $(document).trigger("videojs-loaded"); if (langcn) { $("video.video-js.language-cn").each(function () { var $v = $(this); var ops = $v.data("setup") || {}; ops.language = "zh-cn"; window.videojs(this, ops); }); } if (window.videojs.getplugin("videojsresolutionswitcher")) return $.when(); return $.loadjs("https://cdn.jsdelivr.net/npm/" + "@xiaoyexiang/videojs-resolution-switcher-v7@1.1.9/lib/videojs-resolution-switcher-v7.min.js"); }) .then(function (d) { videodef.resolve(videojs); $(document).trigger("videojs-resolution-switcher-loaded"); }); }; $(document).on("videojs-loaded.videojs-ga", function (e) { var gaplugin = $.when(); gaplugin .then(function (d) { $(document).trigger("videojs-ga-loaded"); }) .then(function () { $(document).trigger("videojs-setup", videojs.getplayers()); }); }); $(document).on("videojs-setup", function (e, players) { $.each(players, function (i, player) { var gaoption = { eventlabel: player.currentsrc().split("/").slice(-1)[0] + "|" + document.url, }; player.ga(gaoption); }); }); // 视频默认分辨率 $(document).on("resolutionswitcher", function (e, _players) { var players = _players || {}; var winw = $(window).width(); $.each(players, function (i, o) { if ( !$.grep(o.controlbar.children(), function (element) { return element.name === "button"; }).length ) { var player = o; try { var mybutton = player.controlbar.addchild("button"); var mybuttondom = mybutton.el(); $(mybuttondom) .addclass("vjs-download-control") .on("click", function () { if (/msie|trident/i.test(navigator.useragent)) { var a = document.createelement("a"); a.href = $(this).find("a").attr("href"); a.target = "_blank"; a.rel = "noopener"; $(a).hide().appendto("body"); settimeout(function () { a.click(); $(a).remove(); }, 200); } }); mybuttondom.innerhtml = ''; } catch (error) { } } // var $rs_btn = $(o.controlbar.resolutionswitcher); if (!$rs_btn.length) { var vrs = { default: 360, dynamiclabel: true, }; if (winw > 991) vrs.default = 720; o.videojsresolutionswitcher(vrs); } if ($rs_btn.length && $rs_btn.find(".vjs-menu-content .vjs-menu-item").length <= 1) { $rs_btn.addclass("hidden"); } }); }); $(document).on("videojs-resolution-switcher-loaded", function (e) { if (typeof videojs !== "undefined") { settimeout(function () { $(document).trigger("resolutionswitcher", videojs.getplayers()); }, 1000); } }); if ($("video.video-js, .btn-play, .js-play-btn, .js_video_player, .js-video-gallery-btn, .js-has-videojs").length) { videojspromise(); } $(document).on("click", ".btn-close, .js-close-btn", function (e) { $("body").removeclass("video-popup"); }).on("click", ".btn-play, .js-play-btn", function (e) { $("body").addclass("video-popup"); }); function videobox(dom, id) { this.dom = dom; if (this.dom[0].inited) return; this.dom[0].inited = true; this.defaultsrc = dom.attr("default-src"); this.src = dom.attr("video-src"); this.poster = dom.attr("poster"); this.id = id; this.popup = dom.attr("data-popup") || 1; var self = this; videodef.then(function (d) { self.init(); }); } videobox.prototype = { init: function () { var self = this; var div = document.createelement("div"); div.setattribute("class", "video-box"); var disabledl = self.dom.hasclass("no-download") ? ' oncontextmenu="return false;"' : ""; var disabledlclass = self.dom.hasclass("no-download") ? " no-download" : ""; var poster = this.poster ? ' poster="' + this.poster + '"' : ""; var sources = []; try { sources = (new function("return " + self.dom.attr("video-src")))(); } catch (_e) { } if (!sources && self.defaultsrc) sources = [{ src: self.defaultsrc, label: "720p", res: 720 }]; var sourceshtml = sources.map(function (v) { return ''; }); sourceshtml = sourceshtml.join(""); var vwidth = 960; var vheight = 540; if (window.innerwidth < 990) { vwidth = window.innerwidth; vheight = vwidth / (16 / 9); } $(div).html('
' + '
"); if (this.popup === "0") { this.dom.after(div).end().hide(); } else $("body").append($(div)); self.setupplayer(div); }, setupplayer: function (videocontainer) { var self = this; var div = videocontainer; var options = { controls: true, }; if (langcn) options.language = "zh-cn"; var video = videojs("my-video-" + this.id, options, function () { var player = this; window.player = player; var aaa = []; try { aaa = eval(self.src) || []; } catch (_e) { } // 切换清晰度 if (aaa.length > 0 && player.updatesrc) player.updatesrc(aaa); if (aaa.length <= 1 && player.controlbar.resolutionswitcher) { player.controlbar.resolutionswitcher.classlist.add("hidden"); } player.on("resolutionchange", function () { console.info("source changed to %s", player.src()); }); }); this.dom.on("click", function (e) { e.preventdefault(); $(div).addclass("show"); settimeout(function () { video.play(); }, 1000); settimeout(function () { video.play(); }, 100); }); $(div).find("a.btn-close").on("click", function (e) { e.preventdefault(); $(div).removeclass("show"); video.pause(); }); }, }; return videobox; }); /** * swiper 5.3.6 * most modern mobile touch slider and framework with hardware accelerated transitions * http://swiperjs.com * * copyright 2014-2020 vladimir kharlampidi * * released under the mit license * * released on: february 29, 2020 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define('vendor/swiper/swiper.min',t):(e=e||self).swiper=t()}(this,(function(){"use strict";var e="undefined"==typeof document?{body:{},addeventlistener:function(){},removeeventlistener:function(){},activeelement:{blur:function(){},nodename:""},queryselector:function(){return null},queryselectorall:function(){return[]},getelementbyid:function(){return null},createevent:function(){return{initevent:function(){}}},createelement:function(){return{children:[],childnodes:[],style:{},setattribute:function(){},getelementsbytagname:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof window?{document:e,navigator:{useragent:""},location:{},history:{},customevent:function(){return this},addeventlistener:function(){},removeeventlistener:function(){},getcomputedstyle:function(){return{getpropertyvalue:function(){return""}}},image:function(){},date:function(){},screen:{},settimeout:function(){},cleartimeout:function(){}}:window,i=function(e){for(var t=0;t=0&&d.indexof(">")>=0){var h="div";for(0===d.indexof(":~]/)?(a||e).queryselectorall(s.trim()):[e.getelementbyid(s.trim().split("#")[1])],n=0;n0&&s[0].nodetype)for(n=0;n=0;u-=1){var v=c[u];r&&v.listener===r?(p.removeeventlistener(d,v.proxylistener,n),c.splice(u,1)):r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(p.removeeventlistener(d,v.proxylistener,n),c.splice(u,1)):r||(p.removeeventlistener(d,v.proxylistener,n),c.splice(u,1))}}return this},trigger:function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];for(var a=i[0].split(" "),r=i[1],n=0;n0})),d.dispatchevent(h),d.dom7eventdata=[],delete d.dom7eventdata}return this},transitionend:function(e){var t,i=["webkittransitionend","transitionend"],s=this;function a(r){if(r.target===this)for(e.call(this,r),t=0;t0){if(e){var t=this.styles();return this[0].offsetwidth+parsefloat(t.getpropertyvalue("margin-right"))+parsefloat(t.getpropertyvalue("margin-left"))}return this[0].offsetwidth}return null},outerheight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetheight+parsefloat(t.getpropertyvalue("margin-top"))+parsefloat(t.getpropertyvalue("margin-bottom"))}return this[0].offsetheight}return null},offset:function(){if(this.length>0){var i=this[0],s=i.getboundingclientrect(),a=e.body,r=i.clienttop||a.clienttop||0,n=i.clientleft||a.clientleft||0,o=i===t?t.scrolly:i.scrolltop,l=i===t?t.scrollx:i.scrollleft;return{top:s.top+o-r,left:s.left+l-n}}return null},css:function(e,i){var s;if(1===arguments.length){if("string"!=typeof e){for(s=0;ss-1?[]:e<0?(t=s+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var t,s=[],a=arguments.length;a--;)s[a]=arguments[a];for(var r=0;r=0;a-=1)this[s].insertbefore(r.childnodes[a],this[s].childnodes[0])}else if(t instanceof i)for(a=0;a0?e?this[0].nextelementsibling&&s(this[0].nextelementsibling).is(e)?new i([this[0].nextelementsibling]):new i([]):this[0].nextelementsibling?new i([this[0].nextelementsibling]):new i([]):new i([])},nextall:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.nextelementsibling;){var r=a.nextelementsibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previouselementsibling&&s(t.previouselementsibling).is(e)?new i([t.previouselementsibling]):new i([]):t.previouselementsibling?new i([t.previouselementsibling]):new i([])}return new i([])},prevall:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.previouselementsibling;){var r=a.previouselementsibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},parent:function(e){for(var t=[],i=0;i6&&(a=a.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new t.webkitcssmatrix("none"===a?"":a)):s=(r=n.moztransform||n.otransform||n.mstransform||n.mstransform||n.transform||n.getpropertyvalue("transform").replace("translate(","matrix(1, 0, 0, 1,")).tostring().split(","),"x"===i&&(a=t.webkitcssmatrix?r.m41:16===s.length?parsefloat(s[12]):parsefloat(s[4])),"y"===i&&(a=t.webkitcssmatrix?r.m42:16===s.length?parsefloat(s[13]):parsefloat(s[5])),a||0},parseurlquery:function(e){var i,s,a,r,n={},o=e||t.location.href;if("string"==typeof o&&o.length)for(r=(s=(o=o.indexof("?")>-1?o.replace(/\s*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,i=0;i0||"ontouchstart"in t||t.documenttouch&&e instanceof t.documenttouch),pointerevents:!!t.pointerevent&&"maxtouchpoints"in t.navigator&&t.navigator.maxtouchpoints>0,observer:"mutationobserver"in t||"webkitmutationobserver"in t,passivelistener:function(){var e=!1;try{var i=object.defineproperty({},"passive",{get:function(){e=!0}});t.addeventlistener("testpassivelistener",null,i)}catch(e){}return e}(),gestures:"ongesturestart"in t},l=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventslisteners={},t.params&&t.params.on&&object.keys(t.params.on).foreach((function(e){t.on(e,t.params.on[e])}))},d={components:{configurable:!0}};l.prototype.on=function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").foreach((function(e){s.eventslisteners[e]||(s.eventslisteners[e]=[]),s.eventslisteners[e][a](t)})),s},l.prototype.once=function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];s.off(e,a),a.f7proxy&&delete a.f7proxy,t.apply(s,i)}return a.f7proxy=t,s.on(e,a,i)},l.prototype.off=function(e,t){var i=this;return i.eventslisteners?(e.split(" ").foreach((function(e){void 0===t?i.eventslisteners[e]=[]:i.eventslisteners[e]&&i.eventslisteners[e].length&&i.eventslisteners[e].foreach((function(s,a){(s===t||s.f7proxy&&s.f7proxy===t)&&i.eventslisteners[e].splice(a,1)}))})),i):i},l.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;if(!r.eventslisteners)return r;"string"==typeof e[0]||array.isarray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r);var n=array.isarray(i)?i:i.split(" ");return n.foreach((function(e){if(r.eventslisteners&&r.eventslisteners[e]){var t=[];r.eventslisteners[e].foreach((function(e){t.push(e)})),t.foreach((function(e){e.apply(a,s)}))}})),r},l.prototype.usemodulesparams=function(e){var t=this;t.modules&&object.keys(t.modules).foreach((function(i){var s=t.modules[i];s.params&&n.extend(e,s.params)}))},l.prototype.usemodules=function(e){void 0===e&&(e={});var t=this;t.modules&&object.keys(t.modules).foreach((function(i){var s=t.modules[i],a=e[i]||{};s.instance&&object.keys(s.instance).foreach((function(e){var i=s.instance[e];t[e]="function"==typeof i?i.bind(t):i})),s.on&&t.on&&object.keys(s.on).foreach((function(e){t.on(e,s.on[e])})),s.create&&s.create.bind(t)(a)}))},d.components.set=function(e){this.use&&this.use(e)},l.installmodule=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;s.prototype.modules||(s.prototype.modules={});var a=e.name||object.keys(s.prototype.modules).length+"_"+n.now();return s.prototype.modules[a]=e,e.proto&&object.keys(e.proto).foreach((function(t){s.prototype[t]=e.proto[t]})),e.static&&object.keys(e.static).foreach((function(t){s[t]=e.static[t]})),e.install&&e.install.apply(s,t),s},l.use=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;return array.isarray(e)?(e.foreach((function(e){return s.installmodule(e)})),s):s.installmodule.apply(s,[e].concat(t))},object.defineproperties(l,d);var h={updatesize:function(){var e,t,i=this.$el;e=void 0!==this.params.width?this.params.width:i[0].clientwidth,t=void 0!==this.params.height?this.params.height:i[0].clientheight,0===e&&this.ishorizontal()||0===t&&this.isvertical()||(e=e-parseint(i.css("padding-left"),10)-parseint(i.css("padding-right"),10),t=t-parseint(i.css("padding-top"),10)-parseint(i.css("padding-bottom"),10),n.extend(this,{width:e,height:t,size:this.ishorizontal()?e:t}))},updateslides:function(){var e=this.params,i=this.$wrapperel,s=this.size,a=this.rtltranslate,r=this.wrongrtl,o=this.virtual&&e.virtual.enabled,l=o?this.virtual.slides.length:this.slides.length,d=i.children("."+this.params.slideclass),h=o?this.virtual.slides.length:d.length,p=[],c=[],u=[];function v(t){return!e.cssmode||t!==d.length-1}var f=e.slidesoffsetbefore;"function"==typeof f&&(f=e.slidesoffsetbefore.call(this));var m=e.slidesoffsetafter;"function"==typeof m&&(m=e.slidesoffsetafter.call(this));var g=this.snapgrid.length,b=this.snapgrid.length,w=e.spacebetween,y=-f,x=0,t=0;if(void 0!==s){var e,s;"string"==typeof w&&w.indexof("%")>=0&&(w=parsefloat(w.replace("%",""))/100*s),this.virtualsize=-w,a?d.css({marginleft:"",margintop:""}):d.css({marginright:"",marginbottom:""}),e.slidespercolumn>1&&(e=math.floor(h/e.slidespercolumn)===h/this.params.slidespercolumn?h:math.ceil(h/e.slidespercolumn)*e.slidespercolumn,"auto"!==e.slidesperview&&"row"===e.slidespercolumnfill&&(e=math.max(e,e.slidesperview*e.slidespercolumn)));for(var c,m=e.slidespercolumn,p=e/m,z=math.floor(h/e.slidespercolumn),k=0;k1){var l=void 0,i=void 0,d=void 0;if("row"===e.slidespercolumnfill&&e.slidespergroup>1){var o=math.floor(k/(e.slidespergroup*e.slidespercolumn)),a=k-e.slidespercolumn*e.slidespergroup*o,g=0===o?e.slidespergroup:math.min(math.ceil((h-o*m*e.slidespergroup)/m),e.slidespergroup);l=(i=a-(d=math.floor(a/g))*g+o*e.slidespergroup)+d*e/m,$.css({"-webkit-box-ordinal-group":l,"-moz-box-ordinal-group":l,"-ms-flex-order":l,"-webkit-order":l,order:l})}else"column"===e.slidespercolumnfill?(d=k-(i=math.floor(k/m))*m,(i>z||i===z&&d===m-1)&&(d+=1)>=m&&(d=0,i+=1)):i=k-(d=math.floor(k/p))*p;$.css("margin-"+(this.ishorizontal()?"top":"left"),0!==d&&e.spacebetween&&e.spacebetween+"px")}if("none"!==$.css("display")){if("auto"===e.slidesperview){var h=t.getcomputedstyle($[0],null),b=$[0].style.transform,n=$[0].style.webkittransform;if(b&&($[0].style.transform="none"),n&&($[0].style.webkittransform="none"),e.roundlengths)s=this.ishorizontal()?$.outerwidth(!0):$.outerheight(!0);else if(this.ishorizontal()){var x=parsefloat(h.getpropertyvalue("width")),v=parsefloat(h.getpropertyvalue("padding-left")),y=parsefloat(h.getpropertyvalue("padding-right")),f=parsefloat(h.getpropertyvalue("margin-left")),w=parsefloat(h.getpropertyvalue("margin-right")),r=h.getpropertyvalue("box-sizing");s=r&&"border-box"===r?x+f+w:x+v+y+f+w}else{var q=parsefloat(h.getpropertyvalue("height")),j=parsefloat(h.getpropertyvalue("padding-top")),k=parsefloat(h.getpropertyvalue("padding-bottom")),u=parsefloat(h.getpropertyvalue("margin-top")),_=parsefloat(h.getpropertyvalue("margin-bottom")),z=h.getpropertyvalue("box-sizing");s=z&&"border-box"===z?q+u+_:q+j+k+u+_}b&&($[0].style.transform=b),n&&($[0].style.webkittransform=n),e.roundlengths&&(s=math.floor(s))}else s=(s-(e.slidesperview-1)*w)/e.slidesperview,e.roundlengths&&(s=math.floor(s)),d[k]&&(this.ishorizontal()?d[k].style.width=s+"px":d[k].style.height=s+"px");d[k]&&(d[k].swiperslidesize=s),u.push(s),e.centeredslides?(y=y+s/2+x/2+w,0===x&&0!==k&&(y=y-s/2-w),0===k&&(y=y-s/2-w),math.abs(y)<.001&&(y=0),e.roundlengths&&(y=math.floor(y)),t%e.slidespergroup==0&&p.push(y),c.push(y)):(e.roundlengths&&(y=math.floor(y)),(t-math.min(this.params.slidespergroupskip,t))%this.params.slidespergroup==0&&p.push(y),c.push(y),y=y+s+w),this.virtualsize+=s+w,x=s,t+=1}}if(this.virtualsize=math.max(this.virtualsize,s)+m,a&&r&&("slide"===e.effect||"coverflow"===e.effect)&&i.css({width:this.virtualsize+e.spacebetween+"px"}),e.setwrappersize&&(this.ishorizontal()?i.css({width:this.virtualsize+e.spacebetween+"px"}):i.css({height:this.virtualsize+e.spacebetween+"px"})),e.slidespercolumn>1&&(this.virtualsize=(s+e.spacebetween)*e,this.virtualsize=math.ceil(this.virtualsize/e.slidespercolumn)-e.spacebetween,this.ishorizontal()?i.css({width:this.virtualsize+e.spacebetween+"px"}):i.css({height:this.virtualsize+e.spacebetween+"px"}),e.centeredslides)){c=[];for(var q=0;q1&&p.push(this.virtualsize-s)}if(0===p.length&&(p=[0]),0!==e.spacebetween&&(this.ishorizontal()?a?d.filter(v).css({marginleft:w+"px"}):d.filter(v).css({marginright:w+"px"}):d.filter(v).css({marginbottom:w+"px"})),e.centeredslides&&e.centeredslidesbounds){var ie=0;u.foreach((function(t){ie+=t+(e.spacebetween?e.spacebetween:0)}));var se=(ie-=e.spacebetween)-s;p=p.map((function(e){return e<0?-f:e>se?se+m:e}))}if(e.centerinsufficientslides){var ae=0;if(u.foreach((function(t){ae+=t+(e.spacebetween?e.spacebetween:0)})),(ae-=e.spacebetween)1)if(this.params.centeredslides)i.push.apply(i,this.visibleslides);else for(t=0;tthis.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeindex)[0]);for(t=0;ts?r:s}s&&this.$wrapperel.css("height",s+"px")},updateslidesoffset:function(){for(var e=this.slides,t=0;t=0&&d1&&h<=this.size||d<=0&&h>=this.size)&&(this.visibleslides.push(o),this.visibleslidesindexes.push(n),i.eq(n).addclass(t.slidevisibleclass))}o.progress=a?-l:l}this.visibleslides=s(this.visibleslides)}},updateprogress:function(e){if(void 0===e){var t=this.rtltranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxtranslate()-this.mintranslate(),a=this.progress,r=this.isbeginning,o=this.isend,l=r,d=o;0===s?(a=0,r=!0,o=!0):(r=(a=(e-this.mintranslate())/s)<=0,o=a>=1),n.extend(this,{progress:a,isbeginning:r,isend:o}),(i.watchslidesprogress||i.watchslidesvisibility||i.centeredslides&&i.autoheight)&&this.updateslidesprogress(e),r&&!l&&this.emit("reachbeginning toedge"),o&&!d&&this.emit("reachend toedge"),(l&&!r||d&&!o)&&this.emit("fromedge"),this.emit("progress",a)},updateslidesclasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperel,a=this.activeindex,r=this.realindex,n=this.virtual&&i.virtual.enabled;t.removeclass(i.slideactiveclass+" "+i.slidenextclass+" "+i.slideprevclass+" "+i.slideduplicateactiveclass+" "+i.slideduplicatenextclass+" "+i.slideduplicateprevclass),(e=n?this.$wrapperel.find("."+i.slideclass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addclass(i.slideactiveclass),i.loop&&(e.hasclass(i.slideduplicateclass)?s.children("."+i.slideclass+":not(."+i.slideduplicateclass+')[data-swiper-slide-index="'+r+'"]').addclass(i.slideduplicateactiveclass):s.children("."+i.slideclass+"."+i.slideduplicateclass+'[data-swiper-slide-index="'+r+'"]').addclass(i.slideduplicateactiveclass));var o=e.nextall("."+i.slideclass).eq(0).addclass(i.slidenextclass);i.loop&&0===o.length&&(o=t.eq(0)).addclass(i.slidenextclass);var l=e.prevall("."+i.slideclass).eq(0).addclass(i.slideprevclass);i.loop&&0===l.length&&(l=t.eq(-1)).addclass(i.slideprevclass),i.loop&&(o.hasclass(i.slideduplicateclass)?s.children("."+i.slideclass+":not(."+i.slideduplicateclass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addclass(i.slideduplicatenextclass):s.children("."+i.slideclass+"."+i.slideduplicateclass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addclass(i.slideduplicatenextclass),l.hasclass(i.slideduplicateclass)?s.children("."+i.slideclass+":not(."+i.slideduplicateclass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addclass(i.slideduplicateprevclass):s.children("."+i.slideclass+"."+i.slideduplicateclass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addclass(i.slideduplicateprevclass))},updateactiveindex:function(e){var t,i=this.rtltranslate?this.translate:-this.translate,s=this.slidesgrid,a=this.snapgrid,r=this.params,o=this.activeindex,l=this.realindex,d=this.snapindex,h=e;if(void 0===h){for(var p=0;p=s[p]&&i=s[p]&&i=s[p]&&(h=p);r.normalizeslideindex&&(h<0||void 0===h)&&(h=0)}if(a.indexof(i)>=0)t=a.indexof(i);else{var c=math.min(r.slidespergroupskip,h);t=c+math.floor((h-c)/r.slidespergroup)}if(t>=a.length&&(t=a.length-1),h!==o){var u=parseint(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);n.extend(this,{snapindex:t,realindex:u,previousindex:o,activeindex:h}),this.emit("activeindexchange"),this.emit("snapindexchange"),l!==u&&this.emit("realindexchange"),(this.initialized||this.runcallbacksoninit)&&this.emit("slidechange")}else t!==d&&(this.snapindex=t,this.emit("snapindexchange"))},updateclickedslide:function(e){var t=this.params,i=s(e.target).closest("."+t.slideclass)[0],a=!1;if(i)for(var r=0;rh?h:s&&ea?"next":is?"next":i=l.length&&(f=l.length-1),(p||o.initialslide||0)===(h||0)&&i&&r.emit("beforeslidechangestart");var m,g=-l[f];if(r.updateprogress(g),o.normalizeslideindex)for(var b=0;b=math.floor(100*d[b])&&(n=b);if(r.initialized&&n!==p){if(!r.allowslidenext&&gr.translate&&g>r.maxtranslate()&&(p||0)!==n)return!1}if(m=n>p?"next":n=e&&(c=e)})),void 0!==c&&(d=n.indexof(c))<0&&(d=this.activeindex-1),this.slideto(d,e,t,i)},slidereset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideto(this.activeindex,e,t,i)},slidetoclosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeindex,r=math.min(this.params.slidespergroupskip,a),n=r+math.floor((a-r)/this.params.slidespergroup),o=this.rtltranslate?this.translate:-this.translate;if(o>=this.snapgrid[n]){var l=this.snapgrid[n];o-l>(this.snapgrid[n+1]-l)*s&&(a+=this.params.slidespergroup)}else{var d=this.snapgrid[n-1];o-d<=(this.snapgrid[n]-d)*s&&(a-=this.params.slidespergroup)}return a=math.max(a,0),a=math.min(a,this.slidesgrid.length-1),this.slideto(a,e,t,i)},slidetoclickedslide:function(){var e,t=this,i=t.params,a=t.$wrapperel,r="auto"===i.slidesperview?t.slidesperviewdynamic():i.slidesperview,o=t.clickedindex;if(i.loop){if(t.animating)return;e=parseint(s(t.clickedslide).attr("data-swiper-slide-index"),10),i.centeredslides?ot.slides.length-t.loopedslides+r/2?(t.loopfix(),o=a.children("."+i.slideclass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideduplicateclass+")").eq(0).index(),n.nexttick((function(){t.slideto(o)}))):t.slideto(o):o>t.slides.length-r?(t.loopfix(),o=a.children("."+i.slideclass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideduplicateclass+")").eq(0).index(),n.nexttick((function(){t.slideto(o)}))):t.slideto(o)}else t.slideto(o)}};var v={loopcreate:function(){var t=this,i=t.params,a=t.$wrapperel;a.children("."+i.slideclass+"."+i.slideduplicateclass).remove();var r=a.children("."+i.slideclass);if(i.loopfillgroupwithblank){var n=i.slidespergroup-r.length%i.slidespergroup;if(n!==i.slidespergroup){for(var o=0;or.length&&(t.loopedslides=r.length);var d=[],h=[];r.each((function(e,i){var a=s(i);e=r.length-t.loopedslides&&d.push(i),a.attr("data-swiper-slide-index",e)}));for(var p=0;p=0;c-=1)a.prepend(s(d[c].clonenode(!0)).addclass(i.slideduplicateclass))},loopfix:function(){this.emit("beforeloopfix");var e,t=this.activeindex,i=this.slides,s=this.loopedslides,a=this.allowslideprev,r=this.allowslidenext,n=this.snapgrid,o=this.rtltranslate;this.allowslideprev=!0,this.allowslidenext=!0;var l=-n[t]-this.gettranslate();if(t=i.length-s){e=-i.length+t+s,e+=s,this.slideto(e,0,!1,!0)&&0!==l&&this.settranslate((o?-this.translate:this.translate)-l)}this.allowslideprev=a,this.allowslidenext=r,this.emit("loopfix")},loopdestroy:function(){var e=this.$wrapperel,t=this.params,i=this.slides;e.children("."+t.slideclass+"."+t.slideduplicateclass+",."+t.slideclass+"."+t.slideblankclass).remove(),i.removeattr("data-swiper-slide-index")}};var f={setgrabcursor:function(e){if(!(o.touch||!this.params.simulatetouch||this.params.watchoverflow&&this.islocked||this.params.cssmode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetgrabcursor:function(){o.touch||this.params.watchoverflow&&this.islocked||this.params.cssmode||(this.el.style.cursor="")}};var m,g,b,w,y,x,t,e,s,c,m,p,z,k,$,l={appendslide:function(e){var t=this.$wrapperel,i=this.params;if(i.loop&&this.loopdestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=r)this.appendslide(t);else{for(var n=a>e?a+1:a,l=[],d=r-1;d>=e;d-=1){var h=this.slides.eq(d);h.remove(),l.unshift(h)}if("object"==typeof t&&"length"in t){for(var p=0;pe?a+t.length:a}else i.append(t);for(var c=0;c=0||g.indexof("trident/")>=0,m=g.indexof("edge/")>=0,p=g.indexof("gecko/")>=0&&g.indexof("firefox/")>=0,z="win32"===m,k=g.tolowercase().indexof("electron")>=0,$="macintel"===m,!t&&$&&o.touch&&(1024===w&&1366===y||834===w&&1194===y||834===w&&1112===y||768===w&&1024===y)&&(t=g.match(/(version)\/([\d.]+)/),$=!1),b.ie=c,b.edge=m,b.firefox=p,x&&!z&&(b.os="android",b.osversion=x[2],b.android=!0,b.androidchrome=g.tolowercase().indexof("chrome")>=0),(t||s||e)&&(b.os="ios",b.ios=!0),s&&!e&&(b.osversion=s[2].replace(/_/g,"."),b.iphone=!0),t&&(b.osversion=t[2].replace(/_/g,"."),b.ipad=!0),e&&(b.osversion=e[3]?e[3].replace(/_/g,"."):null,b.ipod=!0),b.ios&&b.osversion&&g.indexof("version/")>=0&&"10"===b.osversion.split(".")[0]&&(b.osversion=g.tolowercase().split("version/")[1].split(" ")[0]),b.webview=!(!(s||t||e)||!g.match(/.*applewebkit(?!.*safari)/i)&&!t.navigator.standalone)||t.matchmedia&&t.matchmedia("(display-mode: standalone)").matches,b.webview=b.webview,b.standalone=b.webview,b.desktop=!(b.ios||b.android)||k,b.desktop&&(b.electron=k,b.macos=$,b.windows=z,b.macos&&(b.os="macos"),b.windows&&(b.os="windows")),b.pixelratio=t.devicepixelratio||1,b);function d(i){var a=this.toucheventsdata,r=this.params,o=this.touches;if(!this.animating||!r.preventinteractionontransition){var l=i;l.originalevent&&(l=l.originalevent);var d=s(l.target);if(("wrapper"!==r.toucheventstarget||d.closest(this.wrapperel).length)&&(a.istouchevent="touchstart"===l.type,(a.istouchevent||!("which"in l)||3!==l.which)&&!(!a.istouchevent&&"button"in l&&l.button>0||a.istouched&&a.ismoved)))if(r.noswiping&&d.closest(r.noswipingselector?r.noswipingselector:"."+r.noswipingclass)[0])this.allowclick=!0;else if(!r.swipehandler||d.closest(r.swipehandler)[0]){o.currentx="touchstart"===l.type?l.targettouches[0].pagex:l.pagex,o.currenty="touchstart"===l.type?l.targettouches[0].pagey:l.pagey;var h=o.currentx,p=o.currenty,c=r.edgeswipedetection||r.iosedgeswipedetection,u=r.edgeswipethreshold||r.iosedgeswipethreshold;if(!c||!(h<=u||h>=t.screen.width-u)){if(n.extend(a,{istouched:!0,ismoved:!1,allowtouchcallbacks:!0,isscrolling:void 0,startmoving:void 0}),o.startx=h,o.starty=p,a.touchstarttime=n.now(),this.allowclick=!0,this.updatesize(),this.swipedirection=void 0,r.threshold>0&&(a.allowthresholdmove=!1),"touchstart"!==l.type){var v=!0;d.is(a.formelements)&&(v=!1),e.activeelement&&s(e.activeelement).is(a.formelements)&&e.activeelement!==d[0]&&e.activeelement.blur();var f=v&&this.allowtouchmove&&r.touchstartpreventdefault;(r.touchstartforcepreventdefault||f)&&l.preventdefault()}this.emit("touchstart",l)}}}}function o(t){var i=this.toucheventsdata,a=this.params,r=this.touches,o=this.rtltranslate,l=t;if(l.originalevent&&(l=l.originalevent),i.istouched){if(!i.istouchevent||"mousemove"!==l.type){var d="touchmove"===l.type&&l.targettouches&&(l.targettouches[0]||l.changedtouches[0]),h="touchmove"===l.type?d.pagex:l.pagex,p="touchmove"===l.type?d.pagey:l.pagey;if(l.preventedbynestedswiper)return r.startx=h,void(r.starty=p);if(!this.allowtouchmove)return this.allowclick=!1,void(i.istouched&&(n.extend(r,{startx:h,starty:p,currentx:h,currenty:p}),i.touchstarttime=n.now()));if(i.istouchevent&&a.touchreleaseonedges&&!a.loop)if(this.isvertical()){if(pr.starty&&this.translate>=this.mintranslate())return i.istouched=!1,void(i.ismoved=!1)}else if(hr.startx&&this.translate>=this.mintranslate())return;if(i.istouchevent&&e.activeelement&&l.target===e.activeelement&&s(l.target).is(i.formelements))return i.ismoved=!0,void(this.allowclick=!1);if(i.allowtouchcallbacks&&this.emit("touchmove",l),!(l.targettouches&&l.targettouches.length>1)){r.currentx=h,r.currenty=p;var c=r.currentx-r.startx,u=r.currenty-r.starty;if(!(this.params.threshold&&math.sqrt(math.pow(c,2)+math.pow(u,2))=25&&(v=180*math.atan2(math.abs(u),math.abs(c))/math.pi,i.isscrolling=this.ishorizontal()?v>a.touchangle:90-v>a.touchangle);if(i.isscrolling&&this.emit("touchmoveopposite",l),void 0===i.startmoving&&(r.currentx===r.startx&&r.currenty===r.starty||(i.startmoving=!0)),i.isscrolling)i.istouched=!1;else if(i.startmoving){this.allowclick=!1,a.cssmode||l.preventdefault(),a.touchmovestoppropagation&&!a.nested&&l.stoppropagation(),i.ismoved||(a.loop&&this.loopfix(),i.starttranslate=this.gettranslate(),this.settransition(0),this.animating&&this.$wrapperel.trigger("webkittransitionend transitionend"),i.allowmomentumbounce=!1,!a.grabcursor||!0!==this.allowslidenext&&!0!==this.allowslideprev||this.setgrabcursor(!0),this.emit("sliderfirstmove",l)),this.emit("slidermove",l),i.ismoved=!0;var f=this.ishorizontal()?c:u;r.diff=f,f*=a.touchratio,o&&(f=-f),this.swipedirection=f>0?"prev":"next",i.currenttranslate=f+i.starttranslate;var m=!0,g=a.resistanceratio;if(a.touchreleaseonedges&&(g=0),f>0&&i.currenttranslate>this.mintranslate()?(m=!1,a.resistance&&(i.currenttranslate=this.mintranslate()-1+math.pow(-this.mintranslate()+i.starttranslate+f,g))):f<0&&i.currenttranslatei.starttranslate&&(i.currenttranslate=i.starttranslate),a.threshold>0){if(!(math.abs(f)>a.threshold||i.allowthresholdmove))return void(i.currenttranslate=i.starttranslate);if(!i.allowthresholdmove)return i.allowthresholdmove=!0,r.startx=r.currentx,r.starty=r.currenty,i.currenttranslate=i.starttranslate,void(r.diff=this.ishorizontal()?r.currentx-r.startx:r.currenty-r.starty)}a.followfinger&&!a.cssmode&&((a.freemode||a.watchslidesprogress||a.watchslidesvisibility)&&(this.updateactiveindex(),this.updateslidesclasses()),a.freemode&&(0===i.velocities.length&&i.velocities.push({position:r[this.ishorizontal()?"startx":"starty"],time:i.touchstarttime}),i.velocities.push({position:r[this.ishorizontal()?"currentx":"currenty"],time:n.now()})),this.updateprogress(i.currenttranslate),this.settranslate(i.currenttranslate))}}}}}else i.startmoving&&i.isscrolling&&this.emit("touchmoveopposite",l)}function a(e){var t=this,i=t.toucheventsdata,s=t.params,a=t.touches,r=t.rtltranslate,o=t.$wrapperel,l=t.slidesgrid,d=t.snapgrid,h=e;if(h.originalevent&&(h=h.originalevent),i.allowtouchcallbacks&&t.emit("touchend",h),i.allowtouchcallbacks=!1,!i.istouched)return i.ismoved&&s.grabcursor&&t.setgrabcursor(!1),i.ismoved=!1,void(i.startmoving=!1);s.grabcursor&&i.ismoved&&i.istouched&&(!0===t.allowslidenext||!0===t.allowslideprev)&&t.setgrabcursor(!1);var p,c=n.now(),u=c-i.touchstarttime;if(t.allowclick&&(t.updateclickedslide(h),t.emit("tap click",h),u<300&&c-i.lastclicktime<300&&t.emit("doubletap doubleclick",h)),i.lastclicktime=n.now(),n.nexttick((function(){t.destroyed||(t.allowclick=!0)})),!i.istouched||!i.ismoved||!t.swipedirection||0===a.diff||i.currenttranslate===i.starttranslate)return i.istouched=!1,i.ismoved=!1,void(i.startmoving=!1);if(i.istouched=!1,i.ismoved=!1,i.startmoving=!1,p=s.followfinger?r?t.translate:-t.translate:-i.currenttranslate,!s.cssmode)if(s.freemode){if(p<-t.mintranslate())return void t.slideto(t.activeindex);if(p>-t.maxtranslate())return void(t.slides.length1){var v=i.velocities.pop(),f=i.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,math.abs(t.velocity)150||n.now()-v.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freemodemomentumvelocityratio,i.velocities.length=0;var b=1e3*s.freemodemomentumratio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var x,t,e=!1,s=20*math.abs(t.velocity)*s.freemodemomentumbounceratio;if(yt.mintranslate())s.freemodemomentumbounce?(y-t.mintranslate()>s&&(y=t.mintranslate()+s),x=t.mintranslate(),e=!0,i.allowmomentumbounce=!0):y=t.mintranslate(),s.loop&&s.centeredslides&&(t=!0);else if(s.freemodesticky){for(var c,m=0;m-y){c=m;break}y=-(y=math.abs(d[c]-y)=s.longswipesms)&&(t.updateprogress(),t.updateactiveindex(),t.updateslidesclasses())}else{for(var k=0,$=t.slidessizesgrid[0],l=0;l=l[l]&&p=l[l]&&(k=l,$=l[l.length-1]-l[l.length-2])}var d=(p-l[k])/$,o=ks.longswipesms){if(!s.longswipes)return void t.slideto(t.activeindex);"next"===t.swipedirection&&(d>=s.longswipesratio?t.slideto(k+o):t.slideto(k)),"prev"===t.swipedirection&&(d>1-s.longswipesratio?t.slideto(k+o):t.slideto(k))}else{if(!s.shortswipes)return void t.slideto(t.activeindex);t.navigation&&(h.target===t.navigation.nextel||h.target===t.navigation.prevel)?h.target===t.navigation.nextel?t.slideto(k+o):t.slideto(k):("next"===t.swipedirection&&t.slideto(k+o),"prev"===t.swipedirection&&t.slideto(k))}}}function g(){var e=this.params,t=this.el;if(!t||0!==t.offsetwidth){e.breakpoints&&this.setbreakpoint();var i=this.allowslidenext,s=this.allowslideprev,a=this.snapgrid;this.allowslidenext=!0,this.allowslideprev=!0,this.updatesize(),this.updateslides(),this.updateslidesclasses(),("auto"===e.slidesperview||e.slidesperview>1)&&this.isend&&!this.params.centeredslides?this.slideto(this.slides.length-1,0,!1,!0):this.slideto(this.activeindex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowslideprev=s,this.allowslidenext=i,this.params.watchoverflow&&a!==this.snapgrid&&this.checkoverflow()}}function h(e){this.allowclick||(this.params.preventclicks&&e.preventdefault(),this.params.preventclickspropagation&&this.animating&&(e.stoppropagation(),e.stopimmediatepropagation()))}function b(){var e=this.wrapperel;this.previoustranslate=this.translate,this.translate=this.ishorizontal()?-e.scrollleft:-e.scrolltop,-0===this.translate&&(this.translate=0),this.updateactiveindex(),this.updateslidesclasses();var t=this.maxtranslate()-this.mintranslate();(0===t?0:(this.translate-this.mintranslate())/t)!==this.progress&&this.updateprogress(this.translate),this.emit("settranslate",this.translate,!1)}var n=!1;function x(){}var v={init:!0,direction:"horizontal",toucheventstarget:"container",initialslide:0,speed:300,cssmode:!1,updateonwindowresize:!0,preventinteractionontransition:!1,edgeswipedetection:!1,edgeswipethreshold:20,freemode:!1,freemodemomentum:!0,freemodemomentumratio:1,freemodemomentumbounce:!0,freemodemomentumbounceratio:1,freemodemomentumvelocityratio:1,freemodesticky:!1,freemodeminimumvelocity:.02,autoheight:!1,setwrappersize:!1,virtualtranslate:!1,effect:"slide",breakpoints:void 0,spacebetween:0,slidesperview:1,slidespercolumn:1,slidespercolumnfill:"column",slidespergroup:1,slidespergroupskip:0,centeredslides:!1,centeredslidesbounds:!1,slidesoffsetbefore:0,slidesoffsetafter:0,normalizeslideindex:!0,centerinsufficientslides:!1,watchoverflow:!1,roundlengths:!1,touchratio:1,touchangle:45,simulatetouch:!0,shortswipes:!0,longswipes:!0,longswipesratio:.5,longswipesms:300,followfinger:!0,allowtouchmove:!0,threshold:0,touchmovestoppropagation:!1,touchstartpreventdefault:!0,touchstartforcepreventdefault:!1,touchreleaseonedges:!1,uniquenavelements:!0,resistance:!0,resistanceratio:.85,watchslidesprogress:!1,watchslidesvisibility:!1,grabcursor:!1,preventclicks:!0,preventclickspropagation:!0,slidetoclickedslide:!1,preloadimages:!0,updateonimagesready:!0,loop:!1,loopadditionalslides:0,loopedslides:null,loopfillgroupwithblank:!1,allowslideprev:!0,allowslidenext:!0,swipehandler:null,noswiping:!0,noswipingclass:"swiper-no-swiping",noswipingselector:null,passivelisteners:!0,containermodifierclass:"swiper-container-",slideclass:"swiper-slide",slideblankclass:"swiper-slide-invisible-blank",slideactiveclass:"swiper-slide-active",slideduplicateactiveclass:"swiper-slide-duplicate-active",slidevisibleclass:"swiper-slide-visible",slideduplicateclass:"swiper-slide-duplicate",slidenextclass:"swiper-slide-next",slideduplicatenextclass:"swiper-slide-duplicate-next",slideprevclass:"swiper-slide-prev",slideduplicateprevclass:"swiper-slide-duplicate-prev",wrapperclass:"swiper-wrapper",runcallbacksoninit:!0},y={update:h,translate:p,transition:c,slide:u,loop:v,grabcursor:f,manipulation:l,events:{attachevents:function(){var t=this.params,i=this.touchevents,s=this.el,a=this.wrapperel;this.ontouchstart=d.bind(this),this.ontouchmove=o.bind(this),this.ontouchend=a.bind(this),t.cssmode&&(this.onscroll=b.bind(this)),this.onclick=h.bind(this);var r=!!t.nested;if(!o.touch&&o.pointerevents)s.addeventlistener(i.start,this.ontouchstart,!1),e.addeventlistener(i.move,this.ontouchmove,r),e.addeventlistener(i.end,this.ontouchend,!1);else{if(o.touch){var n=!("touchstart"!==i.start||!o.passivelistener||!t.passivelisteners)&&{passive:!0,capture:!1};s.addeventlistener(i.start,this.ontouchstart,n),s.addeventlistener(i.move,this.ontouchmove,o.passivelistener?{passive:!1,capture:r}:r),s.addeventlistener(i.end,this.ontouchend,n),i.cancel&&s.addeventlistener(i.cancel,this.ontouchend,n),n||(e.addeventlistener("touchstart",x),n=!0)}(t.simulatetouch&&!i.ios&&!i.android||t.simulatetouch&&!o.touch&&i.ios)&&(s.addeventlistener("mousedown",this.ontouchstart,!1),e.addeventlistener("mousemove",this.ontouchmove,r),e.addeventlistener("mouseup",this.ontouchend,!1))}(t.preventclicks||t.preventclickspropagation)&&s.addeventlistener("click",this.onclick,!0),t.cssmode&&a.addeventlistener("scroll",this.onscroll),t.updateonwindowresize?this.on(i.ios||i.android?"resize orientationchange observerupdate":"resize observerupdate",g,!0):this.on("observerupdate",g,!0)},detachevents:function(){var t=this.params,i=this.touchevents,s=this.el,a=this.wrapperel,r=!!t.nested;if(!o.touch&&o.pointerevents)s.removeeventlistener(i.start,this.ontouchstart,!1),e.removeeventlistener(i.move,this.ontouchmove,r),e.removeeventlistener(i.end,this.ontouchend,!1);else{if(o.touch){var n=!("ontouchstart"!==i.start||!o.passivelistener||!t.passivelisteners)&&{passive:!0,capture:!1};s.removeeventlistener(i.start,this.ontouchstart,n),s.removeeventlistener(i.move,this.ontouchmove,r),s.removeeventlistener(i.end,this.ontouchend,n),i.cancel&&s.removeeventlistener(i.cancel,this.ontouchend,n)}(t.simulatetouch&&!i.ios&&!i.android||t.simulatetouch&&!o.touch&&i.ios)&&(s.removeeventlistener("mousedown",this.ontouchstart,!1),e.removeeventlistener("mousemove",this.ontouchmove,r),e.removeeventlistener("mouseup",this.ontouchend,!1))}(t.preventclicks||t.preventclickspropagation)&&s.removeeventlistener("click",this.onclick,!0),t.cssmode&&a.removeeventlistener("scroll",this.onscroll),this.off(i.ios||i.android?"resize orientationchange observerupdate":"resize observerupdate",g)}},breakpoints:{setbreakpoint:function(){var e=this.activeindex,t=this.initialized,i=this.loopedslides;void 0===i&&(i=0);var s=this.params,a=this.$el,r=s.breakpoints;if(r&&(!r||0!==object.keys(r).length)){var o=this.getbreakpoint(r);if(o&&this.currentbreakpoint!==o){var l=o in r?r[o]:void 0;l&&["slidesperview","spacebetween","slidespergroup","slidespergroupskip","slidespercolumn"].foreach((function(e){var t=l[e];void 0!==t&&(l[e]="slidesperview"!==e||"auto"!==t&&"auto"!==t?"slidesperview"===e?parsefloat(t):parseint(t,10):"auto")}));var d=l||this.originalparams,h=s.slidespercolumn>1,p=d.slidespercolumn>1;h&&!p?a.removeclass(s.containermodifierclass+"multirow "+s.containermodifierclass+"multirow-column"):!h&&p&&(a.addclass(s.containermodifierclass+"multirow"),"column"===d.slidespercolumnfill&&a.addclass(s.containermodifierclass+"multirow-column"));var c=d.direction&&d.direction!==s.direction,u=s.loop&&(d.slidesperview!==s.slidesperview||c);c&&t&&this.changedirection(),n.extend(this.params,d),n.extend(this,{allowtouchmove:this.params.allowtouchmove,allowslidenext:this.params.allowslidenext,allowslideprev:this.params.allowslideprev}),this.currentbreakpoint=o,u&&t&&(this.loopdestroy(),this.loopcreate(),this.updateslides(),this.slideto(e-i+this.loopedslides,0,!1)),this.emit("breakpoint",d)}}},getbreakpoint:function(e){if(e){var i=!1,s=object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexof("@")){var i=parsefloat(e.substr(1));return{value:t.innerheight*i,point:e}}return{value:e,point:e}}));s.sort((function(e,t){return parseint(e.value,10)-parseint(t.value,10)}));for(var a=0;a0&&e.slidesoffsetbefore+e.spacebetween*(this.slides.length-1)+this.slides[0].offsetwidth*this.slides.length;e.slidesoffsetbefore&&e.slidesoffsetafter&&i?this.islocked=i<=this.size:this.islocked=1===this.snapgrid.length,this.allowslidenext=!this.islocked,this.allowslideprev=!this.islocked,t!==this.islocked&&this.emit(this.islocked?"lock":"unlock"),t&&t!==this.islocked&&(this.isend=!1,this.navigation.update())}},classes:{addclasses:function(){var e=this.classnames,t=this.params,i=this.rtl,s=this.$el,a=[];a.push("initialized"),a.push(t.direction),t.freemode&&a.push("free-mode"),t.autoheight&&a.push("autoheight"),i&&a.push("rtl"),t.slidespercolumn>1&&(a.push("multirow"),"column"===t.slidespercolumnfill&&a.push("multirow-column")),i.android&&a.push("android"),i.ios&&a.push("ios"),t.cssmode&&a.push("css-mode"),a.foreach((function(i){e.push(t.containermodifierclass+i)})),s.addclass(e.join(" "))},removeclasses:function(){var e=this.$el,t=this.classnames;e.removeclass(t.join(" "))}},images:{loadimage:function(e,i,s,a,r,n){var o;function l(){n&&n()}e.complete&&r?l():i?((o=new t.image).onload=l,o.onerror=l,a&&(o.sizes=a),s&&(o.srcset=s),i&&(o.src=i)):l()},preloadimages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesloaded&&(e.imagesloaded+=1),e.imagesloaded===e.imagestoload.length&&(e.params.updateonimagesready&&e.update(),e.emit("imagesready")))}e.imagestoload=e.$el.find("img");for(var i=0;i1){var u=[];return c.each((function(e,i){var s=n.extend({},r,{el:i});u.push(new t(s))})),u}var v,f,m;return a.swiper=h,c.data("swiper",h),a&&a.shadowroot&&a.shadowroot.queryselector?(v=s(a.shadowroot.queryselector("."+h.params.wrapperclass))).children=function(e){return c.children(e)}:v=c.children("."+h.params.wrapperclass),n.extend(h,{$el:c,el:a,$wrapperel:v,wrapperel:v[0],classnames:[],slides:s(),slidesgrid:[],snapgrid:[],slidessizesgrid:[],ishorizontal:function(){return"horizontal"===h.params.direction},isvertical:function(){return"vertical"===h.params.direction},rtl:"rtl"===a.dir.tolowercase()||"rtl"===c.css("direction"),rtltranslate:"horizontal"===h.params.direction&&("rtl"===a.dir.tolowercase()||"rtl"===c.css("direction")),wrongrtl:"-webkit-box"===v.css("display"),activeindex:0,realindex:0,isbeginning:!0,isend:!1,translate:0,previoustranslate:0,progress:0,velocity:0,animating:!1,allowslidenext:h.params.allowslidenext,allowslideprev:h.params.allowslideprev,touchevents:(f=["touchstart","touchmove","touchend","touchcancel"],m=["mousedown","mousemove","mouseup"],o.pointerevents&&(m=["pointerdown","pointermove","pointerup"]),h.toucheventstouch={start:f[0],move:f[1],end:f[2],cancel:f[3]},h.toucheventsdesktop={start:m[0],move:m[1],end:m[2]},o.touch||!h.params.simulatetouch?h.toucheventstouch:h.toucheventsdesktop),toucheventsdata:{istouched:void 0,ismoved:void 0,allowtouchcallbacks:void 0,touchstarttime:void 0,isscrolling:void 0,currenttranslate:void 0,starttranslate:void 0,allowthresholdmove:void 0,formelements:"input, select, option, textarea, button, video, label",lastclicktime:n.now(),clicktimeout:void 0,velocities:[],allowmomentumbounce:void 0,istouchevent:void 0,startmoving:void 0},allowclick:!0,allowtouchmove:h.params.allowtouchmove,touches:{startx:0,starty:0,currentx:0,currenty:0,diff:0},imagestoload:[],imagesloaded:0}),h.usemodules(),h.params.init&&h.init(),h}}e&&(t.__proto__=e),t.prototype=object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendeddefaults:{configurable:!0},defaults:{configurable:!0},class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesperviewdynamic=function(){var e=this.params,t=this.slides,i=this.slidesgrid,s=this.size,a=this.activeindex,r=1;if(e.centeredslides){for(var n,o=t[a].swiperslidesize,l=a+1;ls&&(n=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(o+=t[d].swiperslidesize)>s&&(n=!0))}else for(var h=a+1;h1)&&e.isend&&!e.params.centeredslides?e.slideto(e.slides.length-1,0,!1,!0):e.slideto(e.activeindex,0,!1,!0))||s(),i.watchoverflow&&t!==e.snapgrid&&e.checkoverflow(),e.emit("update")}function s(){var t=e.rtltranslate?-1*e.translate:e.translate,i=math.min(math.max(t,e.maxtranslate()),e.mintranslate());e.settranslate(i),e.updateactiveindex(),e.updateslidesclasses()}},t.prototype.changedirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e?this:(this.$el.removeclass(""+this.params.containermodifierclass+i).addclass(""+this.params.containermodifierclass+e),this.params.direction=e,this.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),this.emit("changedirection"),t&&this.update(),this)},t.prototype.init=function(){this.initialized||(this.emit("beforeinit"),this.params.breakpoints&&this.setbreakpoint(),this.addclasses(),this.params.loop&&this.loopcreate(),this.updatesize(),this.updateslides(),this.params.watchoverflow&&this.checkoverflow(),this.params.grabcursor&&this.setgrabcursor(),this.params.preloadimages&&this.preloadimages(),this.params.loop?this.slideto(this.params.initialslide+this.loopedslides,0,this.params.runcallbacksoninit):this.slideto(this.params.initialslide,0,this.params.runcallbacksoninit),this.attachevents(),this.initialized=!0,this.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,s=i.params,a=i.$el,r=i.$wrapperel,o=i.slides;return void 0===i.params||i.destroyed?null:(i.emit("beforedestroy"),i.initialized=!1,i.detachevents(),s.loop&&i.loopdestroy(),t&&(i.removeclasses(),a.removeattr("style"),r.removeattr("style"),o&&o.length&&o.removeclass([s.slidevisibleclass,s.slideactiveclass,s.slidenextclass,s.slideprevclass].join(" ")).removeattr("style").removeattr("data-swiper-slide-index")),i.emit("destroy"),object.keys(i.eventslisteners).foreach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),n.deleteprops(i)),i.destroyed=!0,null)},t.extenddefaults=function(e){n.extend(f,e)},i.extendeddefaults.get=function(){return f},i.defaults.get=function(){return v},i.class.get=function(){return e},i.$.get=function(){return s},object.defineproperties(t,i),t}(l),r={name:"device",proto:{device:i},static:{device:i}},q={name:"support",proto:{support:o},static:{support:o}},j={isedge:!!t.navigator.useragent.match(/edge/g),issafari:function(){var e=t.navigator.useragent.tolowercase();return e.indexof("safari")>=0&&e.indexof("chrome")<0&&e.indexof("android")<0}(),isuiwebview:/(iphone|ipod|ipad).*applewebkit(?!.*safari)/i.test(t.navigator.useragent)},k={name:"browser",proto:{browser:j},static:{browser:j}},u={name:"resize",create:function(){var e=this;n.extend(e,{resize:{resizehandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeresize"),e.emit("resize"))},orientationchangehandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){t.addeventlistener("resize",this.resize.resizehandler),t.addeventlistener("orientationchange",this.resize.orientationchangehandler)},destroy:function(){t.removeeventlistener("resize",this.resize.resizehandler),t.removeeventlistener("orientationchange",this.resize.orientationchangehandler)}}},_={func:t.mutationobserver||t.webkitmutationobserver,attach:function(e,i){void 0===i&&(i={});var s=this,a=new(0,_.func)((function(e){if(1!==e.length){var i=function(){s.emit("observerupdate",e[0])};t.requestanimationframe?t.requestanimationframe(i):t.settimeout(i,0)}else s.emit("observerupdate",e[0])}));a.observe(e,{attributes:void 0===i.attributes||i.attributes,childlist:void 0===i.childlist||i.childlist,characterdata:void 0===i.characterdata||i.characterdata}),s.observer.observers.push(a)},init:function(){if(o.observer&&this.params.observer){if(this.params.observeparents)for(var e=this.$el.parents(),t=0;tt)&&t.$wrapperel.find("."+t.params.slideclass+'[data-swiper-slide-index="'+p+'"]').remove();for(var z=0;z=x&&z<=t&&(void 0===c||e?m.push(z):(z>c&&m.push(z),z'+e+"
");return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=a),a},appendslide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t=0;i-=1)this.virtual.slides.splice(e[i],1),this.params.virtual.cache&&delete this.virtual.cache[e[i]],e[i]0&&0===this.$el.parents("."+this.params.slideactiveclass).length)return;var o=t.innerwidth,l=t.innerheight,d=this.$el.offset();s&&(d.left-=this.$el[0].scrollleft);for(var h=[[d.left,d.top],[d.left+this.width,d.top],[d.left,d.top+this.height],[d.left+this.width,d.top+this.height]],p=0;p=0&&c[0]<=o&&c[1]>=0&&c[1]<=l&&(n=!0)}if(!n)return}this.ishorizontal()?(33!==r&&34!==r&&37!==r&&39!==r||(a.preventdefault?a.preventdefault():a.returnvalue=!1),(34!==r&&39!==r||s)&&(33!==r&&37!==r||!s)||this.slidenext(),(33!==r&&37!==r||s)&&(34!==r&&39!==r||!s)||this.slideprev()):(33!==r&&34!==r&&38!==r&&40!==r||(a.preventdefault?a.preventdefault():a.returnvalue=!1),34!==r&&40!==r||this.slidenext(),33!==r&&38!==r||this.slideprev()),this.emit("keypress",r)}},enable:function(){this.keyboard.enabled||(s(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(s(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},te={name:"keyboard",params:{keyboard:{enabled:!1,onlyinviewport:!0}},create:function(){n.extend(this,{keyboard:{enabled:!1,enable:ee.enable.bind(this),disable:ee.disable.bind(this),handle:ee.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var ie={lastscrolltime:n.now(),lasteventbeforesnap:void 0,recentwheelevents:[],event:function(){return t.navigator.useragent.indexof("firefox")>-1?"dommousescroll":function(){var t="onwheel"in e;if(!t){var i=e.createelement("div");i.setattribute("onwheel","return;"),t="function"==typeof i.onwheel}return!t&&e.implementation&&e.implementation.hasfeature&&!0!==e.implementation.hasfeature("","")&&(t=e.implementation.hasfeature("events.wheel","3.0")),t}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheeldelta"in e&&(i=-e.wheeldelta/120),"wheeldeltay"in e&&(i=-e.wheeldeltay/120),"wheeldeltax"in e&&(t=-e.wheeldeltax/120),"axis"in e&&e.axis===e.horizontal_axis&&(t=i,i=0),s=10*t,a=10*i,"deltay"in e&&(a=e.deltay),"deltax"in e&&(s=e.deltax),e.shiftkey&&!s&&(s=a,a=0),(s||a)&&e.deltamode&&(1===e.deltamode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinx:t,spiny:i,pixelx:s,pixely:a}},handlemouseenter:function(){this.mouseentered=!0},handlemouseleave:function(){this.mouseentered=!1},handle:function(e){var t=e,i=this,a=i.params.mousewheel;i.params.cssmode&&t.preventdefault();var r=i.$el;if("container"!==i.params.mousewheel.eventstarged&&(r=s(i.params.mousewheel.eventstarged)),!i.mouseentered&&!r[0].contains(t.target)&&!a.releaseonedges)return!0;t.originalevent&&(t=t.originalevent);var o=0,l=i.rtltranslate?-1:1,d=ie.normalize(t);if(a.forcetoaxis)if(i.ishorizontal()){if(!(math.abs(d.pixelx)>math.abs(d.pixely)))return!0;o=d.pixelx*l}else{if(!(math.abs(d.pixely)>math.abs(d.pixelx)))return!0;o=d.pixely}else o=math.abs(d.pixelx)>math.abs(d.pixely)?-d.pixelx*l:-d.pixely;if(0===o)return!0;if(a.invert&&(o=-o),i.params.freemode){var h={time:n.now(),delta:math.abs(o),direction:math.sign(o)},p=i.mousewheel.lasteventbeforesnap,c=p&&h.time=i.mintranslate()&&(u=i.mintranslate()),u<=i.maxtranslate()&&(u=i.maxtranslate()),i.settransition(0),i.settranslate(u),i.updateprogress(),i.updateactiveindex(),i.updateslidesclasses(),(!v&&i.isbeginning||!f&&i.isend)&&i.updateslidesclasses(),i.params.freemodesticky){cleartimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var m=i.mousewheel.recentwheelevents;m.length>=15&&m.shift();var g=m.length?m[m.length-1]:void 0,b=m[0];if(m.push(h),g&&(h.delta>g.delta||h.direction!==g.direction))m.splice(0);else if(m.length>=15&&h.time-b.time<500&&b.delta-h.delta>=1&&h.delta<=6){var w=o>0?.8:.2;i.mousewheel.lasteventbeforesnap=h,m.splice(0),i.mousewheel.timeout=n.nexttick((function(){i.slidetoclosest(i.params.speed,!0,void 0,w)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=n.nexttick((function(){i.mousewheel.lasteventbeforesnap=h,m.splice(0),i.slidetoclosest(i.params.speed,!0,void 0,.5)}),500))}if(c||i.emit("scroll",t),i.params.autoplay&&i.params.autoplaydisableoninteraction&&i.autoplay.stop(),u===i.mintranslate()||u===i.maxtranslate())return!0}}else{var y={time:n.now(),delta:math.abs(o),direction:math.sign(o),raw:e},x=i.mousewheel.recentwheelevents;x.length>=2&&x.shift();var t=x.length?x[x.length-1]:void 0;if(x.push(y),t?(y.direction!==t.direction||y.delta>t.delta)&&i.mousewheel.animateslider(y):i.mousewheel.animateslider(y),i.mousewheel.releasescroll(y))return!0}return t.preventdefault?t.preventdefault():t.returnvalue=!1,!1},animateslider:function(e){return e.delta>=6&&n.now()-this.mousewheel.lastscrolltime<60||(e.direction<0?this.isend&&!this.params.loop||this.animating||(this.slidenext(),this.emit("scroll",e.raw)):this.isbeginning&&!this.params.loop||this.animating||(this.slideprev(),this.emit("scroll",e.raw)),this.mousewheel.lastscrolltime=(new t.date).gettime(),!1)},releasescroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isend&&!this.params.loop&&t.releaseonedges)return!0}else if(this.isbeginning&&!this.params.loop&&t.releaseonedges)return!0;return!1},enable:function(){var e=ie.event();if(this.params.cssmode)return this.wrapperel.removeeventlistener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventstarged&&(t=s(this.params.mousewheel.eventstarged)),t.on("mouseenter",this.mousewheel.handlemouseenter),t.on("mouseleave",this.mousewheel.handlemouseleave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=ie.event();if(this.params.cssmode)return this.wrapperel.addeventlistener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventstarged&&(t=s(this.params.mousewheel.eventstarged)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},se={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextel,s=t.$prevel;s&&s.length>0&&(this.isbeginning?s.addclass(e.disabledclass):s.removeclass(e.disabledclass),s[this.params.watchoverflow&&this.islocked?"addclass":"removeclass"](e.lockclass)),i&&i.length>0&&(this.isend?i.addclass(e.disabledclass):i.removeclass(e.disabledclass),i[this.params.watchoverflow&&this.islocked?"addclass":"removeclass"](e.lockclass))}},onprevclick:function(e){e.preventdefault(),this.isbeginning&&!this.params.loop||this.slideprev()},onnextclick:function(e){e.preventdefault(),this.isend&&!this.params.loop||this.slidenext()},init:function(){var e,t,i=this.params.navigation;(i.nextel||i.prevel)&&(i.nextel&&(e=s(i.nextel),this.params.uniquenavelements&&"string"==typeof i.nextel&&e.length>1&&1===this.$el.find(i.nextel).length&&(e=this.$el.find(i.nextel))),i.prevel&&(t=s(i.prevel),this.params.uniquenavelements&&"string"==typeof i.prevel&&t.length>1&&1===this.$el.find(i.prevel).length&&(t=this.$el.find(i.prevel))),e&&e.length>0&&e.on("click",this.navigation.onnextclick),t&&t.length>0&&t.on("click",this.navigation.onprevclick),n.extend(this.navigation,{$nextel:e,nextel:e&&e[0],$prevel:t,prevel:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextel,i=e.$prevel;t&&t.length&&(t.off("click",this.navigation.onnextclick),t.removeclass(this.params.navigation.disabledclass)),i&&i.length&&(i.off("click",this.navigation.onprevclick),i.removeclass(this.params.navigation.disabledclass))}},ae={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,a=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,r=this.pagination.$el,n=this.params.loop?math.ceil((a-2*this.loopedslides)/this.params.slidespergroup):this.snapgrid.length;if(this.params.loop?((i=math.ceil((this.activeindex-this.loopedslides)/this.params.slidespergroup))>a-1-2*this.loopedslides&&(i-=a-2*this.loopedslides),i>n-1&&(i-=n),i<0&&"bullets"!==this.params.paginationtype&&(i=n+i)):i=void 0!==this.snapindex?this.snapindex:this.activeindex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var o,l,d,h=this.pagination.bullets;if(t.dynamicbullets&&(this.pagination.bulletsize=h.eq(0)[this.ishorizontal()?"outerwidth":"outerheight"](!0),r.css(this.ishorizontal()?"width":"height",this.pagination.bulletsize*(t.dynamicmainbullets+4)+"px"),t.dynamicmainbullets>1&&void 0!==this.previousindex&&(this.pagination.dynamicbulletindex+=i-this.previousindex,this.pagination.dynamicbulletindex>t.dynamicmainbullets-1?this.pagination.dynamicbulletindex=t.dynamicmainbullets-1:this.pagination.dynamicbulletindex<0&&(this.pagination.dynamicbulletindex=0)),o=i-this.pagination.dynamicbulletindex,d=((l=o+(math.min(h.length,t.dynamicmainbullets)-1))+o)/2),h.removeclass(t.bulletactiveclass+" "+t.bulletactiveclass+"-next "+t.bulletactiveclass+"-next-next "+t.bulletactiveclass+"-prev "+t.bulletactiveclass+"-prev-prev "+t.bulletactiveclass+"-main"),r.length>1)h.each((function(e,a){var r=s(a),n=r.index();n===i&&r.addclass(t.bulletactiveclass),t.dynamicbullets&&(n>=o&&n<=l&&r.addclass(t.bulletactiveclass+"-main"),n===o&&r.prev().addclass(t.bulletactiveclass+"-prev").prev().addclass(t.bulletactiveclass+"-prev-prev"),n===l&&r.next().addclass(t.bulletactiveclass+"-next").next().addclass(t.bulletactiveclass+"-next-next"))}));else{var p=h.eq(i),c=p.index();if(p.addclass(t.bulletactiveclass),t.dynamicbullets){for(var u=h.eq(o),v=h.eq(l),f=o;f<=l;f+=1)h.eq(f).addclass(t.bulletactiveclass+"-main");if(this.params.loop)if(c>=h.length-t.dynamicmainbullets){for(var m=t.dynamicmainbullets;m>=0;m-=1)h.eq(h.length-m).addclass(t.bulletactiveclass+"-main");h.eq(h.length-t.dynamicmainbullets-1).addclass(t.bulletactiveclass+"-prev")}else u.prev().addclass(t.bulletactiveclass+"-prev").prev().addclass(t.bulletactiveclass+"-prev-prev"),v.next().addclass(t.bulletactiveclass+"-next").next().addclass(t.bulletactiveclass+"-next-next");else u.prev().addclass(t.bulletactiveclass+"-prev").prev().addclass(t.bulletactiveclass+"-prev-prev"),v.next().addclass(t.bulletactiveclass+"-next").next().addclass(t.bulletactiveclass+"-next-next")}}if(t.dynamicbullets){var g=math.min(h.length,t.dynamicmainbullets+4),b=(this.pagination.bulletsize*g-this.pagination.bulletsize)/2-d*this.pagination.bulletsize,w=e?"right":"left";h.css(this.ishorizontal()?w:"top",b+"px")}}if("fraction"===t.type&&(r.find("."+t.currentclass).text(t.formatfractioncurrent(i+1)),r.find("."+t.totalclass).text(t.formatfractiontotal(n))),"progressbar"===t.type){var y;y=t.progressbaropposite?this.ishorizontal()?"vertical":"horizontal":this.ishorizontal()?"horizontal":"vertical";var x=(i+1)/n,t=1,e=1;"horizontal"===y?t=x:e=x,r.find("."+t.progressbarfillclass).transform("translate3d(0,0,0) scalex("+t+") scaley("+e+")").transition(this.params.speed)}"custom"===t.type&&t.rendercustom?(r.html(t.rendercustom(this,i+1,n)),this.emit("paginationrender",this,r[0])):this.emit("paginationupdate",this,r[0]),r[this.params.watchoverflow&&this.islocked?"addclass":"removeclass"](t.lockclass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?math.ceil((t-2*this.loopedslides)/this.params.slidespergroup):this.snapgrid.length,r=0;r";i.html(s),this.pagination.bullets=i.find("."+e.bulletclass)}"fraction"===e.type&&(s=e.renderfraction?e.renderfraction.call(this,e.currentclass,e.totalclass):' / ',i.html(s)),"progressbar"===e.type&&(s=e.renderprogressbar?e.renderprogressbar.call(this,e.progressbarfillclass):'',i.html(s)),"custom"!==e.type&&this.emit("paginationrender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=s(t.el);0!==i.length&&(e.params.uniquenavelements&&"string"==typeof t.el&&i.length>1&&1===e.$el.find(t.el).length&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addclass(t.clickableclass),i.addclass(t.modifierclass+t.type),"bullets"===t.type&&t.dynamicbullets&&(i.addclass(""+t.modifierclass+t.type+"-dynamic"),e.pagination.dynamicbulletindex=0,t.dynamicmainbullets<1&&(t.dynamicmainbullets=1)),"progressbar"===t.type&&t.progressbaropposite&&i.addclass(t.progressbaroppositeclass),t.clickable&&i.on("click","."+t.bulletclass,(function(t){t.preventdefault();var i=s(this).index()*e.params.slidespergroup;e.params.loop&&(i+=e.loopedslides),e.slideto(i)})),n.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeclass(e.hiddenclass),t.removeclass(e.modifierclass+e.type),this.pagination.bullets&&this.pagination.bullets.removeclass(e.bulletactiveclass),e.clickable&&t.off("click","."+e.bulletclass)}}},re={settranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtltranslate,i=this.progress,s=e.dragsize,a=e.tracksize,r=e.$dragel,n=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>a&&(l=a-d),this.ishorizontal()?(r.transform("translate3d("+d+"px, 0, 0)"),r[0].style.width=l+"px"):(r.transform("translate3d(0px, "+d+"px, 0)"),r[0].style.height=l+"px"),o.hide&&(cleartimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=settimeout((function(){n[0].style.opacity=0,n.transition(400)}),1e3))}},settransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragel.transition(e)},updatesize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragel,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.ishorizontal()?i[0].offsetwidth:i[0].offsetheight,r=this.size/this.virtualsize,o=r*(a/this.size);s="auto"===this.params.scrollbar.dragsize?a*r:parseint(this.params.scrollbar.dragsize,10),this.ishorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),n.extend(e,{tracksize:a,divider:r,movedivider:o,dragsize:s}),e.$el[this.params.watchoverflow&&this.islocked?"addclass":"removeclass"](this.params.scrollbar.lockclass)}},getpointerposition:function(e){return this.ishorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targettouches[0].clientx:e.clientx:"touchstart"===e.type||"touchmove"===e.type?e.targettouches[0].clienty:e.clienty},setdragposition:function(e){var t,i=this.scrollbar,s=this.rtltranslate,a=i.$el,r=i.dragsize,n=i.tracksize,o=i.dragstartpos;t=(i.getpointerposition(e)-a.offset()[this.ishorizontal()?"left":"top"]-(null!==o?o:r/2))/(n-r),t=math.max(math.min(t,1),0),s&&(t=1-t);var l=this.mintranslate()+(this.maxtranslate()-this.mintranslate())*t;this.updateprogress(l),this.settranslate(l),this.updateactiveindex(),this.updateslidesclasses()},ondragstart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperel,a=i.$el,r=i.$dragel;this.scrollbar.istouched=!0,this.scrollbar.dragstartpos=e.target===r[0]||e.target===r?i.getpointerposition(e)-e.target.getboundingclientrect()[this.ishorizontal()?"left":"top"]:null,e.preventdefault(),e.stoppropagation(),s.transition(100),r.transition(100),i.setdragposition(e),cleartimeout(this.scrollbar.dragtimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssmode&&this.$wrapperel.css("scroll-snap-type","none"),this.emit("scrollbardragstart",e)},ondragmove:function(e){var t=this.scrollbar,i=this.$wrapperel,s=t.$el,a=t.$dragel;this.scrollbar.istouched&&(e.preventdefault?e.preventdefault():e.returnvalue=!1,t.setdragposition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbardragmove",e))},ondragend:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperel,a=i.$el;this.scrollbar.istouched&&(this.scrollbar.istouched=!1,this.params.cssmode&&(this.$wrapperel.css("scroll-snap-type",""),s.transition("")),t.hide&&(cleartimeout(this.scrollbar.dragtimeout),this.scrollbar.dragtimeout=n.nexttick((function(){a.css("opacity",0),a.transition(400)}),1e3)),this.emit("scrollbardragend",e),t.snaponrelease&&this.slidetoclosest())},enabledraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.toucheventstouch,s=this.toucheventsdesktop,a=this.params,r=t.$el[0],n=!(!o.passivelistener||!a.passivelisteners)&&{passive:!1,capture:!1},l=!(!o.passivelistener||!a.passivelisteners)&&{passive:!0,capture:!1};o.touch?(r.addeventlistener(i.start,this.scrollbar.ondragstart,n),r.addeventlistener(i.move,this.scrollbar.ondragmove,n),r.addeventlistener(i.end,this.scrollbar.ondragend,l)):(r.addeventlistener(s.start,this.scrollbar.ondragstart,n),e.addeventlistener(s.move,this.scrollbar.ondragmove,n),e.addeventlistener(s.end,this.scrollbar.ondragend,l))}},disabledraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.toucheventstouch,s=this.toucheventsdesktop,a=this.params,r=t.$el[0],n=!(!o.passivelistener||!a.passivelisteners)&&{passive:!1,capture:!1},l=!(!o.passivelistener||!a.passivelisteners)&&{passive:!0,capture:!1};o.touch?(r.removeeventlistener(i.start,this.scrollbar.ondragstart,n),r.removeeventlistener(i.move,this.scrollbar.ondragmove,n),r.removeeventlistener(i.end,this.scrollbar.ondragend,l)):(r.removeeventlistener(s.start,this.scrollbar.ondragstart,n),e.removeeventlistener(s.move,this.scrollbar.ondragmove,n),e.removeeventlistener(s.end,this.scrollbar.ondragend,l))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,a=s(i.el);this.params.uniquenavelements&&"string"==typeof i.el&&a.length>1&&1===t.find(i.el).length&&(a=t.find(i.el));var r=a.find("."+this.params.scrollbar.dragclass);0===r.length&&(r=s('
'),a.append(r)),n.extend(e,{$el:a,el:a[0],$dragel:r,dragel:r[0]}),i.draggable&&e.enabledraggable()}},destroy:function(){this.scrollbar.disabledraggable()}},ne={settransform:function(e,t){var i=this.rtl,a=s(e),r=i?-1:1,n=a.attr("data-swiper-parallax")||"0",o=a.attr("data-swiper-parallax-x"),l=a.attr("data-swiper-parallax-y"),d=a.attr("data-swiper-parallax-scale"),h=a.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):this.ishorizontal()?(o=n,l="0"):(l=n,o="0"),o=o.indexof("%")>=0?parseint(o,10)*t*r+"%":o*t*r+"px",l=l.indexof("%")>=0?parseint(l,10)*t+"%":l*t+"px",null!=h){var p=h-(h-1)*(1-math.abs(t));a[0].style.opacity=p}if(null==d)a.transform("translate3d("+o+", "+l+", 0px)");else{var c=d-(d-1)*(1-math.abs(t));a.transform("translate3d("+o+", "+l+", 0px) scale("+c+")")}},settranslate:function(){var e=this,t=e.$el,i=e.slides,a=e.progress,r=e.snapgrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.settransform(i,a)})),i.each((function(t,i){var n=i.progress;e.params.slidespergroup>1&&"auto"!==e.params.slidesperview&&(n+=math.ceil(t/2)-a*(r.length-1)),n=math.min(math.max(n,-1),1),s(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.settransform(i,n)}))}))},settransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var a=s(i),r=parseint(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),a.transition(r)}))}},oe={getdistancebetweentouches:function(e){if(e.targettouches.length<2)return 1;var t=e.targettouches[0].pagex,i=e.targettouches[0].pagey,s=e.targettouches[1].pagex,a=e.targettouches[1].pagey;return math.sqrt(math.pow(s-t,2)+math.pow(a-i,2))},ongesturestart:function(e){var t=this.params.zoom,i=this.zoom,a=i.gesture;if(i.fakegesturetouched=!1,i.fakegesturemoved=!1,!o.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targettouches.length<2)return;i.fakegesturetouched=!0,a.scalestart=oe.getdistancebetweentouches(e)}a.$slideel&&a.$slideel.length||(a.$slideel=s(e.target).closest("."+this.params.slideclass),0===a.$slideel.length&&(a.$slideel=this.slides.eq(this.activeindex)),a.$imageel=a.$slideel.find("img, svg, canvas, picture, .swiper-zoom-target"),a.$imagewrapel=a.$imageel.parent("."+t.containerclass),a.maxratio=a.$imagewrapel.attr("data-swiper-zoom")||t.maxratio,0!==a.$imagewrapel.length)?(a.$imageel.transition(0),this.zoom.isscaling=!0):a.$imageel=void 0},ongesturechange:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!o.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targettouches.length<2)return;i.fakegesturemoved=!0,s.scalemove=oe.getdistancebetweentouches(e)}s.$imageel&&0!==s.$imageel.length&&(o.gestures?i.scale=e.scale*i.currentscale:i.scale=s.scalemove/s.scalestart*i.currentscale,i.scale>s.maxratio&&(i.scale=s.maxratio-1+math.pow(i.scale-s.maxratio+1,.5)),i.scales.touchesstart.x))return void(s.istouched=!1);if(!this.ishorizontal()&&(math.floor(s.miny)===math.floor(s.starty)&&s.touchescurrent.ys.touchesstart.y))return void(s.istouched=!1)}e.preventdefault(),e.stoppropagation(),s.ismoved=!0,s.currentx=s.touchescurrent.x-s.touchesstart.x+s.startx,s.currenty=s.touchescurrent.y-s.touchesstart.y+s.starty,s.currentxs.maxx&&(s.currentx=s.maxx-1+math.pow(s.currentx-s.maxx+1,.8)),s.currentys.maxy&&(s.currenty=s.maxy-1+math.pow(s.currenty-s.maxy+1,.8)),a.prevpositionx||(a.prevpositionx=s.touchescurrent.x),a.prevpositiony||(a.prevpositiony=s.touchescurrent.y),a.prevtime||(a.prevtime=date.now()),a.x=(s.touchescurrent.x-a.prevpositionx)/(date.now()-a.prevtime)/2,a.y=(s.touchescurrent.y-a.prevpositiony)/(date.now()-a.prevtime)/2,math.abs(s.touchescurrent.x-a.prevpositionx)<2&&(a.x=0),math.abs(s.touchescurrent.y-a.prevpositiony)<2&&(a.y=0),a.prevpositionx=s.touchescurrent.x,a.prevpositiony=s.touchescurrent.y,a.prevtime=date.now(),i.$imagewrapel.transform("translate3d("+s.currentx+"px, "+s.currenty+"px,0)")}}},ontouchend:function(){var e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageel&&0!==t.$imageel.length){if(!i.istouched||!i.ismoved)return i.istouched=!1,void(i.ismoved=!1);i.istouched=!1,i.ismoved=!1;var a=300,r=300,n=s.x*a,o=i.currentx+n,l=s.y*r,d=i.currenty+l;0!==s.x&&(a=math.abs((o-i.currentx)/s.x)),0!==s.y&&(r=math.abs((d-i.currenty)/s.y));var h=math.max(a,r);i.currentx=o,i.currenty=d;var p=i.width*e.scale,c=i.height*e.scale;i.minx=math.min(t.slidewidth/2-p/2,0),i.maxx=-i.minx,i.miny=math.min(t.slideheight/2-c/2,0),i.maxy=-i.miny,i.currentx=math.max(math.min(i.currentx,i.maxx),i.minx),i.currenty=math.max(math.min(i.currenty,i.maxy),i.miny),t.$imagewrapel.transition(h).transform("translate3d("+i.currentx+"px, "+i.currenty+"px,0)")}},ontransitionend:function(){var e=this.zoom,t=e.gesture;t.$slideel&&this.previousindex!==this.activeindex&&(t.$imageel.transform("translate3d(0,0,0) scale(1)"),t.$imagewrapel.transform("translate3d(0,0,0)"),e.scale=1,e.currentscale=1,t.$slideel=void 0,t.$imageel=void 0,t.$imagewrapel=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,s,a,r,n,o,l,d,h,p,c,u,v,f,m,g=this.zoom,b=this.params.zoom,w=g.gesture,y=g.image;(w.$slideel||(w.$slideel=this.slides.eq(this.activeindex),w.$imageel=w.$slideel.find("img, svg, canvas, picture, .swiper-zoom-target"),w.$imagewrapel=w.$imageel.parent("."+b.containerclass)),w.$imageel&&0!==w.$imageel.length)&&(w.$slideel.addclass(""+b.zoomedslideclass),void 0===y.touchesstart.x&&e?(t="touchend"===e.type?e.changedtouches[0].pagex:e.pagex,i="touchend"===e.type?e.changedtouches[0].pagey:e.pagey):(t=y.touchesstart.x,i=y.touchesstart.y),g.scale=w.$imagewrapel.attr("data-swiper-zoom")||b.maxratio,g.currentscale=w.$imagewrapel.attr("data-swiper-zoom")||b.maxratio,e?(f=w.$slideel[0].offsetwidth,m=w.$slideel[0].offsetheight,s=w.$slideel.offset().left+f/2-t,a=w.$slideel.offset().top+m/2-i,o=w.$imageel[0].offsetwidth,l=w.$imageel[0].offsetheight,d=o*g.scale,h=l*g.scale,u=-(p=math.min(f/2-d/2,0)),v=-(c=math.min(m/2-h/2,0)),(r=s*g.scale)u&&(r=u),(n=a*g.scale)v&&(n=v)):(r=0,n=0),w.$imagewrapel.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),w.$imageel.transition(300).transform("translate3d(0,0,0) scale("+g.scale+")"))},out:function(){var e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideel||(i.$slideel=this.slides.eq(this.activeindex),i.$imageel=i.$slideel.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imagewrapel=i.$imageel.parent("."+t.containerclass)),i.$imageel&&0!==i.$imageel.length&&(e.scale=1,e.currentscale=1,i.$imagewrapel.transition(300).transform("translate3d(0,0,0)"),i.$imageel.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideel.removeclass(""+t.zoomedslideclass),i.$slideel=void 0)},enable:function(){var e=this.zoom;if(!e.enabled){e.enabled=!0;var t=!("touchstart"!==this.touchevents.start||!o.passivelistener||!this.params.passivelisteners)&&{passive:!0,capture:!1},i=!o.passivelistener||{passive:!1,capture:!0},s="."+this.params.slideclass;o.gestures?(this.$wrapperel.on("gesturestart",s,e.ongesturestart,t),this.$wrapperel.on("gesturechange",s,e.ongesturechange,t),this.$wrapperel.on("gestureend",s,e.ongestureend,t)):"touchstart"===this.touchevents.start&&(this.$wrapperel.on(this.touchevents.start,s,e.ongesturestart,t),this.$wrapperel.on(this.touchevents.move,s,e.ongesturechange,i),this.$wrapperel.on(this.touchevents.end,s,e.ongestureend,t),this.touchevents.cancel&&this.$wrapperel.on(this.touchevents.cancel,s,e.ongestureend,t)),this.$wrapperel.on(this.touchevents.move,"."+this.params.zoom.containerclass,e.ontouchmove,i)}},disable:function(){var e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var t=!("touchstart"!==this.touchevents.start||!o.passivelistener||!this.params.passivelisteners)&&{passive:!0,capture:!1},i=!o.passivelistener||{passive:!1,capture:!0},s="."+this.params.slideclass;o.gestures?(this.$wrapperel.off("gesturestart",s,e.ongesturestart,t),this.$wrapperel.off("gesturechange",s,e.ongesturechange,t),this.$wrapperel.off("gestureend",s,e.ongestureend,t)):"touchstart"===this.touchevents.start&&(this.$wrapperel.off(this.touchevents.start,s,e.ongesturestart,t),this.$wrapperel.off(this.touchevents.move,s,e.ongesturechange,i),this.$wrapperel.off(this.touchevents.end,s,e.ongestureend,t),this.touchevents.cancel&&this.$wrapperel.off(this.touchevents.cancel,s,e.ongestureend,t)),this.$wrapperel.off(this.touchevents.move,"."+this.params.zoom.containerclass,e.ontouchmove,i)}}},le={loadinslide:function(e,t){void 0===t&&(t=!0);var i=this,a=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var r=i.virtual&&i.params.virtual.enabled?i.$wrapperel.children("."+i.params.slideclass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),n=r.find("."+a.elementclass+":not(."+a.loadedclass+"):not(."+a.loadingclass+")");!r.hasclass(a.elementclass)||r.hasclass(a.loadedclass)||r.hasclass(a.loadingclass)||(n=n.add(r[0])),0!==n.length&&n.each((function(e,n){var o=s(n);o.addclass(a.loadingclass);var l=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),p=o.attr("data-sizes");i.loadimage(o[0],d||l,h,p,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(l?(o.css("background-image",'url("'+l+'")'),o.removeattr("data-background")):(h&&(o.attr("srcset",h),o.removeattr("data-srcset")),p&&(o.attr("sizes",p),o.removeattr("data-sizes")),d&&(o.attr("src",d),o.removeattr("data-src"))),o.addclass(a.loadedclass).removeclass(a.loadingclass),r.find("."+a.preloaderclass).remove(),i.params.loop&&t){var e=r.attr("data-swiper-slide-index");if(r.hasclass(i.params.slideduplicateclass)){var s=i.$wrapperel.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideduplicateclass+")");i.lazy.loadinslide(s.index(),!1)}else{var n=i.$wrapperel.children("."+i.params.slideduplicateclass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadinslide(n.index(),!1)}}i.emit("lazyimageready",r[0],o[0]),i.params.autoheight&&i.updateautoheight()}})),i.emit("lazyimageload",r[0],o[0])}))}},load:function(){var e=this,t=e.$wrapperel,i=e.params,a=e.slides,r=e.activeindex,n=e.virtual&&i.virtual.enabled,o=i.lazy,l=i.slidesperview;function d(e){if(n){if(t.children("."+i.slideclass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(a[e])return!0;return!1}function h(e){return n?s(e).attr("data-swiper-slide-index"):s(e).index()}if("auto"===l&&(l=0),e.lazy.initialimageloaded||(e.lazy.initialimageloaded=!0),e.params.watchslidesvisibility)t.children("."+i.slidevisibleclass).each((function(t,i){var a=n?s(i).attr("data-swiper-slide-index"):s(i).index();e.lazy.loadinslide(a)}));else if(l>1)for(var p=r;p1||o.loadprevnextamount&&o.loadprevnextamount>1){for(var c=o.loadprevnextamount,u=l,v=math.min(r+u+math.max(c,u),a.length),f=math.max(r-math.max(u,c),0),m=r+l;m0&&e.lazy.loadinslide(h(b));var w=t.children("."+i.slideprevclass);w.length>0&&e.lazy.loadinslide(h(w))}}},de={linearspline:function(e,t){var i,s,a,r,n,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastindex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getinterpolatefunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new de.linearspline(this.slidesgrid,e.slidesgrid):new de.linearspline(this.snapgrid,e.snapgrid))},settranslate:function(e,t){var i,s,a=this,r=a.controller.control;function n(e){var t=a.rtltranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getinterpolatefunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxtranslate()-e.mintranslate())/(a.maxtranslate()-a.mintranslate()),s=(t-a.mintranslate())*i+e.mintranslate()),a.params.controller.inverse&&(s=e.maxtranslate()-s),e.updateprogress(s),e.settranslate(s,a),e.updateactiveindex(),e.updateslidesclasses()}if(array.isarray(r))for(var o=0;o0&&(this.isbeginning?this.a11y.disableel(i):this.a11y.enableel(i)),t&&t.length>0&&(this.isend?this.a11y.disableel(t):this.a11y.enableel(t))}},updatepagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,a){var r=s(a);e.a11y.makeelfocusable(r),e.a11y.addelrole(r,"button"),e.a11y.addellabel(r,t.paginationbulletmessage.replace(/{{index}}/,r.index()+1))}))},init:function(){this.$el.append(this.a11y.liveregion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextel&&(e=this.navigation.$nextel),this.navigation&&this.navigation.$prevel&&(t=this.navigation.$prevel),e&&(this.a11y.makeelfocusable(e),this.a11y.addelrole(e,"button"),this.a11y.addellabel(e,i.nextslidemessage),e.on("keydown",this.a11y.onenterkey)),t&&(this.a11y.makeelfocusable(t),this.a11y.addelrole(t,"button"),this.a11y.addellabel(t,i.prevslidemessage),t.on("keydown",this.a11y.onenterkey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletclass,this.a11y.onenterkey)},destroy:function(){var e,t;this.a11y.liveregion&&this.a11y.liveregion.length>0&&this.a11y.liveregion.remove(),this.navigation&&this.navigation.$nextel&&(e=this.navigation.$nextel),this.navigation&&this.navigation.$prevel&&(t=this.navigation.$prevel),e&&e.off("keydown",this.a11y.onenterkey),t&&t.off("keydown",this.a11y.onenterkey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletclass,this.a11y.onenterkey)}},pe={init:function(){if(this.params.history){if(!t.history||!t.history.pushstate)return this.params.history.enabled=!1,void(this.params.hashnavigation.enabled=!0);var e=this.history;e.initialized=!0,e.paths=pe.getpathvalues(),(e.paths.key||e.paths.value)&&(e.scrolltoslide(0,e.paths.value,this.params.runcallbacksoninit),this.params.history.replacestate||t.addeventlistener("popstate",this.history.sethistorypopstate))}},destroy:function(){this.params.history.replacestate||t.removeeventlistener("popstate",this.history.sethistorypopstate)},sethistorypopstate:function(){this.history.paths=pe.getpathvalues(),this.history.scrolltoslide(this.params.speed,this.history.paths.value,!1)},getpathvalues:function(){var e=t.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),i=e.length;return{key:e[i-2],value:e[i-1]}},sethistory:function(e,i){if(this.history.initialized&&this.params.history.enabled){var s=this.slides.eq(i),a=pe.slugify(s.attr("data-history"));t.location.pathname.includes(e)||(a=e+"/"+a);var r=t.history.state;r&&r.value===a||(this.params.history.replacestate?t.history.replacestate({value:a},null,a):t.history.pushstate({value:a},null,a))}},slugify:function(e){return e.tostring().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrolltoslide:function(e,t,i){if(t)for(var s=0,a=this.slides.length;s'),i.append(e)),e.css({height:r+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=s('
'),t.append(e)));for(var u=0;u-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(t),d.slideshadows){var e=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),s=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===e.length&&(e=s('
'),v.append(e)),0===s.length&&(s=s('
'),v.append(s)),e.length&&(e[0].style.opacity=math.max(-b,0)),s.length&&(s[0].style.opacity=math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px, "+(r/2+d.shadowoffset)+"px, "+-r/2+"px) rotatex(90deg) rotatez(0deg) scale("+d.shadowscale+")");else{var c=math.abs(c)-90*math.floor(math.abs(c)/90),m=1.5-(math.sin(2*c*math.pi/360)/2+math.cos(2*c*math.pi/360)/2),p=d.shadowscale,z=d.shadowscale/m,k=d.shadowoffset;e.transform("scale3d("+p+", 1, "+z+") translate3d(0px, "+(n/2+k)+"px, "+-n/2/z+"px) rotatex(-90deg)")}var $=j.issafari||j.isuiwebview?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotatex("+(this.ishorizontal()?0:c)+"deg) rotatey("+(this.ishorizontal()?-c:0)+"deg)")},settransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeeffect.shadow&&!this.ishorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},me={settranslate:function(){for(var e=this.slides,t=this.rtltranslate,i=0;i'),a.append(h)),0===p.length&&(p=s('
'),a.append(p)),h.length&&(h[0].style.opacity=math.max(-r,0)),p.length&&(p[0].style.opacity=math.max(r,0))}a.transform("translate3d("+l+"px, "+d+"px, 0px) rotatex("+o+"deg) rotatey("+n+"deg)")}},settransition:function(e){var t=this,i=t.slides,s=t.activeindex,a=t.$wrapperel;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualtranslate&&0!==e){var r=!1;i.eq(s).transitionend((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkittransitionend","transitionend"],i=0;i'),f.append(c)),0===m.length&&(m=s('
'),f.append(m)),c.length&&(c[0].style.opacity=g>0?g:0),m.length&&(m[0].style.opacity=-g>0?-g:0)}}(o.pointerevents||o.prefixedpointerevents)&&(a[0].style.perspectiveorigin=h+"px 50%")},settransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},be={init:function(){var e=this.params.thumbs,t=this.constructor;e.swiper instanceof t?(this.thumbs.swiper=e.swiper,n.extend(this.thumbs.swiper.originalparams,{watchslidesprogress:!0,slidetoclickedslide:!1}),n.extend(this.thumbs.swiper.params,{watchslidesprogress:!0,slidetoclickedslide:!1})):n.isobject(e.swiper)&&(this.thumbs.swiper=new t(n.extend({},e.swiper,{watchslidesvisibility:!0,watchslidesprogress:!0,slidetoclickedslide:!1})),this.thumbs.swipercreated=!0),this.thumbs.swiper.$el.addclass(this.params.thumbs.thumbscontainerclass),this.thumbs.swiper.on("tap",this.thumbs.onthumbclick)},onthumbclick:function(){var e=this.thumbs.swiper;if(e){var t=e.clickedindex,i=e.clickedslide;if(!(i&&s(i).hasclass(this.params.thumbs.slidethumbactiveclass)||null==t)){var a;if(a=e.params.loop?parseint(s(e.clickedslide).attr("data-swiper-slide-index"),10):t,this.params.loop){var r=this.activeindex;this.slides.eq(r).hasclass(this.params.slideduplicateclass)&&(this.loopfix(),this._clientleft=this.$wrapperel[0].clientleft,r=this.activeindex);var n=this.slides.eq(r).prevall('[data-swiper-slide-index="'+a+'"]').eq(0).index(),o=this.slides.eq(r).nextall('[data-swiper-slide-index="'+a+'"]').eq(0).index();a=void 0===n?o:void 0===o?n:o-ra?s-math.floor(i/2)+1:s+math.floor(i/2)-1:s>a&&(s=s-i+1),t.slideto(s,e?0:void 0))}var o=1,l=this.params.thumbs.slidethumbactiveclass;if(this.params.slidesperview>1&&!this.params.centeredslides&&(o=this.params.slidesperview),this.params.thumbs.multipleactivethumbs||(o=1),o=math.floor(o),t.slides.removeclass(l),t.params.loop||t.params.virtual&&t.params.virtual.enabled)for(var d=0;d0&&!s(e.target).hasclass(this.params.pagination.bulletclass)&&(!0===this.pagination.$el.hasclass(this.params.pagination.hiddenclass)?this.emit("paginationshow",this):this.emit("paginationhide",this),this.pagination.$el.toggleclass(this.params.pagination.hiddenclass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragsize:"auto",hide:!1,draggable:!1,snaponrelease:!0,lockclass:"swiper-scrollbar-lock",dragclass:"swiper-scrollbar-drag"}},create:function(){n.extend(this,{scrollbar:{init:re.init.bind(this),destroy:re.destroy.bind(this),updatesize:re.updatesize.bind(this),settranslate:re.settranslate.bind(this),settransition:re.settransition.bind(this),enabledraggable:re.enabledraggable.bind(this),disabledraggable:re.disabledraggable.bind(this),setdragposition:re.setdragposition.bind(this),getpointerposition:re.getpointerposition.bind(this),ondragstart:re.ondragstart.bind(this),ondragmove:re.ondragmove.bind(this),ondragend:re.ondragend.bind(this),istouched:!1,timeout:null,dragtimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updatesize(),this.scrollbar.settranslate()},update:function(){this.scrollbar.updatesize()},resize:function(){this.scrollbar.updatesize()},observerupdate:function(){this.scrollbar.updatesize()},settranslate:function(){this.scrollbar.settranslate()},settransition:function(e){this.scrollbar.settransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){n.extend(this,{parallax:{settransform:ne.settransform.bind(this),settranslate:ne.settranslate.bind(this),settransition:ne.settransition.bind(this)}})},on:{beforeinit:function(){this.params.parallax.enabled&&(this.params.watchslidesprogress=!0,this.originalparams.watchslidesprogress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.settranslate()},settranslate:function(){this.params.parallax.enabled&&this.parallax.settranslate()},settransition:function(e){this.params.parallax.enabled&&this.parallax.settransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxratio:3,minratio:1,toggle:!0,containerclass:"swiper-zoom-container",zoomedslideclass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentscale:1,isscaling:!1,gesture:{$slideel:void 0,slidewidth:void 0,slideheight:void 0,$imageel:void 0,$imagewrapel:void 0,maxratio:3},image:{istouched:void 0,ismoved:void 0,currentx:void 0,currenty:void 0,minx:void 0,miny:void 0,maxx:void 0,maxy:void 0,width:void 0,height:void 0,startx:void 0,starty:void 0,touchesstart:{},touchescurrent:{}},velocity:{x:void 0,y:void 0,prevpositionx:void 0,prevpositiony:void 0,prevtime:void 0}};"ongesturestart ongesturechange ongestureend ontouchstart ontouchmove ontouchend ontransitionend toggle enable disable in out".split(" ").foreach((function(i){t[i]=oe[i].bind(e)})),n.extend(e,{zoom:t});var i=1;object.defineproperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var s=e.zoom.gesture.$imageel?e.zoom.gesture.$imageel[0]:void 0,a=e.zoom.gesture.$slideel?e.zoom.gesture.$slideel[0]:void 0;e.emit("zoomchange",t,s,a)}i=t}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchstart:function(e){this.zoom.enabled&&this.zoom.ontouchstart(e)},touchend:function(e){this.zoom.enabled&&this.zoom.ontouchend(e)},doubletap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionend:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.ontransitionend()},slidechange:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.params.cssmode&&this.zoom.ontransitionend()}}},{name:"lazy",params:{lazy:{enabled:!1,loadprevnext:!1,loadprevnextamount:1,loadontransitionstart:!1,elementclass:"swiper-lazy",loadingclass:"swiper-lazy-loading",loadedclass:"swiper-lazy-loaded",preloaderclass:"swiper-lazy-preloader"}},create:function(){n.extend(this,{lazy:{initialimageloaded:!1,load:le.load.bind(this),loadinslide:le.loadinslide.bind(this)}})},on:{beforeinit:function(){this.params.lazy.enabled&&this.params.preloadimages&&(this.params.preloadimages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialslide&&this.lazy.load()},scroll:function(){this.params.freemode&&!this.params.freemodesticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbardragmove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionstart:function(){this.params.lazy.enabled&&(this.params.lazy.loadontransitionstart||!this.params.lazy.loadontransitionstart&&!this.lazy.initialimageloaded)&&this.lazy.load()},transitionend:function(){this.params.lazy.enabled&&!this.params.lazy.loadontransitionstart&&this.lazy.load()},slidechange:function(){this.params.lazy.enabled&&this.params.cssmode&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){n.extend(this,{controller:{control:this.params.controller.control,getinterpolatefunction:de.getinterpolatefunction.bind(this),settranslate:de.settranslate.bind(this),settransition:de.settransition.bind(this)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerupdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},settranslate:function(e,t){this.controller.control&&this.controller.settranslate(e,t)},settransition:function(e,t){this.controller.control&&this.controller.settransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationclass:"swiper-notification",prevslidemessage:"previous slide",nextslidemessage:"next slide",firstslidemessage:"this is the first slide",lastslidemessage:"this is the last slide",paginationbulletmessage:"go to slide {{index}}"}},create:function(){var e=this;n.extend(e,{a11y:{liveregion:s('')}}),object.keys(he).foreach((function(t){e.a11y[t]=he[t].bind(e)}))},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updatenavigation())},toedge:function(){this.params.a11y.enabled&&this.a11y.updatenavigation()},fromedge:function(){this.params.a11y.enabled&&this.a11y.updatenavigation()},paginationupdate:function(){this.params.a11y.enabled&&this.a11y.updatepagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replacestate:!1,key:"slides"}},create:function(){n.extend(this,{history:{init:pe.init.bind(this),sethistory:pe.sethistory.bind(this),sethistorypopstate:pe.sethistorypopstate.bind(this),scrolltoslide:pe.scrolltoslide.bind(this),destroy:pe.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionend:function(){this.history.initialized&&this.history.sethistory(this.params.history.key,this.activeindex)},slidechange:function(){this.history.initialized&&this.params.cssmode&&this.history.sethistory(this.params.history.key,this.activeindex)}}},{name:"hash-navigation",params:{hashnavigation:{enabled:!1,replacestate:!1,watchstate:!1}},create:function(){n.extend(this,{hashnavigation:{initialized:!1,init:ce.init.bind(this),destroy:ce.destroy.bind(this),sethash:ce.sethash.bind(this),onhashcange:ce.onhashcange.bind(this)}})},on:{init:function(){this.params.hashnavigation.enabled&&this.hashnavigation.init()},destroy:function(){this.params.hashnavigation.enabled&&this.hashnavigation.destroy()},transitionend:function(){this.hashnavigation.initialized&&this.hashnavigation.sethash()},slidechange:function(){this.hashnavigation.initialized&&this.params.cssmode&&this.hashnavigation.sethash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitfortransition:!0,disableoninteraction:!0,stoponlastslide:!1,reversedirection:!1}},create:function(){var e=this;n.extend(e,{autoplay:{running:!1,paused:!1,run:ue.run.bind(e),start:ue.start.bind(e),stop:ue.stop.bind(e),pause:ue.pause.bind(e),onvisibilitychange:function(){"hidden"===document.visibilitystate&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilitystate&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},ontransitionend:function(t){e&&!e.destroyed&&e.$wrapperel&&t.target===this&&(e.$wrapperel[0].removeeventlistener("transitionend",e.autoplay.ontransitionend),e.$wrapperel[0].removeeventlistener("webkittransitionend",e.autoplay.ontransitionend),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&(this.autoplay.start(),document.addeventlistener("visibilitychange",this.autoplay.onvisibilitychange))},beforetransitionstart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableoninteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderfirstmove:function(){this.autoplay.running&&(this.params.autoplay.disableoninteraction?this.autoplay.stop():this.autoplay.pause())},touchend:function(){this.params.cssmode&&this.autoplay.paused&&!this.params.autoplay.disableoninteraction&&this.autoplay.run()},destroy:function(){this.autoplay.running&&this.autoplay.stop(),document.removeeventlistener("visibilitychange",this.autoplay.onvisibilitychange)}}},{name:"effect-fade",params:{fadeeffect:{crossfade:!1}},create:function(){n.extend(this,{fadeeffect:{settranslate:ve.settranslate.bind(this),settransition:ve.settransition.bind(this)}})},on:{beforeinit:function(){if("fade"===this.params.effect){this.classnames.push(this.params.containermodifierclass+"fade");var e={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,spacebetween:0,virtualtranslate:!0};n.extend(this.params,e),n.extend(this.originalparams,e)}},settranslate:function(){"fade"===this.params.effect&&this.fadeeffect.settranslate()},settransition:function(e){"fade"===this.params.effect&&this.fadeeffect.settransition(e)}}},{name:"effect-cube",params:{cubeeffect:{slideshadows:!0,shadow:!0,shadowoffset:20,shadowscale:.94}},create:function(){n.extend(this,{cubeeffect:{settranslate:fe.settranslate.bind(this),settransition:fe.settransition.bind(this)}})},on:{beforeinit:function(){if("cube"===this.params.effect){this.classnames.push(this.params.containermodifierclass+"cube"),this.classnames.push(this.params.containermodifierclass+"3d");var e={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,resistanceratio:0,spacebetween:0,centeredslides:!1,virtualtranslate:!0};n.extend(this.params,e),n.extend(this.originalparams,e)}},settranslate:function(){"cube"===this.params.effect&&this.cubeeffect.settranslate()},settransition:function(e){"cube"===this.params.effect&&this.cubeeffect.settransition(e)}}},{name:"effect-flip",params:{flipeffect:{slideshadows:!0,limitrotation:!0}},create:function(){n.extend(this,{flipeffect:{settranslate:me.settranslate.bind(this),settransition:me.settransition.bind(this)}})},on:{beforeinit:function(){if("flip"===this.params.effect){this.classnames.push(this.params.containermodifierclass+"flip"),this.classnames.push(this.params.containermodifierclass+"3d");var e={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,spacebetween:0,virtualtranslate:!0};n.extend(this.params,e),n.extend(this.originalparams,e)}},settranslate:function(){"flip"===this.params.effect&&this.flipeffect.settranslate()},settransition:function(e){"flip"===this.params.effect&&this.flipeffect.settransition(e)}}},{name:"effect-coverflow",params:{coverfloweffect:{rotate:50,stretch:0,depth:100,modifier:1,slideshadows:!0}},create:function(){n.extend(this,{coverfloweffect:{settranslate:ge.settranslate.bind(this),settransition:ge.settransition.bind(this)}})},on:{beforeinit:function(){"coverflow"===this.params.effect&&(this.classnames.push(this.params.containermodifierclass+"coverflow"),this.classnames.push(this.params.containermodifierclass+"3d"),this.params.watchslidesprogress=!0,this.originalparams.watchslidesprogress=!0)},settranslate:function(){"coverflow"===this.params.effect&&this.coverfloweffect.settranslate()},settransition:function(e){"coverflow"===this.params.effect&&this.coverfloweffect.settransition(e)}}},{name:"thumbs",params:{thumbs:{multipleactivethumbs:!0,swiper:null,slidethumbactiveclass:"swiper-slide-thumb-active",thumbscontainerclass:"swiper-container-thumbs"}},create:function(){n.extend(this,{thumbs:{swiper:null,init:be.init.bind(this),update:be.update.bind(this),onthumbclick:be.onthumbclick.bind(this)}})},on:{beforeinit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slidechange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerupdate:function(){this.thumbs.swiper&&this.thumbs.update()},settransition:function(e){var t=this.thumbs.swiper;t&&t.settransition(e)},beforedestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swipercreated&&e&&e.destroy()}}}];return void 0===w.use&&(w.use=w.class.use,w.installmodule=w.class.installmodule),w.use(we),w})); //# sourcemappingurl=swiper.min.js.map; define('swiper-slider',['vendor/swiper/swiper.min'], function (swiper) { window.swiper = window.swiper || swiper; $(".js-swiper-container, .js-slick-slider").each(function () { var $t = $(this); if ($t.hasclass("swiper-container-initialized")) return; var $p = $t.parent(); if ($t.find(".swiper-slide").length <= 1) { $p.addclass("swiper-only-one-slider swiper-pagination-none"); return; } var defaultops = { navigation: { nextel: $p.find(".swiper-button-next")[0], prevel: $p.find(".swiper-button-prev")[0], }, pagination: { el: $p.find(".swiper-pagination")[0], clickable: true, }, lazy: { loadprevnext: true, }, watchoverflow: true, observer: true, observeparents: true, on: { observerupdate: function () { var that = this; if (!that) return; if ($(that.$el).is(":hidden")) return; if ($(that.$el).hasclass("js-no-destroy")) return; settimeout(function () { if (that.pagination && that.pagination.bullets && that.pagination.bullets.length === 1) { $(that.pagination.$el[0]).addclass("swiper-pagination-lock"); $(that.$el).parent().addclass("swiper-pagination-none"); that.destroy(true, true); } }, 100); }, afterinit: function () { $(document).trigger("updatelazyload"); }, init: function () { var self = this; settimeout(function () { $(self.pagination.bullets).filter(".swiper-pagination-bullet-active") .removeclass("swiper-pagination-bullet-active").delay(10) .promise() .then(function () { this.addclass("swiper-pagination-bullet-active"); }); }, 10); }, slidechange: function () { if (this.autoplay && !this.autoplay.running) { $(this.$el).addclass("swiper-no-running"); } }, }, }; var options = $.extend({}, defaultops, $t.data()); if(window.activexobject || "activexobject" in window){ if($(this).closest('.correlative').length) options.breakpoints[1025].slidesperview = 3; } var s = new swiper(this, options); }); function ontransitionend(e) { var swiper = $(this).parent()[0].swiper; if (!swiper || swiper.destroyed || !swiper.$wrapperel) return; if (e.target !== swiper.$wrapperel[0]) return; ['transitionend', 'webkittransitionend'].foreach(function (event) { swiper.$wrapperel[0].removeeventlistener(event, ontransitionend); }); swiper.autoplay.paused = false; if (!swiper.autoplay.running) { swiper.autoplay.stop(); } else { swiper.autoplay.run(); } } function swiperhover() { function onmouseenter(swiper) { if (swiper.params.autoplay.disableoninteraction) { swiper.autoplay.pause(); } else { swiper.autoplay.pause(); } ['transitionend', 'webkittransitionend'].foreach(function (event) { swiper.$wrapperel[0].removeeventlistener(event, ontransitionend); }); } function onmouseleave(swiper) { swiper.autoplay.paused = false; swiper.autoplay.run(); } $(document) .on("mouseenter", ".swiper-container", function (e) { var s = this.swiper; if (!s) return; if (!s.autoplay) return; if (!s.autoplay.running) { return; } settimeout(function () { onmouseenter(s); }, 10); $(s.$el).addclass("swiper-no-running"); }) .on("mouseleave", ".swiper-container", function (e) { var s = this.swiper; if (!s) return; if (!s.autoplay) return; if (!s.autoplay.running) { return; } onmouseleave(s); $(s.pagination.bullets).filter(".swiper-pagination-bullet-active") .removeclass("swiper-pagination-bullet-active").delay(10) .promise() .then(function () { this.addclass("swiper-pagination-bullet-active"); }); $(s.$el).removeclass("swiper-no-running"); }); } swiperhover(); }); define('misc',[ 'require', 'videobox', 'swiper-slider', ], function (require, videobox) { var huawei = huawei || {}; if (('ontouchstart' in window) || (window.documenttouch && document instanceof window.documenttouch)) { $("html").addclass("touch"); } else $("html").addclass("no-touch"); // video $('.btn-play').each(function (index) { new videobox($(this), index); }); // a标签新窗口打开的链接增加rel="noopener" $('a[target="_blank"]').attr("rel", "noopener"); // 手机版微信分享复制链接功能 $(document).on('click', '.btn-wechat', function (e) { $("body").addclass("mobile-share-open"); var copytext = $("#share-url-input"); if (!copytext.length) { copytext = $('').appendto("body"); } copytext.val(document.url); settimeout(function () { copytext.select(); document.execcommand("copy"); }, 10); }).on('click.js-wechat-share-overlay', '.js-wechat-share-close-btn', function (e) { $("body").removeclass("mobile-share-open"); }); // 底部分享图标在超出一屏以外显示出来 settimeout(function () { var $sharebox = $(".bottom-box .share-box"); if ($sharebox.length && $(".news-detail-box").outerheight() > window.innerheight) { $sharebox.addclass("show"); } }, 500); // 标签锚点定位功能 (function () { var gethistory = typeof history.replacestate === "function" ? $.when(1) : $.loadjs("https://cdn.jsdelivr.net/npm/html5-history-api@4.2.10/history.min.js"); var huawei = huawei || {}; if ($(".js-tablist-hash").length) { gethistory.then(function () { huawei.tab_hash(); }); } huawei.tab_hash = function () { $(document).on("click.tabclick", ".js-tablist-hash a", function (e) { history.replacestate(null, null, this.href); $(window).trigger('goto_section.tab_hash'); }); var $h = $("header"); var $s = $(".main-subnav"); var $tablist = $(".js-tablist-hash"); $(window).on('popstate.tab_hash goto_section.tab_hash', function (e) { var hash = location.hash.replace("/", ""); if (!hash) return; $("a[href='" + hash + "']").tab('show'); // scrollkey = false; settimeout(function () { $(document).trigger("scroll-goto.nav", $tablist.parent()); }, 100); }); function hideheader() { $h.addclass('header-hide'); $tablist.css("top", 0); $s.addclass("top"); } settimeout(function () { $(window).trigger('goto_section.tab_hash'); }, 100); $(document).on("scroll-goto.nav", function (e, target) { scrollkey = false; var $tg = $(target); var to = $tg.offset().top; var offset = 10; if ($tablist.hasclass("fixed")) offset = 50; hideheader(); $("html, body").stop(true).animate({ scrolltop: to // - $h.outerheight(true) // - ($tablist.hasclass("nav-fixed-tabs") ? 0 : ($s.outerheight(true) || 0)) - offset, - ($s.hasclass("fixed") ? $s.outerheight() : 0) }) .promise() .then(function () { hideheader(); settimeout(function () { scrollkey = true; }, 200); }); }); }; }()); // 左边过滤功能文字点击可选择 $(document).on("click", '.form-box span[type="check-box"] + p', function (e) { $(this).prev().trigger("click"); return false; }); // $(".btn-open-search").on("click", function (e) { var $t = $($(this).attr("data-target")).find("input"); settimeout(function () { $t.trigger("focus"); }, 500); if ($(window).width() > 1024) return; $("body").addclass("open-search"); }); $(".btn-close").on("click", function (e) { if ($(window).width() > 1024) return; $("body").removeclass("open-search"); }); huawei.show_more_less = function () { // 折叠显示更多更少 $(document).on('click.js-show-more', '[data-toggle="collapse"]', function (e) { var $t = $(this); if (!$t.attr('data-show-more-text')) { return false; } if ($t.is('[aria-expanded="true"]')) { $t.children('span').html($t.attr('data-show-less-text')) .end().children('em') .addclass('icon-arrow-up') .removeclass('icon-arrow-down'); } else { $t.children('span').html($t.attr('data-show-more-text')) .end().children('em') .removeclass('icon-arrow-up') .addclass('icon-arrow-down'); } return false; }); $(document).on('click.js-wechat-share', '.js-wechat-share-btn, .social-share .icon-wechat, .social .weixin', function (e) { if (!$(e.target).is('.js-wechat-share-btn, .social-share .icon-wechat, .social .weixin,.hwic_sharing_wechat')) { return false; } $(this).toggleclass('share-open'); return false; }) .on('click.js-wechat-share-close', '.js-wechat-share-close-btn', function (e) { $($(this).data('target')).removeclass('share-open'); return false; }); }; huawei.show_more_less(); window.gafix = function () { var args = array.prototype.slice.call(arguments); if (typeof utag === "undefined") return; try { var target = args[args.length - 1]; var href = target.href; if (href.tolowercase().indexof('javascript') >= 0) { href = "#"; } utag.link({ "link_category": args[2], "link_name": args[3], "link_url": target.href, "tealium_event": "link_click", }); } catch (e) { } }; // 更改默认ga事件 $("a[onclick^='ga']").on("click", function (e) { var evtstr = $(this).attr("onclick"); evtstr = evtstr.replace("ga(", "gafix("); evtstr = evtstr.replace(/\)/, ", this)"); var gaevent = new function('e', evtstr); if (typeof gafix === "function") { gaevent.apply(this, [e]); } }); // 页脚手机版同时只允许展开一个列表 $(document).on('click', 'footer .footer-nav [data-toggle="collapse"]', function (e) { $(this).closest('.footer-nav').find('[data-toggle="collapse"]').not(this) .not('.collapsed') .trigger('click'); settimeout(function () { $(document).trigger("scroll-goto.nav", e.target); }, 500); }); // tab标签点击切换显示对应的隐藏slick $(document).on('shown.bs.tab', '.js-tab-list-slick a', function (e) { settimeout(function () { $(document).trigger("swiper-tab-change", [e]); }, 200); }); // pc三级导航hover功能 $("#main-subnav-list").hoverintent(function () { $(this).addclass("hover"); }, function () { $(this).removeclass("hover"); }, ">ul > li").hoverintent(function () { return true; }, function () { $(this).find(">ul>li").removeclass("hover"); }); // 手机三级导航功能 $(document).on("click", ".main-subnav .nav-select a", function (e) { $(this).toggleclass("hover"); }); return huawei; }); define('search',[ 'vendor/js.cookie-2.2.1.min', // "vendor/jquery-ui/jquery-ui-autocomplete.min" ], function (cookies) { function getlang() { var lang = $("#hidlanguage").val() == "zh" ? "cn" : $("#hidlanguage").val(); return lang; } function validlang(lang) { return true; } $(".btn-search").on("click", function (e) { search($(this).prev()); return false; }); $(document).on("click", ".search_results a", function (e) { var target = $("#" + $(".search_results").attr("data-target")); target.val($(this).text()); search(target); return false; }); $(document).on("input propertychange", ".js-search-header-input-popup,.js-search-footer-input-popup", function (e) { $(".js-results-box").removeclass("hidden").addclass("show"); var keyword = $(this).val(); if (keyword.length < 2) { $(".js-complete-search-result").filter("[data-target='" + $(this).attr("id") + "']") .removeclass("show").addclass("hidden"); $(".js-results-box").removeclass("hidden").addclass("show"); return; if ($("#historyul li").length > 0) { $(".js-results-box").removeclass("hidden").addclass("show"); } else { $(".js-results-box").removeclass("show").addclass("hidden"); } } else { $(".js-complete-search-result").filter("[data-target='" + $(this).attr("id") + "']") .removeclass("hidden").addclass("show"); $(".js-results-box").addclass("hidden").removeclass("show"); } }); $(document).on("keypress", ".js-search-header-input-popup,.js-search-footer-input-popup", function (e) { if (e.keycode == 13) { search($(this)); } }); function search(target) { $(".js-search-btn-close").trigger("click"); savesearchkey(target.val()); var language = $("#hidlanguage").val(); var keyword = target.val(); var url = $("#searchurl").val() + "?keywords=" + keyword; location.href = url; } function savesearchkey(s) { var lang = getlang(); if ($.trim(s) == "" || /[&<>`"'?*\/]/.test(s)) { return; } if (validlang(lang)) { var searchkeystr = cookies.get("searchkey_his"); if (!searchkeystr) { searchkeystr = "[]"; } var searchkeylist = eval("(" + searchkeystr + ")"); var searchkeylistvalid = function () { return searchkeylist && searchkeylist.length > 0; }; var newsearchkeylist = []; newsearchkeylist.push(s); if (searchkeylistvalid()) { for (var i = 0; i < searchkeylist.length; i++) { if ($.trim(searchkeylist[i]) != $.trim(s) && newsearchkeylist.length < 3) { newsearchkeylist.push(searchkeylist[i]); } } } cookies.set("searchkey_his", json.stringify(newsearchkeylist), { expires: 90, path: '/' }); } } function showsearchkey() { var hissearch = $("#hissearch").val(); var lang = getlang(); if (validlang(lang)) { var searchkeystr = cookies.get("searchkey_his"); if (!searchkeystr) { searchkeystr = "[]"; } var searchkeylist = eval("(" + searchkeystr + ")"); var searchkeylistvalid = function () { return searchkeylist && searchkeylist.length > 0; }; if (searchkeylistvalid()) { var html = ""; for (var i = 0; i < searchkeylist.length; i++) { html += "
  • " + searchkeylist[i].replace(//g, ">") + "
  • "; if (i >= 3) break; } $("#historyul").html(html); } } } $(document).on("focusin", ".js-search-header-input-popup,.js-search-footer-input-popup, #b-search", function (e) { var lang = getlang(); if (!validlang(lang)) { return false; } var searchkeystr = cookies.get("searchkey_his"); if (!searchkeystr) { searchkeystr = "[]"; } var hot_search = $(".js-search-keyword-pc ul li"); if (hot_search.length > 0) { $(".js-results-box").css({ top: $(this).offset().top + $(this).outerheight(), left: $(this).offset().left, width: $(this).outerwidth(), }); $(".results2").css("csstext", "display:none !important"); $(".js-results-box").removeclass("hidden").addclass("show"); $(".search_results").attr("data-target", $(this).attr("id")); $(".js-complete-search-result").filter("[data-target='" + $(this).attr("id") + "']").removeclass("show"); $(".js-search-keyword-pc").css("display", ""); } else { $(".js-results-box").addclass("hidden"); } }) .on("focusout", ".js-search-header-input-popup,.js-search-footer-input-popup, #b-search", function (e) { settimeout(function () { $(".js-results-box").addclass("hidden").removeclass("show"); }, 200); }); showsearchkey(); $(document).on("input focusin focusout", "#js-search-footer-input-popup", function () { var $t = $(this); var val = $t.val(); var $clearbtn = $t.nextall(".btn-b-clear"); if (val) $clearbtn.show(); else $clearbtn.hide(); }).on("click", "#footer-search .btn-b-clear", function () { $(this).closest("#footer-search").find("#js-search-footer-input-popup").val("") .end() .end() .hide(); }); }); ; (function (root, factory) { if (typeof define === 'function' && define.amd) { // amd. register as an anonymous module. define('wechat-share',['jquery'], function ($) { return (root.wechatshare = factory($)); }); } else if (typeof module === 'object' && module.exports) { // node. does not work with strict commonjs, but // only commonjs-like environments that support module.exports, // like node. module.exports = factory(require('jquery')); } else { // browser globals root.wechatshare = factory(root.jquery); } }(typeof self !== 'undefined' ? self : this, function (jquery) { // use b in some fashion. var $ = jquery; var huawei = huawei || {}; var defaultimgurl = "https://" + location.host + "/assets/corp/v2/img/hw_logo_wechat.png"; function getshareoptions() { var options = {}; options["title"] = $('meta[property="og:title"]').attr("content") || document.title; options["link"] = location.href; options["desc"] = $('meta[property="og:description"]').attr("content") || $('meta[name="description"]').attr("content"); var wecharimg = $("#js-wechat-imgurl, #js-webchat-imgurl").val() || $('meta[property="og:image"]').attr("content"); if (/\/\//gi.test(wecharimg)) { if (!/http/gi.test(wecharimg) && wecharimg) { wecharimg = 'https:' + wecharimg; } } options["imgurl"] = wecharimg || defaultimgurl; options["imgurl"] = options["imgurl"].replace("www-file.huawei.com", document.domain); options["cancel"] = function (res) { $(document).trigger("wechat-share-cancel", [res]); }; options["success"] = function (res) { $(document).trigger("wechat-share-success", [res]); }; return options; } huawei.webchat_share = function () { var wechat_sdk = $.loadjs('https://res.wx.qq.com/open/js/jweixin-1.6.0.js'); var url = "/api/getwechatjssdk"; var data = { url: location.href.replace(location.hash, "") }; var wechat_auth = $.ajax({ url: url, data: data, datatype: "json", }); $.when(wechat_sdk, wechat_auth) .done(function (wx, auth) { var d = auth[0]; wx.config({ debug: false, appid: d.appid, timestamp: d.timestamp, noncestr: d.noncestr, signature: d.signature, jsapilist: [ 'onmenusharetimeline', 'onmenushareappmessage', 'updateappmessagesharedata', 'updatetimelinesharedata', ], }); var options = getshareoptions(); var timelinesharedata = $.extend({}, options); delete (timelinesharedata["desc"]); wx.ready(function () { // 监听“发送给朋友”按钮点击、自定义分享内容及分享结果接口 wx.updateappmessagesharedata(options); // 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口 wx.updatetimelinesharedata(timelinesharedata); }); }); }; (function () { if (!/micromessenger/i.test(navigator.useragent) || !/www\.huawei\.com(?:\.cn)?/i.test(document.domain)) { return false; } huawei.webchat_share(); return false; }()); // just return a value to define the module export. // this example returns an object, but the module // can return a function as the exported value. return huawei; })); function _extends(){return(_extends=object.assign||function(t){for(var e=1;e-1&&(i(t,e),h(t,o.class_loading)),b(t,e),function(t){s(t,"was-processed","true")}(t),d(o.callback_reveal,t),d(o.callback_set,t))},o=function(t){return!!n&&(t._observer=new intersectionobserver(function(e){e.foreach(function(e){return function(t){return t.isintersecting||t.intersectionratio>0}(e)?function(t,e){var n=e._settings;d(n.callback_enter,t),n.load_delay?x(t,e):a(t,e)}(e.target,t):function(t,e){var n=e._settings;d(n.callback_exit,t),n.load_delay&&l(t)}(e.target,t)})},{root:(e=t._settings).container===document?null:e.container,rootmargin:e.thresholds||e.threshold+"px"}),!0);var e},n=["img","iframe"],c=function(t,e){return function(t){return t.filter(function(t){return!c(t)})}((n=t||function(t){return t.container.queryselectorall(t.elements_selector)}(e),array.prototype.slice.call(n)));var n},m=function(t,e){this._settings=function(t){return _extends({},r,t)}(t),this._loadingcount=0,o(this),this.update(e)};return m.prototype={update:function(t){var n,o=this,r=this._settings;(this._elements=c(t,r),!e&&this._observer)?(function(t){return t.use_native&&"loading"in htmlimageelement.prototype}(r)&&((n=this)._elements.foreach(function(t){-1!==n.indexof(t.tagname)&&(t.setattribute("loading","lazy"),z(t,n))}),this._elements=c(t,r)),this._elements.foreach(function(t){o._observer.observe(t)})):this.loadall()},destroy:function(){var t=this;this._observer&&(this._elements.foreach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){z(t,this,e)},loadall:function(){var t=this;this._elements.foreach(function(e){a(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)a(t,n);else a(t,e)}(m,window.lazyloadoptions),m}); //# sourcemappingurl=lazyload.min.js.map ; define('lazyload',[ 'vendor/lazyload.min' ], function (lazyload) { 'use strict'; // 图片懒加载 // $("img.lazyload").attr("src", "data:image/png;base64,ivborw0kggoaaaansuheugaaaaeaaaabcaqaaac1hawcaaaac0leqvr42mnk8aeaafiatgdk/meaaaaasuvork5cyii="); var lazyloadinstance = new lazyload({ // your custom settings go here class_loading: "lazy-loading", elements_selector: ".lazyload", threshold: 100, lazy: true, preloadimages: false, }); var lazyloadinstanceswiper = new lazyload({ // your custom settings go here class_loading: "lazy-loading", elements_selector: ".swiper-lazy", threshold: 100, lazy: true, preloadimages: false, }); function updatelazyload(){ settimeout(function(){ lazyloadinstance.update(); lazyloadinstanceswiper.update(); }, 200); } updatelazyload(); window.lazyloadinstance = lazyloadinstance; if(window.jquery){ $(document).on("updatelazyload", updatelazyload); } }); // page init callback var page_init = window.page_init; if (page_init) { if (!(page_init instanceof array)) page_init = [page_init]; $.each(page_init, function (i, v) { v.call(this, $); }); } window.scrollkey = true; var commonmodule = { }; define('app/common',['panelimg', 'vendor/js.cookie-2.2.1.min', 'text-dotdotdot', 'photo', 'misc', 'search', 'helper', 'wechat-share', 'lazyload'], function (panelimg, cookies) { var pimg = new panelimg('.panel-img-list'); commonmodule.browsehappy(); // top-nav event var $topnavcontent = $('.top-nav-content'); var $groupwebsite = $('#group-website'); var $worldwide = $('#worldwide'); $('.top-nav-height a').on('click', function (e) { if ($(this).index() >= 2) return; e.preventdefault(); var $showele = null; if ($(this).index() === 0) { $showele = $('#group-website'); } if ($(this).index() === 1) { $showele = $('#worldwide'); } if (window.innerwidth < breakpoint1200) { $topnavcontent.toggleclass('in'); $showele .removeclass('chide') .removeattr('style') .siblings('div') .addclass('chide') .removeattr('style'); } else { if ($(this).index() === 0) { $groupwebsite.slidetoggle(500); $worldwide.slideup(500); } if ($(this).index() === 1) { $worldwide.slidetoggle(500); $groupwebsite.slideup(500); } $(this) .toggleclass('in') .siblings('a') .removeclass('in'); } }); // 移动端导航返回按钮 $('a.btn-nav-back').on('click', function (e) { e.preventdefault(); $(this) .parents('.menu-fixed-right') .removeclass('in'); $('.top-nav-height').removeclass('hide-down'); topnavheight(); }); // 导航栏滚轮 var breakpoint1200 = 1025; var breakpoint992 = 992; var $header = $('header'); var $navtop = $('.top-nav'); var $subnav = $('.main-subnav'); var $pointnav = $('.point-content-nav'); var poinfixedtop = $pointnav.length > 0 ? $pointnav.offset().top : 0; var tabsfixedtop = $('.nav-tabs.nav-fixed-tabs').length > 0 ? $('.nav-tabs.nav-fixed-tabs').offset().top : 0; var before = 0; var topheight = window.innerwidth >= breakpoint1200 ? 25 : 0; var headerheight = $header.height(); var ntop = $subnav.length > 0 ? headerheight + ($pointnav.length <= 0 && $('.nav-tabs.nav-fixed-tabs').length <= 0 ? $subnav.height() : 0) : headerheight; // resize var winwidth = window.innerwidth; $(window).resize(function () { if ((window.innerwidth >= breakpoint1200 && winwidth < breakpoint1200) || (window.innerwidth < breakpoint1200 && winwidth >= breakpoint1200)) { winwidth = window.innerwidth; // topheight = window.innerwidth >= breakpoint1200 ? 25 : 0; headerheight = $header.height(); ntop = $subnav.length > 0 ? headerheight + ($pointnav.length <= 0 && $('.nav-tabs.nav-fixed-tabs').length <= 0 ? $subnav.height() : 0) : headerheight; if ($pointnav.length > 0 && $pointnav.hasclass('fixed')) { $pointnav.removeclass('fixed'); poinfixedtop = $pointnav.offset().top; $pointnav.addclass('fixed'); return; } if ($pointnav.length > 0) poinfixedtop = $pointnav.offset().top; if ($('.nav-tabs.nav-fixed-tabs').length > 0) tabsfixedtop = $('.nav-tabs.nav-fixed-tabs').offset().top; // 手机pc切换修正 if (window.innerwidth < breakpoint1200) { $navtop.removeattr('style'); $header.removeclass('fixed header-hide'); } else if ($('body').hasclass('mobile-menu-open')) { $('body').removeclass('mobile-menu-open'); } } }); function navtabs() { var $nt = $('.nav-tabs'); settimeout(function () { $(".nav.nav-tabs").trigger("scroll.nav-arrow"); }, 100); if ($nt.data("nav-arrow")) return; $nt.data("nav-arrow", true); var navwidth = $('.nav-tabs').width(); var maxwidth = 0; maxwidth = $nt.prop("scrollwidth"); $('.nav-tabs').addclass("has-nav-arrow"); if ($('.nav-arrow').length < 1) { $('.nav-tabs').before('') .after(''); } } function getheaderoffsettop() { return ($header.parent().offset() || { top: 0 }).top; } function fixedheaderands() { // 固定头部,二级导航 if ($(window).scrolltop() >= getheaderoffsettop() && !$header.hasclass('fixed')) { $header.addclass('fixed'); if ($pointnav.length <= 0 && $('.nav-tabs.nav-fixed-tabs').length <= 0 && $subnav.length > 0) { $subnav.addclass('fixed'); } } } function fixednav() { // 固定锚点导航 if ($(window).scrolltop() >= ($pointnav.parent().offset() || { top: 0 }).top - (($header.hasclass('header-hide') ? 0 : headerheight) || 0) && !$pointnav.hasclass('fixed')) { $pointnav.css({ top: (($header.hasclass('header-hide') ? 0 : headerheight) || 0), }).addclass('fixed'); } } function fixedtabs() { // 固定tab切换 if ($(window).scrolltop() >= ($tabaffix.parent().offset() || { top: 0 }).top - (($header.hasclass('header-hide') ? 0 : headerheight) || 0) && !$('.nav-tabs').hasclass('fixed')) { $('.nav-tabs.nav-fixed-tabs').css({ top: (($header.hasclass('header-hide') ? 0 : headerheight) || 0), }).addclass('fixed'); $('.nav-arrow').addclass('fixed'); settimeout(function () { $(".nav.nav-tabs").trigger("scroll.nav-arrow"); }, 100); } } function hideheader() { // 隐藏header if ($(document).scrolltop() >= 150) { $header.addclass('header-hide'); if ($pointnav.length <= 0 && $('.nav-tabs.nav-fixed-tabs').length <= 0) { $subnav.addclass('top'); } else { $pointnav.removeattr('style'); $('.nav-tabs.nav-fixed-tabs').removeattr('style'); $('.nav-arrow').removeattr('style'); } } } function scrolldown() { fixedheaderands(); fixednav(); fixedtabs(); hideheader(); } function resetheader() { if ($header.hasclass('fixed') && $header.hasclass('header-hide')) { $header.removeclass('header-hide'); if ($pointnav.length <= 0 && $subnav.length > 0) $subnav.removeclass('top'); if ($pointnav.hasclass('fixed')) { $pointnav.css({ top: headerheight, }); } if ($('.nav-tabs.nav-fixed-tabs').hasclass('fixed')) { $('.nav-tabs.nav-fixed-tabs').css({ top: headerheight, }); $('.nav-arrow').css({ top: headerheight, }); } } } function resetnav() { if ($(window).scrolltop() < getheaderoffsettop() && $header.hasclass('fixed')) { $header.removeclass('fixed'); $navtop.removeattr('style'); if ($pointnav.length <= 0 && $subnav.length > 0) $subnav.removeclass('fixed'); } } function resetpointnav() { if ($(window).scrolltop() < ($pointnav.parent().offset() || { top: 0 }).top - ($header.hasclass('header-hide') ? 0 : headerheight) && $pointnav.hasclass('fixed')) { $pointnav.removeclass('fixed').removeattr('style'); } } function resettabs() { if ($(window).scrolltop() < ($tabaffix.parent().offset() || { top: 0 }).top - ($header.hasclass('header-hide') ? 0 : headerheight) && $('.nav-tabs').hasclass('fixed')) { $('.nav-tabs.nav-fixed-tabs').removeclass('fixed').removeattr('style'); $('.nav-arrow').removeclass('fixed').removeattr('style'); $('.tab-content.nav-fixed-content').removeclass('tabs-fixed'); navtabs(); } } function scrollup() { resetheader(); resetnav(); resetpointnav(); resettabs(); } $header.wrap('
    '); $subnav.wrap('
    '); $pointnav.wrap('
    '); var $tabaffix = $(".nav-tabs.nav-fixed-tabs"); $tabaffix.wrap('
    '); var userscroll = function (e) { if (!scrollkey) return; var wwidth = window.innerwidth || math.max(document.documentelement.clientheight, document.body.clientheight); if (wwidth > breakpoint1200) { $('.b-search-keyword').hide(); } var after = $(window).scrolltop(); if (math.abs(after - before) < 10) return; if (after >= before) { scrolldown(); } else { scrollup(); } before = after; }; navtabs(); userscroll(); $(window).on('scroll', $.debounce(userscroll, 50)); // header event $header.find('button.navbar-toggle').on('click', function (e) { e.preventdefault(); $(this).toggleclass('collapsed'); $('#hw-navbar, .top-nav .top-nav-height').toggleclass('in'); $('body').toggleclass('mobile-menu-open'); $('a.btn-nav-back').trigger('click'); }); $header.find('.btn-next').on('click', function (e) { if ($(this).parent().hasclass("hover-open")) { e.preventdefault(); $('.top-nav-height').removeattr('style'); $('.top-nav-height').addclass('hide-down'); $(this) .next('.menu-fixed-right') .toggleclass('in'); } }); // 手机版导航 .top-nav-height位置调整 function topnavheight() { if (window.innerwidth < breakpoint1200) { var height = window.innerheight; height -= 321 + 7.5 + 66; $('.top-nav-height ').css('bottom', (height / 2) - 55); } } topnavheight(); $('#hw-navbar [data-toggle=collapse]').on('click', function (e) { if ($(this).hasclass('collapsed')) { $('#hw-navbar [data-toggle=collapse]').addclass('collapsed'); $('#hw-navbar .navbar-collapse').removeclass('in'); } }); // mouseover mask-bg var $maskbg = $('.mask-bg'); var timeinterval; var closeinterval; $('#hw-navbar').hoverintent( function (e) { var $this = $(this); var $brothers = $this.parent().children(".hover-open"); if (window.innerwidth >= breakpoint1200) { var $old = $('.hover-open.active'); $old.removeclass('active'); $old.children('.nav-open').hide(); $maskbg.addclass('show').css('visibility', 'visible'); $this.addclass('active'); $this.children('.nav-open').show().css({ visibility: 'visible', opacity: '1' }); } }, function (e) { }, '.hover-open' ).hoverintent(function () { }, function (e) { $('#hw-navbar .hover-open').removeclass("active").find(".nav-open").fadeout(); $maskbg.removeclass("show").css("visibility", "hidden"); }); // 返回顶部按钮 if ($('body').find('a.btn-go-top').length > 0) { $(window).on('scroll', $.debounce(function () { if ($(window).scrolltop() > 500) { $('a.btn-go-top').fadein(200); } else { $('a.btn-go-top').fadeout(200); } }, 50)); $('body') .find('a.btn-go-top') .on('click', function (e) { e.preventdefault(); $('html,body').animate({ scrolltop: 0, }, 'fast'); }); } // 搜索框 if (window.innerwidth >= breakpoint1200) { $('body').click(function () { if (($('.search-box.search-hide').length < $('.search-box').length)) { $('a.btn-open-search').removeclass('nav-hide'); $('.search-box').addclass('search-hide'); $('.btn-shop, #hw-navbar').removeclass('nav-hide'); $(".js-results-box,.js-complete-search-result").removeclass("show").addclass("hidden"); } }); } $('.search-box input,.search-box .b-search-keyword,.search-box .btn-search').click(function (e) { e.stoppropagation(); }); $('a.btn-open-search').on('click', function (e) { e.preventdefault(); e.stoppropagation(); $(this).addclass('nav-hide'); if ($(this).parents('header').length > 0 && window.innerwidth >= breakpoint1200) { $('.btn-shop, #hw-navbar').addclass('nav-hide'); } $($(this).data('target')).removeclass('search-hide'); if ($('#hw-navbar').hasclass('in')) { $('.top-nav-height').addclass('hide-down'); } }); $('.search-box .btn-close').on('click', function (e) { e.preventdefault(); e.stoppropagation(); if ($(this).parents('header').length > 0 && window.innerwidth >= breakpoint1200) { $('.btn-shop, #hw-navbar').removeclass('nav-hide'); } $(this).parent('.search-box').addclass('search-hide'); $('a.btn-open-search[data-target="#' + $(this).parent('.search-box').attr('id') + '"]').removeclass('nav-hide'); if ($('#hw-navbar').hasclass('in') && $('#hw-navbar').find(".menu-list .nav-open.in").length <= 0) { $('.top-nav-height').removeclass('hide-down'); } $(".js-results-box,.js-complete-search-result").removeclass("show").addclass("hidden"); }); // 微信分享 if ($('.share-box').length > 0) { $('.btn-wechat') .on('click', function (e) { e.preventdefault(); $(this) .find('.wechat-qrcode') .toggleclass('show'); }) .find('button') .on('click', function (e) { e.preventdefault(); $(this) .parents('wechat-qrcode') .removeclass('show'); }); } $('.main-subnav [data-toggle=collapse]').on('click', function (e) { if (window.innerwidth >= 1200) e.stoppropagation(); }); // ie8 var default_version = 8.0; var ua = navigator.useragent.tolowercase(); var isie = ua.indexof("msie") > -1; var safariversion; if (isie) { safariversion = ua.match(/msie ([\d.]+)/)[1]; } if (safariversion <= default_version) { settimeout(function () { if ($('.col-item .imgbox img').length > 0) { $('.col-item .imgbox img').css('top', '0'); } if ($('.c-box .imgbox').length > 0) { $('.c-box .imgbox img').css('top', '0'); } if ($('#story-content').length > 0) { $('#story-content img').css('top', '0'); } if ($('.row li.c-no-img').length > 0) { $('.row li.c-no-img').each(function () { $(this).after('
  • '); }); } }, 2000); } $('.page-list a').click(function () { var top = 0; top = $('.content-list-box,.content-list-box-other,.tab-content .row,.list-row,.result-list').offset().top; if ($('.content-list-box-other').length > 0 && $('.ict-interview').length > 0) { top = $('.ict-interview').offset().top; } scrolloffset(top - 150, 0); }); function scrolloffset(top, time) { $('html,body').stop().animate({ scrolltop: top }, time); } $('.btn-close-nav-ani').click(function () { var $openli = $('.hover-open.active'); $maskbg.removeclass('show').css('visibility', 'hidden'); $openli.children('.nav-open').css('display', 'none'); clearinterval(timeinterval); $openli.removeclass('active'); }); $('.popup-icon').click(function () { $('.popup-service').fadein(); }); $('.btn-close-service').click(function () { $('.popup-service').fadeout(); }); $('.footer-nav h3').click(function () { if (winwidth > breakpoint1200) { return false; } }); var region = $("#hidregionname").val(); var regionlink = $("#worldwide a[href='/" + region + "/']"); regionlink.closest("li").addclass("active"); regionlink.closest("li").prepend(""); commonmodule.getusernameinfo(cookies); // fix r6 server link $("a[href*='corporate/home']").each(function (i, o) { $(o).attr("href", $(o).attr("href").replace(/\/corporate\/home/i, "")); }); // 标签栏内容不够显示时左右滚动 $(document).on("click", ".js-nav-arrow-next", function (e) { // debugger; var $t = $(this); var $p = $t.parent().find($(this).attr("data-target")); $p.animate({ scrollleft: $p.scrollleft() + 250 }); return false; }); $(document).on("click", ".js-nav-arrow-prev", function (e) { // debugger; var $t = $(this); var $p = $t.parent().find($(this).attr("data-target")); $p.animate({ scrollleft: $p.scrollleft() - 250 }); return false; }); $(".nav.nav-tabs").on("scroll.nav-arrow", function (e) { var $t = $(this); var $l = $t.prev(".nav-arrow"); var $r = $t.next(".nav-arrow"); if ($t.prop("scrollwidth") < $t.outerwidth() + 5) { $r.addclass("hidden"); $l.addclass("hidden"); return; } if ($t.scrollleft() + $t.prop("offsetwidth") >= $t.prop("scrollwidth")) { $r.addclass("hidden"); $l.removeclass("hidden"); } else $r.removeclass("hidden"); if ($t.scrollleft() <= 0) { $l.addclass("hidden"); $r.removeclass("hidden"); } else $l.removeclass("hidden"); }); settimeout(function () { $(".nav.nav-tabs").trigger("scroll.nav-arrow"); }, 1000); // 解决ie下背景视频自动播放,video标签需加class js-video-autoplay var $video_autoplay = $("video.js-video-autoplay"); if ($video_autoplay.length) $video_autoplay.get(0).play(); // fixed bottom wechat follow popup $(document).on("click", ".js-wechat-follow", function (e) { e.preventdefault(); $(this) .find('.wechat-qrcode') .toggleclass('show'); }) .on('click', ".wechat-qrcode .share-close", function (e) { e.preventdefault(); $(this) .closest('.wechat-qrcode') .removeclass('show'); }); }); function clearpage() { try { var url = location.href; var ret = /&/; if (ret.test(url)) { var pattern1 = /(\?)page=([^&]*)/gi; if (pattern1.test(url)) { url = url.replace(/page=([^&]*)(&)/gi, ''); } else { url = url.replace(/(&)page=([^&]*)/gi, ''); } } else { url = url.replace(/(\?)page=([^&]*)/gi, ''); } history.pushstate('', document.title, url); } catch (e) { } } // 中文版 cookie 提示 commonmodule.browsehappy = function browsehappy() { var currenturl = window.location.pathname; if (currenturl.indexof("cn") != 1) { $(document).on("click", '.browsehappy a.close', function (e) { $(this).closest('.browsehappy').slideup( function () { $.cache.set('browsehappy', 'browsehappy', 30); } ); }); var browsehappycache = $.cache.get('browsehappy'); try { if (!browsehappycache || (new date(browsehappycache.expire) - new date() <= 0)) { $.cache.del('browsehappy'); $('.browsehappy').slidedown(); } } catch (_e) { } } }; commonmodule.getusernameinfo = function getusernameinfo(cookies) { try { // 登陆注销链接协议判断 if (location.protocol == "https:") { $(".top-nav a[data-id='{e48cf523-1fca-446d-ad7e-b07ccf967a8e}'], " + ".top-nav a[data-id='{bdde876f-d975-4ede-b534-33edf05110b0}']") .each(function (i, o) { var $t = $(this); $t.attr("href", $t.attr("href").replace(/(redi(?:rect|url)=http)(%3a)/ig, "$1s$2")); }); } } catch (e) { } var visuidlogin = cookies.get("uid"); var islogin = cookies.get("hwsso_uniportal"); var isbacklogin = cookies.get("login_uid");// 后台登录 var userstatusurl = $("#hiduserstatusurl").val(); if (userstatusurl != "") userstatusurl += "?action=userstate¤turl=" + encodeuricomponent(window.location); var haslogin = function () { return boolean(islogin) || boolean(isbacklogin) || boolean(visuidlogin); }; $.ajax({ url: userstatusurl, type: "get", datatype: "json", cache: false, async: false, }).then(function (result) { if (result && result.stats == true) { $(".top-nav a[data-id='{3f052e96-2cc6-49c4-ae8b-91caf8f53cd9}']").css("display", ""); $(".top-nav a[data-id='{e48cf523-1fca-446d-ad7e-b07ccf967a8e}']").css("display", ""); $(".top-nav a[data-id='{bdde876f-d975-4ede-b534-33edf05110b0}']").css("display", "none"); } else { $(".top-nav a[data-id='{3f052e96-2cc6-49c4-ae8b-91caf8f53cd9}']").css("display", "none"); $(".top-nav a[data-id='{e48cf523-1fca-446d-ad7e-b07ccf967a8e}']").css("display", "none"); $(".top-nav a[data-id='{bdde876f-d975-4ede-b534-33edf05110b0}']").css("display", ""); } }).fail(function (result) { $(".top-nav a[data-id='{3f052e96-2cc6-49c4-ae8b-91caf8f53cd9}']").css("display", "none"); $(".top-nav a[data-id='{e48cf523-1fca-446d-ad7e-b07ccf967a8e}']").css("display", "none"); $(".top-nav a[data-id='{bdde876f-d975-4ede-b534-33edf05110b0}']").css("display", ""); $("#logout_mob").css("display", "none"); $("#myhuawei_mob").css("display", "none"); }); $(".top-nav a[data-id='{3f052e96-2cc6-49c4-ae8b-91caf8f53cd9}']").css("display", "none"); $(".top-nav a[data-id='{e48cf523-1fca-446d-ad7e-b07ccf967a8e}']").css("display", "none"); $(".top-nav a[data-id='{bdde876f-d975-4ede-b534-33edf05110b0}']").css("display", ""); }; //the build will inline common dependencies into this file. //for any third party dependencies, like jquery, place them in the lib folder. //configure loading modules from the lib directory, //except for 'app' ones, which are in a sibling //directory. requirejs.config({ waitseconds: 0, baseurl: 'js/lib', paths: { app: '../app' } }); // var jquery_cdn = /msie [6-8]/i.test(navigator.useragent) ? 'https://cdn.jsdelivr.net/npm/jquery@1.12.2/dist/jquery.min' : 'https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min'; var _r = require; _r.config({ baseurl: location.pathname.replace(/2020\/www.*/, '2020/www/')+'js/lib', paths: { // jquery: jquery_cdn } }); define('./common', [ 'require', ], function (require) { 'use strict'; return require; }); window.jquery && (window.jquery.loadjs = window.jquery.loadscript = (function () { var loaded = {}; return function (url, options) { var deferred = new jquery.deferred(); if (loaded[url]) return loaded[url]; // allow user to set any option except for datatype, cache, and url options = $.extend(options || {}, { datatype: "script", cache: true, url: url }); // use $.ajax() since it is more flexible than $.getscript // return the jqxhr object so we can chain callbacks if (typeof require == "function") { require([url], function (r) { deferred.resolve(r); }); loaded[url] = deferred.promise(); } else loaded[url] = $.ajax(options); return loaded[url]; }; })()); window.jquery && (window.jquery.loadcss = (function () { var loaded = {}; return function (url, options) { if (loaded[url]) { return loaded[url]; } loaded[url] = true; // use $.ajax() since it is more flexible than $.getscript // return the jqxhr object so we can chain callbacks $('').prependto('head'); return loaded[url]; }; })()); define('jquery', [], function () { return window.jquery; }); // html标签增加特定class, attribute,限定样式,兼容浏览器用 document.documentelement.classname += ' ie' + document.documentmode; document.documentelement.setattribute("data-useragent", navigator.useragent); document.documentelement.setattribute("data-url", document.url); // 兼容 ie8 !window.addeventlistener&&function(e,t,n,r,i,s,o){e[r]=t[r]=n[r]=function(e,t){var n=this;o.unshift([n,e,t,function(e){e.currenttarget=n,e.preventdefault=function(){e.returnvalue=!1},e.stoppropagation=function(){e.cancelbubble=!0},e.target=e.srcelement||n,t.call(n,e)}]),this.attachevent("on"+e,o[0][3])},e[i]=t[i]=n[i]=function(e,t){for(var n=0,r;r=o[n];++n)if(r[0]==this&&r[1]==e&&r[2]==t)return this.detachevent("on"+e,o.splice(n,1)[0][3])},e[s]=t[s]=n[s]=function(e){return this.fireevent("on"+e.type,e)}}(window.prototype,htmldocument.prototype,element.prototype,"addeventlistener","removeeventlistener","dispatchevent",[]) require(["app/common"]); define("../common", function(){});