vendor: 17,158 bytes, lines 1-76
1 2; /* Start:"a:4:{s:4:"full";s:86:"/local/templates/fondpotanin/build/script/plugins/jquery-3.3.1.min.js?1693908502139824";s:6:"source";s:69:"/local/templates/fondpotanin/build/script/plugins/jquery-3.3.1.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3 4(function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");} 5return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){return typeof obj==="function"&&typeof obj.nodeType!=="number";};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window;};var preservedScriptAttributes={type:true,src:true,noModule:true};function DOMEval(code,doc,node){doc=doc||document;var i,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){if(node[i]){script[i]=node[i];}}} 6doc.head.appendChild(script).parentNode.removeChild(script);} 7function toType(obj){if(obj==null){return obj+"";} 8return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj;} 9var 10version="3.3.1",jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this);},get:function(num){if(num==null){return slice.call(this);} 11return num<0?this[num+this.length]:this[num];},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret;},each:function(callback){return jQuery.each(this,callback);},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function(){return this.pushStack(slice.apply(this,arguments));},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function(){return this.prevObject||this.constructor();},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++;} 12if(typeof target!=="object"&&!isFunction(target)){target={};} 13if(i===length){target=this;i--;} 14for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;} 15if(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[];}else{clone=src&&jQuery.isPlainObject(src)?src:{};} 16target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}} 17return target;};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg);},noop:function(){},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!=="[object Object]"){return false;} 18proto=getProto(obj);if(!proto){return true;} 19Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;},isEmptyObject:function(obj){var name;for(name in obj){return false;} 20return true;},globalEval:function(code){DOMEval(code);},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break;}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break;}}} 21return obj;},trim:function(text){return text==null?"":(text+"").replace(rtrim,"");},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else{push.call(ret,arr);}} 22return ret;},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i);},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j];} 23first.length=i;return first;},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}} 24return matches;},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}} 25return concat.apply([],ret);},guid:1,support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];} 26jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);if(isFunction(obj)||isWindow(obj)){return false;} 27return type==="array"||length===0||typeof length==="number"&&length>0&&(length-1)in obj;} 28var Sizzle=(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true;} 29return 0;},hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i;}} 30return-1;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+identifier+")"),"CLASS":new RegExp("^\\.("+identifier+")"),"TAG":new RegExp("^("+identifier+"|[*])"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ 31whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";} 32return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";} 33return"\\"+ch;},unloadHandler=function(){setDocument();},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&("form"in elem||"label"in elem);},{dir:"parentNode",next:"legend"});try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){} 34target.length=j-1;}};} 35function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;} 36if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);} 37context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){if((elem=context.getElementById(m))){if(elem.id===m){results.push(elem);return results;}}else{return results;}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}} 38if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector;}else if(context.nodeName.toLowerCase()!=="object"){if((nid=context.getAttribute("id"))){nid=nid.replace(rcssescape,fcssescape);}else{context.setAttribute("id",(nid=expando));} 39groups=tokenize(selector);i=groups.length;while(i--){groups[i]="#"+nid+" "+toSelector(groups[i]);} 40newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;} 41if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id");}}}}}} 42return select(selector.replace(rtrim,"$1"),context,results,seed);} 43function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()];} 44return(cache[key+" "]=value);} 45return cache;} 46function markFunction(fn){fn[expando]=true;return fn;} 47function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el);}catch(e){return false;}finally{if(el.parentNode){el.parentNode.removeChild(el);} 48el=null;}} 49function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler;}} 50function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff;} 51if(cur){while((cur=cur.nextSibling)){if(cur===b){return-1;}}} 52return a?1:-1;} 53function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};} 54function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};} 55function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else{return elem.disabled===disabled;}} 56return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled;} 57return elem.disabled===disabled;}else if("label"in elem){return elem.disabled===disabled;} 58return false;};} 59function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j]);}}});});} 60function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;} 61support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;} 62document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener("unload",unloadHandler,false);}else if(subWindow.attachEvent){subWindow.attachEvent("onunload",unloadHandler);}} 63support.attributes=assert(function(el){el.className="i";return!el.getAttribute("className");});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(""));return!el.getElementsByTagName("*").length;});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length;});if(support.getById){Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else{Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];} 64elems=context.getElementsByName(id);i=0;while((elem=elems[i++])){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}}} 65return[];}};} 66Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);}else if(support.qsa){return context.querySelectorAll(tag);}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem);}} 67return tmp;} 68return results;};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(document.querySelectorAll))){assert(function(el){docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\r\\' msallowcapture=''>"+"<option selected=''></option></select>";if(el.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");} 69if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");} 70if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");} 71if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");} 72if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}});assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a>"+"<select disabled='disabled'><option/></select>";var input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");if(el.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");} 73if(el.querySelectorAll(":enabled").length!==2){rbuggyQSA.push(":enabled",":disabled");} 74docElem.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");} 75el.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});} 76if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(el){support.disconnectedMatch=matches.call(el,"*");matches.call(el,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}
vendor: 12,068 bytes, lines 77-120
77rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true;}}} 78return false;};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0;} 79var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;} 80compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;} 81if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;} 82return sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;} 83return compare&4?-1:1;}:function(a,b){if(a===b){hasDuplicate=true;return 0;} 84var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}else if(aup===bup){return siblingCheck(a,b);} 85cur=a;while((cur=cur.parentNode)){ap.unshift(cur);} 86cur=b;while((cur=cur.parentNode)){bp.unshift(cur);} 87while(ap[i]===bp[i]){i++;} 88return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return document;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem);} 89expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}} 90return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context);} 91return contains(context,elem);};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem);} 92var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape);};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}} 93while(j--){results.splice(duplicates[j],1);}} 94sortInput=null;return results;};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent;}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;} 95return ret;};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";} 96return match.slice(0,4);},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0]);} 97match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd");}else if(match[3]){Sizzle.error(match[0]);} 98return match;},"PSEUDO":function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;} 99if(match[3]){match[2]=match[4]||match[5]||"";}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);} 100return match.slice(0,3);}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";} 101if(!operator){return true;} 102result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}} 103start=dir=type==="only"&&!start&&"nextSibling";} 104return true;} 105start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break;}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;} 106if(diff===false){while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];} 107if(node===elem){break;}}}}} 108diff-=last;return diff===first||(diff%first===0&&diff/first>=0);}};},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument);} 109if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};} 110return fn;}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);} 111lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function(elem){return elem===docElem;},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},"enabled":createDisabledPseudo(false),"disabled":createDisabledPseudo(true),"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected);},"selected":function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;} 112return elem.selected===true;},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}} 113return true;},"parent":function(elem){return!Expr.pseudos["empty"](elem);},"header":function(elem){return rheader.test(elem.nodeName);},"input":function(elem){return rinputs.test(elem.nodeName);},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);} 114return matchIndexes;}),"odd":createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);} 115return matchIndexes;}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i);} 116return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);} 117return matchIndexes;})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);} 118for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);} 119function setFilters(){} 120setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[
vendor: 16,966 bytes, lines 120-205
120selector+" "];if(cached){return parseOnly?0:cached.slice(0);} 121soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar;} 122groups.push((tokens=[]));} 123matched=false;if((match=rcombinators.exec(soFar))){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length);} 124for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}} 125if(!matched){break;}} 126return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0);};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;} 127return selector;} 128function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}} 129return false;}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else{while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem;}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return(newCache[2]=oldCache[2]);}else{uniqueCache[key]=newCache;if((newCache[2]=matcher(elem,context,xml))){return true;}}}}} 130return false;};} 131function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}} 132return true;}:matchers[0];} 133function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results);} 134return results;} 135function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if((elem=unmatched[i])){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}} 136return newUnmatched;} 137function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);} 138if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);} 139return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml);} 140if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if((elem=temp[i])){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}} 141if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if((elem=matcherOut[i])){temp.push((matcherIn[i]=elem));}} 142postFinder(null,(matcherOut=[]),temp,xml);} 143i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});} 144function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){var ret=(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret;}];for(;i<len;i++){if((matcher=Expr.relative[tokens[i].type])){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}} 145return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens((tokens=tokens.slice(j))),j<len&&toSelector(tokens));} 146matchers.push(matcher);}} 147return elementMatcher(matchers);} 148function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context===document||context||outermost;} 149for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML;} 150while((matcher=elementMatchers[j++])){if(matcher(elem,context||document,xml)){results.push(elem);break;}} 151if(outermost){dirruns=dirrunsUnique;}} 152if(bySet){if((elem=!matcher&&elem)){matchedCount--;} 153if(seed){unmatched.push(elem);}}} 154matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml);} 155if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}} 156setMatched=condense(setMatched);} 157push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results);}} 158if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;} 159return unmatched;};return bySet?markFunction(superMatcher):superMatcher;} 160compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector);} 161i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}} 162cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector;} 163return cached;};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;}else if(compiled){context=context.parentNode;} 164selector=selector.slice(tokens.shift().value.length);} 165i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break;} 166if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;} 167break;}}}} 168(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement("fieldset"))&1;});if(!assert(function(el){el.innerHTML="<a href='#'></a>";return el.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});} 169if(!support.attributes||!assert(function(el){el.innerHTML="<input/>";el.firstChild.setAttribute("value","");return el.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});} 170if(!assert(function(el){return el.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});} 171return Sizzle;})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;} 172matched.push(elem);}} 173return matched;};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}} 174return matched;};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();};var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});} 175if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});} 176if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not;});} 177return jQuery.filter(qualifier,elements,not);} 178jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";} 179if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];} 180return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));} 181ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);} 182return len>1?jQuery.uniqueSort(ret):ret;},filter:function(selector){return this.pushStack(winnow(this,selector||[],false));},not:function(selector){return this.pushStack(winnow(this,selector||[],true));},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this;} 183root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null];}else{match=rquickExpr.exec(selector);} 184if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(isFunction(this[match])){this[match](context[match]);}else{this.attr(match,context[match]);}}} 185return this;}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1;} 186return this;}}else if(!context||context.jquery){return(context||root).find(selector);}else{return this.constructor(context).find(selector);}}else if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery);} 187return jQuery.makeArray(selector,this);};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}} 188return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;} 189if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);} 190return indexOf.call(this,elem.jquery?elem[0]:elem);},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){} 191return cur;} 192jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until);},next:function(elem){return sibling(elem,"nextSibling");},prev:function(elem){return sibling(elem,"previousSibling");},nextAll:function(elem){return dir(elem,"nextSibling");},prevAll:function(elem){return dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until);},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem);},children:function(elem){return siblings(elem.firstChild);},contents:function(elem){if(nodeName(elem,"iframe")){return elem.contentDocument;} 193if(nodeName(elem,"template")){elem=elem.content||elem;} 194return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;} 195if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);} 196if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);} 197if(rparentsprev.test(name)){matched.reverse();}} 198return this.pushStack(matched);};});var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;} 199jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var 200firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false;}}} 201if(!options.memory){memory=false;} 202firing=false;if(locked){if(memory){list=[];}else{list="";}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory);} 203(function add(args){jQuery.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg);}}else if(arg&&arg.length&&toType(arg)!=="string"){add(arg);}});})(arguments);if(memory&&!firing){fire();}} 204return this;},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--;}}});return this;},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},empty:function(){if(list){list=[];} 205return this;},disable:function(){locked=queue=[];list=memory="";return this;},disabled:function(){return!list;},lock:function(){locked=queue=[];
vendor: 9,621 bytes, lines 205-253
205if(!memory&&!firing){list=memory="";} 206return this;},locked:function(){return!!locked;},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}} 207return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};function Identity(v){return v;} 208function Thrower(ex){throw ex;} 209function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&isFunction((method=value.promise))){method.call(value).done(resolve).fail(reject);}else if(value&&isFunction((method=value.then))){method.call(value,resolve,reject);}else{resolve.apply(undefined,[value].slice(noValue));}}catch(value){reject.apply(undefined,[value]);}} 210jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state;},always:function(){deferred.done(arguments).fail(arguments);return this;},"catch":function(fn){return promise.then(null,fn);},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return;} 211returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError("Thenable self-resolution");} 212then=returned&&(typeof returned==="object"||typeof returned==="function")&&returned.then;if(isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special));}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith));}}else{if(handler!==Identity){that=undefined;args=[returned];} 213(special||deferred.resolveWith)(that,args);}},process=special?mightThrow:function(){try{mightThrow();}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace);} 214if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e];} 215deferred.rejectWith(that,args);}}};if(depth){process();}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook();} 216window.setTimeout(process);}};} 217return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower));}).promise();},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise;}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString;},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock);} 218list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};deferred[tuple[0]+"With"]=list.fireWith;});promise.promise(deferred);if(func){func.call(deferred,deferred);} 219return deferred;},when:function(singleValue){var 220remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!(--remaining)){master.resolveWith(resolveContexts,resolveValues);}};};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then();}} 221while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject);} 222return master.promise();}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error);});return this;};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return;} 223jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return;} 224readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();} 225if(document.readyState==="complete"||(document.readyState!=="loading"&&!document.documentElement.doScroll)){window.setTimeout(jQuery.ready);}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed);} 226var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}}else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true;} 227if(bulk){if(raw){fn.call(elems,value);fn=null;}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value);};}} 228if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}} 229if(chainable){return elems;} 230if(bulk){return fn.call(elems);} 231return len?fn(elems[0],key):emptyGet;};var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;function fcamelCase(all,letter){return letter.toUpperCase();} 232function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);} 233var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);};function Data(){this.expando=jQuery.expando+Data.uid++;} 234Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value;}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true});}}} 235return value;},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data==="string"){cache[camelCase(data)]=value;}else{for(prop in data){cache[camelCase(prop)]=data[prop];}} 236return cache;},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][camelCase(key)];},access:function(owner,key,value){if(key===undefined||((key&&typeof key==="string")&&value===undefined)){return this.get(owner,key);} 237this.set(owner,key,value);return value!==undefined?value:key;},remove:function(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return;} 238if(key!==undefined){if(Array.isArray(key)){key=key.map(camelCase);}else{key=camelCase(key);key=key in cache?[key]:(key.match(rnothtmlwhite)||[]);} 239i=key.length;while(i--){delete cache[key[i]];}} 240if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined;}else{delete owner[this.expando];}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache);}};var dataPriv=new Data();var dataUser=new Data();var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true;} 241if(data==="false"){return false;} 242if(data==="null"){return null;} 243if(data===+data+""){return+data;} 244if(rbrace.test(data)){return JSON.parse(data);} 245return data;} 246function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data);}catch(e){} 247dataUser.set(elem,key,data);}else{data=undefined;}} 248return data;} 249jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem);},data:function(elem,name,data){return dataUser.access(elem,name,data);},removeData:function(elem,name){dataUser.remove(elem,name);},_data:function(elem,name,data){return dataPriv.access(elem,name,data);},_removeData:function(elem,name){dataPriv.remove(elem,name);}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}} 250dataPriv.set(elem,"hasDataAttrs",true);}} 251return data;} 252if(typeof key==="object"){return this.each(function(){dataUser.set(this,key);});} 253return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);
vendor: 39,436 bytes, lines 253-454
253if(data!==undefined){return data;} 254data=dataAttr(elem,key);if(data!==undefined){return data;} 255return;} 256this.each(function(){dataUser.set(this,key,value);});},null,value,arguments.length>1,null,true);},removeData:function(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else{queue.push(data);}} 257return queue||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type);};if(fn==="inprogress"){fn=queue.shift();startLength--;} 258if(fn){if(type==="fx"){queue.unshift("inprogress");} 259delete hooks.stop;fn.call(elem,next,hooks);} 260if(!startLength&&hooks){hooks.empty.fire();}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;} 261if(arguments.length<setter){return jQuery.queue(this[0],type);} 262return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!(--count)){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;} 263type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}} 264resolve();return defer.promise(obj);}});var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var isHiddenWithinTree=function(elem,el){elem=el||elem;return elem.style.display==="none"||elem.style.display===""&&jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,"display")==="none";};var swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];} 265ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name];} 266return ret;};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur();}:function(){return jQuery.css(elem,prop,"");},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){initial=initial/2;unit=unit||initialInUnit[3];initialInUnit=+initial||1;while(maxIterations--){jQuery.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){maxIterations=0;} 267initialInUnit=initialInUnit/scale;} 268initialInUnit=initialInUnit*2;jQuery.style(elem,prop,initialInUnit+unit);valueParts=valueParts||[];} 269if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted;}} 270return adjusted;} 271var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display;} 272temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block";} 273defaultDisplayMap[nodeName]=display;return display;} 274function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue;} 275display=elem.style.display;if(show){if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display="";}} 276if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem);}}else{if(display!=="none"){values[index]="none";dataPriv.set(elem,"display",display);}}} 277for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index];}} 278return elements;} 279jQuery.fn.extend({show:function(){return showHide(this,true);},hide:function(){return showHide(this);},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide();} 280return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show();}else{jQuery(this).hide();}});}});var rcheckableType=(/^(?:checkbox|radio)$/i);var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]+)/i);var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);var wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else{ret=[];} 281if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);} 282return ret;} 283function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"));}} 284var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(toType(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem);}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild;} 285jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent="";}}} 286fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem);} 287continue;} 288contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp);} 289if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}} 290return fragment;} 291(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;})();var documentElement=document.documentElement;var 292rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;} 293function returnFalse(){return false;} 294function safeActiveElement(){try{return document.activeElement;}catch(err){}} 295function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;} 296for(type in types){on(elem,type,selector,data,types[type],one);} 297return elem;} 298if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}} 299if(fn===false){fn=returnFalse;}else if(!fn){return elem;} 300if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);} 301return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});} 302jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return;} 303if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;} 304if(selector){jQuery.find.matchesSelector(documentElement,selector);} 305if(!handler.guid){handler.guid=jQuery.guid++;} 306if(!(events=elemData.events)){events=elemData.events={};} 307if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};} 308types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue;} 309special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}} 310if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}} 311if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);} 312jQuery.event.global[type]=true;}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;} 313types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);} 314continue;} 315special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;} 316if(special.remove){special.remove.call(elem,handleObj);}}} 317if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);} 318delete events[type];}} 319if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i];} 320event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;} 321handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}} 322if(special.postDispatch){special.postDispatch.call(this,event);} 323return event.result;},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;} 324if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}} 325if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}} 326cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});} 327return handlerQueue;},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent);}}:function(){if(this.originalEvent){return this.originalEvent[name];}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value});}});},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent);},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false;}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false;}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&nodeName(this,"input")){this.click();return false;}},_default:function(event){return nodeName(event.target,"a");}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result;}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle);}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);} 328if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=(src.target&&src.target.nodeType===3)?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget;}else{this.type=src;} 329if(props){jQuery.extend(this,props);} 330this.timeStamp=src&&src.timeStamp||Date.now();this[jQuery.expando]=true;};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault();}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation();}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation();} 331this.stopPropagation();}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function(event){var button=event.button;if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode;} 332if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1;} 333if(button&2){return 3;} 334if(button&4){return 2;} 335return 0;} 336return event.which;}},jQuery.event.addProp);jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||(related!==target&&!jQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;} 337return ret;}};});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn);},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1);},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;} 338if(typeof types==="object"){for(type in types){this.off(type,selector,types[type]);} 339return this;} 340if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;} 341if(fn===false){fn=returnFalse;} 342return this.each(function(){jQuery.event.remove(this,types,fn,selector);});}});var 343rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem;} 344return elem;} 345function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;} 346function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5);}else{elem.removeAttribute("type");} 347return elem;} 348function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return;} 349if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}} 350if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur);}} 351function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}} 352function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);if(valueIsFunction||(l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html());} 353domManip(self,args,callback,ignored);});} 354if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;} 355if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"));}} 356callback.call(collection[i],node,i);} 357if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{DOMEval(node.textContent.replace(rcleanScript,""),doc,node);}}}}}} 358return collection;} 359function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));} 360if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"));} 361node.parentNode.removeChild(node);}} 362return elem;} 363jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,"<$1></$2>");},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}} 364if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else{cloneCopyEvent(elem,clone);}} 365destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));} 366return clone;},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}} 367elem[dataPriv.expando]=undefined;} 368if(elem[dataUser.expando]){elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true);},remove:function(selector){return remove(this,selector);},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent="";}} 369return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;} 370if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}} 371elem=0;}catch(e){}} 372if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this);}}},ignored);}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get());} 373return this.pushStack(ret);};});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window;} 374return view.getComputedStyle(elem);};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){function computeStyleTests(){if(!div){return;} 375container.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;div.style.position="absolute";scrollboxSizeVal=div.offsetWidth===36||"absolute";documentElement.removeChild(container);div=null;} 376function roundPixelMeasures(measure){return Math.round(parseFloat(measure));} 377var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return;} 378div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery.extend(support,{boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal;},pixelBoxStyles:function(){computeStyleTests();return pixelBoxStylesVal;},pixelPosition:function(){computeStyleTests();return pixelPositionVal;},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal;},scrollboxSize:function(){computeStyleTests();return scrollboxSizeVal;}});})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name);} 379if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}} 380return ret!==undefined?ret+"":ret;} 381function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return;} 382return(this.get=hookFn).apply(this,arguments);}};} 383var 384rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style;function vendorPropName(name){if(name in emptyStyle){return name;} 385var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}} 386function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;} 387return ret;} 388function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value;} 389function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i=dimension==="width"?1:0,extra=0,delta=0;if(box===(isBorderBox?"border":"content")){return 0;} 390for(;i<4;i+=2){if(box==="margin"){delta+=jQuery.css(elem,box+cssExpand[i],true,styles);} 391if(!isBorderBox){delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(box!=="padding"){delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}else{extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}else{if(box==="content"){delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);} 392if(box!=="margin"){delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}} 393if(!isBorderBox&&computedVal>=0){delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- 394computedVal- 395delta- 396extra- 3970.5));} 398return delta;} 399function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),val=curCSS(elem,dimension,styles),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox;if(rnumnonpx.test(val)){if(!extra){return val;} 400val="auto";} 401valueIsBorderBox=valueIsBorderBox&&(support.boxSizingReliable()||val===elem.style[dimension]);if(val==="auto"||!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline"){val=elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)];valueIsBorderBox=true;} 402val=parseFloat(val)||0;return(val+ 403boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val))+"px";} 404jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},cssNumber:{"animationIterationCount":true,"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;} 405var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName);} 406hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number";} 407if(value==null||value!==value){return;} 408if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");} 409if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";} 410if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else{style[name]=value;}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;} 411return style[name];}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName);} 412hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);} 413if(val===undefined){val=curCSS(elem,name,styles);} 414if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];} 415if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;} 416return val;}});jQuery.each(["height","width"],function(i,dimension){jQuery.cssHooks[dimension]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra);}):getWidthOrHeight(elem,dimension,extra);}},set:function(elem,value,extra){var matches,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra&&boxModelAdjustment(elem,dimension,extra,isBorderBox,styles);if(isBorderBox&&support.scrollboxSize()===styles.position){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- 417parseFloat(styles[dimension])- 418boxModelAdjustment(elem,dimension,"border",false,styles)- 4190.5);} 420if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension);} 421return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left- 422swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];} 423return expanded;}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);} 424return map;} 425return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);} 426jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;} 427this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);} 428if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);} 429return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];} 430result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result;},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function(p){return p;},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var 431fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else{window.setTimeout(schedule,jQuery.fx.interval);} 432jQuery.fx.tick();}} 433function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return(fxNow=Date.now());} 434function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;} 435if(includeWidth){attrs.opacity=attrs.width=type;} 436return attrs;} 437function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween;}}} 438function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};} 439hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});} 440for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}} 441orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}} 442propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;} 443if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");} 444display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}} 445if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}} 446style.display="inline-block";}}} 447if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});} 448propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});} 449if(toggle){dataShow.hidden=!hidden;} 450if(hidden){showHide([elem],true);} 451anim.done(function(){if(!hidden){showHide([elem]);} 452dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});} 453propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}} 454function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=camelCase(index);
vendor: 4,645 bytes, lines 454-472
454easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];} 455if(index!==name){props[name]=value;delete props[index];} 456hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}} 457function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem;}),tick=function(){if(stopped){return false;} 458var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);} 459deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining;} 460if(!length){deferred.notifyWith(elem,[animation,1,0]);} 461deferred.resolveWith(elem,[animation]);return false;},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this;} 462stopped=true;for(;index<length;index++){animation.tweens[index].run(1);} 463if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd]);}else{deferred.rejectWith(elem,[animation,gotoEnd]);} 464return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result);} 465return result;}} 466jQuery.map(props,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);} 467animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation;} 468jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween;}]},tweener:function(props,callback){if(isFunction(props)){callback=props;props=["*"];}else{props=props.match(rnothtmlwhite);} 469var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback);}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback);}else{Animation.prefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0;}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration];}else{opt.duration=jQuery.fx.speeds._default;}}} 470if(opt.queue==null||opt.queue===true){opt.queue="fx";} 471opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this);} 472if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;
vendor: 16,081 bytes, lines 472-553
472type=undefined;} 473if(clearQueue&&type!==false){this.queue(type||"fx",[]);} 474return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}} 475for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}} 476if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function(type){if(type!==false){type=type||"fx";} 477return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);} 478for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}} 479for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}} 480delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=Date.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}} 481if(!timers.length){jQuery.fx.stop();} 482fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start();};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return;} 483inProgress=true;schedule();};jQuery.fx.stop=function(){inProgress=null;};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout);};});};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t";})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;} 484if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);} 485if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);} 486if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;} 487if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;} 488elem.setAttribute(name,value+"");return value;} 489if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;} 490ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret;},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;} 491return value;}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){elem.removeAttribute(name);}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name);}else{elem.setAttribute(name,name);} 492return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;} 493return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;} 494if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];} 495if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;} 496return(elem[name]=value);} 497if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;} 498return elem[name];},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);} 499if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;} 500return-1;}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;} 501return null;},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};} 502jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");} 503function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";} 504function classesToArray(value){if(Array.isArray(value)){return value;} 505if(typeof value==="string"){return value.match(rnothtmlwhite)||[];} 506return[];} 507jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});} 508classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}} 509finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}} 510return this;},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});} 511if(!arguments.length){return this.attr("class","");} 512classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}} 513finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}} 514return this;},toggleClass:function(value,stateVal){var type=typeof value,isValidValue=type==="string"||Array.isArray(value);if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value);} 515if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});} 516return this.each(function(){var className,i,self,classNames;if(isValidValue){i=0;self=jQuery(this);classNames=classesToArray(value);while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className);} 517if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while((elem=this[i++])){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}} 518return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;} 519ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"");} 520return ret==null?"":ret;} 521return;} 522valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;} 523if(valueIsFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;} 524if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});} 525hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:stripAndCollapse(jQuery.text(elem));}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else{i=one?index:0;} 526for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value;} 527values.push(value);}} 528return values;},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true;}} 529if(!optionSet){elem.selectedIndex=-1;} 530return values;}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation();};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return;} 531if(rfocusMorph.test(type+jQuery.event.triggered)){return;} 532if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();} 533ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem;} 534data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;} 535if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;} 536for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;} 537if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}} 538i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);} 539handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}} 540event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&isFunction(elem[type])&&!isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null;} 541jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback);} 542elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback);} 543jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}} 544return event.result;},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event));};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);} 545dataPriv.access(doc,fix,(attaches||0)+1);},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix);}else{dataPriv.access(doc,fix,attaches);}}};});} 546var location=window.location;var nonce=Date.now();var rquery=(/\?/);jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null;} 547try{xml=(new window.DOMParser()).parseFromString(data,"text/xml");}catch(e){xml=undefined;} 548if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);} 549return xml;};var 550rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&toType(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}} 551jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+ 552encodeURIComponent(value==null?"":value);};if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}} 553return s.join("&");};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}
vendor: 3,195 bytes, lines 553-570
553).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null;} 554if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};});} 555return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var 556r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";} 557var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};} 558function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;} 559return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");} 560function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}} 561if(deep){jQuery.extend(true,target,deep);} 562return target;} 563function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}} 564if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} 565if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;} 566if(!firstDataType){firstDataType=type;}} 567finalDataType=finalDataType||firstDataType;} 568if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);} 569return responses[finalDataType];}} 570function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}
vendor: 15,820 bytes, lines 571-639
571current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} 572if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);} 573prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);} 574break;}}}} 575if(conv!==true){if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}} 576return{state:"success",data:response};} 577jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;} 578options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}} 579match=responseHeaders[key.toLowerCase()];} 580return match==null?null:match;},getAllResponseHeaders:function(){return completed?responseHeadersString:null;},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;} 581return this;},overrideMimeType:function(type){if(completed==null){s.mimeType=type;} 582return this;},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status]);}else{for(code in map){statusCode[code]=[statusCode[code],map[code]];}}} 583return this;},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);} 584done(0,finalText);return this;}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){s.crossDomain=true;}} 585if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);} 586inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR;} 587fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");} 588s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data;} 589if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce++)+uncached;} 590s.url=cacheURL+uncached;}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");} 591if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);} 592if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}} 593if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);} 594jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+ 595(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);} 596if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort();} 597strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);} 598if(completed){return jqXHR;} 599if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);} 600try{completed=false;transport.send(requestHeaders,done);}catch(e){if(completed){throw e;} 601done(-1,e);}} 602function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return;} 603completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer);} 604transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses);} 605response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;} 606modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}} 607if(status===204||s.type==="HEAD"){statusText="nocontent";}else if(status===304){statusText="notmodified";}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}} 608jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);} 609jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);} 610completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}} 611return jqXHR;},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(isFunction(data)){type=type||callback;callback=data;data=undefined;} 612return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:true,async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0]);} 613wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);} 614wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;} 615return elem;}).append(this);} 616return this;},wrapInner:function(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});} 617return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);});},unwrap:function(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}} 618if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);} 619if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";} 620for(i in headers){xhr.setRequestHeader(i,headers[i]);} 621callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback();}});}};} 622callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null);}catch(e){if(callback){throw e;}}},abort:function(){if(callback){callback();}}};}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text;}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;} 623if(s.crossDomain){s.type="GET";}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type);}});document.head.appendChild(script[0]);},abort:function(){if(callback){callback();}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce++));this[callback]=true;return callback;}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;} 624s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");} 625return responseContainer[0];};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName);}else{window[callbackName]=overwritten;} 626if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName);} 627if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0]);} 628responseContainer=overwritten=undefined;});return"script";}});support.createHTMLDocument=(function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2;})();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="string"){return[];} 629if(typeof context==="boolean"){keepScripts=context;context=false;} 630var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base);}else{context=document;}} 631parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])];} 632parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();} 633return jQuery.merge([],parsed.childNodes);};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off);} 634if(isFunction(params)){callback=params;params=undefined;}else if(params&&typeof params==="object"){type="POST";} 635if(self.length>0){jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText);}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);});});} 636return this;};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative";} 637curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;} 638if(isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset));} 639if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
640if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;} 641if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});} 642var rect,win,elem=this[0];if(!elem){return;} 643if(!elem.getClientRects().length){return{top:0,left:0};} 644rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset};},position:function(){if(!this[0]){return;} 645var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect();}else{offset=this.offset();doc=elem.ownerDocument;offsetParent=elem.offsetParent||doc.documentElement;while(offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode;} 646if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){parentOffset=jQuery(offsetParent).offset();parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);}} 647return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent;} 648return offsetParent||documentElement;});}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(isWindow(elem)){win=elem;}else if(elem.nodeType===9){win=elem.defaultView;} 649if(val===undefined){return win?win[prop]:elem[method];} 650if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset);}else{elem[method]=val;}},method,val,arguments.length);};});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(isWindow(elem)){return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name];} 651if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);} 652return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable);};});});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);}});jQuery.proxy=function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;} 653if(!isFunction(fn)){return undefined;} 654args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;};jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++;}else{jQuery.ready(true);}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;jQuery.isFunction=isFunction;jQuery.isWindow=isWindow;jQuery.camelCase=camelCase;jQuery.type=toType;jQuery.now=Date.now;jQuery.isNumeric=function(obj){var type=jQuery.type(obj);return(type==="number"||type==="string")&&!isNaN(obj-parseFloat(obj));};if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery;});} 655var 656_jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;} 657if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;} 658return jQuery;};if(!noGlobal){window.jQuery=window.$=jQuery;} 659return jQuery;}); 660/* End */ 661; 662; /* Start:"a:4:{s:4:"full";s:81:"/local/templates/fondpotanin/build/script/plugins/jquery.cookie.js?16939085023329";s:6:"source";s:66:"/local/templates/fondpotanin/build/script/plugins/jquery.cookie.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 663/*! 664 * jQuery Cookie Plugin v1.4.1 665 * https://github.com/carhartl/jquery-cookie 666 * 667 * Copyright 2013 Klaus Hartl 668 * Released under the MIT license 669 */ 670(function (factory) { 671 if (typeof define === 'function' && define.amd) { 672 // AMD 673 define(['jquery'], factory); 674 } else if (typeof exports === 'object') { 675 // CommonJS 676 factory(require('jquery')); 677 } else { 678 // Browser globals 679 factory(jQuery); 680 } 681})(function ($) { 682 var pluses = /\+/g; 683 684 function encode(s) { 685 return config.raw ? s : encodeURIComponent(s); 686 } 687 688 function decode(s) { 689 return config.raw ? s : decodeURIComponent(s); 690 } 691 692 function stringifyCookieValue(value) { 693 return encode(config.json ? JSON.stringify(value) : String(value)); 694 } 695 696 function parseCookieValue(s) { 697 if (s.indexOf('"') === 0) { 698 // This is a quoted cookie as according to RFC2068, unescape... 699 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 700 } 701 702 try { 703 // Replace server-side written pluses with spaces. 704 // If we can't decode the cookie, ignore it, it's unusable. 705 // If we can't parse the cookie, ignore it, it's unusable. 706 s = decodeURIComponent(s.replace(pluses, ' ')); 707 return config.json ? JSON.parse(s) : s; 708 } catch (e) { } 709 } 710 711 function read(s, converter) { 712 var value = config.raw ? s : parseCookieValue(s); 713 return $.isFunction(converter) ? converter(value) : value; 714 } 715 716 var config = $.cookie = function (key, value, options) { 717 // Write 718 if (value !== undefined && !$.isFunction(value)) { 719 options = $.extend({}, config.defaults, options); 720 721 if (typeof options.expires === 'number') { 722 var days = options.expires, 723 t = options.expires = new Date(); 724 t.setTime(+t + days * 864e+5); 725 } 726 727 return document.cookie = [encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 728 options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join(''); 729 } // Read 730 731 732 var result = key ? undefined : {}; // To prevent the for loop in the first place assign an empty array 733 // in case there are no cookies at all. Also prevents odd result when 734 // calling $.cookie(). 735 736 var cookies = document.cookie ? document.cookie.split('; ') : []; 737 738 for (var i = 0, l = cookies.length; i < l; i++) { 739 var parts = cookies[i].split('='); 740 var name = decode(parts.shift()); 741 var cookie = parts.join('='); 742 743 if (key && key === name) { 744 // If second argument (value) is a function it's a converter... 745 result = read(cookie, value); 746 break; 747 } // Prevent storing a cookie that we couldn't decode. 748 749 750 if (!key && (cookie = read(cookie)) !== undefined) { 751 result[name] = cookie; 752 } 753 } 754 755 return result; 756 }; 757 758 config.defaults = {}; 759 760 $.removeCookie = function (key, options) { 761 if ($.cookie(key) === undefined) { 762 return false;
763 } // Must not alter options, thus extending a fresh object... 764 765 766 $.cookie(key, '', $.extend({}, options, { 767 expires: -1 768 })); 769 return !$.cookie(key); 770 }; 771}); 772//# sourceMappingURL=../sourcemaps/plugins/jquery.cookie.js.map 773 774/* End */ 775; 776; /* Start:"a:4:{s:4:"full";s:88:"/local/templates/fondpotanin/build/script/plugins/jquery.fancybox.min.js?169390850280480";s:6:"source";s:72:"/local/templates/fondpotanin/build/script/plugins/jquery.fancybox.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 777 778;(function(window,document,$,undefined){'use strict';if(!$){return;} 779if($.fn.fancybox){if('console'in window){console.log('fancyBox already initialized');} 780return;} 781var defaults={loop:false,margin:[44,0],gutter:50,keyboard:true,arrows:true,infobar:true,toolbar:true,buttons:['slideShow','fullScreen','thumbs','share','close'],idleTime:3,smallBtn:'auto',protect:false,modal:false,image:{preload:"auto"},ajax:{settings:{data:{fancybox:true}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>',preload:true,css:{},attr:{scrolling:'auto'}},defaultType:'image',animationEffect:"zoom",animationDuration:500,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:'',baseClass:'',baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1">'+'<div class="fancybox-bg"></div>'+'<div class="fancybox-inner">'+'<div class="fancybox-infobar">'+'<span data-fancybox-index></span> / <span data-fancybox-count></span>'+'</div>'+'<div class="fancybox-toolbar">{{buttons}}</div>'+'<div class="fancybox-navigation">{{arrows}}</div>'+'<div class="fancybox-stage"></div>'+'<div class="fancybox-caption-wrap"><div class="fancybox-caption"></div></div>'+'</div>'+'</div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}<p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M20,23 L20,8 L20,23 L13,16 L20,23 L27,16 L20,23 M26,28 L13,28 L27,28 L14,28" />'+'</svg>'+'</a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M 18,17 m-8,0 a 8,8 0 1,0 16,0 a 8,8 0 1,0 -16,0 M25,23 L31,29 L25,23" />'+'</svg>'+'</button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M10,10 L30,30 M30,10 L10,30" />'+'</svg>'+'</button>',smallBtn:'<button data-fancybox-close class="fancybox-close-small" title="{{CLOSE}}"></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M10,20 L30,20 L10,20 L18,28 L10,20 L18,12 L10,20"></path>'+'</svg>'+'</button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M30,20 L10,20 L30,20 L22,28 L30,20 L22,12 L30,20"></path>'+'</svg>'+'</button>'},parentEl:'body',autoFocus:false,backFocus:true,trapFocus:true,fullScreen:{autoStart:false,},touch:{vertical:true,momentum:true},hash:null,media:{},slideShow:{autoStart:false,speed:4000},thumbs:{autoStart:false,hideOnClose:true,parentEl:'.fancybox-container',axis:'y'},wheel:'auto',onInit:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop,onActivate:$.noop,onDeactivate:$.noop,clickContent:function(current,event){return current.type==='image'?'zoom':false;},clickSlide:'close',clickOutside:'close',dblclickContent:false,dblclickSlide:false,dblclickOutside:false,mobile:{idleTime:false,margin:0,clickContent:function(current,event){return current.type==='image'?'toggleControls':false;},clickSlide:function(current,event){return current.type==='image'?'toggleControls':'close';},dblclickContent:function(current,event){return current.type==='image'?'zoom':false;},dblclickSlide:function(current,event){return current.type==='image'?'zoom':false;}},lang:'en',i18n:{'en':{CLOSE:'Close',NEXT:'Next',PREV:'Previous',
781ERROR:'The requested content cannot be loaded. <br/> Please try again later.',PLAY_START:'Start slideshow',PLAY_STOP:'Pause slideshow',FULL_SCREEN:'Full screen',THUMBS:'Thumbnails',DOWNLOAD:'Download',SHARE:'Share',ZOOM:'Zoom'},'de':{CLOSE:'Schliessen',NEXT:'Weiter',PREV:'Zurück',ERROR:'Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.',PLAY_START:'Diaschau starten',PLAY_STOP:'Diaschau beenden',FULL_SCREEN:'Vollbild',THUMBS:'Vorschaubilder',DOWNLOAD:'Herunterladen',SHARE:'Teilen',ZOOM:'MaÃstab'}}};var $W=$(window);var $D=$(document);var called=0;var isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $;};var requestAFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return window.setTimeout(callback,1000/60);};})();var transitionEnd=(function(){var t,el=document.createElement("fakeelement");var transitions={"transition":"transitionend","OTransition":"oTransitionEnd","MozTransition":"transitionend","WebkitTransition":"webkitTransitionEnd"};for(t in transitions){if(el.style[t]!==undefined){return transitions[t];}} 782return'transitionend';})();var forceRedraw=function($el){return($el&&$el.length&&$el[0].offsetHeight);};var FancyBox=function(content,opts,index){var self=this;self.opts=$.extend(true,{index:index},$.fancybox.defaults,opts||{});if($.fancybox.isMobile){self.opts=$.extend(true,{},self.opts,self.opts.mobile);} 783if(opts&&$.isArray(opts.buttons)){self.opts.buttons=opts.buttons;} 784self.id=self.opts.id||++called;self.group=[];self.currIndex=parseInt(self.opts.index,10)||0;self.prevIndex=null;self.prevPos=null;self.currPos=0;self.firstRun=null;self.createGroup(content);if(!self.group.length){return;} 785self.$lastFocus=$(document.activeElement).blur();self.slides={};self.init();};$.extend(FancyBox.prototype,{init:function(){var self=this,firstItem=self.group[self.currIndex],firstItemOpts=firstItem.opts,scrollbarWidth=$.fancybox.scrollbarWidth,$scrollDiv,$container,buttonStr;self.scrollTop=$D.scrollTop();self.scrollLeft=$D.scrollLeft();if(!$.fancybox.getInstance()){$('body').addClass('fancybox-active');if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){if(firstItem.type!=='image'){$('body').css('top',$('body').scrollTop()*-1).addClass('fancybox-iosfix');}}else if(!$.fancybox.isMobile&&document.body.scrollHeight>window.innerHeight){if(scrollbarWidth===undefined){$scrollDiv=$('<div style="width:50px;height:50px;overflow:scroll;" />').appendTo('body');scrollbarWidth=$.fancybox.scrollbarWidth=$scrollDiv[0].offsetWidth-$scrollDiv[0].clientWidth;$scrollDiv.remove();} 786$('head').append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar { margin-right: '+scrollbarWidth+'px; }</style>');$('body').addClass('compensate-for-scrollbar');}} 787buttonStr='';$.each(firstItemOpts.buttons,function(index,value){buttonStr+=(firstItemOpts.btnTpl[value]||'');});$container=$(self.translate(self,firstItemOpts.baseTpl.replace('\{\{buttons\}\}',buttonStr).replace('\{\{arrows\}\}',firstItemOpts.btnTpl.arrowLeft+firstItemOpts.btnTpl.arrowRight))).attr('id','fancybox-container-'+self.id).addClass('fancybox-is-hidden').addClass(firstItemOpts.baseClass).data('FancyBox',self).appendTo(firstItemOpts.parentEl);self.$refs={container:$container};['bg','inner','infobar','toolbar','stage','caption','navigation'].forEach(function(item){self.$refs[item]=$container.find('.fancybox-'+item);});self.trigger('onInit');self.activate();self.jumpTo(self.currIndex);},translate:function(obj,str){var arr=obj.opts.i18n[obj.opts.lang];return str.replace(/\{\{(\w+)\}\}/g,function(match,n){var value=arr[n];if(value===undefined){return match;} 788return value;});},createGroup:function(content){var self=this;var items=$.makeArray(content);$.each(items,function(i,item){var obj={},opts={},$item,type,found,src,srcParts;if($.isPlainObject(item)){obj=item;opts=item.opts||item;}else if($.type(item)==='object'&&$(item).length){$item=$(item);opts=$item.data();opts=$.extend({},opts,opts.options||{});opts.$orig=$item;obj.src=opts.src||$item.attr('href');if(!obj.type&&!obj.src){obj.type='inline';obj.src=item;}}else{obj={type:'html',src:item+''};} 789obj.opts=$.extend(true,{},self.opts,opts);if($.isArray(opts.buttons)){obj.opts.buttons=opts.buttons;}
790type=obj.type||obj.opts.type;src=obj.src||'';if(!type&&src){if(src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)){type='image';}else if(src.match(/\.(pdf)((\?|#).*)?$/i)){type='pdf';}else if(found=src.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i)){type='video';if(!obj.opts.videoFormat){obj.opts.videoFormat='video/'+(found[1]==='ogv'?'ogg':found[1]);}}else if(src.charAt(0)==='#'){type='inline';}} 791if(type){obj.type=type;}else{self.trigger('objectNeedsType',obj);} 792obj.index=self.group.length;if(obj.opts.$orig&&!obj.opts.$orig.length){delete obj.opts.$orig;} 793if(!obj.opts.$thumb&&obj.opts.$orig){obj.opts.$thumb=obj.opts.$orig.find('img:first');} 794if(obj.opts.$thumb&&!obj.opts.$thumb.length){delete obj.opts.$thumb;} 795if($.type(obj.opts.caption)==='function'){obj.opts.caption=obj.opts.caption.apply(item,[self,obj]);} 796if($.type(self.opts.caption)==='function'){obj.opts.caption=self.opts.caption.apply(item,[self,obj]);} 797if(!(obj.opts.caption instanceof $)){obj.opts.caption=obj.opts.caption===undefined?'':obj.opts.caption+'';} 798if(type==='ajax'){srcParts=src.split(/\s+/,2);if(srcParts.length>1){obj.src=srcParts.shift();obj.opts.filter=srcParts.shift();}} 799if(obj.opts.smallBtn=='auto'){if($.inArray(type,['html','inline','ajax'])>-1){obj.opts.toolbar=false;obj.opts.smallBtn=true;}else{obj.opts.smallBtn=false;}} 800if(type==='pdf'){obj.type='iframe';obj.opts.iframe.preload=false;} 801if(obj.opts.modal){obj.opts=$.extend(true,obj.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:false,clickSlide:false,clickOutside:false,dblclickContent:false,dblclickSlide:false,dblclickOutside:false});} 802self.group.push(obj);});},addEvents:function(){var self=this;self.removeEvents();self.$refs.container.on('click.fb-close','[data-fancybox-close]',function(e){e.stopPropagation();e.preventDefault();self.close(e);}).on('click.fb-prev touchend.fb-prev','[data-fancybox-prev]',function(e){e.stopPropagation();e.preventDefault();self.previous();}).on('click.fb-next touchend.fb-next','[data-fancybox-next]',function(e){e.stopPropagation();e.preventDefault();self.next();}).on('click.fb','[data-fancybox-zoom]',function(e){self[self.isScaledDown()?'scaleToActual':'scaleToFit']();});$W.on('orientationchange.fb resize.fb',function(e){if(e&&e.originalEvent&&e.originalEvent.type==="resize"){requestAFrame(function(){self.update();});}else{self.$refs.stage.hide();setTimeout(function(){self.$refs.stage.show();self.update();},600);}});$D.on('focusin.fb',function(e){var instance=$.fancybox?$.fancybox.getInstance():null;if(instance.isClosing||!instance.current||!instance.current.opts.trapFocus||$(e.target).hasClass('fancybox-container')||$(e.target).is(document)){return;} 803if(instance&&$(e.target).css('position')!=='fixed'&&!instance.$refs.container.has(e.target).length){e.stopPropagation();instance.focus();$W.scrollTop(self.scrollTop).scrollLeft(self.scrollLeft);}});$D.on('keydown.fb',function(e){var current=self.current,keycode=e.keyCode||e.which;if(!current||!current.opts.keyboard){return;} 804if($(e.target).is('input')||$(e.target).is('textarea')){return;} 805if(keycode===8||keycode===27){e.preventDefault();self.close(e);return;} 806if(keycode===37||keycode===38){e.preventDefault();self.previous();return;} 807if(keycode===39||keycode===40){e.preventDefault();self.next();return;} 808self.trigger('afterKeydown',e,keycode);});if(self.group[self.currIndex].opts.idleTime){self.idleSecondsCounter=0;$D.on('mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle',function(e){self.idleSecondsCounter=0;if(self.isIdle){self.showControls();} 809self.isIdle=false;});self.idleInterval=window.setInterval(function(){self.idleSecondsCounter++;if(self.idleSecondsCounter>=self.group[self.currIndex].opts.idleTime&&!self.isDragging){self.isIdle=true;self.idleSecondsCounter=0;self.hideControls();}},1000);}},removeEvents:function(){var self=this;$W.off('orientationchange.fb resize.fb');$D.off('focusin.fb keydown.fb .fb-idle');this.$refs.container.off('.fb-close .fb-prev .fb-next');
809if(self.idleInterval){window.clearInterval(self.idleInterval);self.idleInterval=null;}},previous:function(duration){return this.jumpTo(this.currPos-1,duration);},next:function(duration){return this.jumpTo(this.currPos+1,duration);},jumpTo:function(pos,duration,slide){var self=this,firstRun,loop,current,previous,canvasWidth,currentPos,transitionProps;var groupLen=self.group.length;if(self.isDragging||self.isClosing||(self.isAnimating&&self.firstRun)){return;} 810pos=parseInt(pos,10);loop=self.current?self.current.opts.loop:self.opts.loop;if(!loop&&(pos<0||pos>=groupLen)){return false;} 811firstRun=self.firstRun=(self.firstRun===null);if(groupLen<2&&!firstRun&&!!self.isDragging){return;} 812previous=self.current;self.prevIndex=self.currIndex;self.prevPos=self.currPos;current=self.createSlide(pos);if(groupLen>1){if(loop||current.index>0){self.createSlide(pos-1);} 813if(loop||current.index<groupLen-1){self.createSlide(pos+1);}} 814self.current=current;self.currIndex=current.index;self.currPos=current.pos;self.trigger('beforeShow',firstRun);self.updateControls();currentPos=$.fancybox.getTranslate(current.$slide);current.isMoved=(currentPos.left!==0||currentPos.top!==0)&&!current.$slide.hasClass('fancybox-animated');current.forcedDuration=undefined;if($.isNumeric(duration)){current.forcedDuration=duration;}else{duration=current.opts[firstRun?'animationDuration':'transitionDuration'];} 815duration=parseInt(duration,10);if(firstRun){if(current.opts.animationEffect&&duration){self.$refs.container.css('transition-duration',duration+'ms');} 816self.$refs.container.removeClass('fancybox-is-hidden');forceRedraw(self.$refs.container);self.$refs.container.addClass('fancybox-is-open');current.$slide.addClass('fancybox-slide--current');self.loadSlide(current);self.preload('image');return;} 817$.each(self.slides,function(index,slide){$.fancybox.stop(slide.$slide);});current.$slide.removeClass('fancybox-slide--next fancybox-slide--previous').addClass('fancybox-slide--current');if(current.isMoved){canvasWidth=Math.round(current.$slide.width());$.each(self.slides,function(index,slide){var pos=slide.pos-current.pos;$.fancybox.animate(slide.$slide,{top:0,left:(pos*canvasWidth)+(pos*slide.opts.gutter)},duration,function(){slide.$slide.removeAttr('style').removeClass('fancybox-slide--next fancybox-slide--previous');if(slide.pos===self.currPos){current.isMoved=false;self.complete();}});});}else{self.$refs.stage.children().removeAttr('style');} 818if(current.isLoaded){self.revealContent(current);}else{self.loadSlide(current);} 819self.preload('image');if(previous.pos===current.pos){return;} 820transitionProps='fancybox-slide--'+(previous.pos>current.pos?'next':'previous');previous.$slide.removeClass('fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous');previous.isComplete=false;if(!duration||(!current.isMoved&&!current.opts.transitionEffect)){return;} 821if(current.isMoved){previous.$slide.addClass(transitionProps);}else{transitionProps='fancybox-animated '+transitionProps+' fancybox-fx-'+current.opts.transitionEffect;$.fancybox.animate(previous.$slide,transitionProps,duration,function(){previous.$slide.removeClass(transitionProps).removeAttr('style');});}},createSlide:function(pos){var self=this;var $slide;var index;index=pos%self.group.length;index=index<0?self.group.length+index:index;if(!self.slides[pos]&&self.group[index]){$slide=$('<div class="fancybox-slide"></div>').appendTo(self.$refs.stage);self.slides[pos]=$.extend(true,{},self.group[index],{pos:pos,$slide:$slide,isLoaded:false,});self.updateSlide(self.slides[pos]);} 822return self.slides[pos];},scaleToActual:function(x,y,duration){var self=this;var current=self.current;var $what=current.$content;var imgPos,posX,posY,scaleX,scaleY;var canvasWidth=parseInt(current.$slide.width(),10);var canvasHeight=parseInt(current.$slide.height(),10);var newImgWidth=current.width;var newImgHeight=current.height;if(!(current.type=='image'&&!current.hasError)||!$what||self.isAnimating){return;} 823$.fancybox.stop($what);self.isAnimating=true;x=x===undefined?canvasWidth*0.5:x;y=y===undefined?canvasHeight*0.5:y;imgPos=$.fancybox.getTranslate($what);scaleX=newImgWidth/imgPos.width;scaleY=newImgHeight/imgPos.height;posX=(canvasWidth*0.5-newImgWidth*0.5);posY=(canvasHeight*0.5-newImgHeight*0.5);if(newImgWidth>canvasWidth){posX=imgPos.left*scaleX-((x*scaleX)-x);if(posX>0){posX=0;} 824if(posX<canvasWidth-newImgWidth){posX=canvasWidth-newImgWidth;}} 825if(newImgHeight>canvasHeight){posY=imgPos.top*scaleY-((y*scaleY)-y);if(posY>0){posY=0;} 826if(posY<canvasHeight-newImgHeight){posY=canvasHeight-newImgHeight;}} 827self.updateCursor(newImgWidth,newImgHeight);$.fancybox.animate($what,{top:posY,left:posX,scaleX:scaleX,scaleY:scaleY},duration||330,function(){self.isAnimating=false;});if(self.SlideShow&&self.SlideShow.isActive){self.SlideShow.stop();}},scaleToFit:function(duration){var self=this;var current=self.current;var $what=current.$content;var end;if(!(current.type=='image'&&!current.hasError)||!$what||self.isAnimating){return;} 828$.fancybox.stop($what);self.isAnimating=true;end=self.getFitPos(current);self.updateCursor(end.width,end.height);
828$.fancybox.animate($what,{top:end.top,left:end.left,scaleX:end.width/$what.width(),scaleY:end.height/$what.height()},duration||330,function(){self.isAnimating=false;});},getFitPos:function(slide){var self=this;var $what=slide.$content;var imgWidth=slide.width;var imgHeight=slide.height;var margin=slide.opts.margin;var canvasWidth,canvasHeight,minRatio,width,height;if(!$what||!$what.length||(!imgWidth&&!imgHeight)){return false;} 829if($.type(margin)==="number"){margin=[margin,margin];} 830if(margin.length==2){margin=[margin[0],margin[1],margin[0],margin[1]];} 831canvasWidth=parseInt(self.$refs.stage.width(),10)-(margin[1]+margin[3]);canvasHeight=parseInt(self.$refs.stage.height(),10)-(margin[0]+margin[2]);minRatio=Math.min(1,canvasWidth/imgWidth,canvasHeight/imgHeight);width=Math.floor(minRatio*imgWidth);height=Math.floor(minRatio*imgHeight);return{top:Math.floor((canvasHeight-height)*0.5)+margin[0],left:Math.floor((canvasWidth-width)*0.5)+margin[3],width:width,height:height};},update:function(){var self=this;$.each(self.slides,function(key,slide){self.updateSlide(slide);});},updateSlide:function(slide,duration){var self=this,$what=slide&&slide.$content;if($what&&(slide.width||slide.height)){self.isAnimating=false;$.fancybox.stop($what);$.fancybox.setTranslate($what,self.getFitPos(slide));if(slide.pos===self.currPos){self.updateCursor();}} 832slide.$slide.trigger('refresh');self.trigger('onUpdate',slide);},centerSlide:function(slide,duration){var self=this,canvasWidth,pos;if(self.current){canvasWidth=Math.round(slide.$slide.width());pos=slide.pos-self.current.pos;$.fancybox.animate(slide.$slide,{top:0,left:(pos*canvasWidth)+(pos*slide.opts.gutter),opacity:1},duration===undefined?0:duration,null,false);}},updateCursor:function(nextWidth,nextHeight){var self=this;var isScaledDown;var $container=self.$refs.container.removeClass('fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-drag fancybox-can-zoomOut');if(!self.current||self.isClosing){return;} 833if(self.isZoomable()){$container.addClass('fancybox-is-zoomable');if(nextWidth!==undefined&&nextHeight!==undefined){isScaledDown=nextWidth<self.current.width&&nextHeight<self.current.height;}else{isScaledDown=self.isScaledDown();} 834if(isScaledDown){$container.addClass('fancybox-can-zoomIn');}else{if(self.current.opts.touch){$container.addClass('fancybox-can-drag');}else{$container.addClass('fancybox-can-zoomOut');}}}else if(self.current.opts.touch){$container.addClass('fancybox-can-drag');}},isZoomable:function(){var self=this;var current=self.current;var fitPos;if(!current||self.isClosing){return;} 835if(current.type==='image'&¤t.isLoaded&&!current.hasError&&(current.opts.clickContent==='zoom'||($.isFunction(current.opts.clickContent)&¤t.opts.clickContent(current)==="zoom"))){fitPos=self.getFitPos(current);if(current.width>fitPos.width||current.height>fitPos.height){return true;}} 836return false;},isScaledDown:function(){var self=this;var current=self.current;var $what=current.$content;var rez=false;if($what){rez=$.fancybox.getTranslate($what);rez=rez.width<current.width||rez.height<current.height;} 837return rez;},canPan:function(){var self=this;var current=self.current;var $what=current.$content;var rez=false;if($what){rez=self.getFitPos(current);rez=Math.abs($what.width()-rez.width)>1||Math.abs($what.height()-rez.height)>1;} 838return rez;},loadSlide:function(slide){var self=this,type,$slide;var ajaxLoad;if(slide.isLoading){return;} 839if(slide.isLoaded){return;} 840slide.isLoading=true;self.trigger('beforeLoad',slide);type=slide.type;$slide=slide.$slide;$slide.off('refresh').trigger('onReset').addClass('fancybox-slide--'+(type||'unknown')).addClass(slide.opts.slideClass);switch(type){case'image':self.setImage(slide);break;case'iframe':self.setIframe(slide);break;case'html':self.setContent(slide,slide.src||slide.content);break;case'inline':if($(slide.src).length){self.setContent(slide,$(slide.src));}else{self.setError(slide);} 841break;case'ajax':self.showLoading(slide);ajaxLoad=$.ajax($.extend({},slide.opts.ajax.settings,{url:slide.src,success:function(data,textStatus){if(textStatus==='success'){self.setContent(slide,data);}},error:function(jqXHR,textStatus){if(jqXHR&&textStatus!=='abort'){self.setError(slide);}}}));$slide.one('onReset',function(){ajaxLoad.abort();});break;case'video':self.setContent(slide,'<video controls>'+'<source src="'+slide.src+'" type="'+slide.opts.videoFormat+'">'+'Your browser doesn\'t support HTML5 video'+'</video>');break;default:self.setError(slide);break;} 842return true;},setImage:function(slide){var self=this;var srcset=slide.opts.srcset||slide.opts.image.srcset;var found,temp,pxRatio,windowWidth;
842if(srcset){pxRatio=window.devicePixelRatio||1;windowWidth=window.innerWidth*pxRatio;temp=srcset.split(',').map(function(el){var ret={};el.trim().split(/\s+/).forEach(function(el,i){var value=parseInt(el.substring(0,el.length-1),10);if(i===0){return(ret.url=el);} 843if(value){ret.value=value;ret.postfix=el[el.length-1];}});return ret;});temp.sort(function(a,b){return a.value-b.value;});for(var j=0;j<temp.length;j++){var el=temp[j];if((el.postfix==='w'&&el.value>=windowWidth)||(el.postfix==='x'&&el.value>=pxRatio)){found=el;break;}} 844if(!found&&temp.length){found=temp[temp.length-1];} 845if(found){slide.src=found.url;if(slide.width&&slide.height&&found.postfix=='w'){slide.height=(slide.width/slide.height)*found.value;slide.width=found.value;}}} 846slide.$content=$('<div class="fancybox-image-wrap"></div>').addClass('fancybox-is-hidden').appendTo(slide.$slide);if(slide.opts.preload!==false&&slide.opts.width&&slide.opts.height&&(slide.opts.thumb||slide.opts.$thumb)){slide.width=slide.opts.width;slide.height=slide.opts.height;slide.$ghost=$('<img />').one('error',function(){$(this).remove();slide.$ghost=null;self.setBigImage(slide);}).one('load',function(){self.afterLoad(slide);self.setBigImage(slide);}).addClass('fancybox-image').appendTo(slide.$content).attr('src',slide.opts.thumb||slide.opts.$thumb.attr('src'));}else{self.setBigImage(slide);}},setBigImage:function(slide){var self=this;var $img=$('<img />');slide.$image=$img.one('error',function(){self.setError(slide);}).one('load',function(){clearTimeout(slide.timouts);slide.timouts=null;if(self.isClosing){return;} 847slide.width=slide.opts.width||this.naturalWidth;slide.height=slide.opts.height||this.naturalHeight;if(slide.opts.image.srcset){$img.attr('sizes','100vw').attr('srcset',slide.opts.image.srcset);} 848self.hideLoading(slide);if(slide.$ghost){slide.timouts=setTimeout(function(){slide.timouts=null;slide.$ghost.hide();},Math.min(300,Math.max(1000,slide.height/1600)));}else{self.afterLoad(slide);}}).addClass('fancybox-image').attr('src',slide.src).appendTo(slide.$content);if(($img[0].complete||$img[0].readyState=="complete")&&$img[0].naturalWidth&&$img[0].naturalHeight){$img.trigger('load');}else if($img[0].error){$img.trigger('error');}else{slide.timouts=setTimeout(function(){if(!$img[0].complete&&!slide.hasError){self.showLoading(slide);}},100);}},setIframe:function(slide){var self=this,opts=slide.opts.iframe,$slide=slide.$slide,$iframe;slide.$content=$('<div class="fancybox-content'+(opts.preload?' fancybox-is-hidden':'')+'"></div>').css(opts.css).appendTo($slide);$iframe=$(opts.tpl.replace(/\{rnd\}/g,new Date().getTime())).attr(opts.attr).appendTo(slide.$content);if(opts.preload){self.showLoading(slide);$iframe.on('load.fb error.fb',function(e){this.isReady=1;slide.$slide.trigger('refresh');self.afterLoad(slide);});$slide.on('refresh.fb',function(){var $wrap=slide.$content,frameWidth=opts.css.width,frameHeight=opts.css.height,scrollWidth,$contents,$body;if($iframe[0].isReady!==1){return;} 849try{$contents=$iframe.contents();$body=$contents.find('body');}catch(ignore){} 850if($body&&$body.length){if(frameWidth===undefined){scrollWidth=$iframe[0].contentWindow.document.documentElement.scrollWidth;frameWidth=Math.ceil($body.outerWidth(true)+($wrap.width()-scrollWidth));frameWidth+=$wrap.outerWidth()-$wrap.innerWidth();} 851if(frameHeight===undefined){frameHeight=Math.ceil($body.outerHeight(true));frameHeight+=$wrap.outerHeight()-$wrap.innerHeight();} 852if(frameWidth){$wrap.width(frameWidth);} 853if(frameHeight){$wrap.height(frameHeight);}} 854$wrap.removeClass('fancybox-is-hidden');});}else{this.afterLoad(slide);} 855$iframe.attr('src',slide.src);if(slide.opts.smallBtn===true){slide.$content.prepend(self.translate(slide,slide.opts.btnTpl.smallBtn));} 856$slide.one('onReset',function(){try{$(this).find('iframe').hide().attr('src','//about:blank');}catch(ignore){} 857$(this).empty();slide.isLoaded=false;});},setContent:function(slide,content){var self=this;if(self.isClosing){return;} 858self.hideLoading(slide);slide.$slide.empty();if(isQuery(content)&&content.parent().length){content.parent('.fancybox-slide--inline').trigger('onReset');slide.$placeholder=$('<div></div>').hide().insertAfter(content);content.css('display','inline-block');}
858else if(!slide.hasError){if($.type(content)==='string'){content=$('<div>').append($.trim(content)).contents();if(content[0].nodeType===3){content=$('<div>').html(content);}} 859if(slide.opts.filter){content=$('<div>').html(content).find(slide.opts.filter);}} 860slide.$slide.one('onReset',function(){$(this).find('video,audio').trigger('pause');if(slide.$placeholder){slide.$placeholder.after(content.hide()).remove();slide.$placeholder=null;} 861if(slide.$smallBtn){slide.$smallBtn.remove();slide.$smallBtn=null;} 862if(!slide.hasError){$(this).empty();slide.isLoaded=false;}});slide.$content=$(content).appendTo(slide.$slide);this.afterLoad(slide);},setError:function(slide){slide.hasError=true;slide.$slide.removeClass('fancybox-slide--'+slide.type);this.setContent(slide,this.translate(slide,slide.opts.errorTpl));},showLoading:function(slide){var self=this;slide=slide||self.current;if(slide&&!slide.$spinner){slide.$spinner=$(self.opts.spinnerTpl).appendTo(slide.$slide);}},hideLoading:function(slide){var self=this;slide=slide||self.current;if(slide&&slide.$spinner){slide.$spinner.remove();delete slide.$spinner;}},afterLoad:function(slide){var self=this;if(self.isClosing){return;} 863slide.isLoading=false;slide.isLoaded=true;self.trigger('afterLoad',slide);self.hideLoading(slide);if(slide.opts.smallBtn&&!slide.$smallBtn){slide.$smallBtn=$(self.translate(slide,slide.opts.btnTpl.smallBtn)).appendTo(slide.$content.filter('div,form').first());} 864if(slide.opts.protect&&slide.$content&&!slide.hasError){slide.$content.on('contextmenu.fb',function(e){if(e.button==2){e.preventDefault();} 865return true;});if(slide.type==='image'){$('<div class="fancybox-spaceball"></div>').appendTo(slide.$content);}} 866self.revealContent(slide);},revealContent:function(slide){var self=this;var $slide=slide.$slide;var effect,effectClassName,duration,opacity,end,start=false;effect=slide.opts[self.firstRun?'animationEffect':'transitionEffect'];duration=slide.opts[self.firstRun?'animationDuration':'transitionDuration'];duration=parseInt(slide.forcedDuration===undefined?duration:slide.forcedDuration,10);if(slide.isMoved||slide.pos!==self.currPos||!duration){effect=false;} 867if(effect==='zoom'&&!(slide.pos===self.currPos&&duration&&slide.type==='image'&&!slide.hasError&&(start=self.getThumbPos(slide)))){effect='fade';} 868if(effect==='zoom'){end=self.getFitPos(slide);end.scaleX=end.width/start.width;end.scaleY=end.height/start.height;delete end.width;delete end.height;opacity=slide.opts.zoomOpacity;if(opacity=='auto'){opacity=Math.abs(slide.width/slide.height-start.width/start.height)>0.1;} 869if(opacity){start.opacity=0.1;end.opacity=1;} 870$.fancybox.setTranslate(slide.$content.removeClass('fancybox-is-hidden'),start);forceRedraw(slide.$content);$.fancybox.animate(slide.$content,end,duration,function(){self.complete();});return;} 871self.updateSlide(slide);if(!effect){forceRedraw($slide);slide.$content.removeClass('fancybox-is-hidden');if(slide.pos===self.currPos){self.complete();} 872return;} 873$.fancybox.stop($slide);effectClassName='fancybox-animated fancybox-slide--'+(slide.pos>=self.prevPos?'next':'previous')+' fancybox-fx-'+effect;$slide.removeAttr('style').removeClass('fancybox-slide--current fancybox-slide--next fancybox-slide--previous').addClass(effectClassName);slide.$content.removeClass('fancybox-is-hidden');forceRedraw($slide);$.fancybox.animate($slide,'fancybox-slide--current',duration,function(e){$slide.removeClass(effectClassName).removeAttr('style');if(slide.pos===self.currPos){self.complete();}},true);},getThumbPos:function(slide){var self=this;var rez=false;var isElementVisible=function($el){var element=$el[0];var elementRect=element.getBoundingClientRect();var parentRects=[];var visibleInAllParents;while(element.parentElement!==null){if($(element.parentElement).css('overflow')==='hidden'||$(element.parentElement).css('overflow')==='auto'){parentRects.push(element.parentElement.getBoundingClientRect());} 874element=element.parentElement;} 875visibleInAllParents=parentRects.every(function(parentRect){var visiblePixelX=Math.min(elementRect.right,parentRect.right)-Math.max(elementRect.left,parentRect.left);var visiblePixelY=Math.min(elementRect.bottom,parentRect.bottom)-Math.max(elementRect.top,parentRect.top);return visiblePixelX>0&&visiblePixelY>0;});return visibleInAllParents&&elementRect.bottom>0&&elementRect.right>0&&elementRect.left<$(window).width()&&elementRect.top<$(window).height();};var $thumb=slide.opts.$thumb;var thumbPos=$thumb?$thumb.offset():0;var slidePos;if(thumbPos&&$thumb[0].ownerDocument===document&&isElementVisible($thumb)){slidePos=self.$refs.stage.offset();rez={top:thumbPos.top-slidePos.top+parseFloat($thumb.css("border-top-width")||0),left
875:thumbPos.left-slidePos.left+parseFloat($thumb.css("border-left-width")||0),width:$thumb.width(),height:$thumb.height(),scaleX:1,scaleY:1};} 876return rez;},complete:function(){var self=this,current=self.current,slides={},promise;if(current.isMoved||!current.isLoaded||current.isComplete){return;} 877current.isComplete=true;current.$slide.siblings().trigger('onReset');self.preload('inline');forceRedraw(current.$slide);current.$slide.addClass('fancybox-slide--complete');$.each(self.slides,function(key,slide){if(slide.pos>=self.currPos-1&&slide.pos<=self.currPos+1){slides[slide.pos]=slide;}else if(slide){$.fancybox.stop(slide.$slide);slide.$slide.off().remove();}});self.slides=slides;self.updateCursor();self.trigger('afterShow');current.$slide.find('video,audio').first().trigger('play');if($(document.activeElement).is('[disabled]')||(current.opts.autoFocus&&!(current.type=='image'||current.type==='iframe'))){self.focus();}},preload:function(type){var self=this,next=self.slides[self.currPos+1],prev=self.slides[self.currPos-1];if(next&&next.type===type){self.loadSlide(next);} 878if(prev&&prev.type===type){self.loadSlide(prev);}},focus:function(){var current=this.current;var $el;if(this.isClosing){return;} 879if(current&¤t.isComplete){$el=current.$slide.find('input[autofocus]:enabled:visible:first');if(!$el.length){$el=current.$slide.find('button,:input,[tabindex],a').filter(':enabled:visible:first');}} 880$el=$el&&$el.length?$el:this.$refs.container;$el.focus();},activate:function(){var self=this;$('.fancybox-container').each(function(){var instance=$(this).data('FancyBox');if(instance&&instance.id!==self.id&&!instance.isClosing){instance.trigger('onDeactivate');instance.removeEvents();instance.isVisible=false;}});self.isVisible=true;if(self.current||self.isIdle){self.update();self.updateControls();} 881self.trigger('onActivate');self.addEvents();},close:function(e,d){var self=this;var current=self.current;var effect,duration;var $what,opacity,start,end;var done=function(){self.cleanUp(e);};if(self.isClosing){return false;} 882self.isClosing=true;if(self.trigger('beforeClose',e)===false){self.isClosing=false;requestAFrame(function(){self.update();});return false;} 883self.removeEvents();if(current.timouts){clearTimeout(current.timouts);} 884$what=current.$content;effect=current.opts.animationEffect;duration=$.isNumeric(d)?d:(effect?current.opts.animationDuration:0);current.$slide.off(transitionEnd).removeClass('fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated');current.$slide.siblings().trigger('onReset').remove();if(duration){self.$refs.container.removeClass('fancybox-is-open').addClass('fancybox-is-closing');} 885self.hideLoading(current);self.hideControls();self.updateCursor();if(effect==='zoom'&&!(e!==true&&$what&&duration&¤t.type==='image'&&!current.hasError&&(end=self.getThumbPos(current)))){effect='fade';} 886if(effect==='zoom'){$.fancybox.stop($what);start=$.fancybox.getTranslate($what);start.width=start.width*start.scaleX;start.height=start.height*start.scaleY;opacity=current.opts.zoomOpacity;if(opacity=='auto'){opacity=Math.abs(current.width/current.height-end.width/end.height)>0.1;} 887if(opacity){end.opacity=0;} 888start.scaleX=start.width/end.width;start.scaleY=start.height/end.height;start.width=end.width;start.height=end.height;$.fancybox.setTranslate(current.$content,start);forceRedraw(current.$content);$.fancybox.animate(current.$content,end,duration,done);return true;} 889if(effect&&duration){if(e===true){setTimeout(done,duration);}else{$.fancybox.animate(current.$slide.removeClass('fancybox-slide--current'),'fancybox-animated fancybox-slide--previous fancybox-fx-'+effect,duration,done);}}else{done();} 890return true;},cleanUp:function(e){var self=this,$body=$('body'),instance,offset;self.current.$slide.trigger('onReset');self.$refs.container.empty().remove();self.trigger('afterClose',e);if(self.$lastFocus&&!!self.current.opts.backFocus){self.$lastFocus.focus();} 891self.current=null;instance=$.fancybox.getInstance();if(instance){instance.activate();}else{$W.scrollTop(self.scrollTop).scrollLeft(self.scrollLeft);$body.removeClass('fancybox-active compensate-for-scrollbar');if($body.hasClass('fancybox-iosfix')){offset=parseInt(document.body.style.top,10);$body.removeClass('fancybox-iosfix').css('top','').scrollTop(offset*-1);} 892$('#fancybox-style-noscroll').remove();}},trigger:function(name,slide){var args=Array.prototype.slice.call(arguments,1
892),self=this,obj=slide&&slide.opts?slide:self.current,rez;if(obj){args.unshift(obj);}else{obj=self;} 893args.unshift(self);if($.isFunction(obj.opts[name])){rez=obj.opts[name].apply(obj,args);} 894if(rez===false){return rez;} 895if(name==='afterClose'||!self.$refs){$D.trigger(name+'.fb',args);}else{self.$refs.container.trigger(name+'.fb',args);}},updateControls:function(force){var self=this;var current=self.current,index=current.index,caption=current.opts.caption,$container=self.$refs.container,$caption=self.$refs.caption;current.$slide.trigger('refresh');self.$caption=caption&&caption.length?$caption.html(caption):null;if(!self.isHiddenControls&&!self.isIdle){self.showControls();} 896$container.find('[data-fancybox-count]').html(self.group.length);$container.find('[data-fancybox-index]').html(index+1);$container.find('[data-fancybox-prev]').prop('disabled',(!current.opts.loop&&index<=0));$container.find('[data-fancybox-next]').prop('disabled',(!current.opts.loop&&index>=self.group.length-1));if(current.type==='image'){$container.find('[data-fancybox-download]').attr('href',current.opts.image.src||current.src).show();}else{$container.find('[data-fancybox-download],[data-fancybox-zoom]').hide();}},hideControls:function(){this.isHiddenControls=true;this.$refs.container.removeClass('fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav');},showControls:function(){var self=this;var opts=self.current?self.current.opts:self.opts;var $container=self.$refs.container;self.isHiddenControls=false;self.idleSecondsCounter=0;$container.toggleClass('fancybox-show-toolbar',!!(opts.toolbar&&opts.buttons)).toggleClass('fancybox-show-infobar',!!(opts.infobar&&self.group.length>1)).toggleClass('fancybox-show-nav',!!(opts.arrows&&self.group.length>1)).toggleClass('fancybox-is-modal',!!opts.modal);if(self.$caption){$container.addClass('fancybox-show-caption ');}else{$container.removeClass('fancybox-show-caption');}},toggleControls:function(){if(this.isHiddenControls){this.showControls();}else{this.hideControls();}},});$.fancybox={version:"3.2.10",defaults:defaults,getInstance:function(command){var instance=$('.fancybox-container:not(".fancybox-is-closing"):last').data('FancyBox');var args=Array.prototype.slice.call(arguments,1);if(instance instanceof FancyBox){if($.type(command)==='string'){instance[command].apply(instance,args);}else if($.type(command)==='function'){command.apply(instance,args);} 897return instance;} 898return false;},open:function(items,opts,index){return new FancyBox(items,opts,index);},close:function(all){var instance=this.getInstance();if(instance){instance.close();if(all===true){this.close();}}},destroy:function(){this.close(true);$D.off('click.fb-start');},isMobile:document.createTouch!==undefined&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(function(){var div=document.createElement('div');return window.getComputedStyle&&window.getComputedStyle(div).getPropertyValue('transform')&&!(document.documentMode&&document.documentMode<11);}()),getTranslate:function($el){var matrix;if(!$el||!$el.length){return false;} 899matrix=$el.eq(0).css('transform');if(matrix&&matrix.indexOf('matrix')!==-1){matrix=matrix.split('(')[1];matrix=matrix.split(')')[0];matrix=matrix.split(',');}else{matrix=[];} 900if(matrix.length){if(matrix.length>10){matrix=[matrix[13],matrix[12],matrix[0],matrix[5]];}else{matrix=[matrix[5],matrix[4],matrix[0],matrix[3]];} 901matrix=matrix.map(parseFloat);}else{matrix=[0,0,1,1];var transRegex=/\.*translate\((.*)px,(.*)px\)/i;var transRez=transRegex.exec($el.eq(0).attr('style'));if(transRez){matrix[0]=parseFloat(transRez[2]);matrix[1]=parseFloat(transRez[1]);}} 902return{top:matrix[0],left:matrix[1],scaleX:matrix[2],scaleY:matrix[3],opacity:parseFloat($el.css('opacity')),width:$el.width(),height:$el.height()};},setTranslate:function($el,props){var str='';var css={};if(!$el||!props){return;} 903if(props.left!==undefined||props.top!==undefined){str=(props.left===undefined?$el.position().left:props.left)+'px, '+(props.top===undefined?$el.position().top:props.top)+'px';if(this.use3d){str='translate3d('+str+', 0px)';}else{str='translate('+str+')';}} 904if(props.scaleX!==undefined&&props.scaleY!==undefined){str=(str.length?str+' ':'')+'scale('+props.scaleX+', '+props.scaleY+')';} 905if(str.length){css.transform=str;} 906if(props.opacity!==undefined){css.opacity=props.opacity;} 907if(props.width!==undefined){css.width=props.width;} 908if(props.height!==undefined){css.height=props.height;} 909return $el.css(css);},animate:function($el,to,duration,callback,leaveAnimationName){if($.isFunction(duration)){callback=duration;duration=null;} 910if(!$.isPlainObject(to)){$el.removeAttr('style');} 911$el.on(transitionEnd,function(e){if(e&&e.originalEvent&&(!$el.is(e.originalEvent.target)||e.originalEvent.propertyName=='z-index')){return;} 912$.fancybox.stop($el);
912if($.isPlainObject(to)){if(to.scaleX!==undefined&&to.scaleY!==undefined){$el.css('transition-duration','');to.width=Math.round($el.width()*to.scaleX);to.height=Math.round($el.height()*to.scaleY);to.scaleX=1;to.scaleY=1;$.fancybox.setTranslate($el,to);} 913if(leaveAnimationName===false){$el.removeAttr('style');}}else if(leaveAnimationName!==true){$el.removeClass(to);} 914if($.isFunction(callback)){callback(e);}});if($.isNumeric(duration)){$el.css('transition-duration',duration+'ms');} 915if($.isPlainObject(to)){$.fancybox.setTranslate($el,to);}else{$el.addClass(to);} 916if(to.scaleX&&$el.hasClass('fancybox-image-wrap')){$el.parent().addClass('fancybox-is-scaling');} 917$el.data("timer",setTimeout(function(){$el.trigger('transitionend');},duration+16));},stop:function($el){clearTimeout($el.data("timer"));$el.off('transitionend').css('transition-duration','');if($el.hasClass('fancybox-image-wrap')){$el.parent().removeClass('fancybox-is-scaling');}}};function _run(e){var $target=$(e.currentTarget),opts=e.data?e.data.options:{},value=$target.attr('data-fancybox')||'',index=0,items=[];if(e.isDefaultPrevented()){return;} 918e.preventDefault();if(value){items=opts.selector?$(opts.selector):(e.data?e.data.items:[]);items=items.length?items.filter('[data-fancybox="'+value+'"]'):$('[data-fancybox="'+value+'"]');index=items.index($target);if(index<0){index=0;}}else{items=[$target];} 919$.fancybox.open(items,opts,index);} 920$.fn.fancybox=function(options){var selector;options=options||{};selector=options.selector||false;if(selector){$('body').off('click.fb-start',selector).on('click.fb-start',selector,{options:options},_run);}else{this.off('click.fb-start').on('click.fb-start',{items:this,options:options},_run);} 921return this;};$D.on('click.fb-start','[data-fancybox]',_run);}(window,document,window.jQuery||jQuery));;(function($){'use strict';var format=function(url,rez,params){if(!url){return;} 922params=params||'';if($.type(params)==="object"){params=$.param(params,true);} 923$.each(rez,function(key,value){url=url.replace('$'+key,value||'');});if(params.length){url+=(url.indexOf('?')>0?'&':'?')+params;} 924return url;};var defaults={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:'transparent',enablejsapi:1,html5:1},paramPlace:8,type:'iframe',url:'//www.youtube.com/embed/$4',thumb:'//img.youtube.com/vi/$4/hqdefault.jpg'},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:'iframe',url:'//player.vimeo.com/video/$2'},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:'iframe',url:'//www.metacafe.com/embed/$1/?ap=1'},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:'iframe',url:'//www.dailymotion.com/embed/video/$1'},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:'iframe',url:'//vine.co/v/$1/embed/simple'},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:'image',url:'//$1/p/$2/media/?size=l'},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:'iframe',url:function(rez){return'//maps.google.'+rez[2]+'/?ll='+(rez[9]?rez[9]+'&z='+Math.floor(rez[10])+(rez[12]?rez[12].replace(/^\//,"&"):''):rez[12])+'&output='+(rez[12]&&rez[12].indexOf('layer=c')>0?'svembed':'embed');}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:'iframe',url:function(rez){return'//maps.google.'+rez[2]+'/maps?q='+rez[5].replace('query=','q=').replace('api=1','')+'&output=embed';}}};$(document).on('objectNeedsType.fb',function(e,instance,item){var url=item.src||'',type=false,media,thumb,rez,params,urlParams,paramObj,provider;media=$.extend(true,{},defaults,item.opts.media);$.each(media,function(providerName,providerOpts){rez=url.match(providerOpts.matcher);if(!rez){return;} 925type=providerOpts.type;paramObj={};if(providerOpts.paramPlace&&rez[providerOpts.paramPlace]){urlParam
925s=rez[providerOpts.paramPlace];if(urlParams[0]=='?'){urlParams=urlParams.substring(1);} 926urlParams=urlParams.split('&');for(var m=0;m<urlParams.length;++m){var p=urlParams[m].split('=',2);if(p.length==2){paramObj[p[0]]=decodeURIComponent(p[1].replace(/\+/g," "));}}} 927params=$.extend(true,{},providerOpts.params,item.opts[providerName],paramObj);url=$.type(providerOpts.url)==="function"?providerOpts.url.call(this,rez,params,item):format(providerOpts.url,rez,params);thumb=$.type(providerOpts.thumb)==="function"?providerOpts.thumb.call(this,rez,params,item):format(providerOpts.thumb,rez);if(providerName==='vimeo'){url=url.replace('&%23','#');} 928return false;});if(type){item.src=url;item.type=type;if(!item.opts.thumb&&!(item.opts.$thumb&&item.opts.$thumb.length)){item.opts.thumb=thumb;} 929if(type==='iframe'){$.extend(true,item.opts,{iframe:{preload:false,attr:{scrolling:"no"}}});item.contentProvider=provider;item.opts.slideClass+=' fancybox-slide--'+(provider=='gmap_place'||provider=='gmap_search'?'map':'video');}}else if(url){item.type=item.opts.defaultType;}});}(window.jQuery||jQuery));;(function(window,document,$){'use strict';var requestAFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return window.setTimeout(callback,1000/60);};})();var cancelAFrame=(function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(id){window.clearTimeout(id);};})();var pointers=function(e){var result=[];e=e.originalEvent||e||window.e;e=e.touches&&e.touches.length?e.touches:(e.changedTouches&&e.changedTouches.length?e.changedTouches:[e]);for(var key in e){if(e[key].pageX){result.push({x:e[key].pageX,y:e[key].pageY});}else if(e[key].clientX){result.push({x:e[key].clientX,y:e[key].clientY});}} 930return result;};var distance=function(point2,point1,what){if(!point1||!point2){return 0;} 931if(what==='x'){return point2.x-point1.x;}else if(what==='y'){return point2.y-point1.y;} 932return Math.sqrt(Math.pow(point2.x-point1.x,2)+Math.pow(point2.y-point1.y,2));};var isClickable=function($el){if($el.is('a,area,button,[role="button"],input,label,select,summary,textarea')||$.isFunction($el.get(0).onclick)||$el.data('selectable')){return true;} 933for(var i=0,atts=$el[0].attributes,n=atts.length;i<n;i++){if(atts[i].nodeName.substr(0,14)==='data-fancybox-'){return true;}} 934return false;};var hasScrollbars=function(el){var overflowY=window.getComputedStyle(el)['overflow-y'];var overflowX=window.getComputedStyle(el)['overflow-x'];var vertical=(overflowY==='scroll'||overflowY==='auto')&&el.scrollHeight>el.clientHeight;var horizontal=(overflowX==='scroll'||overflowX==='auto')&&el.scrollWidth>el.clientWidth;return vertical||horizontal;};var isScrollable=function($el){var rez=false;while(true){rez=hasScrollbars($el.get(0));if(rez){break;} 935$el=$el.parent();if(!$el.length||$el.hasClass('fancybox-stage')||$el.is('body')){break;}} 936return rez;};var Guestures=function(instance){var self=this;self.instance=instance;self.$bg=instance.$refs.bg;self.$stage=instance.$refs.stage;self.$container=instance.$refs.container;self.destroy();self.$container.on('touchstart.fb.touch mousedown.fb.touch',$.proxy(self,'ontouchstart'));};Guestures.prototype.destroy=function(){this.$container.off('.fb.touch');};Guestures.prototype.ontouchstart=function(e){var self=this;var $target=$(e.target);var instance=self.instance;var current=instance.current;var $content=current.$content;var isTouchDevice=(e.type=='touchstart');if(isTouchDevice){self.$container.off('mousedown.fb.touch');} 937if(e.originalEvent&&e.originalEvent.button==2){return;} 938if(!$target.length||isClickable($target)||isClickable($target.parent())){return;} 939if(!$target.is('img')&&e.originalEvent.clientX>$target[0].clientWidth+$target.offset().left){return;} 940if(!current||self.instance.isAnimating||self.instance.isClosing){e.stopPropagation();e.preventDefault();return;} 941self.realPoints=self.startPoints=pointers(e);if(!self.startPoints){return;} 942e.stopPropagation();self.startEvent=e;self.canTap=true;self.$target=$target;self.$content=$content;self.opts=current.opts.touch;self.isPanning=false;self.isSwiping=false;self.isZooming=false;self.isScrolling=false;self.sliderStartPos=self.sliderLastPos||{top:0,left:0};self.contentStartPos=$.fancybox.getTranslate(self.$content);self.contentLastPos=null;self.startTime=new Date().getTime();self.distanceX=self.distanceY=self.distance=0;self.canvasWidth=Math.round(current.$slide[0].clientWidth);self.canvasHeight=Math.round(current.$slide[0].clientHeight);$(document).off('.fb.touch').on(isTouchDevice?'touchend.fb.touch touchcancel.fb.touch':'mouseup.fb.touch mouseleave.fb.touch',$.proxy(self,"ontouchend")).on(isTouchDevice?'touchmove.fb.touch':'mousemove.fb.touch',$.proxy(self,"ontouchmove"));if($.fancybox.isMobile){document.addEventListener('scroll',self.onscroll,true);} 943if(!(self.opts||instance.canPan())||!($target.is(self.$stage)||self.$stage.find($target).length)){if($target.is('img')){e.preventDefault();} 944return;} 945if(!($.fancybox.isMobile&&(isScrollable($target)||isScrollable($target.parent())))){e.preventDefault();} 946if(self.startPoints.length===1){if(current.type==='image'&&(self.contentStartPos.width>self.canvasWidth+1||self.contentStartPos.height>self.canvasHeight+1)){$.fancybox.stop(self.$content);self.$content.css('transition-duration','');self.isPanning=true;}else{self.isSwiping=true;} 947self.$container.addClass('fancybox-controls--isGrabbing');} 948if(self.startPoints.length===2&&!instance.isAnimating&&!current.hasError&¤t.type==='image'&&(current.isLoaded||current.$ghost)){self.canTap=false;self.isSwiping=false;self.isPanning=false;self.isZooming=true;$.fancybox.stop(self.$content);self.$content.css('transition-duration','');self.centerPointStartX=((self.startPoints[0].x+self.startPoints[1].x)*0.5)-$(window).scrollLeft();self.centerPointStartY=((self.startPoints[0].y+self.startPoints[1].y)*0.5)-$(window).scrollTop();self.percentageOfImageAtPinchPointX=(self.centerPointStartX-self.contentStartPos.left)/self.contentStartPos.width;self.percentageOfImageAtPinchPointY=(self.centerPointStartY-self.contentStartPos.top)/self.contentStartPos.height;self.startDistanceBetweenFingers=distance(self.startPoints[0],self.startPoints[1]);}};Guestures.prototype.onscroll=function(e){self.isScrolling=true;};Guestures.prototype.ontouchmove=function(e){var self=this,$target=$(e.target);if(self.isScrolling||!($target.is(self.$stage)||self.$stage.find($target).length)){self.canTap=false;return;} 949self.newPoints=pointers(e);if(!(self.opts||self.instance.canPan())||!self.newPoints||!self.newPoints.length){return;} 950if(!(self.isSwiping&&self.isSwiping===true)){e.preventDefault();} 951self.distanceX=distance(self.newPoints[0],self.startPoints[0],'x');self.distanceY=distance(self.newPoints[0],self.startPoints[0],'y');self.distance=distance(self.newPoints[0],self.startPoints[0]) 952if(self.distance>0){if(self.isSwiping){self.onSwipe(e);}else if(self.isPanning){self.onPan();}else if(self.isZooming){self.onZoom();}}};Guestures.prototype.onSwipe=function(e){var self=this,swiping=self.isSwiping,left=self.sliderStartPos.left||0,angle;if(swiping===true){if(Math.abs(self.distance)>10){self.canTap=false;if(self.instance.group.length<2&&self.opts.vertical){self.isSwiping='y';}else if(self.instance.isDragging||self.opts.vertical===false||(self.opts.vertical==='auto'&&$(window).width()>800)){self.isSwiping='x';}else{angle=Math.abs(Math.atan2(self.distanceY,self.distanceX)*180/Math.PI);self.isSwiping=(angle>45&&angle<135)?'y':'x';} 953self.canTap=false;if(self.isSwiping==='y'&&$.fancybox.isMobile&&(isScrollable(self.$target)||isScrollable(self.$target.parent()))){self.isScrolling=true;return;} 954self.instance.isDragging=self.isSwiping;self.startPoints=self.newPoints;$.each(self.instance.slides,function(index,slide){$.fancybox.stop(slide.$slide);slide.$slide.css('transition-duration','');slide.inTransition=false;if(slide.pos===self.instance.current.pos){self.sliderStartPos.left=$.fancybox.getTranslate(slide.$slide).left;}});if(self.instance.SlideShow&&self.instance.SlideShow.isActive){self.instance.SlideShow.stop();}} 955return;} 956if(swiping=='x'){if(self.distanceX>0&&(self.instance.group.length<2||(self.instance.current.index===0&&!self.instance.current.opts.loop))){left=left+Math.pow(self.distanceX,0.8);}else if(self.distanceX<0&&(self.instance.group.length<2||(self.instance.current.index===self.instance.group.length-1&&!self.instance.current.opts.loop))){left=left-Math.pow(-self.distanceX,0.8);}else{left=left+self.distanceX;}} 957self.sliderLastPos={top:swiping=='x'?0:self.sliderStartPos.top+self.distanceY,left:left};if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} 958self.requestId=requestAFrame(function(){if(self.sliderLastPos){$.each(self.instance.slides,function(index,slide){var pos=slide.pos-self.instance.currPos;$.fancybox.setTranslate(slide.$slide,{top:self.sliderLastPos.top,left
958:self.sliderLastPos.left+(pos*self.canvasWidth)+(pos*slide.opts.gutter)});});self.$container.addClass('fancybox-is-sliding');}});};Guestures.prototype.onPan=function(){var self=this;if(distance(self.newPoints[0],self.realPoints[0])<($.fancybox.isMobile?10:5)){self.startPoints=self.newPoints;return;} 959self.canTap=false;self.contentLastPos=self.limitMovement();if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} 960self.requestId=requestAFrame(function(){$.fancybox.setTranslate(self.$content,self.contentLastPos);});};Guestures.prototype.limitMovement=function(){var self=this;var canvasWidth=self.canvasWidth;var canvasHeight=self.canvasHeight;var distanceX=self.distanceX;var distanceY=self.distanceY;var contentStartPos=self.contentStartPos;var currentOffsetX=contentStartPos.left;var currentOffsetY=contentStartPos.top;var currentWidth=contentStartPos.width;var currentHeight=contentStartPos.height;var minTranslateX,minTranslateY,maxTranslateX,maxTranslateY,newOffsetX,newOffsetY;if(currentWidth>canvasWidth){newOffsetX=currentOffsetX+distanceX;}else{newOffsetX=currentOffsetX;} 961newOffsetY=currentOffsetY+distanceY;minTranslateX=Math.max(0,canvasWidth*0.5-currentWidth*0.5);minTranslateY=Math.max(0,canvasHeight*0.5-currentHeight*0.5);maxTranslateX=Math.min(canvasWidth-currentWidth,canvasWidth*0.5-currentWidth*0.5);maxTranslateY=Math.min(canvasHeight-currentHeight,canvasHeight*0.5-currentHeight*0.5);if(currentWidth>canvasWidth){if(distanceX>0&&newOffsetX>minTranslateX){newOffsetX=minTranslateX-1+Math.pow(-minTranslateX+currentOffsetX+distanceX,0.8)||0;} 962if(distanceX<0&&newOffsetX<maxTranslateX){newOffsetX=maxTranslateX+1-Math.pow(maxTranslateX-currentOffsetX-distanceX,0.8)||0;}} 963if(currentHeight>canvasHeight){if(distanceY>0&&newOffsetY>minTranslateY){newOffsetY=minTranslateY-1+Math.pow(-minTranslateY+currentOffsetY+distanceY,0.8)||0;} 964if(distanceY<0&&newOffsetY<maxTranslateY){newOffsetY=maxTranslateY+1-Math.pow(maxTranslateY-currentOffsetY-distanceY,0.8)||0;}} 965return{top:newOffsetY,left:newOffsetX,scaleX:contentStartPos.scaleX,scaleY:contentStartPos.scaleY};};Guestures.prototype.limitPosition=function(newOffsetX,newOffsetY,newWidth,newHeight){var self=this;var canvasWidth=self.canvasWidth;var canvasHeight=self.canvasHeight;if(newWidth>canvasWidth){newOffsetX=newOffsetX>0?0:newOffsetX;newOffsetX=newOffsetX<canvasWidth-newWidth?canvasWidth-newWidth:newOffsetX;}else{newOffsetX=Math.max(0,canvasWidth/2-newWidth/2);} 966if(newHeight>canvasHeight){newOffsetY=newOffsetY>0?0:newOffsetY;newOffsetY=newOffsetY<canvasHeight-newHeight?canvasHeight-newHeight:newOffsetY;}else{newOffsetY=Math.max(0,canvasHeight/2-newHeight/2);} 967return{top:newOffsetY,left:newOffsetX};};Guestures.prototype.onZoom=function(){var self=this;var currentWidth=self.contentStartPos.width;var currentHeight=self.contentStartPos.height;var currentOffsetX=self.contentStartPos.left;var currentOffsetY=self.contentStartPos.top;var endDistanceBetweenFingers=distance(self.newPoints[0],self.newPoints[1]);var pinchRatio=endDistanceBetweenFingers/self.startDistanceBetweenFingers;var newWidth=Math.floor(currentWidth*pinchRatio);var newHeight=Math.floor(currentHeight*pinchRatio);var translateFromZoomingX=(currentWidth-newWidth)*self.percentageOfImageAtPinchPointX;var translateFromZoomingY=(currentHeight-newHeight)*self.percentageOfImageAtPinchPointY;var centerPointEndX=((self.newPoints[0].x+self.newPoints[1].x)/2)-$(window).scrollLeft();var centerPointEndY=((self.newPoints[0].y+self.newPoints[1].y)/2)-$(window).scrollTop();var translateFromTranslatingX=centerPointEndX-self.centerPointStartX;var translateFromTranslatingY=centerPointEndY-self.centerPointStartY;var newOffsetX=currentOffsetX+(translateFromZoomingX+translateFromTranslatingX);var newOffsetY=currentOffsetY+(translateFromZoomingY+translateFromTranslatingY);var newPos={top:newOffsetY,left:newOffsetX,scaleX:self.contentStartPos.scaleX*pinchRatio,scaleY:self.contentStartPos.scaleY*pinchRatio};self.canTap=false;self.newWidth=newWidth;self.newHeight=newHeight;self.contentLastPos=newPos;if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} 968self.requestId=requestAFrame(function(){$.fancybox.setTranslate(self.$content,self.contentLastPos);});};Guestures.prototype.ontouchend=function(e){var self=this;var dMs=Math.max((new Date().getTime())-self.startTime,1);var swiping=self.isSwiping;var panning=self.isPanning;var zooming=self.isZooming;var scrolling=self.isScrolling;self.endPoints=pointers(e);self.$container.removeClass('fancybox-controls--isGrabbing');$(document).off('.fb.touch');document.removeEventListener('scroll',self.onscroll,true);if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} 969self.isSwiping=false;self.isPanning=false;self.isZooming=false;self.isScrolling=false;self.instance.isDragging=false;
969if(self.canTap){return self.onTap(e);} 970self.speed=366;self.velocityX=self.distanceX/dMs*0.5;self.velocityY=self.distanceY/dMs*0.5;self.speedX=Math.max(self.speed*0.5,Math.min(self.speed*1.5,(1/Math.abs(self.velocityX))*self.speed));if(panning){self.endPanning();}else if(zooming){self.endZooming();}else{self.endSwiping(swiping,scrolling);} 971return;};Guestures.prototype.endSwiping=function(swiping,scrolling){var self=this,ret=false,len=self.instance.group.length;self.sliderLastPos=null;if(swiping=='y'&&!scrolling&&Math.abs(self.distanceY)>50){$.fancybox.animate(self.instance.current.$slide,{top:self.sliderStartPos.top+self.distanceY+(self.velocityY*150),opacity:0},150);ret=self.instance.close(true,300);}else if(swiping=='x'&&self.distanceX>50&&len>1){ret=self.instance.previous(self.speedX);}else if(swiping=='x'&&self.distanceX<-50&&len>1){ret=self.instance.next(self.speedX);} 972if(ret===false&&(swiping=='x'||swiping=='y')){if(scrolling||len<2){self.instance.centerSlide(self.instance.current,150);}else{self.instance.jumpTo(self.instance.current.index);}} 973self.$container.removeClass('fancybox-is-sliding');};Guestures.prototype.endPanning=function(){var self=this;var newOffsetX,newOffsetY,newPos;if(!self.contentLastPos){return;} 974if(self.opts.momentum===false){newOffsetX=self.contentLastPos.left;newOffsetY=self.contentLastPos.top;}else{newOffsetX=self.contentLastPos.left+(self.velocityX*self.speed);newOffsetY=self.contentLastPos.top+(self.velocityY*self.speed);} 975newPos=self.limitPosition(newOffsetX,newOffsetY,self.contentStartPos.width,self.contentStartPos.height);newPos.width=self.contentStartPos.width;newPos.height=self.contentStartPos.height;$.fancybox.animate(self.$content,newPos,330);};Guestures.prototype.endZooming=function(){var self=this;var current=self.instance.current;var newOffsetX,newOffsetY,newPos,reset;var newWidth=self.newWidth;var newHeight=self.newHeight;if(!self.contentLastPos){return;} 976newOffsetX=self.contentLastPos.left;newOffsetY=self.contentLastPos.top;reset={top:newOffsetY,left:newOffsetX,width:newWidth,height:newHeight,scaleX:1,scaleY:1};$.fancybox.setTranslate(self.$content,reset);if(newWidth<self.canvasWidth&&newHeight<self.canvasHeight){self.instance.scaleToFit(150);}else if(newWidth>current.width||newHeight>current.height){self.instance.scaleToActual(self.centerPointStartX,self.centerPointStartY,150);}else{newPos=self.limitPosition(newOffsetX,newOffsetY,newWidth,newHeight);$.fancybox.setTranslate(self.content,$.fancybox.getTranslate(self.$content));$.fancybox.animate(self.$content,newPos,150);}};Guestures.prototype.onTap=function(e){var self=this;var $target=$(e.target);var instance=self.instance;var current=instance.current;var endPoints=(e&&pointers(e))||self.startPoints;var tapX=endPoints[0]?endPoints[0].x-self.$stage.offset().left:0;var tapY=endPoints[0]?endPoints[0].y-self.$stage.offset().top:0;var where;var process=function(prefix){var action=current.opts[prefix];if($.isFunction(action)){action=action.apply(instance,[current,e]);} 977if(!action){return;} 978switch(action){case"close":instance.close(self.startEvent);break;case"toggleControls":instance.toggleControls(true);break;case"next":instance.next();break;case"nextOrClose":if(instance.group.length>1){instance.next();}else{instance.close(self.startEvent);} 979break;case"zoom":if(current.type=='image'&&(current.isLoaded||current.$ghost)){if(instance.canPan()){instance.scaleToFit();}else if(instance.isScaledDown()){instance.scaleToActual(tapX,tapY);}else if(instance.group.length<2){instance.close(self.startEvent);}} 980break;}};if(e.originalEvent&&e.originalEvent.button==2){return;} 981if(!$target.is('img')&&tapX>$target[0].clientWidth+$target.offset().left){return;} 982if($target.is('.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container')){where='Outside';}else if($target.is('.fancybox-slide')){where='Slide';}else if(instance.current.$content&&instance.current.$content.find($target).addBack().filter($target).length){where='Content';}else{return;} 983if(self.tapped){clearTimeout(self.tapped);self.tapped=null;if(Math.abs(tapX-self.tapX)>50||Math.abs(tapY-self.tapY)>50){return this;} 984process('dblclick'+where);}else{self.tapX=tapX;self.tapY=tapY;if(current.opts['dblclick'+where]&¤t.opts['dblclick'+where]!==current.opts['click'+where]){self.tapped=setTimeout(function(){self.tapped=null;process('click'+where);},500);}else{process('click'+where);}} 985return this;};$(document).on('onActivate.fb',function(e,instance){if(instance&&!instance.Guestures){instance.Guestures=new Guestures(instance);}});}(window,document,window.jQuery||jQuery));;(function(document,$){'use strict';$.extend(true,$.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M13,12 L27,20 L13,27 Z" />'+'<path d="M15,10 v19 M23,10 v19" />'+'</svg>'+'</button>'},slideShow:{autoStart:false,speed:3000}});var SlideShow=function(instance){this.instance=instance;this.init();};$.extend(SlideShow.prototype,{timer:null,isActive:false,$button:null,init:function(){var self=this;self.$button=self.instance.$refs.toolbar.find('[data-fancybox-play]').on('click',function(){self.toggle(
985);});if(self.instance.group.length<2||!self.instance.group[self.instance.currIndex].opts.slideShow){self.$button.hide();}},set:function(force){var self=this;if(self.instance&&self.instance.current&&(force===true||self.instance.current.opts.loop||self.instance.currIndex<self.instance.group.length-1)){self.timer=setTimeout(function(){if(self.isActive){self.instance.jumpTo((self.instance.currIndex+1)%self.instance.group.length);}},self.instance.current.opts.slideShow.speed);}else{self.stop();self.instance.idleSecondsCounter=0;self.instance.showControls();}},clear:function(){var self=this;clearTimeout(self.timer);self.timer=null;},start:function(){var self=this;var current=self.instance.current;if(current){self.isActive=true;self.$button.attr('title',current.opts.i18n[current.opts.lang].PLAY_STOP).removeClass('fancybox-button--play').addClass('fancybox-button--pause');self.set(true);}},stop:function(){var self=this;var current=self.instance.current;self.clear();self.$button.attr('title',current.opts.i18n[current.opts.lang].PLAY_START).removeClass('fancybox-button--pause').addClass('fancybox-button--play');self.isActive=false;},toggle:function(){var self=this;if(self.isActive){self.stop();}else{self.start();}}});$(document).on({'onInit.fb':function(e,instance){if(instance&&!instance.SlideShow){instance.SlideShow=new SlideShow(instance);}},'beforeShow.fb':function(e,instance,current,firstRun){var SlideShow=instance&&instance.SlideShow;if(firstRun){if(SlideShow&¤t.opts.slideShow.autoStart){SlideShow.start();}}else if(SlideShow&&SlideShow.isActive){SlideShow.clear();}},'afterShow.fb':function(e,instance,current){var SlideShow=instance&&instance.SlideShow;if(SlideShow&&SlideShow.isActive){SlideShow.set();}},'afterKeydown.fb':function(e,instance,current,keypress,keycode){var SlideShow=instance&&instance.SlideShow;if(SlideShow&¤t.opts.slideShow&&(keycode===80||keycode===32)&&!$(document.activeElement).is('button,a,input')){keypress.preventDefault();SlideShow.toggle();}},'beforeClose.fb onDeactivate.fb':function(e,instance){var SlideShow=instance&&instance.SlideShow;if(SlideShow){SlideShow.stop();}}});$(document).on("visibilitychange",function(){var instance=$.fancybox.getInstance();var SlideShow=instance&&instance.SlideShow;if(SlideShow&&SlideShow.isActive){if(document.hidden){SlideShow.clear();}else{SlideShow.set();}}});}(document,window.jQuery||jQuery));;(function(document,$){'use strict';var fn=(function(){var fnMap=[['requestFullscreen','exitFullscreen','fullscreenElement','fullscreenEnabled','fullscreenchange','fullscreenerror'],['webkitRequestFullscreen','webkitExitFullscreen','webkitFullscreenElement','webkitFullscreenEnabled','webkitfullscreenchange','webkitfullscreenerror'],['webkitRequestFullScreen','webkitCancelFullScreen','webkitCurrentFullScreenElement','webkitCancelFullScreen','webkitfullscreenchange','webkitfullscreenerror'],['mozRequestFullScreen','mozCancelFullScreen','mozFullScreenElement','mozFullScreenEnabled','mozfullscreenchange','mozfullscreenerror'],['msRequestFullscreen','msExitFullscreen','msFullscreenElement','msFullscreenEnabled','MSFullscreenChange','MSFullscreenError']];var val;var ret={};var i,j;for(i=0;i<fnMap.length;i++){val=fnMap[i];if(val&&val[1]in document){for(j=0;j<val.length;j++){ret[fnMap[0][j]]=val[j];} 986return ret;}} 987return false;})();if(!fn){if($&&$.fancybox){$.fancybox.defaults.btnTpl.fullScreen=false;} 988return;} 989var FullScreen={request:function(elem){elem=elem||document.documentElement;elem[fn.requestFullscreen](elem.ALLOW_KEYBOARD_INPUT);},exit:function(){document[fn.exitFullscreen]();},toggle:function(elem){elem=elem||document.documentElement;if(this.isFullscreen()){this.exit();}else{this.request(elem);}},isFullscreen:function(){return Boolean(document[fn.fullscreenElement]);},enabled:function(){return Boolean(document[fn.fullscreenEnabled]);}};$.extend(true,$.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fullscreen" title="{{FULL_SCREEN}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M9,12 h22 v16 h-22 v-16 v16 h22 v-16 Z" />'+'</svg>'+'</button>'},fullScreen:{autoStart:false}});$(document).on({'onInit.fb':function(e,instance){var $container;if(instance&&instance.group[instance.currIndex].opts.fullScreen){$container=instance.$refs.container;$container.on('click.fb-fullscreen','[data-fancybox-fullscreen]',function(e){e.stopPropagation();e.preventDefault();FullScreen.toggle($container[0]);});if(instance.opts.fullScreen&&instance.opts.fullScreen.autoStart===true){FullScreen.request($container[0]);} 990instance.FullScreen=FullScreen;}else if(instance){instance.$refs.toolbar.find('[data-fancybox-fullscreen]').hide();}},'afterKeydown.fb':function(e,instance,current,keypress,keycode){if(instance&&instance.FullScreen&&keycode===70){keypress.preventDefault();instance.FullScreen.toggle(instance.$refs.container[0]);}},'beforeClose.fb':function(instance){if(instance&&instance.FullScreen){FullScreen.exit();}}});$(document).on(fn.fullscreenchange,function(){var isFullscreen=FullScreen.isFullscreen(),instance=$.fancybox.getInstance();if(instance){if(instance.current&&instance.current.type==='image'&&instance.isAnimating){instance.current.$content.css('transition','none');instance.isAnimating=false;instance.update(true,true,0);} 991instance.trigger('onFullscreenChange',isFullscreen);instance.$refs.container.toggleClass('fancybox-is-fullscreen',isFullscreen);}}
991);}(document,window.jQuery||jQuery));;(function(document,$){'use strict';$.fancybox.defaults=$.extend(true,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}">'+'<svg viewBox="0 0 120 120">'+'<path d="M30,30 h14 v14 h-14 Z M50,30 h14 v14 h-14 Z M70,30 h14 v14 h-14 Z M30,50 h14 v14 h-14 Z M50,50 h14 v14 h-14 Z M70,50 h14 v14 h-14 Z M30,70 h14 v14 h-14 Z M50,70 h14 v14 h-14 Z M70,70 h14 v14 h-14 Z" />'+'</svg>'+'</button>'},thumbs:{autoStart:false,hideOnClose:true,parentEl:'.fancybox-container',axis:'y'}},$.fancybox.defaults);var FancyThumbs=function(instance){this.init(instance);};$.extend(FancyThumbs.prototype,{$button:null,$grid:null,$list:null,isVisible:false,isActive:false,init:function(instance){var self=this;self.instance=instance;instance.Thumbs=self;var first=instance.group[0],second=instance.group[1];self.opts=instance.group[instance.currIndex].opts.thumbs;self.$button=instance.$refs.toolbar.find('[data-fancybox-thumbs]');if(self.opts&&first&&second&&((first.type=='image'||first.opts.thumb||first.opts.$thumb)&&(second.type=='image'||second.opts.thumb||second.opts.$thumb))){self.$button.show().on('click',function(){self.toggle();});self.isActive=true;}else{self.$button.hide();}},create:function(){var self=this,instance=self.instance,parentEl=self.opts.parentEl,list,src;self.$grid=$('<div class="fancybox-thumbs fancybox-thumbs-'+self.opts.axis+'"></div>').appendTo(instance.$refs.container.find(parentEl).addBack().filter(parentEl));list='<ul>';$.each(instance.group,function(i,item){src=item.opts.thumb||(item.opts.$thumb?item.opts.$thumb.attr('src'):null);if(!src&&item.type==='image'){src=item.src;} 992if(src&&src.length){list+='<li data-index="'+i+'" tabindex="0" class="fancybox-thumbs-loading"><img data-src="'+src+'" /></li>';}});list+='</ul>';self.$list=$(list).appendTo(self.$grid).on('click','li',function(){instance.jumpTo($(this).data('index'));});self.$list.find('img').hide().one('load',function(){var $parent=$(this).parent().removeClass('fancybox-thumbs-loading'),thumbWidth=$parent.outerWidth(),thumbHeight=$parent.outerHeight(),width,height,widthRatio,heightRatio;width=this.naturalWidth||this.width;height=this.naturalHeight||this.height;widthRatio=width/thumbWidth;heightRatio=height/thumbHeight;if(widthRatio>=1&&heightRatio>=1){if(widthRatio>heightRatio){width=width/heightRatio;height=thumbHeight;}else{width=thumbWidth;height=height/widthRatio;}} 993$(this).css({width:Math.floor(width),height:Math.floor(height),'margin-top':height>thumbHeight?(Math.floor(thumbHeight*0.3-height*0.3)):Math.floor(thumbHeight*0.5-height*0.5),'margin-left':Math.floor(thumbWidth*0.5-width*0.5)}).show();}).each(function(){this.src=$(this).data('src');});if(self.opts.axis==='x'){self.$list.width(parseInt(self.$grid.css("padding-right"))+(instance.group.length*self.$list.children().eq(0).outerWidth(true))+'px');}},focus:function(duration){var self=this,$list=self.$list,thumb,thumbPos;if(self.instance.current){thumb=$list.children().removeClass('fancybox-thumbs-active').filter('[data-index="'+self.instance.current.index+'"]').addClass('fancybox-thumbs-active');thumbPos=thumb.position();if(self.opts.axis==='y'&&(thumbPos.top<0||thumbPos.top>($list.height()-thumb.outerHeight()))){$list.stop().animate({'scrollTop':$list.scrollTop()+thumbPos.top},duration);}else if(self.opts.axis==='x'&&(thumbPos.left<$list.parent().scrollLeft()||thumbPos.left>($list.parent().scrollLeft()+($list.parent().width()-thumb.outerWidth())))){$list.parent().stop().animate({'scrollLeft':thumbPos.left},duration);}}},update:function(){this.instance.$refs.container.toggleClass('fancybox-show-thumbs',this.isVisible);if(this.isVisible){if(!this.$grid){this.create();} 994this.instance.trigger('onThumbsShow');this.focus(0);}else if(this.$grid){this.instance.trigger('onThumbsHide');} 995this.instance.update();},hide:function(){this.isVisible=false;this.update();},show:function(){this.isVisible=true;this.update();},toggle:function(){this.isVisible=!this.isVisible;this.update();}});$(document).on({'onInit.fb':function(e,instance){var Thumbs;if(instance&&!instance.Thumbs){Thumbs=new FancyThumbs(instance);if(Thumbs.isActive&&Thumbs.opts.autoStart===true){Thumbs.show();}}},'beforeShow.fb':function(e,instance,item,firstRun){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isVisible){Thumbs.focus(firstRun?0:250);}},'afterKeydown.fb':function(e,instance,current,keypress,keycode){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isActive&&keycode===71){keypress.preventDefault();Thumbs.toggle();}},'beforeClose.fb':function(e,instance){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isVisible&&Thumbs.opts.hideOnClose!==false){Thumbs.$grid.hide();}}});}(document,window.jQuery));;(function(document,$){'use strict';$.extend(true,$.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}">'+'<svg viewBox="0 0 40 40">'+'<path d="M6,30 C8,18 19,16 23,16 L23,16 L23,10 L33,20 L23,29 L23,24 C19,24 8,27 6,30 Z">'+'</svg>'+'</button>'},share:{tpl:'<div class="fancybox-share">'+'<h1>{{SHARE}}</h1>'+'<p class="fancybox-share__links">'+'<a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}">'+'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg>'+'<span>Facebook</span>'+'</a>
995'+'<a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}">'+'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg>'+'<span>Pinterest</span>'+'</a>'+'<a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}">'+'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg>'+'<span>Twitter</span>'+'</a>'+'</p>'+'<p><input class="fancybox-share__input" type="text" value="{{url_raw}}" /></p>'+'</div>'}});function escapeHtml(string){var entityMap={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/','`':'`','=':'='};return String(string).replace(/[&<>"'`=\/]/g,function(s){return entityMap[s];});} 996$(document).on('click','[data-fancybox-share]',function(){var f=$.fancybox.getInstance(),url,tpl;if(f){url=f.current.opts.hash===false?f.current.src:window.location;tpl=f.current.opts.share.tpl.replace(/\{\{media\}\}/g,f.current.type==='image'?encodeURIComponent(f.current.src):'').replace(/\{\{url\}\}/g,encodeURIComponent(url)).replace(/\{\{url_raw\}\}/g,escapeHtml(url)).replace(/\{\{descr\}\}/g,f.$caption?encodeURIComponent(f.$caption.text()):'');$.fancybox.open({src:f.translate(f,tpl),type:'html',opts:{animationEffect:"fade",animationDuration:250,afterLoad:function(instance,current){current.$content.find('.fancybox-share__links a').click(function(){window.open(this.href,"Share","width=550, height=450");return false;});}}});}});}(document,window.jQuery||jQuery));;(function(document,window,$){'use strict';if(!$.escapeSelector){$.escapeSelector=function(sel){var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;var fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";} 997return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";} 998return"\\"+ch;};return(sel+"").replace(rcssescape,fcssescape);};} 999var shouldCreateHistory=true;var currentHash=null;var timerID=null;function parseUrl(){var hash=window.location.hash.substr(1);var rez=hash.split('-');var index=rez.length>1&&/^\+?\d+$/.test(rez[rez.length-1])?parseInt(rez.pop(-1),10)||1:1;var gallery=rez.join('-');if(index<1){index=1;} 1000return{hash:hash,index:index,gallery:gallery};} 1001function triggerFromUrl(url){var $el;if(url.gallery!==''){$el=$("[data-fancybox='"+$.escapeSelector(url.gallery)+"']").eq(url.index-1);if(!$el.length){$el=$("#"+$.escapeSelector(url.gallery)+"");} 1002if($el.length){shouldCreateHistory=false;$el.trigger('click');}}} 1003function getGalleryID(instance){var opts;if(!instance){return false;} 1004opts=instance.current?instance.current.opts:instance.opts;return opts.hash||(opts.$orig?opts.$orig.data('fancybox'):'');} 1005$(function(){if($.fancybox.defaults.hash===false){return;} 1006$(document).on({'onInit.fb':function(e,instance){var url,gallery;if(instance.group[instance.currIndex].opts.hash===false){return;} 1007url=parseUrl();gallery=getGalleryID(instance);if(gallery&&url.gallery&&gallery==url.gallery){instance.currIndex=url.index-1;}},'beforeShow.fb':function(e,instance,current){var gallery;if(!current||current.opts.hash===false){return;} 1008gallery=getGalleryID(instance);if(gallery&&gallery!==''){if(window.location.hash.indexOf(gallery)<0){instance.opts.origHash=window.location.hash;} 1009currentHash=gallery+(instance.group.length>1?'-'+(current.index+1):'');if('replaceState'in window.history){if(timerID){clearTimeout(timerID);} 1010timerID=setTimeout(function(){window.history[shouldCreateHistory?'pushState':'replaceState']({},document.title,window.location.pathname+window.location.search+'#'+currentHash);timerID=null;shouldCreateHistory=false;},300);}else{window.location.hash=currentHash;}}},'beforeClose.fb':function(e,instance,current){var gallery,origHash;if(timerID){clearTimeout(timerID);} 1011if(current.opts.hash===false){return;} 1012gallery=getGalleryID(instance);origHash=instance&&instance.opts.origHash?instance.opts.origHash:'';if(gallery&&gallery!==''){if('replaceState'in history){window.history.replaceState({},document.title,window.location.pathname+window.location.search+origHash);}else{window.location.hash=origHash;$(window).scrollTop(instance.scrollTop).scrollLeft(instance.scrollLeft);}} 1013currentHash=null;}});$(window).on('hashchange.fb',function(){var url=parseUrl();if($.fancybox.getInstance()){if(currentHash&¤tHash!==url.gallery+'-'+url.index&&!(url.index===1&¤tHash==url.gallery)){currentHash=null;$.fancybox.close();}}else if(url.gallery!==''){triggerFromUrl(url);}});setTimeout(function(){triggerFromUrl(parseUrl());},50);});}(document,window,window.jQuery||jQuery));;(function(document,$){'use strict';var prevTime=new Date().getTime();$(document).on({'onInit.fb':function(e,instance,current){instance.$refs.stage.on('mousewheel DOMMouseScroll wheel MozMousePixelScroll',function(e){var current=instance.current,currTime=new Date().getTime();if(instance.group.length<1||current.opts.wheel===false||(current.opts.wheel==='auto'&¤t.type!=='image')){return;} 1014e.preventDefault();e.stopPropagation();if(current.$slide.hasClass('fancybox-animated')){return;} 1015e=e.originalEvent||e;if(currTime-prevTime<250){return;} 1016prevTime=currTime;instance[(-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)<0?'next':'previous']();});}});}(document,window.jQuery||jQuery)); 1017/* End */ 1018; 1019; /* Start:"a:4:{s:4:"full";s:90:"/local/templates/fondpotanin/build/script/plugins/jquery.maskedinput.min.js?16939085025998";s:6:"source";s:75:"/local/templates/fondpotanin/build/script/plugins/jquery.maskedinput.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1020 1021!function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory("object"==typeof exports?require("jquery"):jQuery);}(function($){var caretTimeoutId,ua=navigator.userAgent,iPhone=/iphone/i.test(ua),chrome=/chrome/i.test(ua),android=/android/i.test(ua);$.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},$.fn.extend({caret:function(begin,end){var range;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof begin?(end="number"==typeof end?end:begin,this.each(function(){this.setSelectionRange?this.setSelectionRange(begin,end):this.createTextRange&&(range=this.createTextRange(),range.collapse(!0),range.moveEnd("character",end),range.moveStart("character",begin),range.select());})):(this[0].setSelectionRange?(begin=this[0].selectionStart,end=this[0].selectionEnd):document.selection&&document.selection.createRange&&(range=document.selection.createRange(),begin=0-range.duplicate().moveStart("character",-1e5),end=begin+range.text.length),{begin:begin,end:end});},unmask:function(){return this.trigger("unmask");},mask:function(mask,settings){var input,defs,tests,partialPosition,firstNonMaskPos,lastRequiredNonMaskPos,len,oldVal;if(!mask&&this.length>0){input=$(this[0]);var fn=input.data($.mask.dataName);return fn?fn():void 0;} 1022return settings=$.extend({autoclear:$.mask.autoclear,placeholder:$.mask.placeholder,completed:null},settings),defs=$.mask.definitions,tests=[],partialPosition=len=mask.length,firstNonMaskPos=null,$.each(mask.split(""),function(i,c){"?"==c?(len--,partialPosition=i):defs[c]?(tests.push(new RegExp(defs[c])),null===firstNonMaskPos&&(firstNonMaskPos=tests.length-1),partialPosition>i&&(lastRequiredNonMaskPos=tests.length-1)):tests.push(null);}),this.trigger("unmask").each(function(){function tryFireCompleted(){if(settings.completed){for(var i=firstNonMaskPos;lastRequiredNonMaskPos>=i;i++)if(tests[i]&&buffer[i]===getPlaceholder(i))return;settings.completed.call(input);}} 1023function getPlaceholder(i){return settings.placeholder.charAt(i<settings.placeholder.length?
1023i:0);} 1024function seekNext(pos){for(;++pos<len&&!tests[pos];);return pos;} 1025function seekPrev(pos){for(;--pos>=0&&!tests[pos];);return pos;} 1026function shiftL(begin,end){var i,j;if(!(0>begin)){for(i=begin,j=seekNext(end);len>i;i++)if(tests[i]){if(!(len>j&&tests[i].test(buffer[j])))break;buffer[i]=buffer[j],buffer[j]=getPlaceholder(j),j=seekNext(j);} 1027writeBuffer(),input.caret(Math.max(firstNonMaskPos,begin));}} 1028function shiftR(pos){var i,c,j,t;for(i=pos,c=getPlaceholder(pos);len>i;i++)if(tests[i]){if(j=seekNext(i),t=buffer[i],buffer[i]=c,!(len>j&&tests[j].test(t)))break;c=t;}} 1029function androidInputEvent(){var curVal=input.val(),pos=input.caret();if(oldVal&&oldVal.length&&oldVal.length>curVal.length){for(checkVal(!0);pos.begin>0&&!tests[pos.begin-1];)pos.begin--;if(0===pos.begin)for(;pos.begin<firstNonMaskPos&&!tests[pos.begin];)pos.begin++;input.caret(pos.begin,pos.begin);}else{for(checkVal(!0);pos.begin<len&&!tests[pos.begin];)pos.begin++;input.caret(pos.begin,pos.begin);} 1030tryFireCompleted();} 1031function blurEvent(){checkVal(),input.val()!=focusText&&input.change();} 1032function keydownEvent(e){if(!input.prop("readonly")){var pos,begin,end,k=e.which||e.keyCode;oldVal=input.val(),8===k||46===k||iPhone&&127===k?(pos=input.caret(),begin=pos.begin,end=pos.end,end-begin===0&&(begin=46!==k?seekPrev(begin):end=seekNext(begin-1),end=46===k?seekNext(end):end),clearBuffer(begin,end),shiftL(begin,end-1),e.preventDefault()):13===k?blurEvent.call(this,e):27===k&&(input.val(focusText),input.caret(0,checkVal()),e.preventDefault());}} 1033function keypressEvent(e){if(!input.prop("readonly")){var p,c,next,k=e.which||e.keyCode,pos=input.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||32>k)&&k&&13!==k){if(pos.end-pos.begin!==0&&(clearBuffer(pos.begin,pos.end),shiftL(pos.begin,pos.end-1)),p=seekNext(pos.begin-1),len>p&&(c=String.fromCharCode(k),tests[p].test(c))){if(shiftR(p),buffer[p]=c,writeBuffer(),next=seekNext(p),android){var proxy=function(){$.proxy($.fn.caret,input,next)();};setTimeout(proxy,0);}else input.caret(next);pos.begin<=lastRequiredNonMaskPos&&tryFireCompleted();} 1034e.preventDefault();}}} 1035function clearBuffer(start,end){var i;for(i=start;end>i&&len>i;i++)tests[i]&&(buffer[i]=getPlaceholder(i));} 1036function writeBuffer(){input.val(buffer.join(""));} 1037function checkVal(allow){var i,c,pos,test=input.val(),lastMatch=-1;for(i=0,pos=0;len>i;i++)if(tests[i]){for(buffer[i]=getPlaceholder(i);pos++<test.length;)if(c=test.charAt(pos-1),tests[i].test(c)){buffer[i]=c,lastMatch=i;break;} 1038if(pos>test.length){clearBuffer(i+1,len);break;}}else buffer[i]===test.charAt(pos)&&pos++,partialPosition>i&&(lastMatch=i);return allow?writeBuffer():partialPosition>lastMatch+1?settings.autoclear||buffer.join("")===defaultBuffer?(input.val()&&input.val(""),clearBuffer(0,len)):writeBuffer():(writeBuffer(),input.val(input.val().substring(0,lastMatch+1))),partialPosition?i:firstNonMaskPos;} 1039var input=$(this),buffer=$.map(mask.split(""),function(c,i){return"?"!=c?defs[c]?getPlaceholder(i):c:void 0;}),defaultBuffer=buffer.join(""),focusText=input.val();input.data($.mask.dataName,function(){return $.map(buffer,function(c,i){return tests[i]&&c!=getPlaceholder(i)?c:null;}).join("");}),input.one("unmask",function(){input.off(".mask").removeData($.mask.dataName);}).on("focus.mask",function(){if(!input.prop("readonly")){clearTimeout(caretTimeoutId);var pos;focusText=input.val(),pos=checkVal(),caretTimeoutId=setTimeout(function(){input.get(0)===document.activeElement&&(writeBuffer(),pos==mask.replace("?","").length?input.caret(0,pos):input.caret(pos));},10);}}).on("blur.mask",blurEvent).on("keydown.mask",keydownEvent).on("keypress.mask",keypressEvent).on("input.mask paste.mask",function(){input.prop("readonly")||setTimeout(function(){var pos=checkVal(!0);input.caret(pos),tryFireCompleted();},0);}),chrome&&android&&input.off("input.mask").on("input.mask",androidInputEvent),checkVal();});}});}); 1040/* End */ 1041; 1042; /* Start:"a:4:{s:4:"full";s:82:"/local/templates/fondpotanin/build/script/plugins/flatpickr.min.js?169390850245152";s:6:"source";s:66:"/local/templates/fondpotanin/build/script/plugins/flatpickr.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1043 1044!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.flatpickr=t()}(this,function(){"use strict";var X=function(e){return("0"+e).slice(-2)},ee=function(e){return!0===e?1:0};function te(n,a,i){var o;return void 0===i&&(i=!1),function(){var e=this,t=arguments;null!==o&&clearTimeout(o),o=window.setTimeout(function(){o=null,i||n.apply(e,t)},a),i&&!o&&n.apply(e,t)}}var ne=function(e){return e instanceof Array?e:[e]},e=function(){},ae=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},w={D:e,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*ee(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){var n=parseInt(t);return new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0)},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},ie={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"
1044(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},l={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[l.w(e,t,n)]},F:function(e,t,n){return ae(l.n(e,t,n)-1,!1,t)},G:function(e,t,n){return X(l.h(e,t,n))},H:function(e){return X(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[ee(11<e.getHours())]},M:function(e,t){return ae(e.getMonth(),!0,t)},S:function(e){return X(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return X(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return X(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return X(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},oe={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},re=function(e){var t=e.config,o=void 0===t?C:t,n=e.l10n,r=void 0===n?oe:n;return function(a,e,t){var i=t||r;return void 0!==o.formatDate?o.formatDate(a,e,i):e.split("").map(function(e,t,n){return l[e]&&"\\"!==n[t-1]?l[e](a,i,o):"\\"!==e?e:""}).join("")}},le=function(e){var t=e.config,D=void 0===t?C:t,n=e.l10n,b=void 0===n?oe:n;return function(e,t,n,a){if(0===e||e){var i,o=a||b,r=e;if(e instanceof Date)i=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)i=new Date(e);else if("string"==typeof e){var l=t||(D||C).dateFormat,c=String(e).trim();if("today"===c)i=new Date,n=!0;else if(/Z$/.test(c)||/GMT$/.test(c))i=new Date(e);else if(D&&D.parseDate)i=D.parseDate(e,l);else{i=D&&D.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,s=[],u=0,f=0,m="";u<l.length;u++){var g=l[u],p="\\"===g,h="\\"===l[u-1]||p;if(ie[g]&&!h){m+=ie[g];var v=new RegExp(m).exec(e);v&&(d=!0)&&s["Y"!==g?"push":"unshift"]({fn:w[g],val:v[++f]})}else p||(m+=".");s.forEach(function(e){var t=e.fn,n=e.val;return i=t(i,n,o)||i})}i=d?i:void 0}}if(i instanceof Date&&!isNaN(i.getTime()))return!0===n&&i.setHours(0,0,0,0),i;D.errorHandler(new Error("Invalid date provided: "+r))}}};function ce(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var de=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},se={DAY:864e5},ue=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],C={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewB
1044ox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function fe(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function me(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function ge(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function pe(e,t){var n=me("div","numInputWrapper"),a=me("input","numInput "+e),i=me("span","arrowUp"),o=me("span","arrowDown");if(a.type="text",a.pattern="\\d*",void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}"function"!=typeof Object.assign&&(Object.assign=function(n){if(!n)throw TypeError("Cannot convert undefined or null to object");for(var e=arguments.length,a=new Array(1<e?e-1:0),t=1;t<e;t++)a[t-1]=arguments[t];for(var i=function(){var t=a[o];t&&Object.keys(t).forEach(function(e){return n[e]=t[e]})},o=0;o<a.length;o++)i();return n});var he=300;function r(d,s){var h={config:Object.assign({},ve.defaultConfig),l10n:oe};function u(e){return e.bind(h)}function t(){var t=h.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(h.calendarContainer.style.visibility="hidden",h.calendarContainer.style.display="block",void 0!==h.daysContainer){var e=(h.days.offsetWidth+1)*t.showMonths;h.daysContainer.style.width=e+"px",h.calendarContainer.style.width=e+(void 0!==h.weekWrapper?h.weekWrapper.offsetWidth:0)+"px",h.calendarContainer.style.removeProperty("visibility"),h.calendarContainer.style.removeProperty("display")}})}function f(e){if(0!==h.selectedDates.length){void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==h.amPM&&e.target===h.amPM&&(h.amPM.textContent=h.l10n.amPM[ee(h.amPM.textContent===h.l10n.amPM[0])]);var a=parseFloat(n.getAttribute("data-min")),i=parseFloat(n.getAttribute("data-max")),o=parseFloat(n.getAttribute("data-step")),r=parseInt(n.value,10),l=e.delta||(t?38===e.which?1:-1:0),c=r+o*l;if(void 0!==n.value&&2===n.value.length){var d=n===h.hourElement,s=n===h.minuteElement;c<a?(c=i+c+ee(!d)+(ee(d)&&ee(!h.amPM)),s&&v(void 0,-1,h.hourElement)):i<c&&(c=n===h.hourElement?c-i-ee(!h.amPM):a,s&&v(void 0,1,h.hourElement)),h.amPM&&d&&(1===o?c+r===23:Math.abs(c-r)>o)&&(h.amPM.textContent=h.l10n.amPM[ee(h.amPM.textContent===h.l10n.amPM[0])]),n.value=X(c)}}(e);var t=h._input.value;m(),Z(),h._input.value!==t&&h._debouncedChange()}}function m(){if(void 0!==h.hourElement&&void 0!==h.minuteElement){var e,t,n=(parseInt(h.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(h.minuteElement.value,10)||0)%60,i=void 0!==h.secondElement?(parseInt(h.secondElement.value,10)||0)%60:0;void 0!==h.amPM&&(e=n,t=h.amPM.textContent,n=e%12+12*ee(t===h.l10n.amPM[1]));var o=void 0!==h.config.minTime||h.config.minDate&&h.minDateHasTime&&h.latestSelectedDateObj&&0===ce(h.latestSelectedDateObj,h.config.minDate,!0);if(void 0!==h.config.maxTime||h.config.maxDate&&h.maxDateHasTime&&h.latestSelectedDateObj&&0===ce(h.latestSelectedDateObj,h.config.maxDate,!0)){var r=void 0!==h.config.maxTime?h.config.maxTime:h.config.maxDate;(n=Math.min(n,r.getHours()))===r.getHours()&&(a=Math.min(a,r.getMinutes())),a===r.getMinutes()&&(i=Math.min(i,r.getSeconds()))}if(o){var l=void 0!==h.config.minTime?h.config.minTime:h.config.minDate;(n=Math.max(n,l.getHours()))===l.getHours()&&(a=Math.max(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.max(i,l.getSeconds()))}c(n,a,i)}}function i(e){var t=e||h.latestSelectedDateObj;t&&c(t.getHours(),t.getMinutes(),t.getSeconds())}function a(){var e=h.config.defaultHour,t=h.config.defaultMinute,n=h.config.defaultSeconds;if(void 0!==h.config.minDate){var a=h.config.minDate.getHours(),i=h.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=h.config.minDate.getSeconds())}if(void 0!==h.config.maxDate){var o=h.config.maxDate.getHours(),r=h.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(r,t)),e===o&&t===r&&(n=h.config.maxDate.getSeconds())}c(e,t,n)}
1044function c(e,t,n){void 0!==h.latestSelectedDateObj&&h.latestSelectedDateObj.setHours(e%24,t,n||0,0),h.hourElement&&h.minuteElement&&!h.isMobile&&(h.hourElement.value=X(h.config.time_24hr?e:(12+e)%12+12*ee(e%12==0)),h.minuteElement.value=X(t),void 0!==h.amPM&&(h.amPM.textContent=h.l10n.amPM[ee(12<=e)]),void 0!==h.secondElement&&(h.secondElement.value=X(n)))}function n(e){var t=parseInt(e.target.value)+(e.delta||0);(1<t/1e3||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&_(t)}function o(t,n,a,i){return n instanceof Array?n.forEach(function(e){return o(t,e,a,i)}):t instanceof Array?t.forEach(function(e){return o(e,n,a,i)}):(t.addEventListener(n,a,i),void h._handlers.push({element:t,event:n,handler:a,options:i}))}function r(t){return function(e){1===e.which&&t(e)}}function g(){q("onChange")}function l(e){var t=void 0!==e?h.parseDate(e):h.latestSelectedDateObj||(h.config.minDate&&h.config.minDate>h.now?h.config.minDate:h.config.maxDate&&h.config.maxDate<h.now?h.config.maxDate:h.now);try{void 0!==t&&(h.currentYear=t.getFullYear(),h.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,h.config.errorHandler(e)}h.redraw()}function p(e){~e.target.className.indexOf("arrow")&&v(e,e.target.classList.contains("arrowUp")?1:-1)}function v(e,t,n){var a=e&&e.target,i=n||a&&a.parentNode&&a.parentNode.firstChild,o=$("increment");o.delta=t,i&&i.dispatchEvent(o)}function D(e,t,n,a){var i,o=N(t,!0),r=me("span","flatpickr-day "+e,t.getDate().toString());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",h.formatDate(t,h.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===ce(t,h.now)&&((h.todayDateElem=r).classList.add("today"),r.setAttribute("aria-current","date")),o?(r.tabIndex=-1,z(t)&&(r.classList.add("selected"),h.selectedDateElem=r,"range"===h.config.mode&&(fe(r,"startRange",h.selectedDates[0]&&0===ce(t,h.selectedDates[0],!0)),fe(r,"endRange",h.selectedDates[1]&&0===ce(t,h.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("disabled"),"range"===h.config.mode&&(i=t,!("range"!==h.config.mode||h.selectedDates.length<2)&&0<=ce(i,h.selectedDates[0])&&ce(i,h.selectedDates[1])<=0&&!z(t)&&r.classList.add("inRange")),h.weekNumbers&&1===h.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&h.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+h.config.getWeek(t)+"</span>"),q("onDayCreate",r),r}function b(e){e.focus(),"range"===h.config.mode&&P(e)}function w(e){for(var t=0<e?0:h.config.showMonths-1,n=0<e?h.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=h.daysContainer.children[a],o=0<e?0:i.children.length-1,r=0<e?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&N(c.dateObj))return c}}function C(e,t){var n=F(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==h.selectedDateElem&&F(h.selectedDateElem)?h.selectedDateElem:void 0!==h.todayDateElem&&F(h.todayDateElem)?h.todayDateElem:w(0<t?1:-1);return void 0===a?h._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():h.currentMonth,a=0<t?h.config.showMonths:-1,i=0<t?1:-1,o=n-h.currentMonth;o!=a;o+=i)for(var r=h.daysContainer.children[o],l=n-h.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,c=r.children.length,d=l;0<=d&&d<c&&d!=(0<t?c:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf("hidden")&&N(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return b(s)}h.changeMonth(i),C(w(i),0)}(a,t):b(a)}function y(e,t){for(var n=(new Date(e,t,1).getDay()-h.l10n.firstDayOfWeek+7)%7,a=h.utils.getDaysInMonth((t-1+12)%12),i=h.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=1<h.config.showMonths,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",d=a+1-n,s=0;d<=a;d++,s++)o.appendChild(D(l,new Date(e,t-1,d),d,s));for(d=1;d<=i;d++,s++)o.appendChild(D("",new Date(e,t,d),d,s));for(var u=i+1;u<=42-n&&(1===h.config.showMonths||s%7!=0);u++,s++)o.appendChild(D(c,new Date(e,t+1,u%i),u,s));var f=me("div","dayContainer");return f.appendChild(o),f}function M(){if(void 0!==h.daysContainer){ge(h.daysContainer),h.weekNumbers&&ge(h.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<h.config.showMonths;t++){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),e.appendChild(y(n.getFullYear(),n.getMonth()))}h.daysContainer.appendChild(e),h.days=h.daysContainer.firstChild,"range"===h.config.mode&&1===h.selectedDates.length&&P()}}function x(){var e=me("div","flatpickr-month"),t=window.document.createDocumentFragment(),n=me("span","cur-month"),a=pe("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",h.l10n.yearAriaLabel),h.config.minDate&&i.setAttribute("data-min",h.config.minDate.getFullYear().toString()),h.config.maxDate&&(i.setAttribute("data-max",h.config.maxDate.getFullYear().toString()),i.disabled=!!h.config.minDate&&h.config.minDate.getFullYear()===h.config.maxDate.getFullYear());var o=me("div","flatpickr-current-month");return o.appendChild(n),o.appendChild(a),t.appendChild(o),e.appendChild(t),{container:e,yearElement:i,monthElement:n}}function E(){ge(h.monthNav),h.monthNav.appendChild(h.prevMonthNav);for(var e=h.config.showMonths;e--;){var t=x();h.yearElements.push(t.yearElement),h.monthElements.push(t.monthElement),h.monthNav.appendChild(t.container)}h.monthNav.appendChild(h.nextMonthNav)}function T(){h.weekdayContainer?ge(h.weekdayContainer):h.weekdayContainer=me("div","flatpickr-weekdays");for(var e=h.config.showMonths;e--;){var t=me("div","flatpickr-weekdaycontainer");h.weekdayContainer.appendChild(t)}return k(),h.weekdayContainer}function k(){var e=h.l10n.firstDayOfWeek,t=h.l10n.weekdays.shorthand.concat();
10440<e&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=h.config.showMonths;n--;)h.weekdayContainer.children[n].innerHTML="\n <span class=flatpickr-weekday>\n "+t.join("</span><span class=flatpickr-weekday>")+"\n </span>\n "}function I(e,t){void 0===t&&(t=!0);var n=t?e:e-h.currentMonth;n<0&&!0===h._hidePrevMonthArrow||0<n&&!0===h._hideNextMonthArrow||(h.currentMonth+=n,(h.currentMonth<0||11<h.currentMonth)&&(h.currentYear+=11<h.currentMonth?1:-1,h.currentMonth=(h.currentMonth+12)%12,q("onYearChange")),M(),q("onMonthChange"),G())}function O(e){return!(!h.config.appendTo||!h.config.appendTo.contains(e))||h.calendarContainer.contains(e)}function S(t){if(h.isOpen&&!h.config.inline){var e=O(t.target),n=t.target===h.input||t.target===h.altInput||h.element.contains(t.target)||t.path&&t.path.indexOf&&(~t.path.indexOf(h.input)||~t.path.indexOf(h.altInput)),a="blur"===t.type?n&&t.relatedTarget&&!O(t.relatedTarget):!n&&!e,i=!h.config.ignoredFocusElements.some(function(e){return e.contains(t.target)});a&&i&&(h.close(),"range"===h.config.mode&&1===h.selectedDates.length&&(h.clear(!1),h.redraw()))}}function _(e){if(!(!e||h.config.minDate&&e<h.config.minDate.getFullYear()||h.config.maxDate&&e>h.config.maxDate.getFullYear())){var t=e,n=h.currentYear!==t;h.currentYear=t||h.currentYear,h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth=Math.min(h.config.maxDate.getMonth(),h.currentMonth):h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&(h.currentMonth=Math.max(h.config.minDate.getMonth(),h.currentMonth)),n&&(h.redraw(),q("onYearChange"))}}function N(e,t){void 0===t&&(t=!0);var n=h.parseDate(e,void 0,t);if(h.config.minDate&&n&&ce(n,h.config.minDate,void 0!==t?t:!h.minDateHasTime)<0||h.config.maxDate&&n&&0<ce(n,h.config.maxDate,void 0!==t?t:!h.maxDateHasTime))return!1;if(0===h.config.enable.length&&0===h.config.disable.length)return!0;if(void 0===n)return!1;for(var a,i=0<h.config.enable.length,o=i?h.config.enable:h.config.disable,r=0;r<o.length;r++){if("function"==typeof(a=o[r])&&a(n))return i;if(a instanceof Date&&void 0!==n&&a.getTime()===n.getTime())return i;if("string"==typeof a&&void 0!==n){var l=h.parseDate(a,void 0,!0);return l&&l.getTime()===n.getTime()?i:!i}if("object"==typeof a&&void 0!==n&&a.from&&a.to&&n.getTime()>=a.from.getTime()&&n.getTime()<=a.to.getTime())return i}return!i}function F(e){return void 0!==h.daysContainer&&(-1===e.className.indexOf("hidden")&&h.daysContainer.contains(e))}function A(e){var t=e.target===h._input,n=h.config.allowInput,a=h.isOpen&&(!n||!t),i=h.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return h.setDate(h._input.value,!0,e.target===h.altInput?h.config.altFormat:h.config.dateFormat),e.target.blur();h.open()}else if(O(e.target)||a||i){var o=!!h.timeContainer&&h.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?f():B(e);break;case 27:e.preventDefault(),R();break;case 8:case 46:t&&!h.config.allowInput&&(e.preventDefault(),h.clear());break;case 37:case 39:if(o)h.hourElement&&h.hourElement.focus();else if(e.preventDefault(),void 0!==h.daysContainer&&(!1===n||F(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(I(r),C(w(1),0)):C(void 0,r)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;h.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(_(h.currentYear-l),C(w(1),0)):o||C(void 0,7*l):h.config.enableTime&&(!o&&h.hourElement&&h.hourElement.focus(),f(e),h._debouncedChange());break;case 9:if(!o){h.element.focus();break}var c=[h.hourElement,h.minuteElement,h.secondElement,h.amPM].filter(function(e){return e}),d=c.indexOf(e.target);if(-1!==d){var s=c[d+(e.shiftKey?-1:1)];void 0!==s?(e.preventDefault(),s.focus()):h.element.focus()}}}if(void 0!==h.amPM&&e.target===h.amPM)switch(e.key){case h.l10n.amPM[0].charAt(0):case h.l10n.amPM[0].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[0],m(),Z();break;case h.l10n.amPM[1].charAt(0):case h.l10n.amPM[1].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[1],m(),Z()}q("onKeyDown",e)}function P(o){if(1===h.selectedDates.length&&(!o||o.classList.contains("flatpickr-day")&&!o.classList.contains("disabled"))){for(var r=o?o.dateObj.getTime():h.days.firstElementChild.dateObj.getTime(),l=h.parseDate(h.selectedDates[0],void 0,!0).getTime(),e=Math.min(r,h.selectedDates[0].getTime()),t=Math.max(r,h.selectedDates[0].getTime()),n=h.daysContainer.lastChild.lastChild.dateObj.getTime(),c=!1,d=0,s=0,a=e;a<n;a+=se.DAY)N(new Date(a),!0)||(c=c||e<a&&a<t,a<l&&(!d||d<a)?d=a:l<a&&(!s||a<s)&&(s=a));for(var u=0;u<h.config.showMonths;u++)for(var f=h.daysContainer.children[u],m=h.daysContainer.children[u-1],i=function(e,t){var n=f.children[e],a=n.dateObj.getTime(),i=0<d&&a<d||0<s&&s<a;return i?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)}),"continue"):c&&!i?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void(void 0!==o&&(o.classList.add(r<h.selectedDates[0].getTime()?"startRange":"endRange"),!f.contains(o)&&0<u&&m&&m.lastChild.dateObj.getTime()>=a||(l<r&&a===l?n.classList.add("startRange"):r<l&&a===l&&n.classList.add("endRange"),d<=a&&(0===s||a<=s)&&de(a,l,r)&&n.classList.add("inRange")))))},g=0,p=f.children.length;g<p;g++)i(g)}}
1044function j(){!h.isOpen||h.config.static||h.config.inline||L()}function Y(a){return function(e){var t=h.config["_"+a+"Date"]=h.parseDate(e,h.config.dateFormat),n=h.config["_"+("min"===a?"max":"min")+"Date"];void 0!==t&&(h["min"===a?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),h.selectedDates&&(h.selectedDates=h.selectedDates.filter(function(e){return N(e)}),h.selectedDates.length||"min"!==a||i(t),Z()),h.daysContainer&&(W(),void 0!==t?h.currentYearElement[a]=t.getFullYear().toString():h.currentYearElement.removeAttribute(a),h.currentYearElement.disabled=!!n&&void 0!==t&&n.getFullYear()===t.getFullYear())}}function H(){"object"!=typeof h.config.locale&&void 0===ve.l10ns[h.config.locale]&&h.config.errorHandler(new Error("flatpickr: invalid locale "+h.config.locale)),h.l10n=Object.assign({},ve.l10ns.default,"object"==typeof h.config.locale?h.config.locale:"default"!==h.config.locale?ve.l10ns[h.config.locale]:void 0),ie.K="("+h.l10n.amPM[0]+"|"+h.l10n.amPM[1]+"|"+h.l10n.amPM[0].toLowerCase()+"|"+h.l10n.amPM[1].toLowerCase()+")",h.formatDate=re(h),h.parseDate=le({config:h.config,l10n:h.l10n})}function L(e){if(void 0!==h.calendarContainer){q("onPreCalendarPosition");var t=e||h._positionElement,n=Array.prototype.reduce.call(h.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=h.calendarContainer.offsetWidth,i=h.config.position.split(" "),o=i[0],r=1<i.length?i[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,d="above"===o||"below"!==o&&c<n&&l.top>n,s=window.pageYOffset+l.top+(d?-n-2:t.offsetHeight+2);if(fe(h.calendarContainer,"arrowTop",!d),fe(h.calendarContainer,"arrowBottom",d),!h.config.inline){var u=window.pageXOffset+l.left-(null!=r&&"center"===r?(a-l.width)/2:0),f=window.document.body.offsetWidth-l.right,m=u+a>window.document.body.offsetWidth;fe(h.calendarContainer,"rightMost",m),h.config.static||(h.calendarContainer.style.top=s+"px",m?(h.calendarContainer.style.left="auto",h.calendarContainer.style.right=f+"px"):(h.calendarContainer.style.left=u+"px",h.calendarContainer.style.right="auto"))}}}function W(){h.config.noCalendar||h.isMobile||(G(),M())}function R(){h._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(h.close,0):h.close()}function B(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,a=h.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<h.currentMonth||a.getMonth()>h.currentMonth+h.config.showMonths-1)&&"range"!==h.config.mode;if(h.selectedDateElem=n,"single"===h.config.mode)h.selectedDates=[a];else if("multiple"===h.config.mode){var o=z(a);o?h.selectedDates.splice(parseInt(o),1):h.selectedDates.push(a)}else"range"===h.config.mode&&(2===h.selectedDates.length&&h.clear(!1),h.selectedDates.push(a),0!==ce(a,h.selectedDates[0],!0)&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(m(),i){var r=h.currentYear!==a.getFullYear();h.currentYear=a.getFullYear(),h.currentMonth=a.getMonth(),r&&q("onYearChange"),q("onMonthChange")}if(G(),M(),Z(),h.config.enableTime&&setTimeout(function(){return h.showTimeInput=!0},50),i||"range"===h.config.mode||1!==h.config.showMonths?h.selectedDateElem&&h.selectedDateElem.focus():b(n),void 0!==h.hourElement&&setTimeout(function(){return void 0!==h.hourElement&&h.hourElement.select()},451),h.config.closeOnSelect){var l="single"===h.config.mode&&!h.config.enableTime,c="range"===h.config.mode&&2===h.selectedDates.length&&!h.config.enableTime;(l||c)&&R()}g()}}h.parseDate=le({config:h.config,l10n:h.l10n}),h._handlers=[],h._bind=o,h._setHoursFromDate=i,h._positionCalendar=L,h.changeMonth=I,h.changeYear=_,h.clear=function(e){void 0===e&&(e=!0);h.input.value="",void 0!==h.altInput&&(h.altInput.value="");void 0!==h.mobileInput&&(h.mobileInput.value="");h.selectedDates=[],h.latestSelectedDateObj=void 0,!(h.showTimeInput=!1)===h.config.enableTime&&a();h.redraw(),e&&q("onChange")},h.close=function(){h.isOpen=!1,h.isMobile||(h.calendarContainer.classList.remove("open"),h._input.classList.remove("active"));q("onClose")},h._createElement=me,h.destroy=function(){void 0!==h.config&&q("onDestroy");for(var e=h._handlers.length;e--;){var t=h._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(h._handlers=[],h.mobileInput)h.mobileInput.parentNode&&h.mobileInput.parentNode.removeChild(h.mobileInput),h.mobileInput=void 0;else if(h.calendarContainer&&h.calendarContainer.parentNode)if(h.config.static&&h.calendarContainer.parentNode){var n=h.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else h.calendarContainer.parentNode.removeChild(h.calendarContainer);h.altInput&&(h.input.type="text",h.altInput.parentNode&&h.altInput.parentNode.removeChild(h.altInput),delete h.altInput);h.input&&(h.input.type=h.input._type,h.input.classList.remove("flatpickr-input"),h.input.removeAttribute("readonly"),h.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","
1044isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete h[e]}catch(e){}})},h.isEnabled=N,h.jumpToDate=l,h.open=function(e,t){void 0===t&&(t=h._positionElement);if(!0===h.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==h.mobileInput&&(h.mobileInput.focus(),h.mobileInput.click()),void q("onOpen");if(h._input.disabled||h.config.inline)return;var n=h.isOpen;h.isOpen=!0,n||(h.calendarContainer.classList.add("open"),h._input.classList.add("active"),q("onOpen"),L(t));!0===h.config.enableTime&&!0===h.config.noCalendar&&(0===h.selectedDates.length&&(h.setDate(void 0!==h.config.minDate?new Date(h.config.minDate.getTime()):new Date,!1),a(),Z()),!1!==h.config.allowInput||void 0!==e&&h.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return h.hourElement.select()},50))},h.redraw=W,h.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(h.config,e):(h.config[e]=t,void 0!==K[e]?K[e].forEach(function(e){return e()}):-1<ue.indexOf(e)&&(h.config[e]=ne(t)));h.redraw(),l(),Z(!1)},h.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=h.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return h.clear(t);J(e,n),h.showTimeInput=0<h.selectedDates.length,h.latestSelectedDateObj=h.selectedDates[0],h.redraw(),l(),i(),Z(t),t&&q("onChange")},h.toggle=function(e){if(!0===h.isOpen)return h.close();h.open(e)};var K={locale:[H,k],showMonths:[E,t,T]};function J(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return h.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[h.parseDate(e,t)];else if("string"==typeof e)switch(h.config.mode){case"single":case"time":n=[h.parseDate(e,t)];break;case"multiple":n=e.split(h.config.conjunction).map(function(e){return h.parseDate(e,t)});break;case"range":n=e.split(h.l10n.rangeSeparator).map(function(e){return h.parseDate(e,t)})}else h.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));h.selectedDates=n.filter(function(e){return e instanceof Date&&N(e,!1)}),"range"===h.config.mode&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function U(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?h.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:h.parseDate(e.from,void 0),to:h.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function q(e,t){if(void 0!==h.config){var n=h.config[e];if(void 0!==n&&0<n.length)for(var a=0;n[a]&&a<n.length;a++)n[a](h.selectedDates,h.input.value,h,t);"onChange"===e&&(h.input.dispatchEvent($("change")),h.input.dispatchEvent($("input")))}}function $(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function z(e){for(var t=0;t<h.selectedDates.length;t++)if(0===ce(h.selectedDates[t],e))return""+t;return!1}function G(){h.config.noCalendar||h.isMobile||!h.monthNav||(h.yearElements.forEach(function(e,t){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),h.monthElements[t].textContent=ae(n.getMonth(),h.config.shorthandCurrentMonth,h.l10n)+" ",e.value=n.getFullYear().toString()}),h._hidePrevMonthArrow=void 0!==h.config.minDate&&(h.currentYear===h.config.minDate.getFullYear()?h.currentMonth<=h.config.minDate.getMonth():h.currentYear<h.config.minDate.getFullYear()),h._hideNextMonthArrow=void 0!==h.config.maxDate&&(h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth+1>h.config.maxDate.getMonth():h.currentYear>h.config.maxDate.getFullYear()))}function V(t){return h.selectedDates.map(function(e){return h.formatDate(e,t)}).filter(function(e,t,n){return"range"!==h.config.mode||h.config.enableTime||n.indexOf(e)===t}).join("range"!==h.config.mode?h.config.conjunction:h.l10n.rangeSeparator)}function Z(e){if(void 0===e&&(e=!0),0===h.selectedDates.length)return h.clear(e);void 0!==h.mobileInput&&h.mobileFormatStr&&(h.mobileInput.value=void 0!==h.latestSelectedDateObj?h.formatDate(h.latestSelectedDateObj,h.mobileFormatStr):""),h.input.value=V(h.config.dateFormat),void 0!==h.altInput&&(h.altInput.value=V(h.config.altFormat)),!1!==e&&q("onValueUpdate")}function Q(e){e.preventDefault();var t=h.prevMonthNav.contains(e.target),n=h.nextMonthNav.contains(e.target);t||n?I(t?-1:1):0<=h.yearElements.indexOf(e.target)?e.target.select():e.target.classList.contains("arrowUp")?h.changeYear(h.currentYear+1):e.target.classList.contains("arrowDown")&&h.changeYear(h.currentYear-1)}return function(){h.element=h.input=d,h.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},s,JSON.parse(JSON.stringify(d.dataset||{}))),n={};h.config.parseDate=t.parseDate,h.config.formatDate=t.formatDate,Object.defineProperty(h.config,"enable",{get:function(){return h.config._enable},set:function(e){h.config._enable=U(e)}}),Object.defineProperty(h.config,"disable",{get:function(){return h.config._disable},set:function(e){h.config._disable=U(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):ve.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):ve.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(h.config,"minDate",{get:function(){return h.config._minDate},set:Y("min")}),Object.defineProperty(h.config,"maxDate",{get:function(){return h.config._maxDate},set:Y("max")}
vendor: 5,300 bytes, line 1044
1044);var i=function(t){return function(e){h.config["min"===t?"_minTime":"_maxTime"]=h.parseDate(e,"H:i")}};Object.defineProperty(h.config,"minTime",{get:function(){return h.config._minTime},set:i("min")}),Object.defineProperty(h.config,"maxTime",{get:function(){return h.config._maxTime},set:i("max")}),"time"===t.mode&&(h.config.noCalendar=!0,h.config.enableTime=!0),Object.assign(h.config,n,t);for(var o=0;o<e.length;o++)h.config[e[o]]=!0===h.config[e[o]]||"true"===h.config[e[o]];ue.filter(function(e){return void 0!==h.config[e]}).forEach(function(e){h.config[e]=ne(h.config[e]||[]).map(u)}),h.isMobile=!h.config.disableMobile&&!h.config.inline&&"single"===h.config.mode&&!h.config.disable.length&&!h.config.enable.length&&!h.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var r=0;r<h.config.plugins.length;r++){var l=h.config.plugins[r](h)||{};for(var c in l)-1<ue.indexOf(c)?h.config[c]=ne(l[c]).map(u).concat(h.config[c]):void 0===t[c]&&(h.config[c]=l[c])}q("onParseConfig")}(),H(),function(){if(h.input=h.config.wrap?d.querySelector("[data-input]"):d,!h.input)return h.config.errorHandler(new Error("Invalid input element specified"));h.input._type=h.input.type,h.input.type="text",h.input.classList.add("flatpickr-input"),h._input=h.input,h.config.altInput&&(h.altInput=me(h.input.nodeName,h.input.className+" "+h.config.altInputClass),h._input=h.altInput,h.altInput.placeholder=h.input.placeholder,h.altInput.disabled=h.input.disabled,h.altInput.required=h.input.required,h.altInput.tabIndex=h.input.tabIndex,h.altInput.type="text",h.input.setAttribute("type","hidden"),!h.config.static&&h.input.parentNode&&h.input.parentNode.insertBefore(h.altInput,h.input.nextSibling)),h.config.allowInput||h._input.setAttribute("readonly","readonly"),h._positionElement=h.config.positionElement||h._input}(),function(){h.selectedDates=[],h.now=h.parseDate(h.config.now)||new Date;var e=h.config.defaultDate||("INPUT"!==h.input.nodeName&&"TEXTAREA"!==h.input.nodeName||!h.input.placeholder||h.input.value!==h.input.placeholder?h.input.value:null);e&&J(e,h.config.dateFormat);var t=0<h.selectedDates.length?h.selectedDates[0]:h.config.minDate&&h.config.minDate.getTime()>h.now.getTime()?h.config.minDate:h.config.maxDate&&h.config.maxDate.getTime()<h.now.getTime()?h.config.maxDate:h.now;h.currentYear=t.getFullYear(),h.currentMonth=t.getMonth(),0<h.selectedDates.length&&(h.latestSelectedDateObj=h.selectedDates[0]),void 0!==h.config.minTime&&(h.config.minTime=h.parseDate(h.config.minTime,"H:i")),void 0!==h.config.maxTime&&(h.config.maxTime=h.parseDate(h.config.maxTime,"H:i")),h.minDateHasTime=!!h.config.minDate&&(0<h.config.minDate.getHours()||0<h.config.minDate.getMinutes()||0<h.config.minDate.getSeconds()),h.maxDateHasTime=!!h.config.maxDate&&(0<h.config.maxDate.getHours()||0<h.config.maxDate.getMinutes()||0<h.config.maxDate.getSeconds()),Object.defineProperty(h,"showTimeInput",{get:function(){return h._showTimeInput},set:function(e){h._showTimeInput=e,h.calendarContainer&&fe(h.calendarContainer,"showTimeInput",e),h.isOpen&&L()}})}(),h.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=h.currentMonth),void 0===t&&(t=h.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:h.l10n.daysInMonth[e]}},h.isMobile||function(){var e=window.document.createDocumentFragment();if(h.calendarContainer=me("div","flatpickr-calendar"),h.calendarContainer.tabIndex=-1,!h.config.noCalendar){if(e.appendChild((h.monthNav=me("div","flatpickr-months"),h.yearElements=[],h.monthElements=[],h.prevMonthNav=me("span","flatpickr-prev-month"),h.prevMonthNav.innerHTML=h.config.prevArrow,h.nextMonthNav=me("span","flatpickr-next-month"),h.nextMonthNav.innerHTML=h.config.nextArrow,E(),Object.defineProperty(h,"_hidePrevMonthArrow",{get:function(){return h.__hidePrevMonthArrow},set:function(e){h.__hidePrevMonthArrow!==e&&(fe(h.prevMonthNav,"disabled",e),h.__hidePrevMonthArrow=e)}}),Object.defineProperty(h,"_hideNextMonthArrow",{get:function(){return h.__hideNextMonthArrow},set:function(e){h.__hideNextMonthArrow!==e&&(fe(h.nextMonthNav,"disabled",e),h.__hideNextMonthArrow=e)}}),h.currentYearElement=h.yearElements[0],G(),h.monthNav)),h.innerContainer=me("div","flatpickr-innerContainer"),h.config.weekNumbers){var t=function(){h.calendarContainer.classList.add("hasWeeks");var e=me("div","flatpickr-weekwrapper");e.appendChild(me("span","flatpickr-weekday",h.l10n.weekAbbreviation));var t=me("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;h.innerContainer.appendChild(n),h.weekNumbers=a,h.weekWrapper=n}h.rContainer=me("div","flatpickr-rContainer"),h.rContainer.appendChild(T()),h.daysContainer||(h.daysContainer=me("div","flatpickr-days"),h.daysContainer.tabIndex=-1),M(),h.rContainer.appendChild(h.daysContainer),h.innerContainer.appendChild(h.rContainer),e.appendChild(h.innerContainer)}h.config.enableTime&&e.appendChild(function(){h.calendarContainer.classList.add("hasTime"),h.config.noCalendar&&h.calendarContainer.classList.add("noCalendar"),h.timeContainer=me("div","flatpickr-time"),h.timeContainer.tabIndex=-1;var e=me("span","flatpickr-time-separator",":"),t=pe("flatpickr-hour");h.hourElement=t.getElementsByTagName("input")[0];var n=pe("flatpickr-minute");
1044if(h.minuteElement=n.getElementsByTagName("input")[0],h.hourElement.tabIndex=h.minuteElement.tabIndex=-1,h.hourElement.value=X(h.latestSelectedDateObj?h.latestSelectedDateObj.getHours():h.config.time_24hr?h.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(h.config.defaultHour)),h.minuteElement.value=X(h.latestSelectedDateObj?h.latestSelectedDateObj.getMinutes():h.config.defaultMinute),h.hourElement.setAttribute("data-step",h.config.hourIncrement.toString()),h.minuteElement.setAttribute("data-step",h.config.minuteIncrement.toString()),h.hourElement.setAttribute("data-min",h.config.time_24hr?"0":"1"),h.hourElement.setAttribute("data-max",h.config.time_24hr?"23":"12"),h.minuteElement.setAttribute("data-min","0"),h.minuteElement.setAttribute("data-max","59"),h.timeContainer.appendChild(t),h.timeContainer.appendChild(e),h.timeContainer.appendChild(n),h.config.time_24hr&&h.timeContainer.classList.add("time24hr"),h.config.enableSeconds){h.timeContainer.classList.add("hasSeconds");var a=pe("flatpickr-second");h.secondElement=a.getElementsByTagName("input")[0],h.secondElement.value=X(h.latestSelectedDateObj?h.latestSelectedDateObj.getSeconds():h.config.defaultSeconds),h.secondElement.setAttribute("data-step",h.minuteElement.getAttribute("data-step")),h.secondElement.setAttribute("data-min",h.minuteElement.getAttribute("data-min")),h.secondElement.setAttribute("data-max",h.minuteElement.getAttribute("data-max")),h.timeContainer.appendChild(me("span","flatpickr-time-separator",":")),h.timeContainer.appendChild(a)}return h.config.time_24hr||(h.amPM=me("span","flatpickr-am-pm",h.l10n.amPM[ee(11<(h.latestSelectedDateObj?h.hourElement.value:h.config.defaultHour))]),h.amPM.title=h.l10n.toggleTitle,h.amPM.tabIndex=-1,h.timeContainer.appendChild(h.amPM)),h.timeContainer}()),fe(h.calendarContainer,"rangeMode","range"===h.config.mode),fe(h.calendarContainer,"animate",!0===h.config.animate),fe(h.calendarContainer,"multiMonth",1<h.config.showMonths),h.calendarContainer.appendChild(e);var i=void 0!==h.config.appendTo&&void 0!==h.config.appendTo.nodeType;if((h.config.inline||h.config.static)&&(h.calendarContainer.classList.add(h.config.inline?"inline":"static"),h.config.inline&&(!i&&h.element.parentNode?h.element.parentNode.insertBefore(h.calendarContainer,h._input.nextSibling):void 0!==h.config.appendTo&&h.config.appendTo.appendChild(h.calendarContainer)),h.config.static)){var o=me("div","flatpickr-wrapper");h.element.parentNode&&h.element.parentNode.insertBefore(o,h.element),o.appendChild(h.element),h.altInput&&o.appendChild(h.altInput),o.appendChild(h.calendarContainer)}h.config.static||h.config.inline||(void 0!==h.config.appendTo?h.config.appendTo:window.document.body).appendChild(h.calendarContainer)}(),function(){if(h.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(h.element.querySelectorAll("[data-"+t+"]"),function(e){return o(e,"click",h[t])})}),h.isMobile)return function(){var e=h.config.enableTime?h.config.noCalendar?"time":"datetime-local":"date";h.mobileInput=me("input",h.input.className+" flatpickr-mobile"),h.mobileInput.step=h.input.getAttribute("step")||"any",h.mobileInput.tabIndex=1,h.mobileInput.type=e,h.mobileInput.disabled=h.input.disabled,h.mobileInput.required=h.input.required,h.mobileInput.placeholder=h.input.placeholder,h.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",0<h.selectedDates.length&&(h.mobileInput.defaultValue=h.mobileInput.value=h.formatDate(h.selectedDates[0],h.mobileFormatStr)),h.config.minDate&&(h.mobileInput.min=h.formatDate(h.config.minDate,"Y-m-d")),h.config.maxDate&&(h.mobileInput.max=h.formatDate(h.config.maxDate,"Y-m-d")),h.input.type="hidden",void 0!==h.altInput&&(h.altInput.type="hidden");try{h.input.parentNode&&h.input.parentNode.insertBefore(h.mobileInput,h.input.nextSibling)}catch(e){}o(h.mobileInput,"change",function(e){h.setDate(e.target.value,!1,h.mobileFormatStr),q("onChange"),q("onClose")})}();var e=te(j,50);h._debouncedChange=te(g,he),h.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&o(h.daysContainer,"mouseover",function(e){"range"===h.config.mode&&P(e.target)}),o(window.document.body,"keydown",A),h.config.static||o(h._input,"keydown",A),h.config.inline||h.config.static||o(window,"resize",e),void 0!==window.ontouchstart?o(window.document,"click",S):o(window.document,"mousedown",r(S)),o(window.document,"focus",S,{capture:!0}),!0===h.config.clickOpens&&(o(h._input,"focus",h.open),o(h._input,"mousedown",r(h.open))),void 0!==h.daysContainer&&(o(h.monthNav,"mousedown",r(Q)),o(h.monthNav,["keyup","increment"],n),o(h.daysContainer,"mousedown",r(B))),void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&(o(h.timeContainer,["increment"],f),o(h.timeContainer,"blur",f,{capture:!0}),o(h.timeContainer,"mousedown",r(p)),o([h.hourElement,h.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==h.secondElement&&o(h.secondElement,"focus",function(){return h.secondElement&&h.secondElement.select()}),void 0!==h.amPM&&o(h.amPM,"mousedown",r(function(e){f(e),g()})))}(),(h.selectedDates.length||h.config.noCalendar)&&(h.config.enableTime&&i(h.config.noCalendar?h.latestSelectedDateObj||h.
1044config.minDate:void 0),Z(!1)),t(),h.showTimeInput=0<h.selectedDates.length||h.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!h.isMobile&&e&&L(),q("onReady")}(),h}function n(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++){var o=n[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=r(o,t||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return n(this,e)},HTMLElement.prototype.flatpickr=function(e){return n([this],e)});var ve=function(e,t){return e instanceof NodeList?n(e,t):n("string"==typeof e?window.document.querySelectorAll(e):[e],t)};return ve.defaultConfig=C,ve.l10ns={en:Object.assign({},oe),default:Object.assign({},oe)},ve.localize=function(e){ve.l10ns.default=Object.assign({},ve.l10ns.default,e)},ve.setDefaults=function(e){ve.defaultConfig=Object.assign({},ve.defaultConfig,e)},ve.parseDate=le({}),ve.formatDate=re({}),ve.compareDates=ce,"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return n(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=ve),ve}); 1045/* End */ 1046; 1047; /* Start:"a:4:{s:4:"full";s:86:"/local/templates/fondpotanin/build/script/plugins/select2.full.min.js?1693908502106005";s:6:"source";s:69:"/local/templates/fondpotanin/build/script/plugins/select2.full.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1048 1049(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');} 1050else{jQuery=require('jquery')(root);}} 1051factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function(jQuery){var S2=(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){var S2=jQuery.fn.select2.amd;} 1052var S2;(function(){if(!S2||!S2.requirejs){if(!S2){S2={};}else{require=S2;} 1053var requirejs,require,define;(function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop);} 1054function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=(map&&map['*'])||{};if(name){name=name.split('/');lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,'');} 1055if(name[0].charAt(0)==='.'&&baseParts){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=normalizedBaseParts.concat(name);} 1056for(i=0;i<name.length;i++){part=name[i];if(part==='.'){name.splice(i,1);i-=1;}else if(part==='..'){if(i===0||(i===1&&name[2]==='..')||name[i-1]==='..'){continue;}else if(i>0){name.splice(i-1,2);i-=2;}}} 1057name=name.join('/');} 1058if((baseParts||starMap)&&map){nameParts=name.split('/');for(i=nameParts.length;i>0;i-=1){nameSegment=nameParts.slice(0,i).join("/");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join('/')];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i;break;}}}} 1059if(foundMap){break;} 1060if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i;}} 1061if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI;} 1062if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join('/');}} 1063return name;} 1064function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!=='string'&&args.length===1){args.push(null);} 1065return req.apply(undef,args.concat([relName,forceSync]));};} 1066function makeNormalize(relName){return function(name){return normalize(name,relName);};} 1067function makeLoad(depName){return function(value){defined[depName]=value;};} 1068function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];
vendor: 34,526 bytes, lines 1068-1171
1068defining[name]=true;main.apply(undef,args);} 1069if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error('No '+name);} 1070return defined[name];} 1071function splitPrefix(name){var prefix,index=name?name.indexOf('!'):-1;if(index>-1){prefix=name.substring(0,index);name=name.substring(index+1,name.length);} 1072return[prefix,name];} 1073function makeRelParts(relName){return relName?splitPrefix(relName):[];} 1074makeMap=function(name,relParts){var plugin,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];name=parts[1];if(prefix){prefix=normalize(prefix,relResourceName);plugin=callDep(prefix);} 1075if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relResourceName));}else{name=normalize(name,relResourceName);}}else{name=normalize(name,relResourceName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix);}} 1076return{f:prefix?prefix+'!'+name:name,n:name,pr:prefix,p:plugin};};function makeConfig(name){return function(){return(config&&config.config&&config.config[name])||{};};} 1077handlers={require:function(name){return makeRequire(name);},exports:function(name){var e=defined[name];if(typeof e!=='undefined'){return e;}else{return(defined[name]={});}},module:function(name){return{id:name,uri:'',exports:defined[name],config:makeConfig(name)};}};main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,relParts,args=[],callbackType=typeof callback,usingExports;relName=relName||name;relParts=makeRelParts(relName);if(callbackType==='undefined'||callbackType==='function'){deps=!deps.length&&callback.length?['require','exports','module']:deps;for(i=0;i<deps.length;i+=1){map=makeMap(deps[i],relParts);depName=map.f;if(depName==="require"){args[i]=handlers.require(name);}else if(depName==="exports"){args[i]=handlers.exports(name);usingExports=true;}else if(depName==="module"){cjsModule=args[i]=handlers.module(name);}else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName)){args[i]=callDep(depName);}else if(map.p){map.p.load(map.n,makeRequire(relName,true),makeLoad(depName),{});args[i]=defined[depName];}else{throw new Error(name+' missing '+depName);}} 1078ret=callback?callback.apply(defined[name],args):undefined;if(name){if(cjsModule&&cjsModule.exports!==undef&&cjsModule.exports!==defined[name]){defined[name]=cjsModule.exports;}else if(ret!==undef||!usingExports){defined[name]=ret;}}}else if(name){defined[name]=callback;}};requirejs=require=req=function(deps,callback,relName,forceSync,alt){if(typeof deps==="string"){if(handlers[deps]){return handlers[deps](callback);} 1079return callDep(makeMap(deps,makeRelParts(callback)).f);}else if(!deps.splice){config=deps;if(config.deps){req(config.deps,config.callback);} 1080if(!callback){return;} 1081if(callback.splice){deps=callback;callback=relName;relName=null;}else{deps=undef;}} 1082callback=callback||function(){};if(typeof relName==='function'){relName=forceSync;forceSync=alt;} 1083if(forceSync){main(undef,deps,callback,relName);}else{setTimeout(function(){main(undef,deps,callback,relName);},4);} 1084return req;};req.config=function(cfg){return req(cfg);};requirejs._defined=defined;define=function(name,deps,callback){if(typeof name!=='string'){throw new Error('See almond README: incorrect module build, no module name');} 1085if(!deps.splice){callback=deps;deps=[];} 1086if(!hasProp(defined,name)&&!hasProp(waiting,name)){waiting[name]=[name,deps,callback];}};define.amd={jQuery:true};}());S2.requirejs=requirejs;S2.require=require;S2.define=define;}}());S2.define("almond",function(){});S2.define('jquery',[],function(){var _$=jQuery||$;if(_$==null&&console&&console.error){console.error('Select2: An instance of jQuery or a jQuery-compatible library was not '+'found. Make sure that you are including jQuery before Select2 on your '+'web page.');} 1087return _$;});S2.define('select2/utils',['jquery'],function($){var Utils={};Utils.Extend=function(ChildClass,SuperClass){var __hasProp={}.hasOwnProperty;function BaseConstructor(){this.constructor=ChildClass;} 1088for(var key in SuperClass){if(__hasProp.call(SuperClass,key)){ChildClass[key]=SuperClass[key];}} 1089BaseConstructor.prototype=SuperClass.prototype;ChildClass.prototype=new BaseConstructor();ChildClass.__super__=SuperClass.prototype;return ChildClass;};function getMethods(theClass){var proto=theClass.prototype;var methods=[];for(var methodName in proto){var m=proto[methodName];if(typeof m!=='function'){continue;} 1090if(methodName==='constructor'){continue;} 1091methods.push(methodName);} 1092return methods;} 1093Utils.Decorate=function(SuperClass,DecoratorClass){var decoratedMethods=getMethods(DecoratorClass);var superMethods=getMethods(SuperClass);function DecoratedClass(){var unshift=Array.prototype.unshift;var argCount=DecoratorClass.prototype.constructor.length;var calledConstructor=SuperClass.prototype.constructor;if(argCount>0){unshift.call(arguments,SuperClass.prototype.constructor);calledConstructor=DecoratorClass.prototype.constructor;} 1094calledConstructor.apply(this,arguments);} 1095DecoratorClass.displayName=SuperClass.displayName;function ctr(){this.constructor=DecoratedClass;} 1096DecoratedClass.prototype=new ctr();for(var m=0;m<superMethods.length;m++){var superMethod=superMethods[m];DecoratedClass.prototype[superMethod]=SuperClass.prototype[superMethod];} 1097var calledMethod=function(methodName){var originalMethod=function(){};if(methodName in DecoratedClass.prototype){originalMethod=DecoratedClass.prototype[methodName];} 1098var decoratedMethod=DecoratorClass.prototype[methodName];return function(){var unshift=Array.prototype.unshift;unshift.call(arguments,originalMethod);return decoratedMethod.apply(this,arguments);};};for(var d=0;d<decoratedMethods.length;d++){var decoratedMethod=decoratedMethods[d];DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod);} 1099return DecoratedClass;};var Observable=function(){this.listeners={};};Observable.prototype.on=function(event,callback){this.listeners=this.listeners||{};if(event in this.listeners){this.listeners[event].push(callback);}else{this.listeners[event]=[callback];}};Observable.prototype.trigger=function(event){var slice=Array.prototype.slice;var params=slice.call(arguments,1);this.listeners=this.listeners||{};if(params==null){params=[];} 1100if(params.length===0){params.push({});} 1101params[0]._type=event;if(event in this.listeners){this.invoke(this.listeners[event],slice.call(arguments,1));} 1102if('*'in this.listeners){this.invoke(this.listeners['*'],arguments);}};Observable.prototype.invoke=function(listeners,params){for(var i=0,len=listeners.length;i<len;i++){listeners[i].apply(this,params);}};Utils.Observable=Observable;Utils.generateChars=function(length){var chars='';for(var i=0;i<length;i++){var randomChar=Math.floor(Math.random()*36);chars+=randomChar.toString(36);} 1103return chars;};Utils.bind=function(func,context){return function(){func.apply(context,arguments);};};Utils._convertData=function(data){for(var originalKey in data){var keys=originalKey.split('-');var dataLevel=data;if(keys.length===1){continue;} 1104for(var k=0;k<keys.length;k++){var key=keys[k];key=key.substring(0,1).toLowerCase()+key.substring(1);if(!(key in dataLevel)){dataLevel[key]={};} 1105if(k==keys.length-1){dataLevel[key]=data[originalKey];} 1106dataLevel=dataLevel[key];} 1107delete data[originalKey];} 1108return data;};Utils.hasScroll=function(index,el){var $el=$(el);var overflowX=el.style.overflowX;var overflowY=el.style.overflowY;if(overflowX===overflowY&&(overflowY==='hidden'||overflowY==='visible')){return false;} 1109if(overflowX==='scroll'||overflowY==='scroll'){return true;} 1110return($el.innerHeight()<el.scrollHeight||$el.innerWidth()<el.scrollWidth);};Utils.escapeMarkup=function(markup){var replaceMap={'\\':'\','&':'&','<':'<','>':'>','"':'"','\'':''','/':'/'};if(typeof markup!=='string'){return markup;} 1111return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replaceMap[match];});};Utils.appendMany=function($element,$nodes){if($.fn.jquery.substr(0,3)==='1.7'){var $jqNodes=$();$.map($nodes,function(node){$jqNodes=$jqNodes.add(node);});$nodes=$jqNodes;} 1112$element.append($nodes);};return Utils;});S2.define('select2/results',['jquery','./utils'],function($,Utils){function Results($element,options,dataAdapter){this.$element=$element;this.data=dataAdapter;this.options=options;Results.__super__.constructor.call(this);} 1113Utils.Extend(Results,Utils.Observable);Results.prototype.render=function(){var $results=$('<ul class="select2-results__options" role="tree"></ul>');if(this.options.get('multiple')){$results.attr('aria-multiselectable','true');} 1114this.$results=$results;return $results;};Results.prototype.clear=function(){this.$results.empty();};Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get('escapeMarkup');this.clear();this.hideLoading();var $message=$('<li role="treeitem" aria-live="assertive"'+' class="select2-results__option"></li>');var message=this.options.get('translations').get(params.message);$message.append(escapeMarkup(message(params.args)));$message[0].className+=' select2-results__message';this.$results.append($message);};Results.prototype.hideMessages=function(){this.$results.find('.select2-results__message').remove();};Results.prototype.append=function(data){this.hideLoading();var $options=[];if(data.results==null||data.results.length===0){if(this.$results.children().length===0){this.trigger('results:message',{message:'noResults'});} 1115return;} 1116data.results=this.sort(data.results);for(var d=0;d<data.results.length;d++){var item=data.results[d];var $option=this.option(item);$options.push($option);} 1117this.$results.append($options);};Results.prototype.position=function($results,$dropdown){var $resultsContainer=$dropdown.find('.select2-results');$resultsContainer.append($results);};Results.prototype.sort=function(data){var sorter=this.options.get('sorter');return sorter(data);};Results.prototype.highlightFirstItem=function(){var $options=this.$results.find('.select2-results__option[aria-selected]');var $selected=$options.filter('[aria-selected=true]');if($selected.length>0){$selected.first().trigger('mouseenter');}else{$options.first().trigger('mouseenter');} 1118this.ensureHighlightVisible();};Results.prototype.setClasses=function(){var self=this;this.data.current(function(selected){var selectedIds=$.map(selected,function(s){return s.id.toString();});var $options=self.$results.find('.select2-results__option[aria-selected]');$options.each(function(){var $option=$(this);var item=$.data(this,'data');var id=''+item.id;if((item.element!=null&&item.element.selected)||(item.element==null&&$.inArray(id,selectedIds)>-1)){$option.attr('aria-selected','true');}else{$option.attr('aria-selected','false');}});});};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get('translations').get('searching');var loading={disabled:true,loading:true,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=' loading-results';this.$results.prepend($loading);};Results.prototype.hideLoading=function(){this.$results.find('.loading-results').remove();};Results.prototype.option=function(data){var option=document.createElement('li');option.className='select2-results__option';var attrs={'role':'treeitem','aria-selected':'false'};if(data.disabled){delete attrs['aria-selected'];attrs['aria-disabled']='true';} 1119if(data.id==null){delete attrs['aria-selected'];} 1120if(data._resultId!=null){option.id=data._resultId;} 1121if(data.title){option.title=data.title;} 1122if(data.children){attrs.role='group';attrs['aria-label']=data.text;delete attrs['aria-selected'];} 1123for(var attr in attrs){var val=attrs[attr];option.setAttribute(attr,val);} 1124if(data.children){var $option=$(option);var label=document.createElement('strong');label.className='select2-results__group';var $label=$(label);this.template(data,label);var $children=[];for(var c=0;c<data.children.length;c++){var child=data.children[c];var $child=this.option(child);$children.push($child);} 1125var $childrenContainer=$('<ul></ul>',{'class':'select2-results__options select2-results__options--nested'});$childrenContainer.append($children);$option.append(label);$option.append($childrenContainer);}else{this.template(data,option);} 1126$.data(option,'data',data);return option;};Results.prototype.bind=function(container,$container){var self=this;var id=container.id+'-results';this.$results.attr('id',id);container.on('results:all',function(params){self.clear();self.append(params.data);if(container.isOpen()){self.setClasses();self.highlightFirstItem();}});container.on('results:append',function(params){self.append(params.data);if(container.isOpen()){self.setClasses();}});container.on('query',function(params){self.hideMessages();self.showLoading(params);});container.on('select',function(){if(!container.isOpen()){return;} 1127self.setClasses();self.highlightFirstItem();});container.on('unselect',function(){if(!container.isOpen()){return;} 1128self.setClasses();self.highlightFirstItem();});container.on('open',function(){self.$results.attr('aria-expanded','true');self.$results.attr('aria-hidden','false');self.setClasses();self.ensureHighlightVisible();});container.on('close',function(){self.$results.attr('aria-expanded','false');self.$results.attr('aria-hidden','true');self.$results.removeAttr('aria-activedescendant');});container.on('results:toggle',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return;} 1129$highlighted.trigger('mouseup');});container.on('results:select',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return;} 1130var data=$highlighted.data('data');if($highlighted.attr('aria-selected')=='true'){self.trigger('close',{});}else{self.trigger('select',{data:data});}});container.on('results:previous',function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);if(currentIndex===0){return;} 1131var nextIndex=currentIndex-1;if($highlighted.length===0){nextIndex=0;} 1132var $next=$options.eq(nextIndex);$next.trigger('mouseenter');var currentOffset=self.$results.offset().top;var nextTop=$next.offset().top;var nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);if(nextIndex===0){self.$results.scrollTop(0);}else if(nextTop-currentOffset<0){self.$results.scrollTop(nextOffset);}});container.on('results:next',function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);var nextIndex=currentIndex+1;if(nextIndex>=$options.length){return;} 1133var $next=$options.eq(nextIndex);$next.trigger('mouseenter');var currentOffset=self.$results.offset().top+ 1134self.$results.outerHeight(false);var nextBottom=$next.offset().top+$next.outerHeight(false);var nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;if(nextIndex===0){self.$results.scrollTop(0);}else if(nextBottom>currentOffset){self.$results.scrollTop(nextOffset);}});container.on('results:focus',function(params){params.element.addClass('select2-results__option--highlighted');});container.on('results:message',function(params){self.displayMessage(params);});if($.fn.mousewheel){this.$results.on('mousewheel',function(e){var top=self.$results.scrollTop();var bottom=self.$results.get(0).scrollHeight-top+e.deltaY;var isAtTop=e.deltaY>0&&top-e.deltaY<=0;var isAtBottom=e.deltaY<0&&bottom<=self.$results.height();if(isAtTop){self.$results.scrollTop(0);e.preventDefault();e.stopPropagation();}else if(isAtBottom){self.$results.scrollTop(self.$results.get(0).scrollHeight-self.$results.height());e.preventDefault();e.stopPropagation();}});} 1135this.$results.on('mouseup','.select2-results__option[aria-selected]',function(evt){var $this=$(this);var data=$this.data('data');if($this.attr('aria-selected')==='true'){if(self.options.get('multiple')){self.trigger('unselect',{originalEvent:evt,data:data});}else{self.trigger('close',{});} 1136return;} 1137self.trigger('select',{originalEvent:evt,data:data});});this.$results.on('mouseenter','.select2-results__option[aria-selected]',function(evt){var data=$(this).data('data');self.getHighlightedResults().removeClass('select2-results__option--highlighted');self.trigger('results:focus',{data:data,element:$(this)});});};Results.prototype.getHighlightedResults=function(){var $highlighted=this.$results.find('.select2-results__option--highlighted');return $highlighted;};Results.prototype.destroy=function(){this.$results.remove();};Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if($highlighted.length===0){return;} 1138var $options=this.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);var currentOffset=this.$results.offset().top;var nextTop=$highlighted.offset().top;var nextOffset=this.$results.scrollTop()+(nextTop-currentOffset);var offsetDelta=nextTop-currentOffset;nextOffset-=$highlighted.outerHeight(false)*2;if(currentIndex<=2){this.$results.scrollTop(0);}else if(offsetDelta>this.$results.outerHeight()||offsetDelta<0){this.$results.scrollTop(nextOffset);}};Results.prototype.template=function(result,container){var template=this.options.get('templateResult');var escapeMarkup=this.options.get('escapeMarkup');var content=template(result,container);if(content==null){container.style.display='none';}else if(typeof content==='string'){container.innerHTML=escapeMarkup(content);}else{$(container).append(content);}};return Results;});S2.define('select2/keys',[],function(){var KEYS={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return KEYS;});S2.define('select2/selection/base',['jquery','../utils','../keys'],function($,Utils,KEYS){function BaseSelection($element,options){this.$element=$element;this.options=options;BaseSelection.__super__.constructor.call(this);} 1139Utils.Extend(BaseSelection,Utils.Observable);BaseSelection.prototype.render=function(){var $selection=$('<span class="select2-selection" role="combobox" '+' aria-haspopup="true" aria-expanded="false">'+'</span>');this._tabindex=0;if(this.$element.data('old-tabindex')!=null){this._tabindex=this.$element.data('old-tabindex');}else if(this.$element.attr('tabindex')!=null){this._tabindex=this.$element.attr('tabindex');} 1140$selection.attr('title',this.$element.attr('title'));$selection.attr('tabindex',this._tabindex);this.$selection=$selection;return $selection;};BaseSelection.prototype.bind=function(container,$container){var self=this;var id=container.id+'-container';var resultsId=container.id+'-results';this.container=container;this.$selection.on('focus',function(evt){self.trigger('focus',evt);});this.$selection.on('blur',function(evt){self._handleBlur(evt);});this.$selection.on('keydown',function(evt){self.trigger('keypress',evt);if(evt.which===KEYS.SPACE){evt.preventDefault();}});container.on('results:focus',function(params){self.$selection.attr('aria-activedescendant',params.data._resultId);});container.on('selection:update',function(params){self.update(params.data);});container.on('open',function(){self.$selection.attr('aria-expanded','true');self.$selection.attr('aria-owns',resultsId);self._attachCloseHandler(container);});container.on('close',function(){self.$selection.attr('aria-expanded','false');self.$selection.removeAttr('aria-activedescendant');self.$selection.removeAttr('aria-owns');self.$selection.focus();self._detachCloseHandler(container);});container.on('enable',function(){self.$selection.attr('tabindex',self._tabindex);});container.on('disable',function(){self.$selection.attr('tabindex','-1');});};BaseSelection.prototype._handleBlur=function(evt){var self=this;window.setTimeout(function(){if((document.activeElement==self.$selection[0])||($.contains(self.$selection[0],document.activeElement))){return;} 1141self.trigger('blur',evt);},1);};BaseSelection.prototype._attachCloseHandler=function(container){var self=this;$(document.body).on('mousedown.select2.'+container.id,function(e){var $target=$(e.target);var $select=$target.closest('.select2');var $all=$('.select2.select2-container--open');$all.each(function(){var $this=$(this);if(this==$select[0]){return;} 1142var $element=$this.data('element');$element.select2('close');});});};BaseSelection.prototype._detachCloseHandler=function(container){$(document.body).off('mousedown.select2.'+container.id);};BaseSelection.prototype.position=function($selection,$container){var $selectionContainer=$container.find('.selection');$selectionContainer.append($selection);};BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container);};BaseSelection.prototype.update=function(data){throw new Error('The `update` method must be defined in child classes.');};return BaseSelection;});S2.define('select2/selection/single',['jquery','./base','../utils','../keys'],function($,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments);} 1143Utils.Extend(SingleSelection,BaseSelection);SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);$selection.addClass('select2-selection--single');$selection.html('<span class="select2-selection__rendered"></span>'+'<span class="select2-selection__arrow" role="presentation">'+'<b role="presentation"></b>'+'</span>');return $selection;};SingleSelection.prototype.bind=function(container,$container){var self=this;SingleSelection.__super__.bind.apply(this,arguments);var id=container.id+'-container';this.$selection.find('.select2-selection__rendered').attr('id',id);this.$selection.attr('aria-labelledby',id);this.$selection.on('mousedown',function(evt){if(evt.which!==1){return;} 1144self.trigger('toggle',{originalEvent:evt});});this.$selection.on('focus',function(evt){});this.$selection.on('blur',function(evt){});container.on('focus',function(evt){if(!container.isOpen()){self.$selection.focus();}});container.on('selection:update',function(params){self.update(params.data);});};SingleSelection.prototype.clear=function(){this.$selection.find('.select2-selection__rendered').empty();};SingleSelection.prototype.display=function(data,container){var template=this.options.get('templateSelection');var escapeMarkup=this.options.get('escapeMarkup');return escapeMarkup(template(data,container));};SingleSelection.prototype.selectionContainer=function(){return $('<span></span>');};SingleSelection.prototype.update=function(data){if(data.length===0){this.clear();return;} 1145var selection=data[0];var $rendered=this.$selection.find('.select2-selection__rendered');var formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);$rendered.prop('title',selection.title||selection.text);};return SingleSelection;});S2.define('select2/selection/multiple',['jquery','./base','../utils'],function($,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments);} 1146Utils.Extend(MultipleSelection,BaseSelection);MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);$selection.addClass('select2-selection--multiple');$selection.html('<ul class="select2-selection__rendered"></ul>');return $selection;};MultipleSelection.prototype.bind=function(container,$container){var self=this;MultipleSelection.__super__.bind.apply(this,arguments);this.$selection.on('click',function(evt){self.trigger('toggle',{originalEvent:evt});});this.$selection.on('click','.select2-selection__choice__remove',function(evt){if(self.options.get('disabled')){return;} 1147var $remove=$(this);var $selection=$remove.parent();var data=$selection.data('data');self.trigger('unselect',{originalEvent:evt,data:data});});};MultipleSelection.prototype.clear=function(){this.$selection.find('.select2-selection__rendered').empty();};MultipleSelection.prototype.display=function(data,container){var template=this.options.get('templateSelection');var escapeMarkup=this.options.get('escapeMarkup');return escapeMarkup(template(data,container));};MultipleSelection.prototype.selectionContainer=function(){var $container=$('<li class="select2-selection__choice">'+'<span class="select2-selection__choice__remove" role="presentation">'+'×'+'</span>'+'</li>');return $container;};MultipleSelection.prototype.update=function(data){this.clear();if(data.length===0){return;} 1148var $selections=[];for(var d=0;d<data.length;d++){var selection=data[d];var $selection=this.selectionContainer();var formatted=this.display(selection,$selection);$selection.append(formatted);$selection.prop('title',selection.title||selection.text);$selection.data('data',selection);$selections.push($selection);} 1149var $rendered=this.$selection.find('.select2-selection__rendered');Utils.appendMany($rendered,$selections);};return MultipleSelection;});S2.define('select2/selection/placeholder',['../utils'],function(Utils){function Placeholder(decorated,$element,options){this.placeholder=this.normalizePlaceholder(options.get('placeholder'));decorated.call(this,$element,options);} 1150Placeholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==='string'){placeholder={id:'',text:placeholder};} 1151return placeholder;};Placeholder.prototype.createPlaceholder=function(decorated,placeholder){var $placeholder=this.selectionContainer();$placeholder.html(this.display(placeholder));$placeholder.addClass('select2-selection__placeholder').removeClass('select2-selection__choice');return $placeholder;};Placeholder.prototype.update=function(decorated,data){var singlePlaceholder=(data.length==1&&data[0].id!=this.placeholder.id);var multipleSelections=data.length>1;if(multipleSelections||singlePlaceholder){return decorated.call(this,data);} 1152this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find('.select2-selection__rendered').append($placeholder);};return Placeholder;});S2.define('select2/selection/allowClear',['jquery','../keys'],function($,KEYS){function AllowClear(){} 1153AllowClear.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);if(this.placeholder==null){if(this.options.get('debug')&&window.console&&console.error){console.error('Select2: The `allowClear` option should be used in combination '+'with the `placeholder` option.');}} 1154this.$selection.on('mousedown','.select2-selection__clear',function(evt){self._handleClear(evt);});container.on('keypress',function(evt){self._handleKeyboardClear(evt,container);});};AllowClear.prototype._handleClear=function(_,evt){if(this.options.get('disabled')){return;} 1155var $clear=this.$selection.find('.select2-selection__clear');if($clear.length===0){return;} 1156evt.stopPropagation();var data=$clear.data('data');for(var d=0;d<data.length;d++){var unselectData={data:data[d]};this.trigger('unselect',unselectData);if(unselectData.prevented){return;}} 1157this.$element.val(this.placeholder.id).trigger('change');this.trigger('toggle',{});};AllowClear.prototype._handleKeyboardClear=function(_,evt,container){if(container.isOpen()){return;} 1158if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){this._handleClear(evt);}};AllowClear.prototype.update=function(decorated,data){decorated.call(this,data);if(this.$selection.find('.select2-selection__placeholder').length>0||data.length===0){return;} 1159var $remove=$('<span class="select2-selection__clear">'+'×'+'</span>');$remove.data('data',data);this.$selection.find('.select2-selection__rendered').prepend($remove);};return AllowClear;});S2.define('select2/selection/search',['jquery','../utils','../keys'],function($,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options);} 1160Search.prototype.render=function(decorated){var $search=$('<li class="select2-search select2-search--inline">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="textbox" aria-autocomplete="list" />'+'</li>');this.$searchContainer=$search;this.$search=$search.find('input');var $rendered=decorated.call(this);this._transferTabIndex();return $rendered;};Search.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('open',function(){self.$search.trigger('focus');});container.on('close',function(){self.$search.val('');self.$search.removeAttr('aria-activedescendant');self.$search.trigger('focus');});container.on('enable',function(){self.$search.prop('disabled',false);self._transferTabIndex();});container.on('disable',function(){self.$search.prop('disabled',true);});container.on('focus',function(evt){self.$search.trigger('focus');});container.on('results:focus',function(params){self.$search.attr('aria-activedescendant',params.id);});this.$selection.on('focusin','.select2-search--inline',function(evt){self.trigger('focus',evt);});this.$selection.on('focusout','.select2-search--inline',function(evt){self._handleBlur(evt);});this.$selection.on('keydown','.select2-search--inline',function(evt){evt.stopPropagation();self.trigger('keypress',evt);self._keyUpPrevented=evt.isDefaultPrevented();var key=evt.which;if(key===KEYS.BACKSPACE&&self.$search.val()===''){var $previousChoice=self.$searchContainer.prev('.select2-selection__choice');if($previousChoice.length>0){var item=$previousChoice.data('data');self.searchRemoveChoice(item);evt.preventDefault();}}});var msie=document.documentMode;var disableInputEvents=msie&&msie<=11;this.$selection.on('input.searchcheck','.select2-search--inline',function(evt){if(disableInputEvents){self.$selection.off('input.search input.searchcheck');return;} 1161self.$selection.off('keyup.search');});this.$selection.on('keyup.search input.search','.select2-search--inline',function(evt){if(disableInputEvents&&evt.type==='input'){self.$selection.off('input.search input.searchcheck');return;} 1162var key=evt.which;if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){return;} 1163if(key==KEYS.TAB){return;} 1164self.handleSearch(evt);});};Search.prototype._transferTabIndex=function(decorated){this.$search.attr('tabindex',this.$selection.attr('tabindex'));this.$selection.attr('tabindex','-1');};Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search.attr('placeholder',placeholder.text);};Search.prototype.update=function(decorated,data){var searchHadFocus=this.$search[0]==document.activeElement;this.$search.attr('placeholder','');decorated.call(this,data);this.$selection.find('.select2-selection__rendered').append(this.$searchContainer);this.resizeSearch();if(searchHadFocus){this.$search.focus();}};Search.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var input=this.$search.val();this.trigger('query',{term:input});} 1165this._keyUpPrevented=false;};Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger('unselect',{data:item});this.$search.val(item.text);this.handleSearch();};Search.prototype.resizeSearch=function(){this.$search.css('width','25px');var width='';if(this.$search.attr('placeholder')!==''){width=this.$selection.find('.select2-selection__rendered').innerWidth();}else{var minimumWidth=this.$search.val().length+1;width=(minimumWidth*0.75)+'em';} 1166this.$search.css('width',width);};return Search;});S2.define('select2/selection/eventRelay',['jquery'],function($){function EventRelay(){} 1167EventRelay.prototype.bind=function(decorated,container,$container){var self=this;var relayEvents=['open','opening','close','closing','select','selecting','unselect','unselecting'];var preventableEvents=['opening','closing','selecting','unselecting'];decorated.call(this,container,$container);container.on('*',function(name,params){if($.inArray(name,relayEvents)===-1){return;} 1168params=params||{};var evt=$.Event('select2:'+name,{params:params});self.$element.trigger(evt);if($.inArray(name,preventableEvents)===-1){return;} 1169params.prevented=evt.isDefaultPrevented();});};return EventRelay;});S2.define('select2/translation',['jquery','require'],function($,require){function Translation(dict){this.dict=dict||{};} 1170Translation.prototype.all=function(){return this.dict;};Translation.prototype.get=function(key){return this.dict[key];};Translation.prototype.extend=function(translation){this.dict=$.extend({},translation.all(),this.dict);};Translation._cache={};Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require(path);Translation._cache[path]=translations;} 1171return new Translation(Translation._cache[path]);};return Translation;});S2.define('select2/diacritics',[],function(){var diacritics={'\u24B6':'A','\uFF21':'A','\u00C0':'A','\u00C1':'A','\u00C2':'A','\u1EA6':'A','\u1EA4':'A','\u1EAA':'A','\u1EA8':'A','\u00C3':'A','\u0100':'A','\u0102':'A','\u1EB0':'A','\u1EAE':'A','\u1EB4':'A','\u1EB2':'A','\u0226':'A','\u01E0':'A','\u00C4':'A','\u01DE':'A','\u1EA2':'A','\u00C5':'A','\u01FA':'A','\u01CD':'A','\u0200':'A','\u0202':'A','\u1EA0':'A','\u1EAC':'A','\u1EB6':'A','\u1E00':'A','\u0104':'A','\u023A':'A','\u2C6F':'A','\uA732':'AA','\u00C6':'AE','\u01FC':'AE','\u01E2':'AE','\uA734':'AO','\uA736':'AU','\uA738':'AV','\uA73A':'AV','\uA73C':'AY','\u24B7':'B','\uFF22':'B','\u1E02':'B','\u1E04':'B','\u1E06':'B','\u0243':'B','\u0182':'B','\u0181':'B','\u24B8':'C','\uFF23':'C','\u0106':'C','\u0108':'C','\u010A':'C','\u010C':'C','\u00C7':'C','\u1E08':'C','\u0187':'C','\u023B':'C','\uA73E':'C','\u24B9':'D','\uFF24':'D','\u1E0A':'D','\u010E':'D','\u1E0C':'D','\u1E10':'D','\u1E12':'D','\u1E0E':'D','\u0110':'D','\u018B':'D','\u018A':'D','\u0189':'D','\uA779':'D','\u01F1':'DZ','\u01C4':'DZ','\u01F2':'Dz','\u01C5':'Dz','\u24BA':'E','\uFF25':'E','\u00C8':'E','\u00C9':'E','\u00CA':'E','\u1EC0':'E','\u1EBE':'E','\u1EC4':'E','\u1EC2':'E','\u1EBC':'E','\u0112':'E','\u1E14':'E','\u1E16':'E','\u0114':'E','\u0116':'E','\u00CB':'E','\u1EBA':'E','\u011A':'E','\u0204':'E','\u0206':'E','\u1EB8':'E','\u1EC6':'E','\u0228':'E','\u1E1C':'E','\u0118':'E','\u1E18':'E','\u1E1A':'E','\u0190':'E','\u018E':'E','\u24BB':'F','\uFF26':'F','\u1E1E':'F','\u0191':'F','\uA77B':'F','\u24BC':'G','\uFF27':'G','\u01F4':'G','\u011C':'G','\u1E20':'G','\u011E':'G','\u0120':'G','\u01E6':'G','\u0122':'G','\u01E4':'G','\u0193':'G','\uA7A0':'G','\uA77D':'G','\uA77E':'G','\u24BD':'H','\uFF28':'H','\u0124':'H','\u1E22':'H','\u1E26':'H','\u021E':'H','\u1E24':'H','\u1E28':'H','\u1E2A':'H','\u0126':'H','\u2C67':'H','\u2C75':'H','\uA78D':'H','\u24BE':'I','\uFF29':'I','\u00CC':'I','\u00CD':'I
1171','\u00CE':'I','\u0128':'I','\u012A':'I','\u012C':'I','\u0130':'I','\u00CF':'I','\u1E2E':'I','\u1EC8':'I','\u01CF':'I','\u0208':'I','\u020A':'I','\u1ECA':'I','\u012E':'I','\u1E2C':'I','\u0197':'I','\u24BF':'J','\uFF2A':'J','\u0134':'J','\u0248':'J','\u24C0':'K','\uFF2B':'K','\u1E30':'K','\u01E8':'K','\u1E32':'K','\u0136':'K','\u1E34':'K','\u0198':'K','\u2C69':'K','\uA740':'K','\uA742':'K','\uA744':'K','\uA7A2':'K','\u24C1':'L','\uFF2C':'L','\u013F':'L','\u0139':'L','\u013D':'L','\u1E36':'L','\u1E38':'L','\u013B':'L','\u1E3C':'L','\u1E3A':'L','\u0141':'L','\u023D':'L','\u2C62':'L','\u2C60':'L','\uA748':'L','\uA746':'L','\uA780':'L','\u01C7':'LJ','\u01C8':'Lj','\u24C2':'M','\uFF2D':'M','\u1E3E':'M','\u1E40':'M','\u1E42':'M','\u2C6E':'M','\u019C':'M','\u24C3':'N','\uFF2E':'N','\u01F8':'N','\u0143':'N','\u00D1':'N','\u1E44':'N','\u0147':'N','\u1E46':'N','\u0145':'N','\u1E4A':'N','\u1E48':'N','\u0220':'N','\u019D':'N','\uA790':'N','\uA7A4':'N','\u01CA':'NJ','\u01CB':'Nj','\u24C4':'O','\uFF2F':'O','\u00D2':'O','\u00D3':'O','\u00D4':'O','\u1ED2':'O','\u1ED0':'O','\u1ED6':'O','\u1ED4':'O','\u00D5':'O','\u1E4C':'O','\u022C':'O','\u1E4E':'O','\u014C':'O','\u1E50':'O','\u1E52':'O','\u014E':'O','\u022E':'O','\u0230':'O','\u00D6':'O','\u022A':'O','\u1ECE':'O','\u0150':'O','\u01D1':'O','\u020C':'O','\u020E':'O','\u01A0':'O','\u1EDC':'O','\u1EDA':'O','\u1EE0':'O','\u1EDE':'O','\u1EE2':'O','\u1ECC':'O','\u1ED8':'O','\u01EA':'O','\u01EC':'O','\u00D8':'O','\u01FE':'O','\u0186':'O','\u019F':'O','\uA74A':'O','\uA74C':'O','\u01A2':'OI','\uA74E':'OO','\u0222':'OU','\u24C5':'P','\uFF30':'P','\u1E54':'P','\u1E56':'P','\u01A4':'P','\u2C63':'P','\uA750':'P','\uA752':'P','\uA754':'P','\u24C6':'Q','\uFF31':'Q','\uA756':'Q','\uA758':'Q','\u024A':'Q','\u24C7':'R','\uFF32':'R','\u0154':'R','\u1E58':'R','\u0158':'R','\u0210':'R','\u0212':'R','\u1E5A':'R','\u1E5C':'R','\u0156':'R','\u1E5E':'R','\u024C':'R','\u2C64':'R','\uA75A':'R','\uA7A6':'R','\uA782':'R','\u24C8':'S','\uFF33':'S','\u1E9E':'S','\u015A':'S','\u1E64':'S','\u015C':'S','\u1E60':'S','\u0160':'S','\u1E66':'S','\u1E62':'S','\u1E68':'S','\u0218':'S','\u015E':'S','\u2C7E':'S','\uA7A8':'S','\uA784':'S','\u24C9':'T','\uFF34':'T','\u1E6A':'T','\u0164':'T','\u1E6C':'T','\u021A':'T','\u0162':'T','\u1E70':'T','\u1E6E':'T','\u0166':'T','\u01AC':'T','\u01AE':'T','\u023E':'T','\uA786':'T','\uA728':'TZ','\u24CA':'U','\uFF35':'U','\u00D9':'U','\u00DA':'U','\u00DB':'U','\u0168':'U','\u1E78':'U','\u016A':'U','\u1E7A':'U','\u016C':'U','\u00DC':'U','\u01DB':'U','\u01D7':'U','\u01D5':'U','\u01D9':'U','\u1EE6':'U','\u016E':'U','\u0170':'U','\u01D3':'U','\u0214':'U','\u0216':'U','\u01AF':'U','\u1EEA':'U','\u1EE8':'U','\u1EEE':'U','\u1EEC':'U','\u1EF0':'U','\u1EE4':'U','\u1E72':'U','\u0172':'U','\u1E76':'U','\u1E74':'U','\u0244':'U','\u24CB':'V','\uFF36':'V','\u1E7C':'V','\u1E7E':'V','\u01B2':'V','\uA75E':'V','\u0245':'V','\uA760':'VY','\u24CC':'W','\uFF37':'W','\u1E80':'W','\u1E82':'W','\u0174':'W','\u1E86':'W','\u1E84':'W','\u1E88':'W','\u2C72':'W','\u24CD':'X','\uFF38':'X','\u1E8A':'X','\u1E8C':'X','\u24CE':'Y','\uFF39':'Y','\u1EF2':'Y','\u00DD':'Y','\u0176':'Y','\u1EF8':'Y','\u0232':'Y','\u1E8E':'Y','\u0178':'Y','\u1EF6':'Y','\u1EF4':'Y','\u01B3':'Y','\u024E':'Y','\u1EFE':'Y','\u24CF':'Z','\uFF3A':'Z','\u0179':'Z','\u1E90':'Z','\u017B':'Z','\u017D':'Z','\u1E92':'Z','\u1E94':'Z','\u01B5':'Z','\u0224':'Z','\u2C7F':'Z','\u2C6B':'Z','\uA762':'Z','\u24D0':'a','\uFF41':'a','\u1E9A':'a','\u00E0':'a','\u00E1':'a','\u00E2':'a','\u1EA7':'a','\u1EA5':'a','\u1EAB':'a','\u1EA9':'a','\u00E3':'a','\u0101':'a','\u0103':'a','\u1EB1':'a','\u1EAF':'a','\u1EB5':'a','\u1EB3':'a','\u0227':'a','\u01E1':'a','\u00E4':'a','\u01DF':'a','\u1EA3':'a','\u00E5':'a','\u01FB':'a','\u01CE':'a','\u0201':'a','\u0203':'a','\u1EA1':'a','\u1EAD':'a','\u1EB7':'a','\u1E01':'a','\u0105':'a','\u2C65':'a','\u0250':'a','\uA733':'aa','\u00E6':'ae','\u01FD':'ae','\u01E3':'ae','\uA735':'ao','\uA737':'au','\uA739':'av','\uA73B':'av','\uA73D':'ay','\u24D1':'b','\uFF42':'b','\u1E03':'b','\u1E05':'b','\u1E07':'b','\u0180':'b','\u0183':'b','\u0253':'b','\u24D2':'c','\uFF43':'c','\u0107':'c','\u0109':'c','\u010B':'c','\u010D':'c','\u00E7':'c','\u1E09':'c','\u0188':'c','\u023C':'c','\uA73F':'c','\u2184':'c','\u24D3':'d','\uFF44':'d','\u1E0B':'d','\u010F':'d','\u1E0D':'d','\u1E11':'d','\u1E13':'d','\u1E0F':'d','\u0111':'d','\u018C':'d','\u0256':'d','\u0257':'d','\uA77A':'d','\u01F3':'dz','\u01C6':'dz','\u24D4':'e','\uFF45':'e','\u00E8':'e','\u00E9':'e','\u00EA':'e','\u1EC1':'e','\u1EBF':'e','\u1EC5':'e','\u1EC3':'e','\u1EBD':'e','\u0113':'e','\u1E15':'e','\u1E17':'e','\u0115':'e','\u0117':'e','\u00EB':'e','\u1EBB':'e','\u011B':'e','\u0205':'e','\u0207':'e','\u1EB9':'e','\u1EC7':'e','\u0229':'e','\u1E1D':'e','\u0119':'e','\u1E19':'e','\u1E1B':'e','\u0247':'e','\u025B':'e','\u01DD':'e','\u24D5':'f','\uFF46':'f','\u1E1F':'f','\u0192':'f','\uA77C':'f','\u24D6':'g','\uFF47':'g','\u01F5':'g','\u011D':'g','\u1E21':'g','\u011F':'g','\u0121':'g','\u01E7':'g','\u0123':'g','\u01E5':'g','\u0260':'g','\uA7A1':'g','\u1D79':'g','\uA77F':'g','\u24D7':'h','\uFF48':'h','\u0125':'h','\u1E23':'h','\u1E27':'h','\u021F':'h','\u1E25':'h','\u1E29':'h','\u1E2B':'h','\u1E96':'h','\u0127':'h','\u2C68':'h','\u2C76':'h','\u0265':'h','\u0195':'hv','\u24D8':'i','\uFF49':'i','\u00EC':'i','\u00ED':'i','\u00EE':'i','\u0129':'i','\u012B':'i','\u012D':'i','\u00EF':'i','\u1E2F':'i','\u1EC9':'i','\u01D0':'i','\u0209':'i','\u020B':'i','\u1ECB':'i','\u012F':'i','\u1E2D':'i','\u0268':'i','\u0131':'i','\u24D9':'j','\uFF4A':'j','\u0135':'j','\u01F0':'j','\u0249':'j','\u24DA':'k','\uFF4B':'k','\u1E31':'k','\u01E9':'k','\u1E33':'k','\u0137':'k','\u1E35':'k','\u0199':'k','\u2C6A':'k','\uA741':'k','\uA743':'k','\uA745':'k','\uA7A3':'k','\u24DB':'l','\uFF4C':'l','\u0140':'l','\u013A':'l','\u013E':'l','\u1E37':'l','\u1E39':'l','\u013C':'l','\u1E3D':'l','\u1E3B':'l','\u017F':'l','\u0142':'l','\u019A':'l','\u026B':'l','\u2C61':'l','\uA749':'l','\uA781':'l','\uA747':'l','\u01C9':'lj','\u24DC':'m','\uFF4D':'m','\u1E3F':'m','\u1E41':'m','\u1E43':'m','\u0271':'m','\u026F':'m','\u24DD':'n','\uFF4E':'n','\u01F9':'n','\u0144':'n','\u00F1':'n','\u1E45':'n','\u0148':'n','\u1E47':'n','\u0146':'n','\u1E4B':'n','\u1E49':'n','\u019E':'n','\u0272':'n','\u0149':'n','\uA791':'n','\uA7A5':'n','\u01CC':'nj','\u24DE':'o','\uFF4F':'o','\u00F2':'o','\u00F3':'o','\u00F4':'o','\u1ED3':'o','\u1ED1':'o','\u1ED7':'o','\u1ED5':'o','\u00F5':'o','\u1E4D':'o','\u022D':'o','\u1E4F':'o','\u014D':'o','\u1E51':'o','\u1E53':'o','\u014F':'o','\u022F':'o','\u0231':'o','\u00F6':'o','\u022B':'o','\u1ECF':'o','\u0151':'o','\u01D2':'o','\u020D':'o','\u020F':'o','\u01A1':'o','\u1EDD':'o','\u1EDB':'o','\u1EE1':'o','\u1EDF':'o','\u1EE3':'o','\u1ECD':'o','\u1ED9':'o','\u01EB':'o','\u01ED':'o','\u00F8':'o','\u01FF':'o','\u0254':'o','\uA74B':'o','\uA74D':'o','\u0275':'o','\u01A3':'oi','\u0223':'ou','\uA74F':'oo','\u24DF':'p','\uFF50':'p','\u1E55':'p','\u1E57':'p','\u01A5':'p','\u1D7D':'p','\uA751':'p','\uA753':'p','\uA755':'p','\u24E0':'q','\uFF51':'q','\u024B':'q','\uA757':'q','\uA759':'q','\u24E1':'r','\uFF52':'r','\u0155':'r','\u1E59':'r','\u0159':'r','\u0211':'r','\u0213':'r','\u1E5B':'r','\u1E5D':'r','\u0157':'r','\u1E5F':'r','\u024D':'r','\u027D':'r','\uA75B':'r','\uA7A7':'r','\uA783':'r','\u24E2':'s','\uFF53':'s','\u00DF':'s','\u015B':'s','\u1E65':'s','\u015D':'s','\u1E61':'s','\u0161':'s','\u1E67':'s','\u1E63':'s','\u1E69':'s','\u0219':'s','\u015F':'s','\u023F':'s','\uA7A9':'s','\uA785':'s','\u1E9B':'s','\u24E3':'t','\uFF54':'t','\u1E6B':'t','\u1E97':'t','\u016
11715':'t','\u1E6D':'t','\u021B':'t','\u0163':'t','\u1E71':'t','\u1E6F':'t','\u0167':'t','\u01AD':'t','\u0288':'t','\u2C66':'t','\uA787':'t','\uA729':'tz','\u24E4':'u','\uFF55':'u','\u00F9':'u','\u00FA':'u','\u00FB':'u','\u0169':'u','\u1E79':'u','\u016B':'u','\u1E7B':'u','\u016D':'u','\u00FC':'u','\u01DC':'u','\u01D8':'u','\u01D6':'u','\u01DA':'u','\u1EE7':'u','\u016F':'u','\u0171':'u','\u01D4':'u','\u0215':'u','\u0217':'u','\u01B0':'u','\u1EEB':'u','\u1EE9':'u','\u1EEF':'u','\u1EED':'u','\u1EF1':'u','\u1EE5':'u','\u1E73':'u','\u0173':'u','\u1E77':'u','\u1E75':'u','\u0289':'u','\u24E5':'v','\uFF56':'v','\u1E7D':'v','\u1E7F':'v','\u028B':'v','\uA75F':'v','\u028C':'v','\uA761':'vy','\u24E6':'w','\uFF57':'w','\u1E81':'w','\u1E83':'w','\u0175':'w','\u1E87':'w','\u1E85':'w','\u1E98':'w','\u1E89':'w','\u2C73':'w','\u24E7':'x','\uFF58':'x','\u1E8B':'x','\u1E8D':'x','\u24E8':'y','\uFF59':'y','\u1EF3':'y','\u00FD':'y','\u0177':'y','\u1EF9':'y','\u0233':'y','\u1E8F':'y','\u00FF':'y','\u1EF7':'y','\u1E99':'y','\u1EF5':'y','\u01B4':'y','\u024F':'y','\u1EFF':'y','\u24E9':'z','\uFF5A':'z','\u017A':'z','\u1E91':'z','\u017C':'z','\u017E':'z','\u1E93':'z','\u1E95':'z','\u01B6':'z','\u0225':'z','\u0240':'z','\u2C6C':'z','\uA763':'z','\u0386':'\u0391','\u0388':'\u0395','\u0389':'\u0397','\u038A':'\u0399','\u03AA':'\u0399','\u038C':'\u039F','\u038E':'\u03A5','\u03AB':'\u03A5','\u038F':'\u
vendor: 57,600 bytes, lines 1171-1394
117103A9','\u03AC':'\u03B1','\u03AD':'\u03B5','\u03AE':'\u03B7','\u03AF':'\u03B9','\u03CA':'\u03B9','\u0390':'\u03B9','\u03CC':'\u03BF','\u03CD':'\u03C5','\u03CB':'\u03C5','\u03B0':'\u03C5','\u03C9':'\u03C9','\u03C2':'\u03C3'};return diacritics;});S2.define('select2/data/base',['../utils'],function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this);} 1172Utils.Extend(BaseAdapter,Utils.Observable);BaseAdapter.prototype.current=function(callback){throw new Error('The `current` method must be defined in child classes.');};BaseAdapter.prototype.query=function(params,callback){throw new Error('The `query` method must be defined in child classes.');};BaseAdapter.prototype.bind=function(container,$container){};BaseAdapter.prototype.destroy=function(){};BaseAdapter.prototype.generateResultId=function(container,data){var id=container.id+'-result-';id+=Utils.generateChars(4);if(data.id!=null){id+='-'+data.id.toString();}else{id+='-'+Utils.generateChars(4);} 1173return id;};return BaseAdapter;});S2.define('select2/data/select',['./base','../utils','jquery'],function(BaseAdapter,Utils,$){function SelectAdapter($element,options){this.$element=$element;this.options=options;SelectAdapter.__super__.constructor.call(this);} 1174Utils.Extend(SelectAdapter,BaseAdapter);SelectAdapter.prototype.current=function(callback){var data=[];var self=this;this.$element.find(':selected').each(function(){var $option=$(this);var option=self.item($option);data.push(option);});callback(data);};SelectAdapter.prototype.select=function(data){var self=this;data.selected=true;if($(data.element).is('option')){data.element.selected=true;this.$element.trigger('change');return;} 1175if(this.$element.prop('multiple')){this.current(function(currentData){var val=[];data=[data];data.push.apply(data,currentData);for(var d=0;d<data.length;d++){var id=data[d].id;if($.inArray(id,val)===-1){val.push(id);}} 1176self.$element.val(val);self.$element.trigger('change');});}else{var val=data.id;this.$element.val(val);this.$element.trigger('change');}};SelectAdapter.prototype.unselect=function(data){var self=this;if(!this.$element.prop('multiple')){return;} 1177data.selected=false;if($(data.element).is('option')){data.element.selected=false;this.$element.trigger('change');return;} 1178this.current(function(currentData){var val=[];for(var d=0;d<currentData.length;d++){var id=currentData[d].id;if(id!==data.id&&$.inArray(id,val)===-1){val.push(id);}} 1179self.$element.val(val);self.$element.trigger('change');});};SelectAdapter.prototype.bind=function(container,$container){var self=this;this.container=container;container.on('select',function(params){self.select(params.data);});container.on('unselect',function(params){self.unselect(params.data);});};SelectAdapter.prototype.destroy=function(){this.$element.find('*').each(function(){$.removeData(this,'data');});};SelectAdapter.prototype.query=function(params,callback){var data=[];var self=this;var $options=this.$element.children();$options.each(function(){var $option=$(this);if(!$option.is('option')&&!$option.is('optgroup')){return;} 1180var option=self.item($option);var matches=self.matches(params,option);if(matches!==null){data.push(matches);}});callback({results:data});};SelectAdapter.prototype.addOptions=function($options){Utils.appendMany(this.$element,$options);};SelectAdapter.prototype.option=function(data){var option;if(data.children){option=document.createElement('optgroup');option.label=data.text;}else{option=document.createElement('option');if(option.textContent!==undefined){option.textContent=data.text;}else{option.innerText=data.text;}} 1181if(data.id!==undefined){option.value=data.id;} 1182if(data.disabled){option.disabled=true;} 1183if(data.selected){option.selected=true;} 1184if(data.title){option.title=data.title;} 1185var $option=$(option);var normalizedData=this._normalizeItem(data);normalizedData.element=option;$.data(option,'data',normalizedData);return $option;};SelectAdapter.prototype.item=function($option){var data={};data=$.data($option[0],'data');if(data!=null){return data;} 1186if($option.is('option')){data={id:$option.val(),text:$option.text(),disabled:$option.prop('disabled'),selected:$option.prop('selected'),title:$option.prop('title')};}else if($option.is('optgroup')){data={text:$option.prop('label'),children:[],title:$option.prop('title')};var $children=$option.children('option');var children=[];for(var c=0;c<$children.length;c++){var $child=$($children[c]);var child=this.item($child);children.push(child);} 1187data.children=children;} 1188data=this._normalizeItem(data);data.element=$option[0];$.data($option[0],'data',data);return data;};SelectAdapter.prototype._normalizeItem=function(item){if(!$.isPlainObject(item)){item={id:item,text:item};} 1189item=$.extend({},{text:''},item);var defaults={selected:false,disabled:false};if(item.id!=null){item.id=item.id.toString();} 1190if(item.text!=null){item.text=item.text.toString();} 1191if(item._resultId==null&&item.id&&this.container!=null){item._resultId=this.generateResultId(this.container,item);} 1192return $.extend({},defaults,item);};SelectAdapter.prototype.matches=function(params,data){var matcher=this.options.get('matcher');return matcher(params,data);};return SelectAdapter;});S2.define('select2/data/array',['./select','../utils','jquery'],function(SelectAdapter,Utils,$){function ArrayAdapter($element,options){var data=options.get('data')||[];ArrayAdapter.__super__.constructor.call(this,$element,options);this.addOptions(this.convertToOptions(data));} 1193Utils.Extend(ArrayAdapter,SelectAdapter);ArrayAdapter.prototype.select=function(data){var $option=this.$element.find('option').filter(function(i,elm){return elm.value==data.id.toString();});if($option.length===0){$option=this.option(data);this.addOptions($option);} 1194ArrayAdapter.__super__.select.call(this,data);};ArrayAdapter.prototype.convertToOptions=function(data){var self=this;var $existing=this.$element.find('option');var existingIds=$existing.map(function(){return self.item($(this)).id;}).get();var $options=[];function onlyItem(item){return function(){return $(this).val()==item.id;};} 1195for(var d=0;d<data.length;d++){var item=this._normalizeItem(data[d]);if($.inArray(item.id,existingIds)>=0){var $existingOption=$existing.filter(onlyItem(item));var existingData=this.item($existingOption);var newData=$.extend(true,{},item,existingData);var $newOption=this.option(newData);$existingOption.replaceWith($newOption);continue;} 1196var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);Utils.appendMany($option,$children);} 1197$options.push($option);} 1198return $options;};return ArrayAdapter;});S2.define('select2/data/ajax',['./array','../utils','jquery'],function(ArrayAdapter,Utils,$){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get('ajax'));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults;} 1199AjaxAdapter.__super__.constructor.call(this,$element,options);} 1200Utils.Extend(AjaxAdapter,ArrayAdapter);AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $.extend({},params,{q:params.term});},transport:function(params,success,failure){var $request=$.ajax(params);$request.then(success);$request.fail(failure);return $request;}};return $.extend({},defaults,options,true);};AjaxAdapter.prototype.processResults=function(results){return results;};AjaxAdapter.prototype.query=function(params,callback){var matches=[];var self=this;if(this._request!=null){if($.isFunction(this._request.abort)){this._request.abort();} 1201this._request=null;} 1202var options=$.extend({type:'GET'},this.ajaxOptions);if(typeof options.url==='function'){options.url=options.url.call(this.$element,params);} 1203if(typeof options.data==='function'){options.data=options.data.call(this.$element,params);} 1204function request(){var $request=options.transport(options,function(data){var results=self.processResults(data,params);if(self.options.get('debug')&&window.console&&console.error){if(!results||!results.results||!$.isArray(results.results)){console.error('Select2: The AJAX results did not return an array in the '+'`results` key of the response.');}} 1205callback(results);},function(){if($request.status&&$request.status==='0'){return;} 1206self.trigger('results:message',{message:'errorLoading'});});self._request=$request;} 1207if(this.ajaxOptions.delay&¶ms.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout);} 1208this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay);}else{request();}};return AjaxAdapter;});S2.define('select2/data/tags',['jquery'],function($){function Tags(decorated,$element,options){var tags=options.get('tags');var createTag=options.get('createTag');if(createTag!==undefined){this.createTag=createTag;} 1209var insertTag=options.get('insertTag');if(insertTag!==undefined){this.insertTag=insertTag;} 1210decorated.call(this,$element,options);if($.isArray(tags)){for(var t=0;t<tags.length;t++){var tag=tags[t];var item=this._normalizeItem(tag);var $option=this.option(item);this.$element.append($option);}}} 1211Tags.prototype.query=function(decorated,params,callback){var self=this;this._removeOldTags();if(params.term==null||params.page!=null){decorated.call(this,params,callback);return;} 1212function wrapper(obj,child){var data=obj.results;for(var i=0;i<data.length;i++){var option=data[i];var checkChildren=(option.children!=null&&!wrapper({results:option.children},true));var optionText=(option.text||'').toUpperCase();var paramsTerm=(params.term||'').toUpperCase();var checkText=optionText===paramsTerm;if(checkText||checkChildren){if(child){return false;} 1213obj.data=data;callback(obj);return;}} 1214if(child){return true;} 1215var tag=self.createTag(params);if(tag!=null){var $option=self.option(tag);$option.attr('data-select2-tag',true);self.addOptions([$option]);self.insertTag(data,tag);} 1216obj.results=data;callback(obj);} 1217decorated.call(this,params,wrapper);};Tags.prototype.createTag=function(decorated,params){var term=$.trim(params.term);if(term===''){return null;} 1218return{id:term,text:term};};Tags.prototype.insertTag=function(_,data,tag){data.unshift(tag);};Tags.prototype._removeOldTags=function(_){var tag=this._lastTag;var $options=this.$element.find('option[data-select2-tag]');$options.each(function(){if(this.selected){return;} 1219$(this).remove();});};return Tags;});S2.define('select2/data/tokenizer',['jquery'],function($){function Tokenizer(decorated,$element,options){var tokenizer=options.get('tokenizer');if(tokenizer!==undefined){this.tokenizer=tokenizer;} 1220decorated.call(this,$element,options);} 1221Tokenizer.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);this.$search=container.dropdown.$search||container.selection.$search||$container.find('.select2-search__field');};Tokenizer.prototype.query=function(decorated,params,callback){var self=this;function createAndSelect(data){var item=self._normalizeItem(data);var $existingOptions=self.$element.find('option').filter(function(){return $(this).val()===item.id;});if(!$existingOptions.length){var $option=self.option(item);$option.attr('data-select2-tag',true);self._removeOldTags();self.addOptions([$option]);} 1222select(item);} 1223function select(data){self.trigger('select',{data:data});} 1224params.term=params.term||'';var tokenData=this.tokenizer(params,this.options,createAndSelect);if(tokenData.term!==params.term){if(this.$search.length){this.$search.val(tokenData.term);this.$search.focus();} 1225params.term=tokenData.term;} 1226decorated.call(this,params,callback);};Tokenizer.prototype.tokenizer=function(_,params,options,callback){var separators=options.get('tokenSeparators')||[];var term=params.term;var i=0;var createTag=this.createTag||function(params){return{id:params.term,text:params.term};};while(i<term.length){var termChar=term[i];if($.inArray(termChar,separators)===-1){i++;continue;} 1227var part=term.substr(0,i);var partParams=$.extend({},params,{term:part});var data=createTag(partParams);if(data==null){i++;continue;} 1228callback(data);term=term.substr(i+1)||'';i=0;} 1229return{term:term};};return Tokenizer;});S2.define('select2/data/minimumInputLength',[],function(){function MinimumInputLength(decorated,$e,options){this.minimumInputLength=options.get('minimumInputLength');decorated.call(this,$e,options);} 1230MinimumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||'';if(params.term.length<this.minimumInputLength){this.trigger('results:message',{message:'inputTooShort',args:{minimum:this.minimumInputLength,input:params.term,params:params}});return;} 1231decorated.call(this,params,callback);};return MinimumInputLength;});S2.define('select2/data/maximumInputLength',[],function(){function MaximumInputLength(decorated,$e,options){this.maximumInputLength=options.get('maximumInputLength');decorated.call(this,$e,options);} 1232MaximumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||'';if(this.maximumInputLength>0&¶ms.term.length>this.maximumInputLength){this.trigger('results:message',{message:'inputTooLong',args:{maximum:this.maximumInputLength,input:params.term,params:params}});return;} 1233decorated.call(this,params,callback);};return MaximumInputLength;});S2.define('select2/data/maximumSelectionLength',[],function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get('maximumSelectionLength');decorated.call(this,$e,options);} 1234MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self=this;this.current(function(currentData){var count=currentData!=null?currentData.length:0;if(self.maximumSelectionLength>0&&count>=self.maximumSelectionLength){self.trigger('results:message',{message:'maximumSelected',args:{maximum:self.maximumSelectionLength}});return;} 1235decorated.call(self,params,callback);});};return MaximumSelectionLength;});S2.define('select2/dropdown',['jquery','./utils'],function($,Utils){function Dropdown($element,options){this.$element=$element;this.options=options;Dropdown.__super__.constructor.call(this);} 1236Utils.Extend(Dropdown,Utils.Observable);Dropdown.prototype.render=function(){var $dropdown=$('<span class="select2-dropdown">'+'<span class="select2-results"></span>'+'</span>');$dropdown.attr('dir',this.options.get('dir'));this.$dropdown=$dropdown;return $dropdown;};Dropdown.prototype.bind=function(){};Dropdown.prototype.position=function($dropdown,$container){};Dropdown.prototype.destroy=function(){this.$dropdown.remove();};return Dropdown;});S2.define('select2/dropdown/search',['jquery','../utils'],function($,Utils){function Search(){} 1237Search.prototype.render=function(decorated){var $rendered=decorated.call(this);var $search=$('<span class="select2-search select2-search--dropdown">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="textbox" />'+'</span>');this.$searchContainer=$search;this.$search=$search.find('input');$rendered.prepend($search);return $rendered;};Search.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);this.$search.on('keydown',function(evt){self.trigger('keypress',evt);self._keyUpPrevented=evt.isDefaultPrevented();});this.$search.on('input',function(evt){$(this).off('keyup');});this.$search.on('keyup input',function(evt){self.handleSearch(evt);});container.on('open',function(){self.$search.attr('tabindex',0);self.$search.focus();window.setTimeout(function(){self.$search.focus();},0);});container.on('close',function(){self.$search.attr('tabindex',-1);self.$search.val('');});container.on('focus',function(){if(!container.isOpen()){self.$search.focus();}});container.on('results:all',function(params){if(params.query.term==null||params.query.term===''){var showSearch=self.showSearch(params);if(showSearch){self.$searchContainer.removeClass('select2-search--hide');}else{self.$searchContainer.addClass('select2-search--hide');}}});};Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$search.val();this.trigger('query',{term:input});} 1238this._keyUpPrevented=false;};Search.prototype.showSearch=function(_,params){return true;};return Search;});S2.define('select2/dropdown/hidePlaceholder',[],function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get('placeholder'));decorated.call(this,$element,options,dataAdapter);} 1239HidePlaceholder.prototype.append=function(decorated,data){data.results=this.removePlaceholder(data.results);decorated.call(this,data);};HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==='string'){placeholder={id:'',text:placeholder};} 1240return placeholder;};HidePlaceholder.prototype.removePlaceholder=function(_,data){var modifiedData=data.slice(0);for(var d=data.length-1;d>=0;d--){var item=data[d];if(this.placeholder.id===item.id){modifiedData.splice(d,1);}} 1241return modifiedData;};return HidePlaceholder;});S2.define('select2/dropdown/infiniteScroll',['jquery'],function($){function InfiniteScroll(decorated,$element,options,dataAdapter){this.lastParams={};decorated.call(this,$element,options,dataAdapter);this.$loadingMore=this.createLoadingMore();this.loading=false;} 1242InfiniteScroll.prototype.append=function(decorated,data){this.$loadingMore.remove();this.loading=false;decorated.call(this,data);if(this.showLoadingMore(data)){this.$results.append(this.$loadingMore);}};InfiniteScroll.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('query',function(params){self.lastParams=params;self.loading=true;});container.on('query:append',function(params){self.lastParams=params;self.loading=true;});this.$results.on('scroll',function(){var isLoadMoreVisible=$.contains(document.documentElement,self.$loadingMore[0]);if(self.loading||!isLoadMoreVisible){return;} 1243var currentOffset=self.$results.offset().top+ 1244self.$results.outerHeight(false);var loadingMoreOffset=self.$loadingMore.offset().top+ 1245self.$loadingMore.outerHeight(false);if(currentOffset+50>=loadingMoreOffset){self.loadMore();}});};InfiniteScroll.prototype.loadMore=function(){this.loading=true;var params=$.extend({},{page:1},this.lastParams);params.page++;this.trigger('query:append',params);};InfiniteScroll.prototype.showLoadingMore=function(_,data){return data.pagination&&data.pagination.more;};InfiniteScroll.prototype.createLoadingMore=function(){var $option=$('<li '+'class="select2-results__option select2-results__option--load-more"'+'role="treeitem" aria-disabled="true"></li>');var message=this.options.get('translations').get('loadingMore');$option.html(message(this.lastParams));return $option;};return InfiniteScroll;});S2.define('select2/dropdown/attachBody',['jquery','../utils'],function($,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=options.get('dropdownParent')||$(document.body);decorated.call(this,$element,options);} 1246AttachBody.prototype.bind=function(decorated,container,$container){var self=this;var setupResultsEvents=false;decorated.call(this,container,$container);container.on('open',function(){self._showDropdown();self._attachPositioningHandler(container);if(!setupResultsEvents){setupResultsEvents=true;container.on('results:all',function(){self._positionDropdown();self._resizeDropdown();});container.on('results:append',function(){self._positionDropdown();self._resizeDropdown();});}});container.on('close',function(){self._hideDropdown();self._detachPositioningHandler(container);});this.$dropdownContainer.on('mousedown',function(evt){evt.stopPropagation();});};AttachBody.prototype.destroy=function(decorated){decorated.call(this);this.$dropdownContainer.remove();};AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown.attr('class',$container.attr('class'));$dropdown.removeClass('select2');$dropdown.addClass('select2-container--open');$dropdown.css({position:'absolute',top:-999999});this.$container=$container;};AttachBody.prototype.render=function(decorated){var $container=$('<span></span>');var $dropdown=decorated.call(this);$container.append($dropdown);this.$dropdownContainer=$container;return $container;};AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach();};AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self=this;var scrollEvent='scroll.select2.'+container.id;var resizeEvent='resize.select2.'+container.id;var orientationEvent='orientationchange.select2.'+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each(function(){$(this).data('select2-scroll-position',{x:$(this).scrollLeft(),y:$(this).scrollTop()});});$watchers.on(scrollEvent,function(ev){var position=$(this).data('select2-scroll-position');$(this).scrollTop(position.y);});$(window).on(scrollEvent+' '+resizeEvent+' '+orientationEvent,function(e){self._positionDropdown();self._resizeDropdown();});};AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent='scroll.select2.'+container.id;var resizeEvent='resize.select2.'+container.id;var orientationEvent='orientationchange.select2.'+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.off(scrollEvent);$(window).off(scrollEvent+' '+resizeEvent+' '+orientationEvent);};AttachBody.prototype._positionDropdown=function(){var $window=$(window);var isCurrentlyAbove=this.$dropdown.hasClass('select2-dropdown--above');var isCurrentlyBelow=this.$dropdown.hasClass('select2-dropdown--below');var newDirection=null;var offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(false);var container={height:this.$container.outerHeight(false)};container.top=offset.top;container.bottom=offset.top+container.height;var dropdown={height:this.$dropdown.outerHeight(false)};var viewport={top:$window.scrollTop(),bottom:$window.scrollTop()+$window.height()};var enoughRoomAbove=viewport.top<(offset.top-dropdown.height);var enoughRoomBelow=viewport.bottom>(offset.bottom+dropdown.height);var css={left:offset.left,top:container.bottom};var $offsetParent=this.$dropdownParent;if($offsetParent.css('position')==='static'){$offsetParent=$offsetParent.offsetParent();} 1247var parentOffset=$offsetParent.offset();css.top-=parentOffset.top;css.left-=parentOffset.left;if(!isCurrentlyAbove&&!isCurrentlyBelow){newDirection='below';} 1248if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){newDirection='above';}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){newDirection='below';} 1249if(newDirection=='above'||(isCurrentlyAbove&&newDirection!=='below')){css.top=container.top-parentOffset.top-dropdown.height;} 1250if(newDirection!=null){this.$dropdown.removeClass('select2-dropdown--below select2-dropdown--above').addClass('select2-dropdown--'+newDirection);this.$container.removeClass('select2-container--below select2-container--above').addClass('select2-container--'+newDirection);} 1251this.$dropdownContainer.css(css);};AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(false)+'px'};if(this.options.get('dropdownAutoWidth')){css.minWidth=css.width;css.position='relative';css.width='auto';} 1252this.$dropdown.css(css);};AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown();};return AttachBody;});S2.define('select2/dropdown/minimumResultsForSearch',[],function(){function countResults(data){var count=0;for(var d=0;d<data.length;d++){var item=data[d];if(item.children){count+=countResults(item.children);}else{count++;}} 1253return count;} 1254function MinimumResultsForSearch(decorated,$element,options,dataAdapter){this.minimumResultsForSearch=options.get('minimumResultsForSearch');if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity;} 1255decorated.call(this,$element,options,dataAdapter);} 1256MinimumResultsForSearch.prototype.showSearch=function(decorated,params){if(countResults(params.data.results)<this.minimumResultsForSearch){return false;} 1257return decorated.call(this,params);};return MinimumResultsForSearch;});S2.define('select2/dropdown/selectOnClose',[],function(){function SelectOnClose(){} 1258SelectOnClose.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('close',function(params){self._handleSelectOnClose(params);});};SelectOnClose.prototype._handleSelectOnClose=function(_,params){if(params&¶ms.originalSelect2Event!=null){var event=params.originalSelect2Event;if(event._type==='select'||event._type==='unselect'){return;}} 1259var $highlightedResults=this.getHighlightedResults();if($highlightedResults.length<1){return;} 1260var data=$highlightedResults.data('data');if((data.element!=null&&data.element.selected)||(data.element==null&&data.selected)){return;} 1261this.trigger('select',{data:data});};return SelectOnClose;});S2.define('select2/dropdown/closeOnSelect',[],function(){function CloseOnSelect(){} 1262CloseOnSelect.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('select',function(evt){self._selectTriggered(evt);});container.on('unselect',function(evt){self._selectTriggered(evt);});};CloseOnSelect.prototype._selectTriggered=function(_,evt){var originalEvent=evt.originalEvent;if(originalEvent&&originalEvent.ctrlKey){return;} 1263this.trigger('close',{originalEvent:originalEvent,originalSelect2Event:evt});};return CloseOnSelect;});S2.define('select2/i18n/en',[],function(){return{errorLoading:function(){return'The results could not be loaded.';},inputTooLong:function(args){var overChars=args.input.length-args.maximum;var message='Please delete '+overChars+' character';if(overChars!=1){message+='s';} 1264return message;},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;var message='Please enter '+remainingChars+' or more characters';return message;},loadingMore:function(){return'Loading more resultsâ¦';},maximumSelected:function(args){var message='You can only select '+args.maximum+' item';if(args.maximum!=1){message+='s';} 1265return message;},noResults:function(){return'No results found';},searching:function(){return'Searchingâ¦';}};});S2.define('select2/defaults',['jquery','require','./results','./selection/single','./selection/multiple','./selection/placeholder','./selection/allowClear','./selection/search','./selection/eventRelay','./utils','./translation','./diacritics','./data/select','./data/array','./data/ajax','./data/tags','./data/tokenizer','./data/minimumInputLength','./data/maximumInputLength','./data/maximumSelectionLength','./dropdown','./dropdown/search','./dropdown/hidePlaceholder','./dropdown/infiniteScroll','./dropdown/attachBody','./dropdown/minimumResultsForSearch','./dropdown/selectOnClose','./dropdown/closeOnSelect','./i18n/en'],function($,require,ResultsList,SingleSelection,MultipleSelection,Placeholder,AllowClear,SelectionSearch,EventRelay,Utils,Translation,DIACRITICS,SelectData,ArrayData,AjaxData,Tags,Tokenizer,MinimumInputLength,MaximumInputLength,MaximumSelectionLength,Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,EnglishTranslation){function Defaults(){this.reset();} 1266Defaults.prototype.apply=function(options){options=$.extend(true,{},this.defaults,options);if(options.dataAdapter==null){if(options.ajax!=null){options.dataAdapter=AjaxData;}else if(options.data!=null){options.dataAdapter=ArrayData;}else{options.dataAdapter=SelectData;} 1267if(options.minimumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength);} 1268if(options.maximumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength);} 1269if(options.maximumSelectionLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength);} 1270if(options.tags){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags);} 1271if(options.tokenSeparators!=null||options.tokenizer!=null){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer);} 1272if(options.query!=null){var Query=require(options.amdBase+'compat/query');options.dataAdapter=Utils.Decorate(options.dataAdapter,Query);} 1273if(options.initSelection!=null){var InitSelection=require(options.amdBase+'compat/initSelection');options.dataAdapter=Utils.Decorate(options.dataAdapter,InitSelection);}} 1274if(options.resultsAdapter==null){options.resultsAdapter=ResultsList;if(options.ajax!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll);} 1275if(options.placeholder!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder);} 1276if(options.selectOnClose){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose);}} 1277if(options.dropdownAdapter==null){if(options.multiple){options.dropdownAdapter=Dropdown;}else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown;} 1278if(options.minimumResultsForSearch!==0){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch);} 1279if(options.closeOnSelect){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect);} 1280if(options.dropdownCssClass!=null||options.dropdownCss!=null||options.adaptDropdownCssClass!=null){var DropdownCSS=require(options.amdBase+'compat/dropdownCss');options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS);} 1281options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody);} 1282if(options.selectionAdapter==null){if(options.multiple){options.selectionAdapter=MultipleSelection;}else{options.selectionAdapter=SingleSelection;} 1283if(options.placeholder!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder);} 1284if(options.allowClear){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear);} 1285if(options.multiple){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch);} 1286if(options.containerCssClass!=null||options.containerCss!=null||options.adaptContainerCssClass!=null){var ContainerCSS=require(options.amdBase+'compat/containerCss');options.selectionAdapter=Utils.Decorate(options.selectionAdapter,ContainerCSS);} 1287options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay);} 1288if(typeof options.language==='string'){if(options.language.indexOf('-')>0){var languageParts=options.language.split('-');var baseLanguage=languageParts[0];options.language=[options.language,baseLanguage];}else{options.language=[options.language];}} 1289if($.isArray(options.language)){var languages=new Translation();options.language.push('en');var languageNames=options.language;for(var l=0;l<languageNames.length;l++){var name=languageNames[l];var language={};try{language=Translation.loadPath(name);}catch(e){try{name=this.defaults.amdLanguageBase+name;language=Translation.loadPath(name);}catch(ex){if(options.debug&&window.console&&console.warn){console.warn('Select2: The language file for "'+name+'" could not be '+'automatically loaded. A fallback will be used instead.');} 1290continue;}} 1291languages.extend(language);} 1292options.translations=languages;}else{var baseTranslation=Translation.loadPath(this.defaults.amdLanguageBase+'en');var customTranslation=new Translation(options.language);customTranslation.extend(baseTranslation);options.translations=customTranslation;} 1293return options;};Defaults.prototype.reset=function(){function stripDiacritics(text){function match(a){return DIACRITICS[a]||a;} 1294return text.replace(/[^\u0000-\u007E]/g,match);} 1295function matcher(params,data){if($.trim(params.term)===''){return data;} 1296if(data.children&&data.children.length>0){var match=$.extend(true,{},data);for(var c=data.children.length-1;c>=0;c--){var child=data.children[c];var matches=matcher(params,child);if(matches==null){match.children.splice(c,1);}} 1297if(match.children.length>0){return match;} 1298return matcher(params,match);} 1299var original=stripDiacritics(data.text).toUpperCase();var term=stripDiacritics(params.term).toUpperCase();if(original.indexOf(term)>-1){return data;} 1300return null;} 1301this.defaults={amdBase:'./',amdLanguageBase:'./i18n/',closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:Utils.escapeMarkup,language:EnglishTranslation,matcher:matcher,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,sorter:function(data){return data;},templateResult:function(result){return result.text;},templateSelection:function(selection){return selection.text;},theme:'default',width:'resolve'};};Defaults.prototype.set=function(key,value){var camelKey=$.camelCase(key);var data={};data[camelKey]=value;var convertedData=Utils._convertData(data);$.extend(this.defaults,convertedData);};var defaults=new Defaults();return defaults;});S2.define('select2/options',['require','jquery','./defaults','./utils'],function(require,$,Defaults,Utils){function Options(options,$element){this.options=options;if($element!=null){this.fromElement($element);} 1302this.options=Defaults.apply(this.options);if($element&&$element.is('input')){var InputCompat=require(this.get('amdBase')+'compat/inputData');this.options.dataAdapter=Utils.Decorate(this.options.dataAdapter,InputCompat);}} 1303Options.prototype.fromElement=function($e){var excludedData=['select2'];if(this.options.multiple==null){this.options.multiple=$e.prop('multiple');} 1304if(this.options.disabled==null){this.options.disabled=$e.prop('disabled');} 1305if(this.options.language==null){if($e.prop('lang')){this.options.language=$e.prop('lang').toLowerCase();}else if($e.closest('[lang]').prop('lang')){this.options.language=$e.closest('[lang]').prop('lang');}} 1306if(this.options.dir==null){if($e.prop('dir')){this.options.dir=$e.prop('dir');}else if($e.closest('[dir]').prop('dir')){this.options.dir=$e.closest('[dir]').prop('dir');}else{this.options.dir='ltr';}} 1307$e.prop('disabled',this.options.disabled);$e.prop('multiple',this.options.multiple);if($e.data('select2Tags')){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to '+'use the `data-data` and `data-tags="true"` attributes and will be '+'removed in future versions of Select2.');} 1308$e.data('data',$e.data('select2Tags'));$e.data('tags',true);} 1309if($e.data('ajaxUrl')){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-ajax-url` attribute has been changed to '+'`data-ajax--url` and support for the old attribute will be removed'+' in future versions of Select2.');} 1310$e.attr('ajax--url',$e.data('ajaxUrl'));$e.data('ajax--url',$e.data('ajaxUrl'));} 1311var dataset={};if($.fn.jquery&&$.fn.jquery.substr(0,2)=='1.'&&$e[0].dataset){dataset=$.extend(true,{},$e[0].dataset,$e.data());}else{dataset=$e.data();} 1312var data=$.extend(true,{},dataset);data=Utils._convertData(data);for(var key in data){if($.inArray(key,excludedData)>-1){continue;} 1313if($.isPlainObject(this.options[key])){$.extend(this.options[key],data[key]);}else{this.options[key]=data[key];}} 1314return this;};Options.prototype.get=function(key){return this.options[key];};Options.prototype.set=function(key,val){this.options[key]=val;};return Options;});S2.define('select2/core',['jquery','./options','./utils','./keys'],function($,Options,Utils,KEYS){var Select2=function($element,options){if($element.data('select2')!=null){$element.data('select2').destroy();} 1315this.$element=$element;this.id=this._generateId($element);options=options||{};this.options=new Options(options,$element);Select2.__super__.constructor.call(this);var tabindex=$element.attr('tabindex')||0;$element.data('old-tabindex',tabindex);$element.attr('tabindex','-1');var DataAdapter=this.options.get('dataAdapter');this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get('selectionAdapter');this.selection=new SelectionAdapter($element,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get('dropdownAdapter');this.dropdown=new DropdownAdapter($element,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get('resultsAdapter');this.results=new ResultsAdapter($element,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var self=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(initialData){self.trigger('selection:update',{data:initialData});});$element.addClass('select2-hidden-accessible');$element.attr('aria-hidden','true');this._syncAttributes();$element.data('select2',this);};Utils.Extend(Select2,Utils.Observable);Select2.prototype._generateId=function($element){var id='';if($element.attr('id')!=null){id=$element.attr('id');}else if($element.attr('name')!=null){id=$element.attr('name')+'-'+Utils.generateChars(2);}else{id=Utils.generateChars(4);} 1316id=id.replace(/(:|\.|\[|\]|,)/g,'');id='select2-'+id;return id;};Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get('width'));if(width!=null){$container.css('width',width);}};Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(method=='resolve'){var styleWidth=this._resolveWidth($element,'style');if(styleWidth!=null){return styleWidth;} 1317return this._resolveWidth($element,'element');} 1318if(method=='element'){var elementWidth=$element.outerWidth(false);if(elementWidth<=0){return'auto';} 1319return elementWidth+'px';} 1320if(method=='style'){var style=$element.attr('style');if(typeof(style)!=='string'){return null;} 1321var attrs=style.split(';');for(var i=0,l=attrs.length;i<l;i=i+1){var attr=attrs[i].replace(/\s/g,'');var matches=attr.match(WIDTH);if(matches!==null&&matches.length>=1){return matches[1];}} 1322return null;} 1323return method;};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container);};Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on('change.select2',function(){self.dataAdapter.current(function(data){self.trigger('selection:update',{data:data});});});this.$element.on('focus.select2',function(evt){self.trigger('focus',evt);});this._syncA=Utils.bind(this._syncAttributes,this);this._syncS=Utils.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent('onpropertychange',this._syncA);} 1324var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(observer!=null){this._observer=new observer(function(mutations){$.each(mutations,self._syncA);$.each(mutations,self._syncS);});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false});}else if(this.$element[0].addEventListener){this.$element[0].addEventListener('DOMAttrModified',self._syncA,false);this.$element[0].addEventListener('DOMNodeInserted',self._syncS,false);this.$element[0].addEventListener('DOMNodeRemoved',self._syncS,false);}};Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerSelectionEvents=function(){var self=this;var nonRelayEvents=['toggle','focus'];this.selection.on('toggle',function(){self.toggleDropdown();});this.selection.on('focus',function(params){self.focus(params);});this.selection.on('*',function(name,params){if($.inArray(name,nonRelayEvents)!==-1){return;} 1325self.trigger(name,params);});};Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerEvents=function(){var self=this;this.on('open',function(){self.$container.addClass('select2-container--open');});this.on('close',function(){self.$container.removeClass('select2-container--open');});this.on('enable',function(){self.$container.removeClass('select2-container--disabled');});this.on('disable',function(){self.$container.addClass('select2-container--disabled');});this.on('blur',function(){self.$container.removeClass('select2-container--focus');});this.on('query',function(params){if(!self.isOpen()){self.trigger('open',{});} 1326this.dataAdapter.query(params,function(data){self.trigger('results:all',{data:data,query:params});});});this.on('query:append',function(params){this.dataAdapter.query(params,function(data){self.trigger('results:append',{data:data,query:params});});});this.on('keypress',function(evt){var key=evt.which;if(self.isOpen()){if(key===KEYS.ESC||key===KEYS.TAB||(key===KEYS.UP&&evt.altKey)){self.close();evt.preventDefault();}else if(key===KEYS.ENTER){self.trigger('results:select',{});evt.preventDefault();}else if((key===KEYS.SPACE&&evt.ctrlKey)){self.trigger('results:toggle',{});evt.preventDefault();}else if(key===KEYS.UP){self.trigger('results:previous',{});evt.preventDefault();}else if(key===KEYS.DOWN){self.trigger('results:next',{});evt.preventDefault();}}else{if(key===KEYS.ENTER||key===KEYS.SPACE||(key===KEYS.DOWN&&evt.altKey)){self.open();evt.preventDefault();}}});};Select2.prototype._syncAttributes=function(){this.options.set('disabled',this.$element.prop('disabled'));if(this.options.get('disabled')){if(this.isOpen()){this.close();} 1327this.trigger('disable',{});}else{this.trigger('enable',{});}};Select2.prototype._syncSubtree=function(evt,mutations){var changed=false;var self=this;if(evt&&evt.target&&(evt.target.nodeName!=='OPTION'&&evt.target.nodeName!=='OPTGROUP')){return;} 1328if(!mutations){changed=true;}else if(mutations.addedNodes&&mutations.addedNodes.length>0){for(var n=0;n<mutations.addedNodes.length;n++){var node=mutations.addedNodes[n];if(node.selected){changed=true;}}}else if(mutations.removedNodes&&mutations.removedNodes.length>0){changed=true;} 1329if(changed){this.dataAdapter.current(function(currentData){self.trigger('selection:update',{data:currentData});});}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={'open':'opening','close':'closing','select':'selecting','unselect':'unselecting'};if(args===undefined){args={};} 1330if(name in preTriggerMap){var preTriggerName=preTriggerMap[name];var preTriggerArgs={prevented:false,name:name,args:args};actualTrigger.call(this,preTriggerName,preTriggerArgs);if(preTriggerArgs.prevented){args.prevented=true;return;}} 1331actualTrigger.call(this,name,args);};Select2.prototype.toggleDropdown=function(){if(this.options.get('disabled')){return;} 1332if(this.isOpen()){this.close();}else{this.open();}};Select2.prototype.open=function(){if(this.isOpen()){return;} 1333this.trigger('query',{});};Select2.prototype.close=function(){if(!this.isOpen()){return;} 1334this.trigger('close',{});};Select2.prototype.isOpen=function(){return this.$container.hasClass('select2-container--open');};Select2.prototype.hasFocus=function(){return this.$container.hasClass('select2-container--focus');};Select2.prototype.focus=function(data){if(this.hasFocus()){return;} 1335this.$container.addClass('select2-container--focus');this.trigger('focus',{});};Select2.prototype.enable=function(args){if(this.options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will'+' be removed in later Select2 versions. Use $element.prop("disabled")'+' instead.');} 1336if(args==null||args.length===0){args=[true];} 1337var disabled=!args[0];this.$element.prop('disabled',disabled);};Select2.prototype.data=function(){if(this.options.get('debug')&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You '+'should consider setting the value instead using `$element.val()`.');} 1338var data=[];this.dataAdapter.current(function(currentData){data=currentData;});return data;};Select2.prototype.val=function(args){if(this.options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be'+' removed in later Select2 versions. Use $element.val() instead.');} 1339if(args==null||args.length===0){return this.$element.val();} 1340var newVal=args[0];if($.isArray(newVal)){newVal=$.map(newVal,function(obj){return obj.toString();});} 1341this.$element.val(newVal).trigger('change');};Select2.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent('onpropertychange',this._syncA);} 1342if(this._observer!=null){this._observer.disconnect();this._observer=null;}else if(this.$element[0].removeEventListener){this.$element[0].removeEventListener('DOMAttrModified',this._syncA,false);this.$element[0].removeEventListener('DOMNodeInserted',this._syncS,false);this.$element[0].removeEventListener('DOMNodeRemoved',this._syncS,false);} 1343this._syncA=null;this._syncS=null;this.$element.off('.select2');this.$element.attr('tabindex',this.$element.data('old-tabindex'));this.$element.removeClass('select2-hidden-accessible');this.$element.attr('aria-hidden','false');this.$element.removeData('select2');this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null;};Select2.prototype.render=function(){var $container=$('<span class="select2 select2-container">'+'<span class="selection"></span>'+'<span class="dropdown-wrapper" aria-hidden="true"></span>'+'</span>');$container.attr('dir',this.options.get('dir'));this.$container=$container;this.$container.addClass('select2-container--'+this.options.get('theme'));$container.data('element',this.$element);return $container;};return Select2;});S2.define('select2/compat/utils',['jquery'],function($){function syncCssClasses($dest,$src,adapter){var classes,replacements=[],adapted;classes=$.trim($dest.attr('class'));if(classes){classes=''+classes;$(classes.split(/\s+/)).each(function(){if(this.indexOf('select2-')===0){replacements.push(this);}});} 1344classes=$.trim($src.attr('class'));if(classes){classes=''+classes;$(classes.split(/\s+/)).each(function(){if(this.indexOf('select2-')!==0){adapted=adapter(this);if(adapted!=null){replacements.push(adapted);}}});} 1345$dest.attr('class',replacements.join(' '));} 1346return{syncCssClasses:syncCssClasses};});S2.define('select2/compat/containerCss',['jquery','./utils'],function($,CompatUtils){function _containerAdapter(clazz){return null;} 1347function ContainerCSS(){} 1348ContainerCSS.prototype.render=function(decorated){var $container=decorated.call(this);var containerCssClass=this.options.get('containerCssClass')||'';if($.isFunction(containerCssClass)){containerCssClass=containerCssClass(this.$element);} 1349var containerCssAdapter=this.options.get('adaptContainerCssClass');containerCssAdapter=containerCssAdapter||_containerAdapter;if(containerCssClass.indexOf(':all:')!==-1){containerCssClass=containerCssClass.replace(':all:','');var _cssAdapter=containerCssAdapter;containerCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);if(adapted!=null){return adapted+' '+clazz;} 1350return clazz;};} 1351var containerCss=this.options.get('containerCss')||{};if($.isFunction(containerCss)){containerCss=containerCss(this.$element);} 1352CompatUtils.syncCssClasses($container,this.$element,containerCssAdapter);$container.css(containerCss);$container.addClass(containerCssClass);return $container;};return ContainerCSS;});S2.define('select2/compat/dropdownCss',['jquery','./utils'],function($,CompatUtils){function _dropdownAdapter(clazz){return null;} 1353function DropdownCSS(){} 1354DropdownCSS.prototype.render=function(decorated){var $dropdown=decorated.call(this);var dropdownCssClass=this.options.get('dropdownCssClass')||'';if($.isFunction(dropdownCssClass)){dropdownCssClass=dropdownCssClass(this.$element);} 1355var dropdownCssAdapter=this.options.get('adaptDropdownCssClass');dropdownCssAdapter=dropdownCssAdapter||_dropdownAdapter;if(dropdownCssClass.indexOf(':all:')!==-1){dropdownCssClass=dropdownCssClass.replace(':all:','');var _cssAdapter=dropdownCssAdapter;dropdownCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);if(adapted!=null){return adapted+' '+clazz;} 1356return clazz;};} 1357var dropdownCss=this.options.get('dropdownCss')||{};if($.isFunction(dropdownCss)){dropdownCss=dropdownCss(this.$element);} 1358CompatUtils.syncCssClasses($dropdown,this.$element,dropdownCssAdapter);$dropdown.css(dropdownCss);$dropdown.addClass(dropdownCssClass);return $dropdown;};return DropdownCSS;});S2.define('select2/compat/initSelection',['jquery'],function($){function InitSelection(decorated,$element,options){if(options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `initSelection` option has been deprecated in favor'+' of a custom data adapter that overrides the `current` method. '+'This method is now called multiple times instead of a single '+'time when the instance is initialized. Support will be removed '+'for the `initSelection` option in future versions of Select2');} 1359this.initSelection=options.get('initSelection');this._isInitialized=false;decorated.call(this,$element,options);} 1360InitSelection.prototype.current=function(decorated,callback){var self=this;if(this._isInitialized){decorated.call(this,callback);return;} 1361this.initSelection.call(null,this.$element,function(data){self._isInitialized=true;if(!$.isArray(data)){data=[data];} 1362callback(data);});};return InitSelection;});S2.define('select2/compat/inputData',['jquery'],function($){function InputData(decorated,$element,options){this._currentData=[];this._valueSeparator=options.get('valueSeparator')||',';if($element.prop('type')==='hidden'){if(options.get('debug')&&console&&console.warn){console.warn('Select2: Using a hidden input with Select2 is no longer '+'supported and may stop working in the future. It is recommended '+'to use a `<select>` element instead.');}} 1363decorated.call(this,$element,options);} 1364InputData.prototype.current=function(_,callback){function getSelected(data,selectedIds){var selected=[];if(data.selected||$.inArray(data.id,selectedIds)!==-1){data.selected=true;selected.push(data);}else{data.selected=false;} 1365if(data.children){selected.push.apply(selected,getSelected(data.children,selectedIds));} 1366return selected;} 1367var selected=[];for(var d=0;d<this._currentData.length;d++){var data=this._currentData[d];selected.push.apply(selected,getSelected(data,this.$element.val().split(this._valueSeparator)));} 1368callback(selected);};InputData.prototype.select=function(_,data){if(!this.options.get('multiple')){this.current(function(allData){$.map(allData,function(data){data.selected=false;});});this.$element.val(data.id);this.$element.trigger('change');}else{var value=this.$element.val();value+=this._valueSeparator+data.id;this.$element.val(value);this.$element.trigger('change');}};InputData.prototype.unselect=function(_,data){var self=this;data.selected=false;this.current(function(allData){var values=[];for(var d=0;d<allData.length;d++){var item=allData[d];if(data.id==item.id){continue;} 1369values.push(item.id);} 1370self.$element.val(values.join(self._valueSeparator));self.$element.trigger('change');});};InputData.prototype.query=function(_,params,callback){var results=[];for(var d=0;d<this._currentData.length;d++){var data=this._currentData[d];var matches=this.matches(params,data);if(matches!==null){results.push(matches);}} 1371callback({results:results});};InputData.prototype.addOptions=function(_,$options){var options=$.map($options,function($option){return $.data($option[0],'data');});this._currentData.push.apply(this._currentData,options);};return InputData;});S2.define('select2/compat/matcher',['jquery'],function($){function oldMatcher(matcher){function wrappedMatcher(params,data){var match=$.extend(true,{},data);if(params.term==null||$.trim(params.term)===''){return match;} 1372if(data.children){for(var c=data.children.length-1;c>=0;c--){var child=data.children[c];var doesMatch=matcher(params.term,child.text,child);if(!doesMatch){match.children.splice(c,1);}} 1373if(match.children.length>0){return match;}} 1374if(matcher(params.term,data.text,data)){return match;} 1375return null;} 1376return wrappedMatcher;} 1377return oldMatcher;});S2.define('select2/compat/query',[],function(){function Query(decorated,$element,options){if(options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `query` option has been deprecated in favor of a '+'custom data adapter that overrides the `query` method. Support '+'will be removed for the `query` option in future versions of '+'Select2.');} 1378decorated.call(this,$element,options);} 1379Query.prototype.query=function(_,params,callback){params.callback=callback;var query=this.options.get('query');query.call(null,params);};return Query;});S2.define('select2/dropdown/attachContainer',[],function(){function AttachContainer(decorated,$element,options){decorated.call(this,$element,options);} 1380AttachContainer.prototype.position=function(decorated,$dropdown,$container){var $dropdownContainer=$container.find('.dropdown-wrapper');$dropdownContainer.append($dropdown);$dropdown.addClass('select2-dropdown--below');$container.addClass('select2-container--below');};return AttachContainer;});S2.define('select2/dropdown/stopPropagation',[],function(){function StopPropagation(){} 1381StopPropagation.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);var stoppedEvents=['blur','change','click','dblclick','focus','focusin','focusout','input','keydown','keyup','keypress','mousedown','mouseenter','mouseleave','mousemove','mouseover','mouseup','search','touchend','touchstart'];this.$dropdown.on(stoppedEvents.join(' '),function(evt){evt.stopPropagation();});};return StopPropagation;});S2.define('select2/selection/stopPropagation',[],function(){function StopPropagation(){} 1382StopPropagation.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);var stoppedEvents=['blur','change','click','dblclick','focus','focusin','focusout','input','keydown','keyup','keypress','mousedown','mouseenter','mouseleave','mousemove','mouseover','mouseup','search','touchend','touchstart'];this.$selection.on(stoppedEvents.join(' '),function(evt){evt.stopPropagation();});};return StopPropagation;});(function(factory){if(typeof S2.define==='function'&&S2.define.amd){S2.define('jquery-mousewheel',['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory;}else{factory(jQuery);}}(function($){var toFix=['wheel','mousewheel','DOMMouseScroll','MozMousePixelScroll'],toBind=('onwheel'in document||document.documentMode>=9)?['wheel']:['mousewheel','DomMouseScroll','MozMousePixelScroll'],slice=Array.prototype.slice,nullLowestDeltaTimeout,lowestDelta;if($.event.fixHooks){for(var i=toFix.length;i;){$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;}} 1383var special=$.event.special.mousewheel={version:'3.1.12',setup:function(){if(this.addEventListener){for(var i=toBind.length;i;){this.addEventListener(toBind[--i],handler,false);}}else{this.onmousewheel=handler;} 1384$.data(this,'mousewheel-line-height',special.getLineHeight(this));$.data(this,'mousewheel-page-height',special.getPageHeight(this));},teardown:function(){if(this.removeEventListener){for(var i=toBind.length;i;){this.removeEventListener(toBind[--i],handler,false);}}else{this.onmousewheel=null;} 1385$.removeData(this,'mousewheel-line-height');$.removeData(this,'mousewheel-page-height');},getLineHeight:function(elem){var $elem=$(elem),$parent=$elem['offsetParent'in $.fn?'offsetParent':'parent']();if(!$parent.length){$parent=$('body');} 1386return parseInt($parent.css('fontSize'),10)||parseInt($elem.css('fontSize'),10)||16;},getPageHeight:function(elem){return $(elem).height();},settings:{adjustOldDeltas:true,normalizeOffset:true}};$.fn.extend({mousewheel:function(fn){return fn?this.bind('mousewheel',fn):this.trigger('mousewheel');},unmousewheel:function(fn){return this.unbind('mousewheel',fn);}});function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;event=$.event.fix(orgEvent);event.type='mousewheel';if('detail'in orgEvent){deltaY=orgEvent.detail*-1;} 1387if('wheelDelta'in orgEvent){deltaY=orgEvent.wheelDelta;} 1388if('wheelDeltaY'in orgEvent){deltaY=orgEvent.wheelDeltaY;} 1389if('wheelDeltaX'in orgEvent){deltaX=orgEvent.wheelDeltaX*-1;} 1390if('axis'in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaX=deltaY*-1;deltaY=0;} 1391delta=deltaY===0?deltaX:deltaY;if('deltaY'in orgEvent){deltaY=orgEvent.deltaY*-1;delta=deltaY;} 1392if('deltaX'in orgEvent){deltaX=orgEvent.deltaX;if(deltaY===0){delta=deltaX*-1;}} 1393if(deltaY===0&&deltaX===0){return;} 1394if(orgEvent.deltaMode===1){var lineHeight=$.data(this,'mousewheel-line-height');delta*=lineHeight;deltaY*=lineHeight;deltaX*=lineHeight;}else if(orgEvent.deltaMode===2){var pageHeight=$.data(this,'mousewheel-page-height');delta*=pageHeight;deltaY*=pageHeight;deltaX*=pageHeight;}
1395absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX));if(!lowestDelta||absDelta<lowestDelta){lowestDelta=absDelta;if(shouldAdjustOldDeltas(orgEvent,absDelta)){lowestDelta/=40;}} 1396if(shouldAdjustOldDeltas(orgEvent,absDelta)){delta/=40;deltaX/=40;deltaY/=40;} 1397delta=Math[delta>=1?'floor':'ceil'](delta/lowestDelta);deltaX=Math[deltaX>=1?'floor':'ceil'](deltaX/lowestDelta);deltaY=Math[deltaY>=1?'floor':'ceil'](deltaY/lowestDelta);if(special.settings.normalizeOffset&&this.getBoundingClientRect){var boundingRect=this.getBoundingClientRect();offsetX=event.clientX-boundingRect.left;offsetY=event.clientY-boundingRect.top;} 1398event.deltaX=deltaX;event.deltaY=deltaY;event.deltaFactor=lowestDelta;event.offsetX=offsetX;event.offsetY=offsetY;event.deltaMode=0;args.unshift(event,delta,deltaX,deltaY);if(nullLowestDeltaTimeout){clearTimeout(nullLowestDeltaTimeout);} 1399nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200);return($.event.dispatch||$.event.handle).apply(this,args);} 1400function nullLowestDelta(){lowestDelta=null;} 1401function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&orgEvent.type==='mousewheel'&&absDelta%120===0;}}));S2.define('jquery.select2',['jquery','jquery-mousewheel','./select2/core','./select2/defaults'],function($,_,Select2,Defaults){if($.fn.select2==null){var thisMethods=['open','close','destroy'];$.fn.select2=function(options){options=options||{};if(typeof options==='object'){this.each(function(){var instanceOptions=$.extend(true,{},options);var instance=new Select2($(this),instanceOptions);});return this;}else if(typeof options==='string'){var ret;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$(this).data('select2');if(instance==null&&window.console&&console.error){console.error('The select2(\''+options+'\') method was called on an '+'element that is not using Select2.');} 1402ret=instance[options].apply(instance,args);});if($.inArray(options,thisMethods)>-1){return this;} 1403return ret;}else{throw new Error('Invalid arguments for Select2: '+options);}};} 1404if($.fn.select2.defaults==null){$.fn.select2.defaults=Defaults;} 1405return Select2;});return{define:S2.define,require:S2.require};}());var select2=S2.require('jquery.select2');jQuery.fn.select2.amd=S2;return select2;})); 1406/* End */ 1407; 1408; /* Start:"a:4:{s:4:"full";s:85:"/local/templates/fondpotanin/build/script/plugins/svg4everybody.min.js?16939085021321";s:6:"source";s:70:"/local/templates/fondpotanin/build/script/plugins/svg4everybody.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1409 1410!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.svg4everybody=b()}):"object"==typeof exports?module.exports=b():a.svg4everybody=b()}(this,function(){function a(a,b){if(b){var c=!a.getAttribute("viewBox")&&b.getAttribute("viewBox"),d=document.createDocumentFragment(),e=b.cloneNode(!0);for(c&&a.setAttribute("viewBox",c);e.childNodes.length;)d.appendChild(e.firstChild);a.appendChild(d)}}function b(b){b.onreadystatechange=function(){if(4===b.readyState){var c=document.createElement("x");c.innerHTML=b.responseText,b.s.splice(0).map(function(b){a(b[0],c.querySelector("#"+b[1].replace(/(\W)/g,"\\$1")))})}},b.onreadystatechange()}function c(c){function d(){for(var c;c=e[0];){var j=c.parentNode;if(j&&/svg/i.test(j.nodeName)){var k=c.getAttribute("xlink:href");if(f&&(!g||g(k,j,c))){var l=k.split("#"),m=l[0],n=l[1];if(j.removeChild(c),m.length){var o=i[m]=i[m]||new XMLHttpRequest;o.s||(o.s=[],o.open("GET",m),o.send()),o.s.push([j,n]),b(o)}else a(j,document.getElementById(n))}}}h(d,17)}c=c||{};var e=document.getElementsByTagName("use"),f="shim"in c?c.shim:/\bEdge\/12\b|\bTrident\/[567]\b|\bVersion\/7.0 Safari\b/.test(navigator.userAgent)||(navigator.userAgent.match(/AppleWebKit\/(\d+)/)||[])[1]<537,g=c.validate,h=window.requestAnimationFrame||setTimeout,i={};f&&d()}return c}); 1411/* End */ 1412; 1413; /* Start:"a:4:{s:4:"full";s:80:"/local/templates/fondpotanin/build/script/plugins/swiper.min.js?1693908502123081";s:6:"source";s:63:"/local/templates/fondpotanin/build/script/plugins/swiper.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1414 1415(function(){'use strict';var $;var Swiper=function(container,params){if(!(this instanceof Swiper))return new Swiper(container,params);var defaults={direction:'horizontal',touchEventsTarget:'container',initialSlide:0,speed:300,autoplay:false,autoplayDisableOnInteraction:true,autoplayStopOnLast:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:0.02,autoHeight:false,setWrapperSize:false,virtualTranslate:false,effect:'slide',coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flip:{slideShadows:true,limitRotation:true},cube:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:0.94},fade:{crossFade:false},parallax:false,zoom:false,zoomMax:3,zoomMin:1,zoomToggle:true,scrollbar:null,scrollbarHide:true,scrollbarDraggable:false,scrollbarSnapOnRelease:false,keyboardControl:false,mousewheelControl:false,mousewheelReleaseOnEdges:false,mousewheelInvert:false,mousewheelForceToAxis:false,mousewheelSensitivity:1,mousewheelEventsTarged:'container',hashnav:false,hashnavWatchState:false,history:false,replaceState:false,breakpoints:undefined,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:'column',slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:false,touchRatio:1,touchAngle:45,simulateTouch:true,shortSwipes:true,longSwipes:true,longSwipesRatio:0.5,longSwipesMs:300,followFinger:true,onlyExternal:false,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,uniqueNavElements:true,pagination:null,paginationElement:'span',paginationClickable:false,paginationHide:false,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:'bullets',resistance:true,resistanceRatio:0.85,nextButton:null,prevButton:null,wat
1415chSlidesProgress:false,watchSlidesVisibility:false,grabCursor:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,lazyLoading:false,lazyLoadingInPrevNext:false,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:false,preloadImages:true,updateOnImagesReady:true,loop:false,loopAdditionalSlides:0,loopedSlides:null,control:undefined,controlInverse:false,controlBy:'slide',normalizeSlideIndex:true,allowSwipeToPrev:true,allowSwipeToNext:true,swipeHandler:null,noSwiping:true,noSwipingClass:'swiper-no-swiping',passiveListeners:true,containerModifierClass:'swiper-container-',slideClass:'swiper-slide',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',bulletClass:'swiper-pagination-bullet',bulletActiveClass:'swiper-pagination-bullet-active',buttonDisabledClass:'swiper-button-disabled',paginationCurrentClass:'swiper-pagination-current',paginationTotalClass:'swiper-pagination-total',paginationHiddenClass:'swiper-pagination-hidden',paginationProgressbarClass:'swiper-pagination-progressbar',paginationClickableClass:'swiper-pagination-clickable',paginationModifierClass:'swiper-pagination-',lazyLoadingClass:'swiper-lazy',lazyStatusLoadingClass:'swiper-lazy-loading',lazyStatusLoadedClass:'swiper-lazy-loaded',lazyPreloaderClass:'swiper-lazy-preloader',notificationClass:'swiper-notification',preloaderClass:'preloader',zoomContainerClass:'swiper-zoom-container',observer:false,observeParents:false,a11y:false,prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',firstSlideMessage:'This is the first slide',lastSlideMessage:'This is the last slide',paginationBulletMessage:'Go to slide {{index}}',runCallbacksOnInit:true};var initialVirtualTranslate=params&¶ms.virtualTranslate;params=params||{};var originalParams={};for(var param in params){if(typeof params[param]==='object'&¶ms[param]!==null&&!(params[param].nodeType||params[param]===window||params[param]===document||(typeof Dom7!=='undefined'&¶ms[param]instanceof Dom7)||(typeof jQuery!=='undefined'&¶ms[param]instanceof jQuery))){originalParams[param]={};for(var deepParam in params[param]){originalParams[param][deepParam]=params[param][deepParam];}} 1416else{originalParams[param]=params[param];}} 1417for(var def in defaults){if(typeof params[def]==='undefined'){params[def]=defaults[def];} 1418else if(typeof params[def]==='object'){for(var deepDef in defaults[def]){if(typeof params[def][deepDef]==='undefined'){params[def][deepDef]=defaults[def][deepDef];}}}} 1419var s=this;s.params=params;s.originalParams=originalParams;s.classNames=[];if(typeof $!=='undefined'&&typeof Dom7!=='undefined'){$=Dom7;} 1420if(typeof $==='undefined'){if(typeof Dom7==='undefined'){$=window.Dom7||window.Zepto||window.jQuery;} 1421else{$=Dom7;} 1422if(!$)return;} 1423s.$=$;s.currentBreakpoint=undefined;s.getActiveBreakpoint=function(){if(!s.params.breakpoints)return false;var breakpoint=false;var points=[],point;for(point in s.params.breakpoints){if(s.params.breakpoints.hasOwnProperty(point)){points.push(point);}} 1424points.sort(function(a,b){return parseInt(a,10)>parseInt(b,10);});for(var i=0;i<points.length;i++){point=points[i];if(point>=window.innerWidth&&!breakpoint){breakpoint=point;}} 1425return breakpoint||'max';};s.setBreakpoint=function(){var breakpoint=s.getActiveBreakpoint();if(breakpoint&&s.currentBreakpoint!==breakpoint){var breakPointsParams=breakpoint in s.params.breakpoints?s.params.breakpoints[breakpoint]:s.originalParams;var needsReLoop=s.params.loop&&(breakPointsParams.slidesPerView!==s.params.slidesPerView);for(var param in breakPointsParams){s.params[param]=breakPointsParams[param];} 1426s.currentBreakpoint=breakpoint;if(needsReLoop&&s.destroyLoop){s.reLoop(true);}}};if(s.params.breakpoints){s.setBreakpoint();} 1427s.container=$(container);if(s.container.length===0)return;if(s.container.length>1){var swipers=[];s.container.each(function(){var container=this;swipers.push(new Swiper(this,params));});return swipers;} 1428s.container[0].swiper=s;s.container.data('swiper',s);s.classNames.push(s.params.containerModifierClass+s.params.direction);if(s.params.freeMode){s.classNames.push(s.params.containerModifierClass+'free-mode');} 1429if(!s.support.flexbox){s.classNames.push(s.params.containerModifierClass+'no-flexbox');s.params.slidesPerColumn=1;} 1430if(s.params.autoHeight){s.classNames.push(s.params.containerModifierClass+'autoheight');} 1431if(s.params.parallax||s.params.watchSlidesVisibility){s.params.watchSlidesProgress=true;} 1432if(s.params.touchReleaseOnEdges){s.params.resistanceRatio=0;} 1433if(['cube','coverflow','flip'].indexOf(s.params.effect)>=0){if(s.support.transforms3d){s.params.watchSlidesProgress=true;s.classNames.push(s.params.containerModifierClass+'3d');} 1434else{s.params.effect='slide';}} 1435if(s.params.effect!=='slide'){s.classNames.push(s.params.containerModifierClass+s.params.effect);} 1436if(s.params.effect==='cube'){s.params.resistanceRatio=0;s.params.slidesPerView=1;s.params.slidesPerColumn=1;s.params.slidesPerGroup=1;s.params.centeredSlides=false;s.params.spaceBetween=0;s.params.virtualTranslate=true;} 1437if(s.params.effect==='fade'||s.params.effect==='flip'){s.params.slidesPerView=1;s.params.slidesPerColumn=1;s.params.slidesPerGroup=1;s.params.watchSlidesProgress=true;s.params.spaceBetween=0;if(typeof initialVirtualTranslate==='undefined'){s.params.virtualTranslate=true;}} 1438if(s.params.grabCursor&&s.support.touch){s.params.grabCursor=false;} 1439s.wrapper=s.container.children('.'+s.params.wrapperClass);if(s.params.pagination){s.paginationContainer=$(s.params.pagination);if(s.params.uniqueNavElements&&typeof s.params.pagination==='string'&&s.paginationContainer.length>1&&s.container.find(s.params.pagination).length===1){s.paginationContainer=s.container.find(s.params.pagination);} 1440if(s.params.paginationType==='bullets'&&s.params.paginationClickable){s.paginationContainer.addClass(s.params.paginationModifierClass+'clickable');} 1441else{s.params.paginationClickable=false;} 1442s.paginationContainer.addClass(s.params.paginationModifierClass+s.params.paginationType);} 1443if(s.params.nextButton||s.params.prevButton){if(s.params.nextButton){s.nextButton=$(s.params.nextButton);if(s.params.uniqueNavElements&&typeof s.params.nextButton==='string'&&s.nextButton.length>1&&s.container.find(s.params.nextButton).length===1){s.nextButton=s.container.find(s.params.nextButton);}} 1444if(s.params.prevButton){s.prevButton=$(s.params.prevButton);if(s.params.uniqueNavElements&&typeof s.params.prevButton==='string'&&s.prevButton.length>1&&s.container.find(s.params.prevButton).length===1){s.prevButton=s.container.find(s.params.prevButton);}}} 1445s.isHorizontal=function(){return s.params.direction==='horizontal';};s.rtl=s.isHorizontal()&&(s.container[0].dir.toLowerCase()==='rtl'||s.container.css('direction')==='rtl');if(s.rtl){s.classNames.push(s.params.containerModifierClass+'rtl');} 1446if(s.rtl){s.wrongRTL=s.wrapper.css('display')==='-webkit-box';} 1447if(s.params.slidesPerColumn>1){s.classNames.push(s.params.containerModifierClass+'multirow');} 1448if(s.device.android){s.classNames.push(s.params.containerModifierClass+'android');} 1449s.container.addClass(s.classNames.join(' '));s.translate=0;s.progress=0;s.velocity=0;s.lockSwipeToNext=function(){s.params.allowSwipeToNext=false;if(s.params.allowSwipeToPrev===false&&s.params.grabCursor){s.unsetGrabCursor(
1449);}};s.lockSwipeToPrev=function(){s.params.allowSwipeToPrev=false;if(s.params.allowSwipeToNext===false&&s.params.grabCursor){s.unsetGrabCursor();}};s.lockSwipes=function(){s.params.allowSwipeToNext=s.params.allowSwipeToPrev=false;if(s.params.grabCursor)s.unsetGrabCursor();};s.unlockSwipeToNext=function(){s.params.allowSwipeToNext=true;if(s.params.allowSwipeToPrev===true&&s.params.grabCursor){s.setGrabCursor();}};s.unlockSwipeToPrev=function(){s.params.allowSwipeToPrev=true;if(s.params.allowSwipeToNext===true&&s.params.grabCursor){s.setGrabCursor();}};s.unlockSwipes=function(){s.params.allowSwipeToNext=s.params.allowSwipeToPrev=true;if(s.params.grabCursor)s.setGrabCursor();};function round(a){return Math.floor(a);} 1450s.setGrabCursor=function(moving){s.container[0].style.cursor='move';s.container[0].style.cursor=moving?'-webkit-grabbing':'-webkit-grab';s.container[0].style.cursor=moving?'-moz-grabbin':'-moz-grab';s.container[0].style.cursor=moving?'grabbing':'grab';};s.unsetGrabCursor=function(){s.container[0].style.cursor='';};if(s.params.grabCursor){s.setGrabCursor();} 1451s.imagesToLoad=[];s.imagesLoaded=0;s.loadImage=function(imgElement,src,srcset,sizes,checkForComplete,callback){var image;function onReady(){if(callback)callback();} 1452if(!imgElement.complete||!checkForComplete){if(src){image=new window.Image();image.onload=onReady;image.onerror=onReady;if(sizes){image.sizes=sizes;} 1453if(srcset){image.srcset=srcset;} 1454if(src){image.src=src;}}else{onReady();}}else{onReady();}};s.preloadImages=function(){s.imagesToLoad=s.container.find('img');function _onReady(){if(typeof s==='undefined'||s===null||!s)return;if(s.imagesLoaded!==undefined)s.imagesLoaded++;if(s.imagesLoaded===s.imagesToLoad.length){if(s.params.updateOnImagesReady)s.update();s.emit('onImagesReady',s);}} 1455for(var i=0;i<s.imagesToLoad.length;i++){s.loadImage(s.imagesToLoad[i],(s.imagesToLoad[i].currentSrc||s.imagesToLoad[i].getAttribute('src')),(s.imagesToLoad[i].srcset||s.imagesToLoad[i].getAttribute('srcset')),s.imagesToLoad[i].sizes||s.imagesToLoad[i].getAttribute('sizes'),true,_onReady);}};s.autoplayTimeoutId=undefined;s.autoplaying=false;s.autoplayPaused=false;function autoplay(){var autoplayDelay=s.params.autoplay;var activeSlide=s.slides.eq(s.activeIndex);if(activeSlide.attr('data-swiper-autoplay')){autoplayDelay=activeSlide.attr('data-swiper-autoplay')||s.params.autoplay;} 1456s.autoplayTimeoutId=setTimeout(function(){if(s.params.loop){s.fixLoop();s._slideNext();s.emit('onAutoplay',s);} 1457else{if(!s.isEnd){s._slideNext();s.emit('onAutoplay',s);} 1458else{if(!params.autoplayStopOnLast){s._slideTo(0);s.emit('onAutoplay',s);} 1459else{s.stopAutoplay();}}}},autoplayDelay);} 1460s.startAutoplay=function(){if(typeof s.autoplayTimeoutId!=='undefined')return false;if(!s.params.autoplay)return false;if(s.autoplaying)return false;s.autoplaying=true;s.emit('onAutoplayStart',s);autoplay();};s.stopAutoplay=function(internal){if(!s.autoplayTimeoutId)return;if(s.autoplayTimeoutId)clearTimeout(s.autoplayTimeoutId);s.autoplaying=false;s.autoplayTimeoutId=undefined;s.emit('onAutoplayStop',s);};s.pauseAutoplay=function(speed){if(s.autoplayPaused)return;if(s.autoplayTimeoutId)clearTimeout(s.autoplayTimeoutId);s.autoplayPaused=true;if(speed===0){s.autoplayPaused=false;autoplay();} 1461else{s.wrapper.transitionEnd(function(){if(!s)return;s.autoplayPaused=false;if(!s.autoplaying){s.stopAutoplay();} 1462else{autoplay();}});}};s.minTranslate=function(){return(-s.snapGrid[0]);};s.maxTranslate=function(){return(-s.snapGrid[s.snapGrid.length-1]);};s.updateAutoHeight=function(){var activeSlides=[];var newHeight=0;var i;if(s.params.slidesPerView!=='auto'&&s.params.slidesPerView>1){for(i=0;i<Math.ceil(s.params.slidesPerView);i++){var index=s.activeIndex+i;if(index>s.slides.length)break;activeSlides.push(s.slides.eq(index)[0]);}}else{activeSlides.push(s.slides.eq(s.activeIndex)[0]);} 1463for(i=0;i<activeSlides.length;i++){if(typeof activeSlides[i]!=='undefined'){var height=activeSlides[i].offsetHeight;newHeight=height>newHeight?height:newHeight;}} 1464if(newHeight)s.wrapper.css('height',newHeight+'px');};s.updateContainerSize=function(){var width,height;if(typeof s.params.width!=='undefined'){width=s.params.width;} 1465else{width=s.container[0].clientWidth;} 1466if(typeof s.params.height!=='undefined'){height=s.params.height;} 1467else{height=s.container[0].clientHeight;} 1468if(width===0&&s.isHorizontal()||height===0&&!s.isHorizontal()){return;} 1469width=width-parseInt(s.container.css('padding-left'),10)-parseInt(s.container.css('padding-right'),10);height=height-parseInt(s.container.css('padding-top'),10)-parseInt(s.container.css('padding-bottom'),10);s.width=width;s.height=height;s.size=s.isHorizontal()?s.width:s.height;};s.updateSlidesSize=function(){s.slides=s.wrapper.children('.'+s.params.slideClass);s.snapGrid=[];s.slidesGrid=[];s.slidesSizesGrid=[];var spaceBetween=s.params.spaceBetween,slidePosition=-s.params.slidesOffsetBefore,i,prevSlideSize=0,index=0;
1469if(typeof s.size==='undefined')return;if(typeof spaceBetween==='string'&&spaceBetween.indexOf('%')>=0){spaceBetween=parseFloat(spaceBetween.replace('%',''))/100*s.size;} 1470s.virtualSize=-spaceBetween;if(s.rtl)s.slides.css({marginLeft:'',marginTop:''});else s.slides.css({marginRight:'',marginBottom:''});var slidesNumberEvenToRows;if(s.params.slidesPerColumn>1){if(Math.floor(s.slides.length/s.params.slidesPerColumn)===s.slides.length/s.params.slidesPerColumn){slidesNumberEvenToRows=s.slides.length;} 1471else{slidesNumberEvenToRows=Math.ceil(s.slides.length/s.params.slidesPerColumn)*s.params.slidesPerColumn;} 1472if(s.params.slidesPerView!=='auto'&&s.params.slidesPerColumnFill==='row'){slidesNumberEvenToRows=Math.max(slidesNumberEvenToRows,s.params.slidesPerView*s.params.slidesPerColumn);}} 1473var slideSize;var slidesPerColumn=s.params.slidesPerColumn;var slidesPerRow=slidesNumberEvenToRows/slidesPerColumn;var numFullColumns=slidesPerRow-(s.params.slidesPerColumn*slidesPerRow-s.slides.length);for(i=0;i<s.slides.length;i++){slideSize=0;var slide=s.slides.eq(i);if(s.params.slidesPerColumn>1){var newSlideOrderIndex;var column,row;if(s.params.slidesPerColumnFill==='column'){column=Math.floor(i/slidesPerColumn);row=i-column*slidesPerColumn;if(column>numFullColumns||(column===numFullColumns&&row===slidesPerColumn-1)){if(++row>=slidesPerColumn){row=0;column++;}} 1474newSlideOrderIndex=column+row*slidesNumberEvenToRows/slidesPerColumn;slide.css({'-webkit-box-ordinal-group':newSlideOrderIndex,'-moz-box-ordinal-group':newSlideOrderIndex,'-ms-flex-order':newSlideOrderIndex,'-webkit-order':newSlideOrderIndex,'order':newSlideOrderIndex});} 1475else{row=Math.floor(i/slidesPerRow);column=i-row*slidesPerRow;} 1476slide.css('margin-'+(s.isHorizontal()?'top':'left'),(row!==0&&s.params.spaceBetween)&&(s.params.spaceBetween+'px')).attr('data-swiper-column',column).attr('data-swiper-row',row);} 1477if(slide.css('display')==='none')continue;if(s.params.slidesPerView==='auto'){slideSize=s.isHorizontal()?slide.outerWidth(true):slide.outerHeight(true);if(s.params.roundLengths)slideSize=round(slideSize);} 1478else{slideSize=(s.size-(s.params.slidesPerView-1)*spaceBetween)/s.params.slidesPerView;if(s.params.roundLengths)slideSize=round(slideSize);if(s.isHorizontal()){s.slides[i].style.width=slideSize+'px';} 1479else{s.slides[i].style.height=slideSize+'px';}} 1480s.slides[i].swiperSlideSize=slideSize;s.slidesSizesGrid.push(slideSize);if(s.params.centeredSlides){slidePosition=slidePosition+slideSize/2+prevSlideSize/2+spaceBetween;if(prevSlideSize===0&&i!==0)slidePosition=slidePosition-s.size/2-spaceBetween;if(i===0)slidePosition=slidePosition-s.size/2-spaceBetween;if(Math.abs(slidePosition)<1/1000)slidePosition=0;if((index)%s.params.slidesPerGroup===0)s.snapGrid.push(slidePosition);s.slidesGrid.push(slidePosition);} 1481else{if((index)%s.params.slidesPerGroup===0)s.snapGrid.push(slidePosition);s.slidesGrid.push(slidePosition);slidePosition=slidePosition+slideSize+spaceBetween;} 1482s.virtualSize+=slideSize+spaceBetween;prevSlideSize=slideSize;index++;} 1483s.virtualSize=Math.max(s.virtualSize,s.size)+s.params.slidesOffsetAfter;var newSlidesGrid;if(s.rtl&&s.wrongRTL&&(s.params.effect==='slide'||s.params.effect==='coverflow')){s.wrapper.css({width:s.virtualSize+s.params.spaceBetween+'px'});} 1484if(!s.support.flexbox||s.params.setWrapperSize){if(s.isHorizontal())s.wrapper.css({width:s.virtualSize+s.params.spaceBetween+'px'});else s.wrapper.css({height:s.virtualSize+s.params.spaceBetween+'px'});} 1485if(s.params.slidesPerColumn>1){s.virtualSize=(slideSize+s.params.spaceBetween)*slidesNumberEvenToRows;s.virtualSize=Math.ceil(s.virtualSize/s.params.slidesPerColumn)-s.params.spaceBetween;if(s.isHorizontal())s.wrapper.css({width:s.virtualSize+s.params.spaceBetween+'px'});else s.wrapper.css({height:s.virtualSize+s.params.spaceBetween+'px'});if(s.params.centeredSlides){newSlidesGrid=[];for(i=0;i<s.snapGrid.length;i++){if(s.snapGrid[i]<s.virtualSize+s.snapGrid[0])newSlidesGrid.push(s.snapGrid[i]);} 1486s.snapGrid=newSlidesGrid;}} 1487if(!s.params.centeredSlides){newSlidesGrid=[];for(i=0;i<s.snapGrid.length;i++){if(s.snapGrid[i]<=s.virtualSize-s.size){newSlidesGrid.push(s.snapGrid[i]);}}
1487 1488s.snapGrid=newSlidesGrid;if(Math.floor(s.virtualSize-s.size)-Math.floor(s.snapGrid[s.snapGrid.length-1])>1){s.snapGrid.push(s.virtualSize-s.size);}} 1489if(s.snapGrid.length===0)s.snapGrid=[0];if(s.params.spaceBetween!==0){if(s.isHorizontal()){if(s.rtl)s.slides.css({marginLeft:spaceBetween+'px'});else s.slides.css({marginRight:spaceBetween+'px'});} 1490else s.slides.css({marginBottom:spaceBetween+'px'});} 1491if(s.params.watchSlidesProgress){s.updateSlidesOffset();}};s.updateSlidesOffset=function(){for(var i=0;i<s.slides.length;i++){s.slides[i].swiperSlideOffset=s.isHorizontal()?s.slides[i].offsetLeft:s.slides[i].offsetTop;}};s.currentSlidesPerView=function(){var spv=1,i,j;if(s.params.centeredSlides){var size=s.slides[s.activeIndex].swiperSlideSize;var breakLoop;for(i=s.activeIndex+1;i<s.slides.length;i++){if(s.slides[i]&&!breakLoop){size+=s.slides[i].swiperSlideSize;spv++;if(size>s.size)breakLoop=true;}} 1492for(j=s.activeIndex-1;j>=0;j--){if(s.slides[j]&&!breakLoop){size+=s.slides[j].swiperSlideSize;spv++;if(size>s.size)breakLoop=true;}}} 1493else{for(i=s.activeIndex+1;i<s.slides.length;i++){if(s.slidesGrid[i]-s.slidesGrid[s.activeIndex]<s.size){spv++;}}} 1494return spv;};s.updateSlidesProgress=function(translate){if(typeof translate==='undefined'){translate=s.translate||0;} 1495if(s.slides.length===0)return;if(typeof s.slides[0].swiperSlideOffset==='undefined')s.updateSlidesOffset();var offsetCenter=-translate;if(s.rtl)offsetCenter=translate;s.slides.removeClass(s.params.slideVisibleClass);for(var i=0;i<s.slides.length;i++){var slide=s.slides[i];var slideProgress=(offsetCenter+(s.params.centeredSlides?s.minTranslate():0)-slide.swiperSlideOffset)/(slide.swiperSlideSize+s.params.spaceBetween);if(s.params.watchSlidesVisibility){var slideBefore=-(offsetCenter-slide.swiperSlideOffset);var slideAfter=slideBefore+s.slidesSizesGrid[i];var isVisible=(slideBefore>=0&&slideBefore<s.size)||(slideAfter>0&&slideAfter<=s.size)||(slideBefore<=0&&slideAfter>=s.size);if(isVisible){s.slides.eq(i).addClass(s.params.slideVisibleClass);}} 1496slide.progress=s.rtl?-slideProgress:slideProgress;}};s.updateProgress=function(translate){if(typeof translate==='undefined'){translate=s.translate||0;} 1497var translatesDiff=s.maxTranslate()-s.minTranslate();var wasBeginning=s.isBeginning;var wasEnd=s.isEnd;if(translatesDiff===0){s.progress=0;s.isBeginning=s.isEnd=true;} 1498else{s.progress=(translate-s.minTranslate())/(translatesDiff);s.isBeginning=s.progress<=0;s.isEnd=s.progress>=1;} 1499if(s.isBeginning&&!wasBeginning)s.emit('onReachBeginning',s);if(s.isEnd&&!wasEnd)s.emit('onReachEnd',s);if(s.params.watchSlidesProgress)s.updateSlidesProgress(translate);s.emit('onProgress',s,s.progress);};s.updateActiveIndex=function(){var translate=s.rtl?s.translate:-s.translate;var newActiveIndex,i,snapIndex;for(i=0;i<s.slidesGrid.length;i++){if(typeof s.slidesGrid[i+1]!=='undefined'){if(translate>=s.slidesGrid[i]&&translate<s.slidesGrid[i+1]-(s.slidesGrid[i+1]-s.slidesGrid[i])/2){newActiveIndex=i;} 1500else if(translate>=s.slidesGrid[i]&&translate<s.slidesGrid[i+1]){newActiveIndex=i+1;}} 1501else{if(translate>=s.slidesGrid[i]){newActiveIndex=i;}}} 1502if(s.params.normalizeSlideIndex){if(newActiveIndex<0||typeof newActiveIndex==='undefined')newActiveIndex=0;} 1503snapIndex=Math.floor(newActiveIndex/s.params.slidesPerGroup);if(snapIndex>=s.snapGrid.length)snapIndex=s.snapGrid.length-1;if(newActiveIndex===s.activeIndex){return;} 1504s.snapIndex=snapIndex;s.previousIndex=s.activeIndex;s.activeIndex=newActiveIndex;s.updateClasses();s.updateRealIndex();};s.updateRealIndex=function(){s.realIndex=parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index')||s.activeIndex,10);};s.updateClasses=function(){s.slides.removeClass(s.params.slideActiveClass+' '+s.params.slideNextClass+' '+s.params.slidePrevClass+' '+s.params.slideDuplicateActiveClass+' '+s.params.slideDuplicateNextClass+' '+s.params.slideDuplicatePrevClass);var activeSlide=s.slides.eq(s.activeIndex);activeSlide.addClass(s.params.slideActiveClass);if(params.loop){if(activeSlide.hasClass(s.params.slideDuplicateClass)){s.wrapper.children('.'+s.params.slideClass+':not(.'+s.params.slideDuplicateClass+')[data-swiper-slide-index="'+s.realIndex+'"]').addClass(s.params.slideDuplicateActiveClass);} 1505else{s.wrapper.children('.'+s.params.slideClass+'.'+s.params.slideDuplicateClass+'[data-swiper-slide-index="'+s.realIndex+'"]').addClass(s.params.slideDuplicateActiveClass);}} 1506var nextSlide=activeSlide.next('.'+s.params.slideClass).addClass(s.params.slideNextClass);if(s.params.loop&&nextSlide.length===0){nextSlide=s.slides.eq(0);nextSlide.addClass(s.params.slideNextClass);} 1507var prevSlide=activeSlide.prev('.'+s.params.slideClass).addClass(s.params.slidePrevClass);if(s.params.loop&&prevSlide.length===0){prevSlide=s.slides.eq(-1);prevSlide.addClass(s.params.slidePrevClass);} 1508if(params.loop){if(nextSlide.hasClass(s.params.slideDuplicateClass)){s.wrapper.children('.'+s.params.slideClass+':not(.'+s.params.slideDuplicateClass+')[data-swiper-slide-index="'+nextSlide.attr('data-swiper-slide-index')+'"]').addClass(s.params.slideDuplicateNextClass);} 1509else{s.wrapper.children('.'+s.params.slideClass+'.'+s.params.slideDuplicateClass+'[data-swiper-slide-index="'+nextSlide.attr('data-swiper-slide-index')+'"]').addClass(s.params.slideDuplicateNextClass);} 1510if(prevSlide.hasClass(s.params.slideDuplicateClass)){s.wrapper.children('.'+s.params.slideClass+':not(.'+s.params.slideDuplicateClass+')[data-swiper-slide-index="'+prevSlide.attr('data-swiper-slide-index')+'"]').addClass(s.params.slideDuplicatePrevClass);} 1511else{s.wrapper.children('.'+s.params.slideClass+'.'+s.params.slideDuplicateClass+'[data-swiper-slide-index="'+prevSlide.attr('data-swiper-slide-index')+'"]').addClass(s.params.slideDuplicatePrevClass);}} 1512if(s.paginationContainer&&s.paginationContainer.length>
15120){var current,total=s.params.loop?Math.ceil((s.slides.length-s.loopedSlides*2)/s.params.slidesPerGroup):s.snapGrid.length;if(s.params.loop){current=Math.ceil((s.activeIndex-s.loopedSlides)/s.params.slidesPerGroup);if(current>s.slides.length-1-s.loopedSlides*2){current=current-(s.slides.length-s.loopedSlides*2);} 1513if(current>total-1)current=current-total;if(current<0&&s.params.paginationType!=='bullets')current=total+current;} 1514else{if(typeof s.snapIndex!=='undefined'){current=s.snapIndex;} 1515else{current=s.activeIndex||0;}} 1516if(s.params.paginationType==='bullets'&&s.bullets&&s.bullets.length>0){s.bullets.removeClass(s.params.bulletActiveClass);if(s.paginationContainer.length>1){s.bullets.each(function(){if($(this).index()===current)$(this).addClass(s.params.bulletActiveClass);});} 1517else{s.bullets.eq(current).addClass(s.params.bulletActiveClass);}} 1518if(s.params.paginationType==='fraction'){s.paginationContainer.find('.'+s.params.paginationCurrentClass).text(current+1);s.paginationContainer.find('.'+s.params.paginationTotalClass).text(total);} 1519if(s.params.paginationType==='progress'){var scale=(current+1)/total,scaleX=scale,scaleY=1;if(!s.isHorizontal()){scaleY=scale;scaleX=1;} 1520s.paginationContainer.find('.'+s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX('+scaleX+') scaleY('+scaleY+')').transition(s.params.speed);} 1521if(s.params.paginationType==='custom'&&s.params.paginationCustomRender){s.paginationContainer.html(s.params.paginationCustomRender(s,current+1,total));s.emit('onPaginationRendered',s,s.paginationContainer[0]);}} 1522if(!s.params.loop){if(s.params.prevButton&&s.prevButton&&s.prevButton.length>0){if(s.isBeginning){s.prevButton.addClass(s.params.buttonDisabledClass);if(s.params.a11y&&s.a11y)s.a11y.disable(s.prevButton);} 1523else{s.prevButton.removeClass(s.params.buttonDisabledClass);if(s.params.a11y&&s.a11y)s.a11y.enable(s.prevButton);}} 1524if(s.params.nextButton&&s.nextButton&&s.nextButton.length>0){if(s.isEnd){s.nextButton.addClass(s.params.buttonDisabledClass);if(s.params.a11y&&s.a11y)s.a11y.disable(s.nextButton);} 1525else{s.nextButton.removeClass(s.params.buttonDisabledClass);if(s.params.a11y&&s.a11y)s.a11y.enable(s.nextButton);}}}};s.updatePagination=function(){if(!s.params.pagination)return;if(s.paginationContainer&&s.paginationContainer.length>0){var paginationHTML='';if(s.params.paginationType==='bullets'){var numberOfBullets=s.params.loop?Math.ceil((s.slides.length-s.loopedSlides*2)/s.params.slidesPerGroup):s.snapGrid.length;for(var i=0;i<numberOfBullets;i++){if(s.params.paginationBulletRender){paginationHTML+=s.params.paginationBulletRender(s,i,s.params.bulletClass);} 1526else{paginationHTML+='<'+s.params.paginationElement+' class="'+s.params.bulletClass+'"></'+s.params.paginationElement+'>';}} 1527s.paginationContainer.html(paginationHTML);s.bullets=s.paginationContainer.find('.'+s.params.bulletClass);if(s.params.paginationClickable&&s.params.a11y&&s.a11y){s.a11y.initPagination();}} 1528if(s.params.paginationType==='fraction'){if(s.params.paginationFractionRender){paginationHTML=s.params.paginationFractionRender(s,s.params.paginationCurrentClass,s.params.paginationTotalClass);} 1529else{paginationHTML='<span class="'+s.params.paginationCurrentClass+'"></span>'+' / '+'<span class="'+s.params.paginationTotalClass+'"></span>';} 1530s.paginationContainer.html(paginationHTML);} 1531if(s.params.paginationType==='progress'){if(s.params.paginationProgressRender){paginationHTML=s.params.paginationProgressRender(s,s.params.paginationProgressbarClass);} 1532else{paginationHTML='<span class="'+s.params.paginationProgressbarClass+'"></span>';} 1533s.paginationContainer.html(paginationHTML);} 1534if(s.params.paginationType!=='custom'){s.emit('onPaginationRendered',s,s.paginationContainer[0]);}}};s.update=function(updateTranslate){if(!s)return;s.updateContainerSize();s.updateSlidesSize();s.updateProgress();s.updatePagination();s.updateClasses();if(s.params.scrollbar&&s.scrollbar){s.scrollbar.set();} 1535var newTranslate;function forceSetTranslate(){var translate=s.rtl?-s.translate:s.translate;newTranslate=Math.min(Math.max(s.translate,s.maxTranslate()),s.minTranslate());s.setWrapperTranslate(newTranslate);s.updateActiveIndex();s.updateClasses();} 1536if(updateTranslate){var translated;if(s.controller&&s.controller.spline){s.controller.spline=undefined;} 1537if(s.params.freeMode){forceSetTranslate();if(s.params.autoHeight){s.updateAutoHeight();}} 1538else{if((s.params.slidesPerView==='auto'||s.params.slidesPerView>1)&&s.isEnd&&!s.params.centeredSlides){translated=s.slideTo(s.slides.length-1,0,false,true);} 1539else{translated=s.slideTo(s.activeIndex,0,false,true);} 1540if(!translated){forceSetTranslate();}}} 1541else if(s.params.autoHeight){s.updateAutoHeight();}};s.onResize=function(forceUpdatePagination){if(s.params.onBeforeResize)s.params.onBeforeResize(s);if(s.params.breakpoints){s.setBreakpoint();} 1542var allowSwipeToPrev=s.params.allowSwipeToPrev;var allowSwipeToNext=s.params.allowSwipeToNext;s.params.allowSwipeToPrev=s.params.allowSwipeToNext=true;s.updateContainerSize();s.updateSlidesSize();
1542if(s.params.slidesPerView==='auto'||s.params.freeMode||forceUpdatePagination)s.updatePagination();if(s.params.scrollbar&&s.scrollbar){s.scrollbar.set();} 1543if(s.controller&&s.controller.spline){s.controller.spline=undefined;} 1544var slideChangedBySlideTo=false;if(s.params.freeMode){var newTranslate=Math.min(Math.max(s.translate,s.maxTranslate()),s.minTranslate());s.setWrapperTranslate(newTranslate);s.updateActiveIndex();s.updateClasses();if(s.params.autoHeight){s.updateAutoHeight();}} 1545else{s.updateClasses();if((s.params.slidesPerView==='auto'||s.params.slidesPerView>1)&&s.isEnd&&!s.params.centeredSlides){slideChangedBySlideTo=s.slideTo(s.slides.length-1,0,false,true);} 1546else{slideChangedBySlideTo=s.slideTo(s.activeIndex,0,false,true);}} 1547if(s.params.lazyLoading&&!slideChangedBySlideTo&&s.lazy){s.lazy.load();} 1548s.params.allowSwipeToPrev=allowSwipeToPrev;s.params.allowSwipeToNext=allowSwipeToNext;if(s.params.onAfterResize)s.params.onAfterResize(s);};s.touchEventsDesktop={start:'mousedown',move:'mousemove',end:'mouseup'};if(window.navigator.pointerEnabled)s.touchEventsDesktop={start:'pointerdown',move:'pointermove',end:'pointerup'};else if(window.navigator.msPointerEnabled)s.touchEventsDesktop={start:'MSPointerDown',move:'MSPointerMove',end:'MSPointerUp'};s.touchEvents={start:s.support.touch||!s.params.simulateTouch?'touchstart':s.touchEventsDesktop.start,move:s.support.touch||!s.params.simulateTouch?'touchmove':s.touchEventsDesktop.move,end:s.support.touch||!s.params.simulateTouch?'touchend':s.touchEventsDesktop.end};if(window.navigator.pointerEnabled||window.navigator.msPointerEnabled){(s.params.touchEventsTarget==='container'?s.container:s.wrapper).addClass('swiper-wp8-'+s.params.direction);} 1549s.initEvents=function(detach){var actionDom=detach?'off':'on';var action=detach?'removeEventListener':'addEventListener';var touchEventsTarget=s.params.touchEventsTarget==='container'?s.container[0]:s.wrapper[0];var target=s.support.touch?touchEventsTarget:document;var moveCapture=s.params.nested?true:false;if(s.browser.ie){touchEventsTarget[action](s.touchEvents.start,s.onTouchStart,false);target[action](s.touchEvents.move,s.onTouchMove,moveCapture);target[action](s.touchEvents.end,s.onTouchEnd,false);} 1550else{if(s.support.touch){var passiveListener=s.touchEvents.start==='touchstart'&&s.support.passiveListener&&s.params.passiveListeners?{passive:true,capture:false}:false;touchEventsTarget[action](s.touchEvents.start,s.onTouchStart,passiveListener);touchEventsTarget[action](s.touchEvents.move,s.onTouchMove,moveCapture);touchEventsTarget[action](s.touchEvents.end,s.onTouchEnd,passiveListener);} 1551if((params.simulateTouch&&!s.device.ios&&!s.device.android)||(params.simulateTouch&&!s.support.touch&&s.device.ios)){touchEventsTarget[action]('mousedown',s.onTouchStart,false);document[action]('mousemove',s.onTouchMove,moveCapture);document[action]('mouseup',s.onTouchEnd,false);}} 1552window[action]('resize',s.onResize);if(s.params.nextButton&&s.nextButton&&s.nextButton.length>0){s.nextButton[actionDom]('click',s.onClickNext);if(s.params.a11y&&s.a11y)s.nextButton[actionDom]('keydown',s.a11y.onEnterKey);} 1553if(s.params.prevButton&&s.prevButton&&s.prevButton.length>0){s.prevButton[actionDom]('click',s.onClickPrev);if(s.params.a11y&&s.a11y)s.prevButton[actionDom]('keydown',s.a11y.onEnterKey);} 1554if(s.params.pagination&&s.params.paginationClickable){s.paginationContainer[actionDom]('click','.'+s.params.bulletClass,s.onClickIndex);if(s.params.a11y&&s.a11y)s.paginationContainer[actionDom]('keydown','.'+s.params.bulletClass,s.a11y.onEnterKey);} 1555if(s.params.preventClicks||s.params.preventClicksPropagation)touchEventsTarget[action]('click',s.preventClicks,true);};s.attachEvents=function(){s.initEvents();};s.detachEvents=function(){s.initEvents(true);};s.allowClick=true;s.preventClicks=function(e){if(!s.allowClick){if(s.params.preventClicks)e.preventDefault();if(s.params.preventClicksPropagation&&s.animating){e.stopPropagation();e.stopImmediatePropagation();}}};s.onClickNext=function(e){e.preventDefault();if(s.isEnd&&!s.params.loop)return;s.slideNext();};s.onClickPrev=function(e){e.preventDefault();if(s.isBeginning&&!s.params.loop)return;s.slidePrev();};s.onClickIndex=function(e){e.preventDefault();var index=$(this).index()*s.params.slidesPerGroup;if(s.params.loop)index=index+s.loopedSlides;s.slideTo(index);};function findElementInEvent(e,selector){var el=$(e.target);if(!el.is(selector)){if(typeof selector==='string'){el=el.parents(selector);} 1556else if(selector.nodeType){var found;el.parents().each(function(index,_el){if(_el===selector)found=selector;});if(!found)return undefined;else return selector;}} 1557if(el.length===0){return undefined;} 1558return el[0];} 1559s.updateClickedSlide=function(e){var slide=findElementInEvent(e,'.'+s.params.slideClass);var slideFound=false;if(slide){for(var i=0;i<s.slides.length;i++){if(s.slides[i]===slide)slideFound=true;}} 1560if(slide&&slideFound){s.clickedSlide=slide;s.clickedIndex=$(slide).index();} 1561else{s.clickedSlide=undefined;s.clickedIndex=undefined;return;} 1562if(s.params.slideToClickedSlide&&s.clickedIndex!==undefined&&s.clickedIndex!==s.activeIndex){var slideToIndex=s.clickedIndex,realIndex,duplicatedSlides,slidesPerView=s.params.slidesPerView==='auto'?s.currentSlidesPerView():s.params.slidesPerView;if(s.params.loop){if(s.animating)return;realIndex=parseInt($(s.clickedSlide).attr('data-swiper-slide-index'),10);
1562if(s.params.centeredSlides){if((slideToIndex<s.loopedSlides-slidesPerView/2)||(slideToIndex>s.slides.length-s.loopedSlides+slidesPerView/2)){s.fixLoop();slideToIndex=s.wrapper.children('.'+s.params.slideClass+'[data-swiper-slide-index="'+realIndex+'"]:not(.'+s.params.slideDuplicateClass+')').eq(0).index();setTimeout(function(){s.slideTo(slideToIndex);},0);} 1563else{s.slideTo(slideToIndex);}} 1564else{if(slideToIndex>s.slides.length-slidesPerView){s.fixLoop();slideToIndex=s.wrapper.children('.'+s.params.slideClass+'[data-swiper-slide-index="'+realIndex+'"]:not(.'+s.params.slideDuplicateClass+')').eq(0).index();setTimeout(function(){s.slideTo(slideToIndex);},0);} 1565else{s.slideTo(slideToIndex);}}} 1566else{s.slideTo(slideToIndex);}}};var isTouched,isMoved,allowTouchCallbacks,touchStartTime,isScrolling,currentTranslate,startTranslate,allowThresholdMove,formElements='input, select, textarea, button, video',lastClickTime=Date.now(),clickTimeout,velocities=[],allowMomentumBounce;s.animating=false;s.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var isTouchEvent,startMoving;s.onTouchStart=function(e){if(e.originalEvent)e=e.originalEvent;isTouchEvent=e.type==='touchstart';if(!isTouchEvent&&'which'in e&&e.which===3)return;if(s.params.noSwiping&&findElementInEvent(e,'.'+s.params.noSwipingClass)){s.allowClick=true;return;} 1567if(s.params.swipeHandler){if(!findElementInEvent(e,s.params.swipeHandler))return;} 1568var startX=s.touches.currentX=e.type==='touchstart'?e.targetTouches[0].pageX:e.pageX;var startY=s.touches.currentY=e.type==='touchstart'?e.targetTouches[0].pageY:e.pageY;if(s.device.ios&&s.params.iOSEdgeSwipeDetection&&startX<=s.params.iOSEdgeSwipeThreshold){return;} 1569isTouched=true;isMoved=false;allowTouchCallbacks=true;isScrolling=undefined;startMoving=undefined;s.touches.startX=startX;s.touches.startY=startY;touchStartTime=Date.now();s.allowClick=true;s.updateContainerSize();s.swipeDirection=undefined;if(s.params.threshold>0)allowThresholdMove=false;if(e.type!=='touchstart'){var preventDefault=true;if($(e.target).is(formElements))preventDefault=false;if(document.activeElement&&$(document.activeElement).is(formElements)){document.activeElement.blur();} 1570if(preventDefault){e.preventDefault();}} 1571s.emit('onTouchStart',s,e);};s.onTouchMove=function(e){if(e.originalEvent)e=e.originalEvent;if(isTouchEvent&&e.type==='mousemove')return;if(e.preventedByNestedSwiper){s.touches.startX=e.type==='touchmove'?e.targetTouches[0].pageX:e.pageX;s.touches.startY=e.type==='touchmove'?e.targetTouches[0].pageY:e.pageY;return;} 1572if(s.params.onlyExternal){s.allowClick=false;if(isTouched){s.touches.startX=s.touches.currentX=e.type==='touchmove'?e.targetTouches[0].pageX:e.pageX;s.touches.startY=s.touches.currentY=e.type==='touchmove'?e.targetTouches[0].pageY:e.pageY;touchStartTime=Date.now();} 1573return;} 1574if(isTouchEvent&&s.params.touchReleaseOnEdges&&!s.params.loop){if(!s.isHorizontal()){if((s.touches.currentY<s.touches.startY&&s.translate<=s.maxTranslate())||(s.touches.currentY>s.touches.startY&&s.translate>=s.minTranslate())){return;}} 1575else{if((s.touches.currentX<s.touches.startX&&s.translate<=s.maxTranslate())||(s.touches.currentX>s.touches.startX&&s.translate>=s.minTranslate())){return;}}} 1576if(isTouchEvent&&document.activeElement){if(e.target===document.activeElement&&$(e.target).is(formElements)){isMoved=true;s.allowClick=false;return;}} 1577if(allowTouchCallbacks){s.emit('onTouchMove',s,e);} 1578if(e.targetTouches&&e.targetTouches.length>1)return;s.touches.currentX=e.type==='touchmove'?e.targetTouches[0].pageX:e.pageX;s.touches.currentY=e.type==='touchmove'?e.targetTouches[0].pageY:e.pageY;if(typeof isScrolling==='undefined'){var touchAngle;if(s.isHorizontal()&&s.touches.currentY===s.touches.startY||!s.isHorizontal()&&s.touches.currentX===s.touches.startX){isScrolling=false;} 1579else{touchAngle=Math.atan2(Math.abs(s.touches.currentY-s.touches.startY),Math.abs(s.touches.currentX-s.touches.startX))*180/Math.PI;isScrolling=s.isHorizontal()?touchAngle>s.params.touchAngle:(90-touchAngle>s.params.touchAngle);}} 1580if(isScrolling){s.emit('onTouchMoveOpposite',s,e);} 1581if(typeof startMoving==='undefined'){if(s.touches.currentX!==s.touches.startX||s.touches.currentY!==s.touches.startY){startMoving=true;}} 1582if(!isTouched)return;if(isScrolling){isTouched=false;return;} 1583if(!startMoving){return;} 1584s.allowClick=false;s.emit('onSliderMove',s,e);e.preventDefault();if(s.params.touchMoveStopPropagation&&!s.params.nested){e.stopPropagation();} 1585if(!isMoved){if(params.loop){s.fixLoop();} 1586startTranslate=s.getWrapperTranslate();s.setWrapperTransition(0);if(s.animating){s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');} 1587if(s.params.autoplay&&s.autoplaying){if(s.params.autoplayDisableOnInteraction){s.stopAutoplay();} 1588else{s.pauseAutoplay();}}
1589allowMomentumBounce=false;if(s.params.grabCursor&&(s.params.allowSwipeToNext===true||s.params.allowSwipeToPrev===true)){s.setGrabCursor(true);}} 1590isMoved=true;var diff=s.touches.diff=s.isHorizontal()?s.touches.currentX-s.touches.startX:s.touches.currentY-s.touches.startY;diff=diff*s.params.touchRatio;if(s.rtl)diff=-diff;s.swipeDirection=diff>0?'prev':'next';currentTranslate=diff+startTranslate;var disableParentSwiper=true;if((diff>0&¤tTranslate>s.minTranslate())){disableParentSwiper=false;if(s.params.resistance)currentTranslate=s.minTranslate()-1+Math.pow(-s.minTranslate()+startTranslate+diff,s.params.resistanceRatio);} 1591else if(diff<0&¤tTranslate<s.maxTranslate()){disableParentSwiper=false;if(s.params.resistance)currentTranslate=s.maxTranslate()+1-Math.pow(s.maxTranslate()-startTranslate-diff,s.params.resistanceRatio);} 1592if(disableParentSwiper){e.preventedByNestedSwiper=true;} 1593if(!s.params.allowSwipeToNext&&s.swipeDirection==='next'&¤tTranslate<startTranslate){currentTranslate=startTranslate;} 1594if(!s.params.allowSwipeToPrev&&s.swipeDirection==='prev'&¤tTranslate>startTranslate){currentTranslate=startTranslate;} 1595if(s.params.threshold>0){if(Math.abs(diff)>s.params.threshold||allowThresholdMove){if(!allowThresholdMove){allowThresholdMove=true;s.touches.startX=s.touches.currentX;s.touches.startY=s.touches.currentY;currentTranslate=startTranslate;s.touches.diff=s.isHorizontal()?s.touches.currentX-s.touches.startX:s.touches.currentY-s.touches.startY;return;}} 1596else{currentTranslate=startTranslate;return;}} 1597if(!s.params.followFinger)return;if(s.params.freeMode||s.params.watchSlidesProgress){s.updateActiveIndex();} 1598if(s.params.freeMode){if(velocities.length===0){velocities.push({position:s.touches[s.isHorizontal()?'startX':'startY'],time:touchStartTime});} 1599velocities.push({position:s.touches[s.isHorizontal()?'currentX':'currentY'],time:(new window.Date()).getTime()});} 1600s.updateProgress(currentTranslate);s.setWrapperTranslate(currentTranslate);};s.onTouchEnd=function(e){if(e.originalEvent)e=e.originalEvent;if(allowTouchCallbacks){s.emit('onTouchEnd',s,e);} 1601allowTouchCallbacks=false;if(!isTouched)return;if(s.params.grabCursor&&isMoved&&isTouched&&(s.params.allowSwipeToNext===true||s.params.allowSwipeToPrev===true)){s.setGrabCursor(false);} 1602var touchEndTime=Date.now();var timeDiff=touchEndTime-touchStartTime;if(s.allowClick){s.updateClickedSlide(e);s.emit('onTap',s,e);if(timeDiff<300&&(touchEndTime-lastClickTime)>300){if(clickTimeout)clearTimeout(clickTimeout);clickTimeout=setTimeout(function(){if(!s)return;if(s.params.paginationHide&&s.paginationContainer.length>0&&!$(e.target).hasClass(s.params.bulletClass)){s.paginationContainer.toggleClass(s.params.paginationHiddenClass);} 1603s.emit('onClick',s,e);},300);} 1604if(timeDiff<300&&(touchEndTime-lastClickTime)<300){if(clickTimeout)clearTimeout(clickTimeout);s.emit('onDoubleTap',s,e);}} 1605lastClickTime=Date.now();setTimeout(function(){if(s)s.allowClick=true;},0);if(!isTouched||!isMoved||!s.swipeDirection||s.touches.diff===0||currentTranslate===startTranslate){isTouched=isMoved=false;return;} 1606isTouched=isMoved=false;var currentPos;if(s.params.followFinger){currentPos=s.rtl?s.translate:-s.translate;} 1607else{currentPos=-currentTranslate;} 1608if(s.params.freeMode){if(currentPos<-s.minTranslate()){s.slideTo(s.activeIndex);return;} 1609else if(currentPos>-s.maxTranslate()){if(s.slides.length<s.snapGrid.length){s.slideTo(s.snapGrid.length-1);} 1610else{s.slideTo(s.slides.length-1);} 1611return;} 1612if(s.params.freeModeMomentum){if(velocities.length>1){var lastMoveEvent=velocities.pop(),velocityEvent=velocities.pop();var distance=lastMoveEvent.position-velocityEvent.position;var time=lastMoveEvent.time-velocityEvent.time;s.velocity=distance/time;s.velocity=s.velocity/2;if(Math.abs(s.velocity)<s.params.freeModeMinimumVelocity){s.velocity=0;} 1613if(time>150||(new window.Date().getTime()-lastMoveEvent.time)>300){s.velocity=0;}}else{s.velocity=0;} 1614s.velocity=s.velocity*s.params.freeModeMomentumVelocityRatio;velocities.length=0;var momentumDuration=1000*s.params.freeModeMomentumRatio;
1614var momentumDistance=s.velocity*momentumDuration;var newPosition=s.translate+momentumDistance;if(s.rtl)newPosition=-newPosition;var doBounce=false;var afterBouncePosition;var bounceAmount=Math.abs(s.velocity)*20*s.params.freeModeMomentumBounceRatio;if(newPosition<s.maxTranslate()){if(s.params.freeModeMomentumBounce){if(newPosition+s.maxTranslate()<-bounceAmount){newPosition=s.maxTranslate()-bounceAmount;} 1615afterBouncePosition=s.maxTranslate();doBounce=true;allowMomentumBounce=true;} 1616else{newPosition=s.maxTranslate();}} 1617else if(newPosition>s.minTranslate()){if(s.params.freeModeMomentumBounce){if(newPosition-s.minTranslate()>bounceAmount){newPosition=s.minTranslate()+bounceAmount;} 1618afterBouncePosition=s.minTranslate();doBounce=true;allowMomentumBounce=true;} 1619else{newPosition=s.minTranslate();}} 1620else if(s.params.freeModeSticky){var j=0,nextSlide;for(j=0;j<s.snapGrid.length;j+=1){if(s.snapGrid[j]>-newPosition){nextSlide=j;break;}} 1621if(Math.abs(s.snapGrid[nextSlide]-newPosition)<Math.abs(s.snapGrid[nextSlide-1]-newPosition)||s.swipeDirection==='next'){newPosition=s.snapGrid[nextSlide];}else{newPosition=s.snapGrid[nextSlide-1];} 1622if(!s.rtl)newPosition=-newPosition;} 1623if(s.velocity!==0){if(s.rtl){momentumDuration=Math.abs((-newPosition-s.translate)/s.velocity);} 1624else{momentumDuration=Math.abs((newPosition-s.translate)/s.velocity);}} 1625else if(s.params.freeModeSticky){s.slideReset();return;} 1626if(s.params.freeModeMomentumBounce&&doBounce){s.updateProgress(afterBouncePosition);s.setWrapperTransition(momentumDuration);s.setWrapperTranslate(newPosition);s.onTransitionStart();s.animating=true;s.wrapper.transitionEnd(function(){if(!s||!allowMomentumBounce)return;s.emit('onMomentumBounce',s);s.setWrapperTransition(s.params.speed);s.setWrapperTranslate(afterBouncePosition);s.wrapper.transitionEnd(function(){if(!s)return;s.onTransitionEnd();});});}else if(s.velocity){s.updateProgress(newPosition);s.setWrapperTransition(momentumDuration);s.setWrapperTranslate(newPosition);s.onTransitionStart();if(!s.animating){s.animating=true;s.wrapper.transitionEnd(function(){if(!s)return;s.onTransitionEnd();});}}else{s.updateProgress(newPosition);} 1627s.updateActiveIndex();} 1628if(!s.params.freeModeMomentum||timeDiff>=s.params.longSwipesMs){s.updateProgress();s.updateActiveIndex();} 1629return;} 1630var i,stopIndex=0,groupSize=s.slidesSizesGrid[0];for(i=0;i<s.slidesGrid.length;i+=s.params.slidesPerGroup){if(typeof s.slidesGrid[i+s.params.slidesPerGroup]!=='undefined'){if(currentPos>=s.slidesGrid[i]&¤tPos<s.slidesGrid[i+s.params.slidesPerGroup]){stopIndex=i;groupSize=s.slidesGrid[i+s.params.slidesPerGroup]-s.slidesGrid[i];}} 1631else{if(currentPos>=s.slidesGrid[i]){stopIndex=i;groupSize=s.slidesGrid[s.slidesGrid.length-1]-s.slidesGrid[s.slidesGrid.length-2];}}} 1632var ratio=(currentPos-s.slidesGrid[stopIndex])/groupSize;if(timeDiff>s.params.longSwipesMs){if(!s.params.longSwipes){s.slideTo(s.activeIndex);return;} 1633if(s.swipeDirection==='next'){if(ratio>=s.params.longSwipesRatio)s.slideTo(stopIndex+s.params.slidesPerGroup);else s.slideTo(stopIndex);} 1634if(s.swipeDirection==='prev'){if(ratio>(1-s.params.longSwipesRatio))s.slideTo(stopIndex+s.params.slidesPerGroup);else s.slideTo(stopIndex);}} 1635else{if(!s.params.shortSwipes){s.slideTo(s.activeIndex);return;} 1636if(s.swipeDirection==='next'){s.slideTo(stopIndex+s.params.slidesPerGroup);} 1637if(s.swipeDirection==='prev'){s.slideTo(stopIndex);}}};s._slideTo=function(slideIndex,speed){return s.slideTo(slideIndex,speed,true,true);};s.slideTo=function(slideIndex,speed,runCallbacks,internal){if(typeof runCallbacks==='undefined')runCallbacks=true;if(typeof slideIndex==='undefined')slideIndex=0;if(slideIndex<0)slideIndex=0;s.snapIndex=Math.floor(slideIndex/s.params.slidesPerGroup);if(s.snapIndex>=s.snapGrid.length)s.snapIndex=s.snapGrid.length-1;var translate=-s.snapGrid[s.snapIndex];if(s.params.autoplay&&s.autoplaying){if(internal||!s.params.autoplayDisableOnInteraction){s.pauseAutoplay(speed);} 1638else{s.stopAutoplay();}} 1639s.updateProgress(translate);if(s.params.normalizeSlideIndex){for(var i=0;i<s.slidesGrid.length;i++){if(-Math.floor(translate*100)>=Math.floor(s.slidesGrid[i]*100)){slideIndex=i;}}} 1640if(!s.params.allowSwipeToNext&&translate<s.translate&&translate<s.minTranslate()){return false;} 1641if(!s.params.allowSwipeToPrev&&translate>s.translate&&translate>
1641s.maxTranslate()){if((s.activeIndex||0)!==slideIndex)return false;} 1642if(typeof speed==='undefined')speed=s.params.speed;s.previousIndex=s.activeIndex||0;s.activeIndex=slideIndex;s.updateRealIndex();if((s.rtl&&-translate===s.translate)||(!s.rtl&&translate===s.translate)){if(s.params.autoHeight){s.updateAutoHeight();} 1643s.updateClasses();if(s.params.effect!=='slide'){s.setWrapperTranslate(translate);} 1644return false;} 1645s.updateClasses();s.onTransitionStart(runCallbacks);if(speed===0||s.browser.lteIE9){s.setWrapperTranslate(translate);s.setWrapperTransition(0);s.onTransitionEnd(runCallbacks);} 1646else{s.setWrapperTranslate(translate);s.setWrapperTransition(speed);if(!s.animating){s.animating=true;s.wrapper.transitionEnd(function(){if(!s)return;s.onTransitionEnd(runCallbacks);});}} 1647return true;};s.onTransitionStart=function(runCallbacks){if(typeof runCallbacks==='undefined')runCallbacks=true;if(s.params.autoHeight){s.updateAutoHeight();} 1648if(s.lazy)s.lazy.onTransitionStart();if(runCallbacks){s.emit('onTransitionStart',s);if(s.activeIndex!==s.previousIndex){s.emit('onSlideChangeStart',s);if(s.activeIndex>s.previousIndex){s.emit('onSlideNextStart',s);} 1649else{s.emit('onSlidePrevStart',s);}}}};s.onTransitionEnd=function(runCallbacks){s.animating=false;s.setWrapperTransition(0);if(typeof runCallbacks==='undefined')runCallbacks=true;if(s.lazy)s.lazy.onTransitionEnd();if(runCallbacks){s.emit('onTransitionEnd',s);if(s.activeIndex!==s.previousIndex){s.emit('onSlideChangeEnd',s);if(s.activeIndex>s.previousIndex){s.emit('onSlideNextEnd',s);} 1650else{s.emit('onSlidePrevEnd',s);}}} 1651if(s.params.history&&s.history){s.history.setHistory(s.params.history,s.activeIndex);} 1652if(s.params.hashnav&&s.hashnav){s.hashnav.setHash();}};s.slideNext=function(runCallbacks,speed,internal){if(s.params.loop){if(s.animating)return false;s.fixLoop();var clientLeft=s.container[0].clientLeft;return s.slideTo(s.activeIndex+s.params.slidesPerGroup,speed,runCallbacks,internal);} 1653else return s.slideTo(s.activeIndex+s.params.slidesPerGroup,speed,runCallbacks,internal);};s._slideNext=function(speed){return s.slideNext(true,speed,true);};s.slidePrev=function(runCallbacks,speed,internal){if(s.params.loop){if(s.animating)return false;s.fixLoop();var clientLeft=s.container[0].clientLeft;return s.slideTo(s.activeIndex-1,speed,runCallbacks,internal);} 1654else return s.slideTo(s.activeIndex-1,speed,runCallbacks,internal);};s._slidePrev=function(speed){return s.slidePrev(true,speed,true);};s.slideReset=function(runCallbacks,speed,internal){return s.slideTo(s.activeIndex,speed,runCallbacks);};s.disableTouchControl=function(){s.params.onlyExternal=true;return true;};s.enableTouchControl=function(){s.params.onlyExternal=false;return true;};s.setWrapperTransition=function(duration,byController){s.wrapper.transition(duration);if(s.params.effect!=='slide'&&s.effects[s.params.effect]){s.effects[s.params.effect].setTransition(duration);} 1655if(s.params.parallax&&s.parallax){s.parallax.setTransition(duration);} 1656if(s.params.scrollbar&&s.scrollbar){s.scrollbar.setTransition(duration);} 1657if(s.params.control&&s.controller){s.controller.setTransition(duration,byController);} 1658s.emit('onSetTransition',s,duration);};s.setWrapperTranslate=function(translate,updateActiveIndex,byController){var x=0,y=0,z=0;if(s.isHorizontal()){x=s.rtl?-translate:translate;} 1659else{y=translate;} 1660if(s.params.roundLengths){x=round(x);y=round(y);} 1661if(!s.params.virtualTranslate){if(s.support.transforms3d)s.wrapper.transform('translate3d('+x+'px, '+y+'px, '+z+'px)');else s.wrapper.transform('translate('+x+'px, '+y+'px)');} 1662s.translate=s.isHorizontal()?x:y;var progress;var translatesDiff=s.maxTranslate()-s.minTranslate();if(translatesDiff===0){progress=0;} 1663else{progress=(translate-s.minTranslate())/(translatesDiff);} 1664if(progress!==s.progress){s.updateProgress(translate);} 1665if(updateActiveIndex)s.updateActiveIndex();if(s.params.effect!=='slide'&&s.effects[s.params.effect]){s.effects[s.params.effect].setTranslate(s.translate);} 1666if(s.params.parallax&&s.parallax){s.parallax.setTranslate(s.translate);} 1667if(s.params.scrollbar&&s.scrollbar){s.scrollbar.setTranslate(s.translate);} 1668if(s.params.control&&s.controller){s.controller.setTranslate(s.translate,byController);} 1669s.emit('onSetTranslate',s,s.translate);};s.getTranslate=function(el,axis){var matrix,curTransform,curStyle,transformMatrix;if(typeof axis==='undefined'){axis='x';} 1670if(s.params.virtualTranslate){return s.rtl?-s.translate:s.translate;} 1671curStyle=window.getComputedStyle(el,null);if(window.WebKitCSSMatrix){curTransform=curStyle.transform||curStyle.webkitTransform;if(curTransform.split(',').length>6){curTransform=curTransform.split(', ').map(function(a){return a.replace(',','.');}).join(', ');} 1672transformMatrix=new window.WebKitCSSMatrix(curTransform==='none'?'':curTransform);} 1673else{transformMatrix=curStyle.MozTransform||curStyle.OTransform||curStyle.MsTransform||curStyle.msTransform||curStyle.transform||curStyle.getPropertyValue('transform').replace('translate(','matrix(1, 0, 0, 1,');matrix=transformMatrix.toString().split(',');} 1674if(axis==='x'){if(window.WebKitCSSMatrix) 1675curTransform=transformMatrix.m41;else if(matrix.length===16) 1676curTransform=parseFloat(matrix[12]);else 1677curTransform=parseFloat(matrix[4]);} 1678if(axis==='y'){if(window.WebKitCSSMatrix) 1679curTransform=transformMatrix.m42;else if(matrix.length===16) 1680curTransform=parseFloat(matrix[13]);else 1681curTransform=parseFloat(matrix[5]);} 1682if(s.rtl&&curTransform)curTransform=-curTransform;return curTransform||0;};s.getWrapperTranslate=function(axis){if(typeof axis==='undefined'){axis=s.isHorizontal()?'x':'y';} 1683return s.getTranslate(s.wrapper[0],axis);};s.observers=[];function initObserver(target,options){options=options||{};var ObserverFunc=window.MutationObserver||window.WebkitMutationObserver;var observer=new ObserverFunc(function(mutations){mutations.forEach(function(mutation){s.onResize(true);s.emit('onObserverUpdate',s,mutation);});});observer.observe(target,{attributes:typeof options.attributes==='undefined'?true:options.attributes,childList:typeof options.childList==='undefined'?true:options.childList,characterData:typeof options.characterData==='undefined'?true:options.characterData});s.observers.push(observer);} 1684s.initObservers=function(){if(s.params.observeParents){var containerParents=s.container.parents();for(var i=0;i<containerParents.length;i++){initObserver(containerParents[i]);}} 1685initObserver(s.container[0],{childList:false});initObserver(s.wrapper[0],{attributes:false});};s.disconnectObservers=function(){for(var i=0;i<s.observers.length;i++){s.observers[i].disconnect();} 1686s.observers=[];};s.createLoop=function(){s.wrapper.children('.'+s.params.slideClass+'.'+s.params.slideDuplicateClass).remove();var slides=s.wrapper.children('.'+s.params.slideClass);if(s.params.slidesPerView==='auto'&&!s.params.loopedSlides)s.params.loopedSlides=slides.length;s.loopedSlides=parseInt(s.params.loopedSlides||s.params.slidesPerView,10);s.loopedSlides=s.loopedSlides+s.params.loopAdditionalSlides;if(s.loopedSlides>slides.length){s.loopedSlides=slides.length;} 1687var prependSlides=[],appendSlides=[],i;slides.each(function(index,el){var slide=$(this);if(index<s.loopedSlides)appendSlides.push(el);if(index<slides.length&&index>=slides.length-s.loopedSlides)prependSlides.push(el);slide.attr('data-swiper-slide-index',index);});for(i=0;i<appendSlides.length;i++){s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));} 1688for(i=prependSlides.length-1;i>=0;i--){s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));}};s.destroyLoop=function(){s.wrapper.children('.'+s.params.slideClass+'.'+s.params.slideDuplicateClass).remove();s.slides.removeAttr('data-swiper-slide-index');};s.reLoop=function(updatePosition){var oldIndex=s.activeIndex-s.loopedSlides;s.destroyLoop();s.createLoop();s.updateSlidesSize();if(updatePosition){s.slideTo(oldIndex+s.loopedSlides,0,false);}};s.fixLoop=function(){var newIndex;if(s.activeIndex<s.loopedSlides){newIndex=s.slides.length-s.loopedSlides*3+s.activeIndex;newIndex=newIndex+s.loopedSlides;s.slideTo(newIndex,0,false,true);} 1689else if((s.params.slidesPerView==='auto'&&s.activeIndex>=s.loopedSlides*2)||(s.activeIndex>s.slides.length-s.params.slidesPerView*2)){newIndex=-s.slides.length+s.activeIndex+s.loopedSlides;newIndex=newIndex+s.loopedSlides;s.slideTo(newIndex,0,false,true);}};s.appendSlide=function(slides){if(s.params.loop){s.destroyLoop();} 1690if(typeof slides==='object'&&slides.length){for(var i=0;i<slides.length;i++){if(slides[i])s.wrapper.append(slides[i]);}}
1690 1691else{s.wrapper.append(slides);} 1692if(s.params.loop){s.createLoop();} 1693if(!(s.params.observer&&s.support.observer)){s.update(true);}};s.prependSlide=function(slides){if(s.params.loop){s.destroyLoop();} 1694var newActiveIndex=s.activeIndex+1;if(typeof slides==='object'&&slides.length){for(var i=0;i<slides.length;i++){if(slides[i])s.wrapper.prepend(slides[i]);} 1695newActiveIndex=s.activeIndex+slides.length;} 1696else{s.wrapper.prepend(slides);} 1697if(s.params.loop){s.createLoop();} 1698if(!(s.params.observer&&s.support.observer)){s.update(true);} 1699s.slideTo(newActiveIndex,0,false);};s.removeSlide=function(slidesIndexes){if(s.params.loop){s.destroyLoop();s.slides=s.wrapper.children('.'+s.params.slideClass);} 1700var newActiveIndex=s.activeIndex,indexToRemove;if(typeof slidesIndexes==='object'&&slidesIndexes.length){for(var i=0;i<slidesIndexes.length;i++){indexToRemove=slidesIndexes[i];if(s.slides[indexToRemove])s.slides.eq(indexToRemove).remove();if(indexToRemove<newActiveIndex)newActiveIndex--;} 1701newActiveIndex=Math.max(newActiveIndex,0);} 1702else{indexToRemove=slidesIndexes;if(s.slides[indexToRemove])s.slides.eq(indexToRemove).remove();if(indexToRemove<newActiveIndex)newActiveIndex--;newActiveIndex=Math.max(newActiveIndex,0);} 1703if(s.params.loop){s.createLoop();} 1704if(!(s.params.observer&&s.support.observer)){s.update(true);} 1705if(s.params.loop){s.slideTo(newActiveIndex+s.loopedSlides,0,false);} 1706else{s.slideTo(newActiveIndex,0,false);}};s.removeAllSlides=function(){var slidesIndexes=[];for(var i=0;i<s.slides.length;i++){slidesIndexes.push(i);} 1707s.removeSlide(slidesIndexes);};s.effects={fade:{setTranslate:function(){for(var i=0;i<s.slides.length;i++){var slide=s.slides.eq(i);var offset=slide[0].swiperSlideOffset;var tx=-offset;if(!s.params.virtualTranslate)tx=tx-s.translate;var ty=0;if(!s.isHorizontal()){ty=tx;tx=0;} 1708var slideOpacity=s.params.fade.crossFade?Math.max(1-Math.abs(slide[0].progress),0):1+Math.min(Math.max(slide[0].progress,-1),0);slide.css({opacity:slideOpacity}).transform('translate3d('+tx+'px, '+ty+'px, 0px)');}},setTransition:function(duration){s.slides.transition(duration);if(s.params.virtualTranslate&&duration!==0){var eventTriggered=false;s.slides.transitionEnd(function(){if(eventTriggered)return;if(!s)return;eventTriggered=true;s.animating=false;var triggerEvents=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'];for(var i=0;i<triggerEvents.length;i++){s.wrapper.trigger(triggerEvents[i]);}});}}},flip:{setTranslate:function(){for(var i=0;i<s.slides.length;i++){var slide=s.slides.eq(i);var progress=slide[0].progress;if(s.params.flip.limitRotation){progress=Math.max(Math.min(slide[0].progress,1),-1);} 1709var offset=slide[0].swiperSlideOffset;var rotate=-180*progress,rotateY=rotate,rotateX=0,tx=-offset,ty=0;if(!s.isHorizontal()){ty=tx;tx=0;rotateX=-rotateY;rotateY=0;} 1710else if(s.rtl){rotateY=-rotateY;} 1711slide[0].style.zIndex=-Math.abs(Math.round(progress))+s.slides.length;if(s.params.flip.slideShadows){var shadowBefore=s.isHorizontal()?slide.find('.swiper-slide-shadow-left'):slide.find('.swiper-slide-shadow-top');var shadowAfter=s.isHorizontal()?slide.find('.swiper-slide-shadow-right'):slide.find('.swiper-slide-shadow-bottom');if(shadowBefore.length===0){shadowBefore=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'left':'top')+'"></div>');slide.append(shadowBefore);} 1712if(shadowAfter.length===0){shadowAfter=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'right':'bottom')+'"></div>');slide.append(shadowAfter);} 1713if(shadowBefore.length)shadowBefore[0].style.opacity=Math.max(-progress,0);if(shadowAfter.length)shadowAfter[0].style.opacity=Math.max(progress,0);} 1714slide.transform('translate3d('+tx+'px, '+ty+'px, 0px) rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)');}},setTransition:function(duration){s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);if(s.params.virtualTranslate&&duration!==0){var eventTriggered=false;s.slides.eq(s.activeIndex).transitionEnd(function(){if(eventTriggered)return;if(!s)return;if(!$(this).hasClass(s.params.slideActiveClass))return;eventTriggered=true;s.animating=false;var triggerEvents=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'];for(var i=0;i<triggerEvents.length;i++){s.wrapper.trigger(triggerEvents[i]);}});}}},cube:{setTranslate:function(){var wrapperRotate=0,cubeShadow;if(s.params.cube.shadow){if(s.isHorizontal()){cubeShadow=s.wrapper.find('.swiper-cube-shadow');if(cubeShadow.length===0){cubeShadow=$('<div class="swiper-cube-shadow"></div>');s.wrapper.append(cubeShadow);} 1715cubeShadow.css({height:s.width+'px'});} 1716else{cubeShadow=s.container.find('.swiper-cube-shadow');if(cubeShadow.length===0){cubeShadow=$('<div class="swiper-cube-shadow"></div>');s.container.append(cubeShadow);}}} 1717for(var i=0;i<s.slides.length;i++){var slide=s.slides.eq(i);var slideAngle=i*90;var round=Math.floor(slideAngle/360);if(s.rtl){slideAngle=-slideAngle;round=Math.floor(-slideAngle/360);}
1718var progress=Math.max(Math.min(slide[0].progress,1),-1);var tx=0,ty=0,tz=0;if(i%4===0){tx=-round*4*s.size;tz=0;} 1719else if((i-1)%4===0){tx=0;tz=-round*4*s.size;} 1720else if((i-2)%4===0){tx=s.size+round*4*s.size;tz=s.size;} 1721else if((i-3)%4===0){tx=-s.size;tz=3*s.size+s.size*4*round;} 1722if(s.rtl){tx=-tx;} 1723if(!s.isHorizontal()){ty=tx;tx=0;} 1724var transform='rotateX('+(s.isHorizontal()?0:-slideAngle)+'deg) rotateY('+(s.isHorizontal()?slideAngle:0)+'deg) translate3d('+tx+'px, '+ty+'px, '+tz+'px)';if(progress<=1&&progress>-1){wrapperRotate=i*90+progress*90;if(s.rtl)wrapperRotate=-i*90-progress*90;} 1725slide.transform(transform);if(s.params.cube.slideShadows){var shadowBefore=s.isHorizontal()?slide.find('.swiper-slide-shadow-left'):slide.find('.swiper-slide-shadow-top');var shadowAfter=s.isHorizontal()?slide.find('.swiper-slide-shadow-right'):slide.find('.swiper-slide-shadow-bottom');if(shadowBefore.length===0){shadowBefore=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'left':'top')+'"></div>');slide.append(shadowBefore);} 1726if(shadowAfter.length===0){shadowAfter=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'right':'bottom')+'"></div>');slide.append(shadowAfter);} 1727if(shadowBefore.length)shadowBefore[0].style.opacity=Math.max(-progress,0);if(shadowAfter.length)shadowAfter[0].style.opacity=Math.max(progress,0);}} 1728s.wrapper.css({'-webkit-transform-origin':'50% 50% -'+(s.size/2)+'px','-moz-transform-origin':'50% 50% -'+(s.size/2)+'px','-ms-transform-origin':'50% 50% -'+(s.size/2)+'px','transform-origin':'50% 50% -'+(s.size/2)+'px'});if(s.params.cube.shadow){if(s.isHorizontal()){cubeShadow.transform('translate3d(0px, '+(s.width/2+s.params.cube.shadowOffset)+'px, '+(-s.width/2)+'px) rotateX(90deg) rotateZ(0deg) scale('+(s.params.cube.shadowScale)+')');} 1729else{var shadowAngle=Math.abs(wrapperRotate)-Math.floor(Math.abs(wrapperRotate)/90)*90;var multiplier=1.5-(Math.sin(shadowAngle*2*Math.PI/360)/2+Math.cos(shadowAngle*2*Math.PI/360)/2);var scale1=s.params.cube.shadowScale,scale2=s.params.cube.shadowScale/multiplier,offset=s.params.cube.shadowOffset;cubeShadow.transform('scale3d('+scale1+', 1, '+scale2+') translate3d(0px, '+(s.height/2+offset)+'px, '+(-s.height/2/scale2)+'px) rotateX(-90deg)');}} 1730var zFactor=(s.isSafari||s.isUiWebView)?(-s.size/2):0;s.wrapper.transform('translate3d(0px,0,'+zFactor+'px) rotateX('+(s.isHorizontal()?0:wrapperRotate)+'deg) rotateY('+(s.isHorizontal()?-wrapperRotate:0)+'deg)');},setTransition:function(duration){s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);if(s.params.cube.shadow&&!s.isHorizontal()){s.container.find('.swiper-cube-shadow').transition(duration);}}},coverflow:{setTranslate:function(){var transform=s.translate;var center=s.isHorizontal()?-transform+s.width/2:-transform+s.height/2;var rotate=s.isHorizontal()?s.params.coverflow.rotate:-s.params.coverflow.rotate;var translate=s.params.coverflow.depth;for(var i=0,length=s.slides.length;i<length;i++){var slide=s.slides.eq(i);var slideSize=s.slidesSizesGrid[i];var slideOffset=slide[0].swiperSlideOffset;var offsetMultiplier=(center-slideOffset-slideSize/2)/slideSize*s.params.coverflow.modifier;var rotateY=s.isHorizontal()?rotate*offsetMultiplier:0;var rotateX=s.isHorizontal()?0:rotate*offsetMultiplier;var translateZ=-translate*Math.abs(offsetMultiplier);var translateY=s.isHorizontal()?0:s.params.coverflow.stretch*(offsetMultiplier);var translateX=s.isHorizontal()?s.params.coverflow.stretch*(offsetMultiplier):0;if(Math.abs(translateX)<0.001)translateX=0;if(Math.abs(translateY)<0.001)translateY=0;if(Math.abs(translateZ)<0.001)translateZ=0;if(Math.abs(rotateY)<0.001)rotateY=0;if(Math.abs(rotateX)<0.001)rotateX=0;var slideTransform='translate3d('+translateX+'px,'+translateY+'px,'+translateZ+'px) rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)';slide.transform(slideTransform);slide[0].style.zIndex=-Math.abs(Math.round(offsetMultiplier))+1;if(s.params.coverflow.slideShadows){var shadowBefore=s.isHorizontal()?slide.find('.swiper-slide-shadow-left'):sli
1730de.find('.swiper-slide-shadow-top');var shadowAfter=s.isHorizontal()?slide.find('.swiper-slide-shadow-right'):slide.find('.swiper-slide-shadow-bottom');if(shadowBefore.length===0){shadowBefore=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'left':'top')+'"></div>');slide.append(shadowBefore);} 1731if(shadowAfter.length===0){shadowAfter=$('<div class="swiper-slide-shadow-'+(s.isHorizontal()?'right':'bottom')+'"></div>');slide.append(shadowAfter);} 1732if(shadowBefore.length)shadowBefore[0].style.opacity=offsetMultiplier>0?offsetMultiplier:0;if(shadowAfter.length)shadowAfter[0].style.opacity=(-offsetMultiplier)>0?-offsetMultiplier:0;}} 1733if(s.browser.ie){var ws=s.wrapper[0].style;ws.perspectiveOrigin=center+'px 50%';}},setTransition:function(duration){s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);}}};s.lazy={initialImageLoaded:false,loadImageInSlide:function(index,loadInDuplicate){if(typeof index==='undefined')return;if(typeof loadInDuplicate==='undefined')loadInDuplicate=true;if(s.slides.length===0)return;var slide=s.slides.eq(index);var img=slide.find('.'+s.params.lazyLoadingClass+':not(.'+s.params.lazyStatusLoadedClass+'):not(.'+s.params.lazyStatusLoadingClass+')');if(slide.hasClass(s.params.lazyLoadingClass)&&!slide.hasClass(s.params.lazyStatusLoadedClass)&&!slide.hasClass(s.params.lazyStatusLoadingClass)){img=img.add(slide[0]);} 1734if(img.length===0)return;img.each(function(){var _img=$(this);_img.addClass(s.params.lazyStatusLoadingClass);var background=_img.attr('data-background');var src=_img.attr('data-src'),srcset=_img.attr('data-srcset'),sizes=_img.attr('data-sizes');s.loadImage(_img[0],(src||background),srcset,sizes,false,function(){if(typeof s==='undefined'||s===null||!s)return;if(background){_img.css('background-image','url("'+background+'")');_img.removeAttr('data-background');} 1735else{if(srcset){_img.attr('srcset',srcset);_img.removeAttr('data-srcset');} 1736if(sizes){_img.attr('sizes',sizes);_img.removeAttr('data-sizes');} 1737if(src){_img.attr('src',src);_img.removeAttr('data-src');}} 1738_img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);slide.find('.'+s.params.lazyPreloaderClass+', .'+s.params.preloaderClass).remove();if(s.params.loop&&loadInDuplicate){var slideOriginalIndex=slide.attr('data-swiper-slide-index');if(slide.hasClass(s.params.slideDuplicateClass)){var originalSlide=s.wrapper.children('[data-swiper-slide-index="'+slideOriginalIndex+'"]:not(.'+s.params.slideDuplicateClass+')');s.lazy.loadImageInSlide(originalSlide.index(),false);} 1739else{var duplicatedSlide=s.wrapper.children('.'+s.params.slideDuplicateClass+'[data-swiper-slide-index="'+slideOriginalIndex+'"]');s.lazy.loadImageInSlide(duplicatedSlide.index(),false);}} 1740s.emit('onLazyImageReady',s,slide[0],_img[0]);});s.emit('onLazyImageLoad',s,slide[0],_img[0]);});},load:function(){var i;var slidesPerView=s.params.slidesPerView;if(slidesPerView==='auto'){slidesPerView=0;} 1741if(!s.lazy.initialImageLoaded)s.lazy.initialImageLoaded=true;if(s.params.watchSlidesVisibility){s.wrapper.children('.'+s.params.slideVisibleClass).each(function(){s.lazy.loadImageInSlide($(this).index());});} 1742else{if(slidesPerView>1){for(i=s.activeIndex;i<s.activeIndex+slidesPerView;i++){if(s.slides[i])s.lazy.loadImageInSlide(i);}} 1743else{s.lazy.loadImageInSlide(s.activeIndex);}} 1744if(s.params.lazyLoadingInPrevNext){if(slidesPerView>1||(s.params.lazyLoadingInPrevNextAmount&&s.params.lazyLoadingInPrevNextAmount>1)){var amount=s.params.lazyLoadingInPrevNextAmount;var spv=slidesPerView;var maxIndex=Math.min(s.activeIndex+spv+Math.max(amount,spv),s.slides.length);var minIndex=Math.max(s.activeIndex-Math.max(spv,amount),0);for(i=s.activeIndex+slidesPerView;i<maxIndex;i++){if(s.slides[i])s.lazy.loadImageInSlide(i);} 1745for(i=minIndex;i<s.activeIndex;i++){if(s.slides[i])s.lazy.loadImageInSlide(i);}} 1746else{var nextSlide=s.wrapper.children('.'+s.params.slideNextClass);if(nextSlide.length>0)s.lazy.loadImageInSlide(nextSlide.index());var prevSlide=s.wrapper.children('.'+s.params.slidePrevClass);if(prevSlide.length>0)s.lazy.loadImageInSlide(prevSlide.index());}}},onTransitionStart:function(){if(s.params.lazyLoading){if(s.params.lazyLoadingOnTransitionStart||(!s.params.lazyLoadingOnTransitionStart&&!s.lazy.initialImageLoaded)){s.lazy.load();}}},onTransitionEnd:function(){if(s.params.lazyLoading&&!s.params.lazyLoadingOnTransitionStart){s.lazy.load();}}};s.scrollbar={isTouched:false,setDragPosition:function(e){var sb=s.scrollbar;var x=0,y=0;var translate;var pointerPosition=s.isHorizontal()?((e.type==='touchstart'||e.type==='touchmove')?e.targetTouches[0].pageX:e.pageX||e.clientX):((e.type==='touchstart'||e.type==='touchmove')?e.targetTouches[0].pageY:e.pageY||e.clientY);var position=(pointerPosition)-sb.track.offset()[s.isHorizontal()?'left':'top']-sb.dragSize/2;var positionMin=-s.minTranslate()*sb.moveDivider;var positionMax=-s.maxTranslate()*sb.moveDivider;if(position<positionMin){position=positionMin;} 1747else if(position>positionMax){position=positionMax;} 1748position=-position/sb.moveDivider;s.updateProgress(position);s.setWrapperTranslate(position,true);},dragStart:function(e){var sb=s.scrollbar;sb.isTouched=true;e.preventDefault();e.stopPropagation();sb.setDragPosition(e);clearTimeout(sb.dragTimeout);sb.track.transition(0);if(s.params.scrollbarHide){sb.track.css('opacity',1);} 1749s.wrapper.transition(100);sb.drag.transition(100);s.emit('onScrollbarDragStart',s);},dragMove:function(e){var sb=s.scrollbar;if(!sb.isTouched)return;if(e.preventDefault)e.preventDefault();else e.returnValue=false;sb.setDragPosition(e);s.wrapper.transition(0);sb.track.transition(0);sb.drag.transition(0);s.emit('onScrollbarDragMove',s);},dragEnd:function(e){var sb=s.scrollbar;if(!sb.isTouched)return;sb.isTouched=false;if(s.params.scrollbarHide){clearTimeout(sb.dragTimeout);sb.dragTimeout=setTimeout(function(){sb.track.css('opacity',0);sb.track.transition(400);},1000);} 1750s.emit('onScrollbarDragEnd',s);if(s.params.scrollbarSnapOnRelease){s.slideReset();}}
1750,draggableEvents:(function(){if((s.params.simulateTouch===false&&!s.support.touch))return s.touchEventsDesktop;else return s.touchEvents;})(),enableDraggable:function(){var sb=s.scrollbar;var target=s.support.touch?sb.track:document;$(sb.track).on(sb.draggableEvents.start,sb.dragStart);$(target).on(sb.draggableEvents.move,sb.dragMove);$(target).on(sb.draggableEvents.end,sb.dragEnd);},disableDraggable:function(){var sb=s.scrollbar;var target=s.support.touch?sb.track:document;$(sb.track).off(sb.draggableEvents.start,sb.dragStart);$(target).off(sb.draggableEvents.move,sb.dragMove);$(target).off(sb.draggableEvents.end,sb.dragEnd);},set:function(){if(!s.params.scrollbar)return;var sb=s.scrollbar;sb.track=$(s.params.scrollbar);if(s.params.uniqueNavElements&&typeof s.params.scrollbar==='string'&&sb.track.length>1&&s.container.find(s.params.scrollbar).length===1){sb.track=s.container.find(s.params.scrollbar);} 1751sb.drag=sb.track.find('.swiper-scrollbar-drag');if(sb.drag.length===0){sb.drag=$('<div class="swiper-scrollbar-drag"></div>');sb.track.append(sb.drag);} 1752sb.drag[0].style.width='';sb.drag[0].style.height='';sb.trackSize=s.isHorizontal()?sb.track[0].offsetWidth:sb.track[0].offsetHeight;sb.divider=s.size/s.virtualSize;sb.moveDivider=sb.divider*(sb.trackSize/s.size);sb.dragSize=sb.trackSize*sb.divider;if(s.isHorizontal()){sb.drag[0].style.width=sb.dragSize+'px';} 1753else{sb.drag[0].style.height=sb.dragSize+'px';} 1754if(sb.divider>=1){sb.track[0].style.display='none';} 1755else{sb.track[0].style.display='';} 1756if(s.params.scrollbarHide){sb.track[0].style.opacity=0;}},setTranslate:function(){if(!s.params.scrollbar)return;var diff;var sb=s.scrollbar;var translate=s.translate||0;var newPos;var newSize=sb.dragSize;newPos=(sb.trackSize-sb.dragSize)*s.progress;if(s.rtl&&s.isHorizontal()){newPos=-newPos;if(newPos>0){newSize=sb.dragSize-newPos;newPos=0;} 1757else if(-newPos+sb.dragSize>sb.trackSize){newSize=sb.trackSize+newPos;}} 1758else{if(newPos<0){newSize=sb.dragSize+newPos;newPos=0;} 1759else if(newPos+sb.dragSize>sb.trackSize){newSize=sb.trackSize-newPos;}} 1760if(s.isHorizontal()){if(s.support.transforms3d){sb.drag.transform('translate3d('+(newPos)+'px, 0, 0)');} 1761else{sb.drag.transform('translateX('+(newPos)+'px)');} 1762sb.drag[0].style.width=newSize+'px';} 1763else{if(s.support.transforms3d){sb.drag.transform('translate3d(0px, '+(newPos)+'px, 0)');} 1764else{sb.drag.transform('translateY('+(newPos)+'px)');} 1765sb.drag[0].style.height=newSize+'px';} 1766if(s.params.scrollbarHide){clearTimeout(sb.timeout);sb.track[0].style.opacity=1;sb.timeout=setTimeout(function(){sb.track[0].style.opacity=0;sb.track.transition(400);},1000);}},setTransition:function(duration){if(!s.params.scrollbar)return;s.scrollbar.drag.transition(duration);}};s.controller={LinearSpline:function(x,y){var binarySearch=(function(){var maxIndex,minIndex,guess;return function(array,val){minIndex=-1;maxIndex=array.length;while(maxIndex-minIndex>1) 1767if(array[guess=maxIndex+minIndex>>1]<=val){minIndex=guess;}else{maxIndex=guess;} 1768return maxIndex;};})();this.x=x;this.y=y;this.lastIndex=x.length-1;var i1,i3;var l=this.x.length;this.interpolate=function(x2){if(!x2)return 0;i3=binarySearch(this.x,x2);i1=i3-1;return((x2-this.x[i1])*(this.y[i3]-this.y[i1]))/(this.x[i3]-this.x[i1])+this.y[i1];};},getInterpolateFunction:function(c){if(!s.controller.spline)s.controller.spline=s.params.loop?new s.controller.LinearSpline(s.slidesGrid,c.slidesGrid):new s.controller.LinearSpline(s.snapGrid,c.snapGrid);},setTranslate:function(translate,byController){var controlled=s.params.control;var multiplier,controlledTranslate;function setControlledTranslate(c){translate=c.rtl&&c.params.direction==='horizontal'?-s.translate:s.translate;if(s.params.controlBy==='slide'){s.controller.getInterpolateFunction(c);controlledTranslate=-s.controller.spline.interpolate(-translate);} 1769if(!controlledTranslate||s.params.controlBy==='container'){multiplier=(c.maxTranslate()-c.minTranslate())/(s.maxTranslate()-s.minTranslate());controlledTranslate=(translate-s.minTranslate())*multiplier+c.minTranslate();} 1770if(s.params.controlInverse){controlledTranslate=c.maxTranslate()-controlledTranslate;} 1771c.updateProgress(controlledTranslate);c.setWrapperTranslate(controlledTranslate,false,s);c.updateActiveIndex();} 1772if(Array.isArray(controlled)){for(var i=0;i<controlled.length;i++){if(controlled[i]!==byController&&controlled[i]instanceof Swiper){setControlledTranslate(controlled[i]);}}} 1773else if(controlled instanceof Swiper&&byController!==controlled){setControlledTranslate(controlled);}},setTransition:function(duration,byController){var controlled=s.params.control;var i;function setControlledTransition(c){c.setWrapperTransition(duration,s);if(duration!==0){c.onTransitionStart();c.wrapper.transitionEnd(function(){if(!controlled)return;if(c.params.loop&&s.params.controlBy==='slide'){c.fixLoop();} 1774c.onTransitionEnd();});}} 1775if(Array.isArray(controlled)){for(i=0;i<controlled.length;i++){if(controlled[i]!==byController&&controlled[i]instanceof Swiper){setControlledTransition(controlled[i]);}}} 1776else if(controlled instanceof Swiper&&byController!==controlled){setControlledTransition(controlled);}}};s.hashnav={onHashCange:function(e,a){var newHash=document.location.hash.replace('#','');var activeSlideHash=s.slides.eq(s.activeIndex).attr('data-hash');if(newHash!==activeSlideHash){s.slideTo(s.wrapper.children('.'+s.params.slideClass+'[data-hash="'+(newHash)+'"]').index());}},attachEvents:function(detach){var action=detach?'off':'on';$(window)[action]('hashchange',s.hashnav.onHashCange);},setHash:function(){if(!s.hashnav.initialized||!s.params.hashnav)return;if(s.params.replaceState&&window.history&&window.history.replaceState){window.history.replaceState(null,null,('#'+s.slides.eq(s.activeIndex).attr('data-hash')||''));}else{var slide=s.slides.eq(s.activeIndex);var hash=slide.attr('data-hash')||slide.attr('data-history');document.location.hash=hash||'';}},init:function(){if(!s.params.hashnav||s.params.history)return;s.hashnav.initialized=true;var hash=document.location.hash.replace('#','');if(hash){var speed=0;for(var i=0,length=s.slides.length;i<length;i++){var slide=s.slides.eq(i);var slideHash=slide.attr('data-hash')||slide.attr('data-history');if(slideHash===hash&&!slide.hasClass(s.params.slideDuplicateClass)){var index=sli
1776de.index();s.slideTo(index,speed,s.params.runCallbacksOnInit,true);}}} 1777if(s.params.hashnavWatchState)s.hashnav.attachEvents();},destroy:function(){if(s.params.hashnavWatchState)s.hashnav.attachEvents(true);}};s.history={init:function(){if(!s.params.history)return;if(!window.history||!window.history.pushState){s.params.history=false;s.params.hashnav=true;return;} 1778s.history.initialized=true;this.paths=this.getPathValues();if(!this.paths.key&&!this.paths.value)return;this.scrollToSlide(0,this.paths.value,s.params.runCallbacksOnInit);if(!s.params.replaceState){window.addEventListener('popstate',this.setHistoryPopState);}},setHistoryPopState:function(){s.history.paths=s.history.getPathValues();s.history.scrollToSlide(s.params.speed,s.history.paths.value,false);},getPathValues:function(){var pathArray=window.location.pathname.slice(1).split('/');var total=pathArray.length;var key=pathArray[total-2];var value=pathArray[total-1];return{key:key,value:value};},setHistory:function(key,index){if(!s.history.initialized||!s.params.history)return;var slide=s.slides.eq(index);var value=this.slugify(slide.attr('data-history'));if(!window.location.pathname.includes(key)){value=key+'/'+value;} 1779if(s.params.replaceState){window.history.replaceState(null,null,value);}else{window.history.pushState(null,null,value);}},slugify:function(text){return text.toString().toLowerCase().replace(/\s+/g,'-').replace(/[^\w\-]+/g,'').replace(/\-\-+/g,'-').replace(/^-+/,'').replace(/-+$/,'');},scrollToSlide:function(speed,value,runCallbacks){if(value){for(var i=0,length=s.slides.length;i<length;i++){var slide=s.slides.eq(i);var slideHistory=this.slugify(slide.attr('data-history'));if(slideHistory===value&&!slide.hasClass(s.params.slideDuplicateClass)){var index=slide.index();s.slideTo(index,speed,runCallbacks);}}}else{s.slideTo(0,speed,runCallbacks);}}};function handleKeyboard(e){if(e.originalEvent)e=e.originalEvent;var kc=e.keyCode||e.charCode;if(!s.params.allowSwipeToNext&&(s.isHorizontal()&&kc===39||!s.isHorizontal()&&kc===40)){return false;} 1780if(!s.params.allowSwipeToPrev&&(s.isHorizontal()&&kc===37||!s.isHorizontal()&&kc===38)){return false;} 1781if(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey){return;} 1782if(document.activeElement&&document.activeElement.nodeName&&(document.activeElement.nodeName.toLowerCase()==='input'||document.activeElement.nodeName.toLowerCase()==='textarea')){return;} 1783if(kc===37||kc===39||kc===38||kc===40){var inView=false;if(s.container.parents('.'+s.params.slideClass).length>0&&s.container.parents('.'+s.params.slideActiveClass).length===0){return;} 1784var windowScroll={left:window.pageXOffset,top:window.pageYOffset};var windowWidth=window.innerWidth;var windowHeight=window.innerHeight;var swiperOffset=s.container.offset();if(s.rtl)swiperOffset.left=swiperOffset.left-s.container[0].scrollLeft;var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+s.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+s.height],[swiperOffset.left+s.width,swiperOffset.top+s.height]];for(var i=0;i<swiperCoord.length;i++){var point=swiperCoord[i];if(point[0]>=windowScroll.left&&point[0]<=windowScroll.left+windowWidth&&point[1]>=windowScroll.top&&point[1]<=windowScroll.top+windowHeight){inView=true;}} 1785if(!inView)return;} 1786if(s.isHorizontal()){if(kc===37||kc===39){if(e.preventDefault)e.preventDefault();else e.returnValue=false;} 1787if((kc===39&&!s.rtl)||(kc===37&&s.rtl))s.slideNext();if((kc===37&&!s.rtl)||(kc===39&&s.rtl))s.slidePrev();} 1788else{if(kc===38||kc===40){if(e.preventDefault)e.preventDefault();else e.returnValue=false;} 1789if(kc===40)s.slideNext();if(kc===38)s.slidePrev();} 1790s.emit('onKeyPress',s,kc);} 1791s.disableKeyboardControl=function(){s.params.keyboardControl=false;$(document).off('keydown',handleKeyboard);};s.enableKeyboardControl=function(){s.params.keyboardControl=true;$(document).on('keydown',handleKeyboard);};s.mousewheel={event:false,lastScrollTime:(new window.Date()).getTime()};function isEventSupported(){var eventName='onwheel';var isSupported=eventName in document;if(!isSupported){var element=document.createElement('div');element.setAttribute(eventName,'return;');isSupported=typeof element[eventName]==='function';} 1792if(!isSupported&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature('','')!==true){isSupported=document.implementation.hasFeature('Events.wheel','3.0');} 1793return isSupported;} 1794function normalizeWheel(event){var PIXEL_STEP=10;var LINE_HEIGHT=40;var PAGE_HEIGHT=800;var sX=0,sY=0,pX=0,pY=0;if('detail'in event){sY=event.detail;} 1795if('wheelDelta'in event){sY=-event.wheelDelta/120;} 1796if('wheelDeltaY'in event){sY=-event.wheelDeltaY/120;} 1797if('wheelDeltaX'in event){sX=-event.wheelDeltaX/120;} 1798if('axis'in event&&event.axis===event.HORIZONTAL_AXIS){sX=sY;sY=0;} 1799pX=sX*PIXEL_STEP;pY=sY*PIXEL_STEP;if('deltaY'in event){pY=event.deltaY;} 1800if('deltaX'in event){pX=event.deltaX;} 1801if((pX||pY)&&event.deltaMode){if(event.deltaMode===1){pX*=LINE_HEIGHT;pY*=LINE_HEIGHT;}else{pX*=PAGE_HEIGHT;pY*=PAGE_HEIGHT;}} 1802if(pX&&!sX){sX=(pX<1)?-1:1;} 1803if(pY&&!sY){sY=(pY<1)?-1:1;} 1804return{spinX:sX,spinY:sY,pixelX:pX,pixelY:pY};} 1805if(s.params.mousewheelControl){s.mousewheel.event=(navigator.userAgent.indexOf('firefox')>-1)?'DOMMouseScroll':isEventSupported()?'wheel':'mousewheel';} 1806function handleMousewheel(e){if(e.originalEvent)e=e.originalEvent;var delta=0;var rtlFactor=s.rtl?-1:1;var data=normalizeWheel(e);if(s.params.mousewheelForceToAxis){if(s.isHorizontal()){if(Math.abs(data.pixelX)>Math.abs(data.pixelY))delta=data.pixelX*rtlFactor;else return;} 1807else{if(Math.abs(data.pixelY)>Math.abs(data.pixelX))delta=data.pixelY;else return;}} 1808else{delta=Math.abs(data.pixelX)>Math.abs(data.pixelY)?-data.pixelX*rtlFactor:-data.pixelY;} 1809if(delta===0)return;if(s.params.mousewheelInvert)delta=-delta;
1809if(!s.params.freeMode){if((new window.Date()).getTime()-s.mousewheel.lastScrollTime>60){if(delta<0){if((!s.isEnd||s.params.loop)&&!s.animating){s.slideNext();s.emit('onScroll',s,e);} 1810else if(s.params.mousewheelReleaseOnEdges)return true;} 1811else{if((!s.isBeginning||s.params.loop)&&!s.animating){s.slidePrev();s.emit('onScroll',s,e);} 1812else if(s.params.mousewheelReleaseOnEdges)return true;}} 1813s.mousewheel.lastScrollTime=(new window.Date()).getTime();} 1814else{var position=s.getWrapperTranslate()+delta*s.params.mousewheelSensitivity;var wasBeginning=s.isBeginning,wasEnd=s.isEnd;if(position>=s.minTranslate())position=s.minTranslate();if(position<=s.maxTranslate())position=s.maxTranslate();s.setWrapperTransition(0);s.setWrapperTranslate(position);s.updateProgress();s.updateActiveIndex();if(!wasBeginning&&s.isBeginning||!wasEnd&&s.isEnd){s.updateClasses();} 1815if(s.params.freeModeSticky){clearTimeout(s.mousewheel.timeout);s.mousewheel.timeout=setTimeout(function(){s.slideReset();},300);} 1816else{if(s.params.lazyLoading&&s.lazy){s.lazy.load();}} 1817s.emit('onScroll',s,e);if(s.params.autoplay&&s.params.autoplayDisableOnInteraction)s.stopAutoplay();if(position===0||position===s.maxTranslate())return;} 1818if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;} 1819s.disableMousewheelControl=function(){if(!s.mousewheel.event)return false;var target=s.container;if(s.params.mousewheelEventsTarged!=='container'){target=$(s.params.mousewheelEventsTarged);} 1820target.off(s.mousewheel.event,handleMousewheel);s.params.mousewheelControl=false;return true;};s.enableMousewheelControl=function(){if(!s.mousewheel.event)return false;var target=s.container;if(s.params.mousewheelEventsTarged!=='container'){target=$(s.params.mousewheelEventsTarged);} 1821target.on(s.mousewheel.event,handleMousewheel);s.params.mousewheelControl=true;return true;};function setParallaxTransform(el,progress){el=$(el);var p,pX,pY;var rtlFactor=s.rtl?-1:1;p=el.attr('data-swiper-parallax')||'0';pX=el.attr('data-swiper-parallax-x');pY=el.attr('data-swiper-parallax-y');if(pX||pY){pX=pX||'0';pY=pY||'0';} 1822else{if(s.isHorizontal()){pX=p;pY='0';} 1823else{pY=p;pX='0';}} 1824if((pX).indexOf('%')>=0){pX=parseInt(pX,10)*progress*rtlFactor+'%';} 1825else{pX=pX*progress*rtlFactor+'px';} 1826if((pY).indexOf('%')>=0){pY=parseInt(pY,10)*progress+'%';} 1827else{pY=pY*progress+'px';} 1828el.transform('translate3d('+pX+', '+pY+',0px)');} 1829s.parallax={setTranslate:function(){s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){setParallaxTransform(this,s.progress);});s.slides.each(function(){var slide=$(this);slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){var progress=Math.min(Math.max(slide[0].progress,-1),1);setParallaxTransform(this,progress);});});},setTransition:function(duration){if(typeof duration==='undefined')duration=s.params.speed;s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){var el=$(this);var parallaxDuration=parseInt(el.attr('data-swiper-parallax-duration'),10)||duration;if(duration===0)parallaxDuration=0;el.transition(parallaxDuration);});}};s.zoom={scale:1,currentScale:1,isScaling:false,gesture:{slide:undefined,slideWidth:undefined,slideHeight:undefined,image:undefined,imageWrap:undefined,zoomMax:s.params.zoomMax},image:{isTouched:undefined,isMoved:undefined,currentX:undefined,currentY:undefined,minX:undefined,minY:undefined,maxX:undefined,maxY:undefined,width:undefined,height:undefined,startX:undefined,startY:undefined,touchesStart:{},touchesCurrent:{}},velocity:{x:undefined,y:undefined,prevPositionX:undefined,prevPositionY:undefined,prevTime:undefined},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var x1=e.targetTouches[0].pageX,y1=e.targetTouches[0].pageY,x2=e.targetTouches[1].pageX,y2=e.targetTouches[1].pageY;var distance=Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2));return distance;},onGestureStart:function(e){var z=s.zoom;if(!s.support.gestures){if(e.type!=='touchstart'||e.type==='touchstart'&&e.targetTouches.length<2){return;} 1830z.gesture.scaleStart=z.getDistanceBetweenTouches(e);} 1831if(!z.gesture.slide||!z.gesture.slide.length){z.gesture.slide=$(this);if(z.gesture.slide.length===0)z.gesture.slide=s.slides.eq(s.activeIndex);z.gesture.image=z.gesture.slide.find('img, svg, canvas');z.gesture.imageWrap=z.gesture.image.parent('.'+s.params.zoomContainerClass);z.gesture.zoomMax=z.gesture.imageWrap.attr('data-swiper-zoom')||s.params.zoomMax;if(z.gesture.imageWrap.length===0){z.gesture.image=undefined;return;}} 1832z.gesture.image.transition(0);z.isScaling=true;},onGestureChange:function(e){var z=s.zoom;if(!s.support.gestures){if(e.type!=='touchmove'||e.type==='touchmove'&&e.targetTouches.length<2){return;} 1833z.gesture.scaleMove=z.getDistanceBetweenTouches(e);} 1834if(!z.gesture.image||z.gesture.image.length===0)return;if(s.support.gestures){z.scale=e.scale*z.currentScale;} 1835else{z.scale=(z.gesture.scaleMove/z.gesture.scaleStart)*z.currentScale;} 1836if(z.scale>z.gesture.zoomMax){z.scale=z.gesture.zoomMax-1+Math.pow((z.scale-z.gesture.zoomMax+1),0.5);} 1837if(z.scale<s.params.zoomMin){z.scale=s.params.zoomMin+1-Math.pow((s.params.zoomMin-z.scale+1),0.5);}
1838z.gesture.image.transform('translate3d(0,0,0) scale('+z.scale+')');},onGestureEnd:function(e){var z=s.zoom;if(!s.support.gestures){if(e.type!=='touchend'||e.type==='touchend'&&e.changedTouches.length<2){return;}} 1839if(!z.gesture.image||z.gesture.image.length===0)return;z.scale=Math.max(Math.min(z.scale,z.gesture.zoomMax),s.params.zoomMin);z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale('+z.scale+')');z.currentScale=z.scale;z.isScaling=false;if(z.scale===1)z.gesture.slide=undefined;},onTouchStart:function(s,e){var z=s.zoom;if(!z.gesture.image||z.gesture.image.length===0)return;if(z.image.isTouched)return;if(s.device.os==='android')e.preventDefault();z.image.isTouched=true;z.image.touchesStart.x=e.type==='touchstart'?e.targetTouches[0].pageX:e.pageX;z.image.touchesStart.y=e.type==='touchstart'?e.targetTouches[0].pageY:e.pageY;},onTouchMove:function(e){var z=s.zoom;if(!z.gesture.image||z.gesture.image.length===0)return;s.allowClick=false;if(!z.image.isTouched||!z.gesture.slide)return;if(!z.image.isMoved){z.image.width=z.gesture.image[0].offsetWidth;z.image.height=z.gesture.image[0].offsetHeight;z.image.startX=s.getTranslate(z.gesture.imageWrap[0],'x')||0;z.image.startY=s.getTranslate(z.gesture.imageWrap[0],'y')||0;z.gesture.slideWidth=z.gesture.slide[0].offsetWidth;z.gesture.slideHeight=z.gesture.slide[0].offsetHeight;z.gesture.imageWrap.transition(0);if(s.rtl)z.image.startX=-z.image.startX;if(s.rtl)z.image.startY=-z.image.startY;} 1840var scaledWidth=z.image.width*z.scale;var scaledHeight=z.image.height*z.scale;if(scaledWidth<z.gesture.slideWidth&&scaledHeight<z.gesture.slideHeight)return;z.image.minX=Math.min((z.gesture.slideWidth/2-scaledWidth/2),0);z.image.maxX=-z.image.minX;z.image.minY=Math.min((z.gesture.slideHeight/2-scaledHeight/2),0);z.image.maxY=-z.image.minY;z.image.touchesCurrent.x=e.type==='touchmove'?e.targetTouches[0].pageX:e.pageX;z.image.touchesCurrent.y=e.type==='touchmove'?e.targetTouches[0].pageY:e.pageY;if(!z.image.isMoved&&!z.isScaling){if(s.isHorizontal()&&(Math.floor(z.image.minX)===Math.floor(z.image.startX)&&z.image.touchesCurrent.x<z.image.touchesStart.x)||(Math.floor(z.image.maxX)===Math.floor(z.image.startX)&&z.image.touchesCurrent.x>z.image.touchesStart.x)){z.image.isTouched=false;return;} 1841else if(!s.isHorizontal()&&(Math.floor(z.image.minY)===Math.floor(z.image.startY)&&z.image.touchesCurrent.y<z.image.touchesStart.y)||(Math.floor(z.image.maxY)===Math.floor(z.image.startY)&&z.image.touchesCurrent.y>z.image.touchesStart.y)){z.image.isTouched=false;return;}} 1842e.preventDefault();e.stopPropagation();z.image.isMoved=true;z.image.currentX=z.image.touchesCurrent.x-z.image.touchesStart.x+z.image.startX;z.image.currentY=z.image.touchesCurrent.y-z.image.touchesStart.y+z.image.startY;if(z.image.currentX<z.image.minX){z.image.currentX=z.image.minX+1-Math.pow((z.image.minX-z.image.currentX+1),0.8);} 1843if(z.image.currentX>z.image.maxX){z.image.currentX=z.image.maxX-1+Math.pow((z.image.currentX-z.image.maxX+1),0.8);} 1844if(z.image.currentY<z.image.minY){z.image.currentY=z.image.minY+1-Math.pow((z.image.minY-z.image.currentY+1),0.8);} 1845if(z.image.currentY>z.image.maxY){z.image.currentY=z.image.maxY-1+Math.pow((z.image.currentY-z.image.maxY+1),0.8);} 1846if(!z.velocity.prevPositionX)z.velocity.prevPositionX=z.image.touchesCurrent.x;if(!z.velocity.prevPositionY)z.velocity.prevPositionY=z.image.touchesCurrent.y;if(!z.velocity.prevTime)z.velocity.prevTime=Date.now();z.velocity.x=(z.image.touchesCurrent.x-z.velocity.prevPositionX)/(Date.now()-z.velocity.prevTime)/2;z.velocity.y=(z.image.touchesCurrent.y-z.velocity.prevPositionY)/(Date.now()-z.velocity.prevTime)/2;if(Math.abs(z.image.touchesCurrent.x-z.velocity.prevPositionX)<2)z.velocity.x=0;if(Math.abs(z.image.touchesCurrent.y-z.velocity.prevPositionY)<2)z.velocity.y=0;z.velocity.prevPositionX=z.image.touchesCurrent.x;z.velocity.prevPositionY=z.image.touchesCurrent.y;z.velocity.prevTime=Date.now();z.gesture.imageWrap.transform('translate3d('+z.image.currentX+'px, '+z.image.currentY+'px,0)');},onTouchEnd:function(s,e){var z=s.zoom;if(!z.gesture.image||z.gesture.image.length===0)return;if(!z.image.isTouched||!z.image.isMoved){z.image.isTouched=false;z.image.isMoved=false;return;} 1847z.image.isTouched=false;z.image.isMoved=false;var momentumDurationX=300;var momentumDurationY=300;var momentumDistanceX=z.velocity.x*momentumDurationX;var newPositionX=z.image.currentX+momentumDistanceX;var momentumDistanceY=z.velocity.y*momentumDurationY;var newPositionY=z.image.currentY+momentumDistanceY;if(z.velocity.x!==0)momentumDurationX=Math.abs((newPositionX-z.image.currentX)/z.velocity.x);if(z.velocity.y!==0)momentumDurationY=Math.abs((newPositionY-z.image.currentY)/z.velocity.y);var momentumDuration=Math.max(momentumDurationX,momentumDurationY);z.image.currentX=newPositionX;z.image.currentY=newPositionY;var scaledWidth=z.image.width*z.scale;var scaledHeight=z.image.height*z.scale;z.image.minX=Math.min((z.gesture.slideWidth/2-scaledWidth/2),0);z.image.maxX=-z.image.minX;z.image.minY=Math.min((z.gesture.slideHeight/2-scaledHeight/2),0);z.image.maxY=-z.image.minY;z.image.currentX=Math.max(Math.min(z.image.currentX,z.image.maxX),z.image.minX);z.image.currentY=Math.max(Math.min(z.image.currentY,z.image.maxY),z.image.minY);z.gesture.imageWrap.transition(momentumDuration).transform('translate3d('+z.image.currentX+'px, '+z.image.currentY+'px,0)');},onTransitionEnd:function(s){var z=s.zoom;if(z.gesture.slide&&s.previousIndex!==s.activeIndex){z.gesture.image.transform('translate3d(0,
18470,0) scale(1)');z.gesture.imageWrap.transform('translate3d(0,0,0)');z.gesture.slide=z.gesture.image=z.gesture.imageWrap=undefined;z.scale=z.currentScale=1;}},toggleZoom:function(s,e){var z=s.zoom;if(!z.gesture.slide){z.gesture.slide=s.clickedSlide?$(s.clickedSlide):s.slides.eq(s.activeIndex);z.gesture.image=z.gesture.slide.find('img, svg, canvas');z.gesture.imageWrap=z.gesture.image.parent('.'+s.params.zoomContainerClass);} 1848if(!z.gesture.image||z.gesture.image.length===0)return;var touchX,touchY,offsetX,offsetY,diffX,diffY,translateX,translateY,imageWidth,imageHeight,scaledWidth,scaledHeight,translateMinX,translateMinY,translateMaxX,translateMaxY,slideWidth,slideHeight;if(typeof z.image.touchesStart.x==='undefined'&&e){touchX=e.type==='touchend'?e.changedTouches[0].pageX:e.pageX;touchY=e.type==='touchend'?e.changedTouches[0].pageY:e.pageY;} 1849else{touchX=z.image.touchesStart.x;touchY=z.image.touchesStart.y;} 1850if(z.scale&&z.scale!==1){z.scale=z.currentScale=1;z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');z.gesture.slide=undefined;} 1851else{z.scale=z.currentScale=z.gesture.imageWrap.attr('data-swiper-zoom')||s.params.zoomMax;if(e){slideWidth=z.gesture.slide[0].offsetWidth;slideHeight=z.gesture.slide[0].offsetHeight;offsetX=z.gesture.slide.offset().left;offsetY=z.gesture.slide.offset().top;diffX=offsetX+slideWidth/2-touchX;diffY=offsetY+slideHeight/2-touchY;imageWidth=z.gesture.image[0].offsetWidth;imageHeight=z.gesture.image[0].offsetHeight;scaledWidth=imageWidth*z.scale;scaledHeight=imageHeight*z.scale;translateMinX=Math.min((slideWidth/2-scaledWidth/2),0);translateMinY=Math.min((slideHeight/2-scaledHeight/2),0);translateMaxX=-translateMinX;translateMaxY=-translateMinY;translateX=diffX*z.scale;translateY=diffY*z.scale;if(translateX<translateMinX){translateX=translateMinX;} 1852if(translateX>translateMaxX){translateX=translateMaxX;} 1853if(translateY<translateMinY){translateY=translateMinY;} 1854if(translateY>translateMaxY){translateY=translateMaxY;}} 1855else{translateX=0;translateY=0;} 1856z.gesture.imageWrap.transition(300).transform('translate3d('+translateX+'px, '+translateY+'px,0)');z.gesture.image.transition(300).transform('translate3d(0,0,0) scale('+z.scale+')');}},attachEvents:function(detach){var action=detach?'off':'on';if(s.params.zoom){var target=s.slides;var passiveListener=s.touchEvents.start==='touchstart'&&s.support.passiveListener&&s.params.passiveListeners?{passive:true,capture:false}:false;if(s.support.gestures){s.slides[action]('gesturestart',s.zoom.onGestureStart,passiveListener);s.slides[action]('gesturechange',s.zoom.onGestureChange,passiveListener);s.slides[action]('gestureend',s.zoom.onGestureEnd,passiveListener);} 1857else if(s.touchEvents.start==='touchstart'){s.slides[action](s.touchEvents.start,s.zoom.onGestureStart,passiveListener);s.slides[action](s.touchEvents.move,s.zoom.onGestureChange,passiveListener);s.slides[action](s.touchEvents.end,s.zoom.onGestureEnd,passiveListener);} 1858s[action]('touchStart',s.zoom.onTouchStart);s.slides.each(function(index,slide){if($(slide).find('.'+s.params.zoomContainerClass).length>0){$(slide)[action](s.touchEvents.move,s.zoom.onTouchMove);}});s[action]('touchEnd',s.zoom.onTouchEnd);s[action]('transitionEnd',s.zoom.onTransitionEnd);if(s.params.zoomToggle){s.on('doubleTap',s.zoom.toggleZoom);}}},init:function(){s.zoom.attachEvents();},destroy:function(){s.zoom.attachEvents(true);}};s._plugins=[];for(var plugin in s.plugins){var p=s.plugins[plugin](s,s.params[plugin]);if(p)s._plugins.push(p);} 1859s.callPlugins=function(eventName){for(var i=0;i<s._plugins.length;i++){if(eventName in s._plugins[i]){s._plugins[i][eventName](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);}}};function normalizeEventName(eventName){if(eventName.indexOf('on')!==0){if(eventName[0]!==eventName[0].toUpperCase()){eventName='on'+eventName[0].toUpperCase()+eventName.substring(1);} 1860else{eventName='on'+eventName;}} 1861return eventName;} 1862s.emitterEventListeners={};s.emit=function(eventName){if(s.params[eventName]){s.params[eventName](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);} 1863var i;if(s.emitterEventListeners[eventName]){for(i=0;i<s.emitterEventListeners[eventName].length;i++){s.emitterEventListeners[eventName][i](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);}} 1864if(s.callPlugins)s.callPlugins(eventName,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);};s.on=function(eventName,handler){eventName=normalizeEventName(eventName);if(!s.emitterEventListeners[eventName])s.emitterEventListeners[eventName]=[];s.emitterEventListeners[eventName].push(handler);return s;};s.off=function(eventName,handler){var i;eventName=normalizeEventName(eventName);if(typeof handler==='undefined'){s.emitterEventListeners[eventName]=[];return s;} 1865if(!s.emitterEventListeners[eventName]||s.emitterEventListeners[eventName].length===0)return;for(i=0;i<s.emitterEventListeners[eventName].length;i++){if(s.emitterEventListeners[eventName][i]===handler)s.emitterEventListeners[eventName].splice(i,1);} 1866return s;};s.once=function(eventName,handler){eventName=normalizeEventName(eventName);var _handler=function(){handler(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]);s.off(eventName,_handler);};s.on(eventName,_handler);return s;};s.a11y={makeFocusable:function($el){$el.attr('tabIndex','0');return $el;},addRole:function($el,role){$el.attr('role',role);return $el;},addLabel:function($el,label){$el.attr('aria-label',label);return $el;},disable:function($el){$el.attr('aria-disabled',true);return $el;},enable:function($el){$el.attr('aria-disabled',false);return $el;},onEnterKey:function(event){if(event.keyCode!==13)return;if($(event.target).is(s.params.nextButton)){s.onClickNext(event);if(s.isEnd){s.a11y.notify(s.params.lastSlideMessage);} 1867else{s.a11y.notify(s.params.nextSlideMessage);}} 1868else if($(event.target).is(s.params.prevButton)){s.onClickPrev(event);if(s.isBeginning){s.a11y.notify(s.params.firstSlideMessage);} 1869else{s.a11y.notify(s.params.prevSlideMessage);}} 1870if($(event.target).is('.'+s.params.bulletClass)){$(event.target)[0].click();}},liveRegion:$('<span class="'+s.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(message){var notification=s.a11y.liveRegion;if(notification.length===0)return;notification.html('');notification.html(message);},init:function(){if(s.params.nextButton&&s.nextButton&&s.nextButton.length>0){s.a11y.makeFocusable(s.nextButton);s.a11y.addRole(s.nextButton,'button');s.a11y.addLabel(s.nextButton,s.params.nextSlideMessage);} 1871if(s.params.prevButton&&s.prevButton&&s.prevButton.length>0){s.a11y.makeFocusable(s.prevButton);s.a11y.addRole(s.prevButton,'button');s.a11y.addLabel(s.prevButton,s.params.prevSlideMessage);} 1872$(s.container).append(s.a11y.liveRegion);},initPagination:function(){if(s.params.pagination&&s.params.paginationClickable&&s.bullets&&s.bullets.length){s.bullets.each(function(){var bullet=$(this);s.a11y.makeFocusable(bullet);s.a11y.addRole(bullet,'button');s.a11y.addLabel(bullet,s.params.paginationBulletMessage.replace(/{{index}}/,bullet.index()+1));});}},destroy:function(){if(s.a11y.liveRegion&&s.a11y.liveRegion.length>0)s.a11y.liveRegion.remove();}};s.init=function(){if(s.params.loop)s.createLoop();s.updateContainerSize();s.updateSlidesSize();s.updatePagination();if(s.params.scrollbar&&s.scrollbar){s.scrollbar.set();if(s.params.scrollbarDraggable){s.scrollbar.enableDraggable();}} 1873if(s.params.effect!=='slide'&&s.effects[s.params.effect]){if(!s.params.loop)s.updateProgress();s.effects[s.params.effect].setTranslate();} 1874if(s.params.loop){s.slideTo(s.params.initialSlide+s.loopedSlides,0,s.params.runCallbacksOnInit);} 1875else{s.slideTo(s.params.initialSlide,0,s.params.runCallbacksOnInit);if(s.params.initialSlide===0){if(s.parallax&&s.params.parallax)s.parallax.setTranslate();if(s.lazy&&s.params.lazyLoading){s.lazy.load();s.lazy.initialImageLoaded=true;}}} 1876s.attachEvents();
1876if(s.params.observer&&s.support.observer){s.initObservers();} 1877if(s.params.preloadImages&&!s.params.lazyLoading){s.preloadImages();} 1878if(s.params.zoom&&s.zoom){s.zoom.init();} 1879if(s.params.autoplay){s.startAutoplay();} 1880if(s.params.keyboardControl){if(s.enableKeyboardControl)s.enableKeyboardControl();} 1881if(s.params.mousewheelControl){if(s.enableMousewheelControl)s.enableMousewheelControl();} 1882if(s.params.hashnavReplaceState){s.params.replaceState=s.params.hashnavReplaceState;} 1883if(s.params.history){if(s.history)s.history.init();} 1884if(s.params.hashnav){if(s.hashnav)s.hashnav.init();} 1885if(s.params.a11y&&s.a11y)s.a11y.init();s.emit('onInit',s);};s.cleanupStyles=function(){s.container.removeClass(s.classNames.join(' ')).removeAttr('style');s.wrapper.removeAttr('style');if(s.slides&&s.slides.length){s.slides.removeClass([s.params.slideVisibleClass,s.params.slideActiveClass,s.params.slideNextClass,s.params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-column').removeAttr('data-swiper-row');} 1886if(s.paginationContainer&&s.paginationContainer.length){s.paginationContainer.removeClass(s.params.paginationHiddenClass);} 1887if(s.bullets&&s.bullets.length){s.bullets.removeClass(s.params.bulletActiveClass);} 1888if(s.params.prevButton)$(s.params.prevButton).removeClass(s.params.buttonDisabledClass);if(s.params.nextButton)$(s.params.nextButton).removeClass(s.params.buttonDisabledClass);if(s.params.scrollbar&&s.scrollbar){if(s.scrollbar.track&&s.scrollbar.track.length)s.scrollbar.track.removeAttr('style');if(s.scrollbar.drag&&s.scrollbar.drag.length)s.scrollbar.drag.removeAttr('style');}};s.destroy=function(deleteInstance,cleanupStyles){s.detachEvents();s.stopAutoplay();if(s.params.scrollbar&&s.scrollbar){if(s.params.scrollbarDraggable){s.scrollbar.disableDraggable();}} 1889if(s.params.loop){s.destroyLoop();} 1890if(cleanupStyles){s.cleanupStyles();} 1891s.disconnectObservers();if(s.params.zoom&&s.zoom){s.zoom.destroy();} 1892if(s.params.keyboardControl){if(s.disableKeyboardControl)s.disableKeyboardControl();} 1893if(s.params.mousewheelControl){if(s.disableMousewheelControl)s.disableMousewheelControl();} 1894if(s.params.a11y&&s.a11y)s.a11y.destroy();if(s.params.history&&!s.params.replaceState){window.removeEventListener('popstate',s.history.setHistoryPopState);} 1895if(s.params.hashnav&&s.hashnav){s.hashnav.destroy();} 1896s.emit('onDestroy');if(deleteInstance!==false)s=null;};s.init();return s;};Swiper.prototype={isSafari:(function(){var ua=window.navigator.userAgent.toLowerCase();return(ua.indexOf('safari')>=0&&ua.indexOf('chrome')<0&&ua.indexOf('android')<0);})(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(arr){return Object.prototype.toString.apply(arr)==='[object Array]';},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:(window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1)||(window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1),lteIE9:(function(){var div=document.createElement('div');div.innerHTML='<!--[if lte IE 9]><i></i><![endif]-->';return div.getElementsByTagName('i').length===1;})()},device:(function(){var ua=window.navigator.userAgent;var android=ua.match(/(Android);?[\s\/]+([\d.]+)?/);var ipad=ua.match(/(iPad).*OS\s([\d_]+)/);var ipod=ua.match(/(iPod)(.*OS\s([\d_]+))?/);var iphone=!ipad&&ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:ipad||iphone||ipod,android:android};})(),support:{touch:(window.Modernizr&&Modernizr.touch===true)||(function(){return!!(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch);})(),transforms3d:(window.Modernizr&&Modernizr.csstransforms3d===true)||(function(){var div=document.createElement('div').style;return('webkitPerspective'in div||'MozPerspective'in div||'OPerspective'in div||'MsPerspective'in div||'perspective'in div);})(),flexbox:(function(){var div=document.createElement('div').style;var styles=('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');for(var i=0;i<styles.length;i++){if(styles[i]in div)return true;}}
1896)(),observer:(function(){return('MutationObserver'in window||'WebkitMutationObserver'in window);})(),passiveListener:(function(){var supportsPassive=false;try{var opts=Object.defineProperty({},'passive',{get:function(){supportsPassive=true;}});window.addEventListener('testPassiveListener',null,opts);}catch(e){} 1897return supportsPassive;})(),gestures:(function(){return'ongesturestart'in window;})()},plugins:{}};var Dom7=(function(){var Dom7=function(arr){var _this=this,i=0;for(i=0;i<arr.length;i++){_this[i]=arr[i];} 1898_this.length=arr.length;return this;};var $=function(selector,context){var arr=[],i=0;if(selector&&!context){if(selector instanceof Dom7){return selector;}} 1899if(selector){if(typeof selector==='string'){var els,tempParent,html=selector.trim();if(html.indexOf('<')>=0&&html.indexOf('>')>=0){var toCreate='div';if(html.indexOf('<li')===0)toCreate='ul';if(html.indexOf('<tr')===0)toCreate='tbody';if(html.indexOf('<td')===0||html.indexOf('<th')===0)toCreate='tr';if(html.indexOf('<tbody')===0)toCreate='table';if(html.indexOf('<option')===0)toCreate='select';tempParent=document.createElement(toCreate);tempParent.innerHTML=selector;for(i=0;i<tempParent.childNodes.length;i++){arr.push(tempParent.childNodes[i]);}} 1900else{if(!context&&selector[0]==='#'&&!selector.match(/[ .<>:~]/)){els=[document.getElementById(selector.split('#')[1])];} 1901else{els=(context||document).querySelectorAll(selector);} 1902for(i=0;i<els.length;i++){if(els[i])arr.push(els[i]);}}} 1903else if(selector.nodeType||selector===window||selector===document){arr.push(selector);} 1904else if(selector.length>0&&selector[0].nodeType){for(i=0;i<selector.length;i++){arr.push(selector[i]);}}} 1905return new Dom7(arr);};Dom7.prototype={addClass:function(className){if(typeof className==='undefined'){return this;} 1906var classes=className.split(' ');for(var i=0;i<classes.length;i++){for(var j=0;j<this.length;j++){this[j].classList.add(classes[i]);}} 1907return this;},removeClass:function(className){var classes=className.split(' ');for(var i=0;i<classes.length;i++){for(var j=0;j<this.length;j++){this[j].classList.remove(classes[i]);}} 1908return this;},hasClass:function(className){if(!this[0])return false;else return this[0].classList.contains(className);},toggleClass:function(className){var classes=className.split(' ');for(var i=0;i<classes.length;i++){for(var j=0;j<this.length;j++){this[j].classList.toggle(classes[i]);}} 1909return this;},attr:function(attrs,value){if(arguments.length===1&&typeof attrs==='string'){if(this[0])return this[0].getAttribute(attrs);else return undefined;} 1910else{for(var i=0;i<this.length;i++){if(arguments.length===2){this[i].setAttribute(attrs,value);} 1911else{for(var attrName in attrs){this[i][attrName]=attrs[attrName];this[i].setAttribute(attrName,attrs[attrName]);}}} 1912return this;}},removeAttr:function(attr){for(var i=0;i<this.length;i++){this[i].removeAttribute(attr);} 1913return this;},data:function(key,value){if(typeof value==='undefined'){if(this[0]){var dataKey=this[0].getAttribute('data-'+key);if(dataKey)return dataKey;else if(this[0].dom7ElementDataStorage&&(key in this[0].dom7ElementDataStorage))return this[0].dom7ElementDataStorage[key];else return undefined;} 1914else return undefined;} 1915else{for(var i=0;i<this.length;i++){var el=this[i];if(!el.dom7ElementDataStorage)el.dom7ElementDataStorage={};el.dom7ElementDataStorage[key]=value;} 1916return this;}},transform:function(transform){for(var i=0;i<this.length;i++){var elStyle=this[i].style;elStyle.webkitTransform=elStyle.MsTransform=elStyle.msTransform=elStyle.MozTransform=elStyle.OTransform=elStyle.transform=transform;} 1917return this;},transition:function(duration){if(typeof duration!=='string'){duration=duration+'ms';} 1918for(var i=0;i<this.length;i++){var elStyle=this[i].style;elStyle.webkitTransitionDuration=elStyle.MsTransitionDuration=elStyle.msTransitionDuration=elStyle.MozTransitionDuration=elStyle.OTransitionDuration=elStyle.transitionDuration=duration;} 1919return this;},on:function(eventName,targetSelector,listener,capture){function handleLiveEvent(e){var target=e.target;if($(target).is(targetSelector))listener.call(target,e);else{var parents=$(target).parents();for(var k=0;k<parents.length;k++){if($(parents[k]).is(targetSelector))listener.call(parents[k],e);}}} 1920var events=eventName.split(' ');var i,j;for(i=0;i<this.length;i++){if(typeof targetSelector==='function'||targetSelector===false){if(typeof targetSelector==='function'){listener=arguments[1];capture=arguments[2]||false;} 1921for(j=0;j<events.length;j++){this[i].addEventListener(events[j],listener,capture);}} 1922else{for(j=0;j<events.length;j++){if(!this[i].dom7LiveListeners)this[i].dom7LiveListeners=[];this[i].dom7LiveListeners.push({listener:listener,liveListener:handleLiveEvent});this[i].addEventListener(events[j],handleLiveEvent,capture);}}} 1923return this;},off:function(eventName,targetSelector,listener,capture){var events=eventName.split(' ');for(var i=0;i<events.length;i++){for(var j=0;j<this.length;j++){if(typeof targetSelector==='function'||targetSelector===false){if(typeof targetSelector==='function'){listener=arguments[1];capture=arguments[2]||false;} 1924this[j].removeEventListener(events[i],listener,capture);} 1925else{if(this[j].dom7LiveListeners){for(var k=0;k<this[j].dom7LiveListeners.length;k++){if(this[j].dom7LiveListeners[k].listener===listener){this[j].removeEventListener(events[i],this[j].dom7LiveListeners[k].liveListener,capture);}}}}}} 1926return this;},once:function(eventName,targetSelector,listener,capture){var dom=this;if(typeof targetSelector==='function'){targetSelector=false;listener=arguments[1];capture=arguments[2];} 1927function proxy(e){listener(e);dom.off(eventName,targetSelector,proxy,capture);} 1928dom.on(eventName,targetSelector,proxy,capture);},trigger:function(eventName,eventData){for(var i=0;i<this.length;i++){var evt;try{evt=new window.CustomEvent(eventName,{detail:eventData,bubbles:true,cancelable:true});} 1929catch(e){evt=document.createEvent('Event');evt.initEvent(eventName,true,true);evt.detail=eventData;} 1930this[i].dispatchEvent(evt);} 1931return this;},transitionEnd:function(callback){var events=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'],i,j,dom=this;function fireCallBack(e){if(e.target!==this)return;callback.call(this,e);for(i=0;i<events.length;i++){dom.off(events[i],fireCallBack);}} 1932if(callback){for(i=0;i<events.length;i++){dom.on(events[i],fireCallBack);}} 1933return this;},width:function(){if(this[0]===window){return window.innerWidth;} 1934else{if(this.length>0){return parseFloat(this.css('width'));} 1935else{return null;}}},outerWidth:function(includeMargins){if(this.length>0){if(includeMargins) 1936return this[0].offsetWidth+parseFloat(this.css('margin-right'))+parseFloat(this.css('margin-left'));else 1937return this[0].offsetWidth;} 1938else return null;},height:function(){if(this[0]===window){return window.innerHeight;} 1939else{if(this.length>0){return parseFloat(this.css('height'));} 1940else{return null;}}},outerHeight:function(includeMargins){if(this.length>0){if(includeMargins) 1941return this[0].offsetHeight+parseFloat(this.css('margin-top'))+parseFloat(this.css('margin-bottom'));else 1942return this[0].offsetHeight;} 1943else return null;},offset:function(){if(this.length>0){var el=this[0];var box=el.getBoundingClientRect();var body=document.body;var clientTop=el.clientTop||body.clientTop||0;var clientLeft=el.clientLeft||body.clientLeft||0;var scrollTop=window.pageYOffset||el.scrollTop;var scrollLeft=window.pageXOffset||el.scrollLeft;return{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft};} 1944else{return null;}},css:function(props,value){var i;if(arguments.length===1){if(typeof props==='string'){if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(props);} 1945else{for(i=0;i<this.length;i++){for(var prop in props){this[i].style[prop]=props[prop];}} 1946return this;}} 1947if(arguments.length===2&&typeof props==='string'){for(i=0;i<this.length;i++){this[i].style[props]=value;} 1948return this;} 1949return this;},each:function(callback){for(var i=0;i<this.length;i++){callback.call(this[i],i,this[i]);} 1950return this;},html:function(html){if(typeof html==='undefined'){return this[0]?this[0].innerHTML:undefined;} 1951else{for(var i=0;i<this.length;i++){this[i].innerHTML=html;} 1952return this;}},text:function(text){if(typeof text==='undefined'){if(this[0]){return this[0].textContent.trim();} 1953else return null;} 1954else{for(var i=0;i<this.length;i++){this[i].textContent=text;} 1955return this;}},is:function(selector){if(!this[0])return false;var compareWith,i;if(typeof selector==='string'){var el=this[0];if(el===document)return selector===document;if(el===window)return selector===window;if(el.matches)return el.matches(selector);else if(el.webkitMatchesSelector)return el.webkitMatchesSelector(selector);else if(el.mozMatchesSelector)return el.mozMatchesSelector(selector);
1955else if(el.msMatchesSelector)return el.msMatchesSelector(selector);else{compareWith=$(selector);for(i=0;i<compareWith.length;i++){if(compareWith[i]===this[0])return true;} 1956return false;}} 1957else if(selector===document)return this[0]===document;else if(selector===window)return this[0]===window;else{if(selector.nodeType||selector instanceof Dom7){compareWith=selector.nodeType?[selector]:selector;for(i=0;i<compareWith.length;i++){if(compareWith[i]===this[0])return true;} 1958return false;} 1959return false;}},index:function(){if(this[0]){var child=this[0];var i=0;while((child=child.previousSibling)!==null){if(child.nodeType===1)i++;} 1960return i;} 1961else return undefined;},eq:function(index){if(typeof index==='undefined')return this;var length=this.length;var returnIndex;if(index>length-1){return new Dom7([]);} 1962if(index<0){returnIndex=length+index;if(returnIndex<0)return new Dom7([]);else return new Dom7([this[returnIndex]]);} 1963return new Dom7([this[index]]);},append:function(newChild){var i,j;for(i=0;i<this.length;i++){if(typeof newChild==='string'){var tempDiv=document.createElement('div');tempDiv.innerHTML=newChild;while(tempDiv.firstChild){this[i].appendChild(tempDiv.firstChild);}} 1964else if(newChild instanceof Dom7){for(j=0;j<newChild.length;j++){this[i].appendChild(newChild[j]);}} 1965else{this[i].appendChild(newChild);}} 1966return this;},prepend:function(newChild){var i,j;for(i=0;i<this.length;i++){if(typeof newChild==='string'){var tempDiv=document.createElement('div');tempDiv.innerHTML=newChild;for(j=tempDiv.childNodes.length-1;j>=0;j--){this[i].insertBefore(tempDiv.childNodes[j],this[i].childNodes[0]);}} 1967else if(newChild instanceof Dom7){for(j=0;j<newChild.length;j++){this[i].insertBefore(newChild[j],this[i].childNodes[0]);}} 1968else{this[i].insertBefore(newChild,this[i].childNodes[0]);}} 1969return this;},insertBefore:function(selector){var before=$(selector);for(var i=0;i<this.length;i++){if(before.length===1){before[0].parentNode.insertBefore(this[i],before[0]);} 1970else if(before.length>1){for(var j=0;j<before.length;j++){before[j].parentNode.insertBefore(this[i].cloneNode(true),before[j]);}}}},insertAfter:function(selector){var after=$(selector);for(var i=0;i<this.length;i++){if(after.length===1){after[0].parentNode.insertBefore(this[i],after[0].nextSibling);} 1971else if(after.length>1){for(var j=0;j<after.length;j++){after[j].parentNode.insertBefore(this[i].cloneNode(true),after[j].nextSibling);}}}},next:function(selector){if(this.length>0){if(selector){if(this[0].nextElementSibling&&$(this[0].nextElementSibling).is(selector))return new Dom7([this[0].nextElementSibling]);else return new Dom7([]);} 1972else{if(this[0].nextElementSibling)return new Dom7([this[0].nextElementSibling]);else return new Dom7([]);}} 1973else return new Dom7([]);},nextAll:function(selector){var nextEls=[];var el=this[0];if(!el)return new Dom7([]);while(el.nextElementSibling){var next=el.nextElementSibling;if(selector){if($(next).is(selector))nextEls.push(next);} 1974else nextEls.push(next);el=next;} 1975return new Dom7(nextEls);},prev:function(selector){if(this.length>0){if(selector){if(this[0].previousElementSibling&&$(this[0].previousElementSibling).is(selector))return new Dom7([this[0].previousElementSibling]);else return new Dom7([]);} 1976else{if(this[0].previousElementSibling)return new Dom7([this[0].previousElementSibling]);else return new Dom7([]);}} 1977else return new Dom7([]);},prevAll:function(selector){var prevEls=[];var el=this[0];if(!el)return new Dom7([]);while(el.previousElementSibling){var prev=el.previousElementSibling;if(selector){if($(prev).is(selector))prevEls.push(prev);} 1978else prevEls.push(prev);el=prev;} 1979return new Dom7(prevEls);},parent:function(selector){var parents=[];for(var i=0;i<this.length;i++){if(selector){if($(this[i].parentNode).is(selector))parents.push(this[i].parentNode);} 1980else{parents.push(this[i].parentNode);}} 1981return $($.unique(parents));},parents:function(selector){var parents=[];for(var i=0;i<this.length;i++){var parent=this[i].parentNode;while(parent){if(selector){if($(parent).is(selector))parents.push(parent);} 1982else{parents.push(parent);} 1983parent=parent.parentNode;}} 1984return $($.unique(parents));},find:function(selector){var foundElements=[];for(var i=0;i<this.length;i++){var found=this[i].querySelectorAll(selector);for(var j=0;j<found.length;j++){foundElements.push(found[j]);}} 1985return new Dom7(foundElements);},children:function(selector){var children=[];for(var i=0;i<this.length;i++){var childNodes=this[i].childNodes;for(var j=0;j<childNodes.length;j++){if(!selector){if(childNodes[j].nodeType===1)children.push(childNodes[j]);} 1986else{if(childNodes[j].nodeType===1&&$(childNodes[j]).is(selector))children.push(childNodes[j]);}}} 1987return new Dom7($.unique(children));},remove:function(){for(var i=0;i<this.length;i++){if(this[i].parentNode)this[i].parentNode.removeChild(this[i]);} 1988return this;},add:function(){var dom=this;var i,j;for(i=0;i<arguments.length;i++){var toAdd=$(arguments[i]);for(j=0;j<toAdd.length;j++){dom[dom.length]=toAdd[j];dom.length++;}} 1989return dom;}};$.fn=Dom7.prototype;$.unique=function(arr){var unique=[];for(var i=0;i<arr.length;
1989i++){if(unique.indexOf(arr[i])===-1)unique.push(arr[i]);} 1990return unique;};return $;})();var swiperDomPlugins=['jQuery','Zepto','Dom7'];for(var i=0;i<swiperDomPlugins.length;i++){if(window[swiperDomPlugins[i]]){addLibraryPlugin(window[swiperDomPlugins[i]]);}} 1991var domLib;if(typeof Dom7==='undefined'){domLib=window.Dom7||window.Zepto||window.jQuery;} 1992else{domLib=Dom7;} 1993function addLibraryPlugin(lib){lib.fn.swiper=function(params){var firstInstance;lib(this).each(function(){var s=new Swiper(this,params);if(!firstInstance)firstInstance=s;});return firstInstance;};} 1994if(domLib){if(!('transitionEnd'in domLib.fn)){domLib.fn.transitionEnd=function(callback){var events=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'],i,j,dom=this;function fireCallBack(e){if(e.target!==this)return;callback.call(this,e);for(i=0;i<events.length;i++){dom.off(events[i],fireCallBack);}} 1995if(callback){for(i=0;i<events.length;i++){dom.on(events[i],fireCallBack);}} 1996return this;};} 1997if(!('transform'in domLib.fn)){domLib.fn.transform=function(transform){for(var i=0;i<this.length;i++){var elStyle=this[i].style;elStyle.webkitTransform=elStyle.MsTransform=elStyle.msTransform=elStyle.MozTransform=elStyle.OTransform=elStyle.transform=transform;} 1998return this;};} 1999if(!('transition'in domLib.fn)){domLib.fn.transition=function(duration){if(typeof duration!=='string'){duration=duration+'ms';} 2000for(var i=0;i<this.length;i++){var elStyle=this[i].style;elStyle.webkitTransitionDuration=elStyle.MsTransitionDuration=elStyle.msTransitionDuration=elStyle.MozTransitionDuration=elStyle.OTransitionDuration=elStyle.transitionDuration=duration;} 2001return this;};} 2002if(!('outerWidth'in domLib.fn)){domLib.fn.outerWidth=function(includeMargins){if(this.length>0){if(includeMargins) 2003return this[0].offsetWidth+parseFloat(this.css('margin-right'))+parseFloat(this.css('margin-left'));else 2004return this[0].offsetWidth;} 2005else return null;};}} 2006window.Swiper=Swiper;})();if(typeof(module)!=='undefined') 2007{module.exports=window.Swiper;} 2008else if(typeof define==='function'&&define.amd){define([],function(){'use strict';return window.Swiper;});} 2009/* End */ 2010; 2011; /* Start:"a:4:{s:4:"full";s:78:"/local/templates/fondpotanin/build/script/polyfills/includes.js?16939085021483";s:6:"source";s:63:"/local/templates/fondpotanin/build/script/polyfills/includes.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2012if (!Array.prototype.includes) { 2013 Object.defineProperty(Array.prototype, 'includes', { 2014 value: function(searchElement, fromIndex) { 2015 2016 if (this == null) { 2017 throw new TypeError('"this" is null or not defined'); 2018 } 2019 2020 // 1. Let O be ? ToObject(this value). 2021 var o = Object(this); 2022 2023 // 2. Let len be ? ToLength(? Get(O, "length")). 2024 var len = o.length >>> 0; 2025 2026 // 3. If len is 0, return false. 2027 if (len === 0) { 2028 return false; 2029 } 2030 2031 // 4. Let n be ? ToInteger(fromIndex). 2032 // (If fromIndex is undefined, this step produces the value 0.) 2033 var n = fromIndex | 0; 2034 2035 // 5. If n ⥠0, then 2036 // a. Let k be n. 2037 // 6. Else n < 0, 2038 // a. Let k be len + n. 2039 // b. If k < 0, let k be 0. 2040 var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); 2041 2042 function sameValueZero(x, y) { 2043 return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y)); 2044 } 2045 2046 // 7. Repeat, while k < len 2047 while (k < len) { 2048 // a. Let elementK be the result of ? Get(O, ! ToString(k)). 2049 // b. If SameValueZero(searchElement, elementK) is true, return true. 2050 if (sameValueZero(o[k], searchElement)) { 2051 return true; 2052 } 2053 // c. Increase k by 1. 2054 k++; 2055 } 2056 2057 // 8. Return false 2058 return false; 2059 } 2060 }); 2061} 2062/* End */ 2063; 2064; /* Start:"a:4:{s:4:"full";
2064s:53:"/local/templates/fondpotanin/script.js?16939085024891";s:6:"source";s:38:"/local/templates/fondpotanin/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2065// оÑобÑажение cookie-пÑедÑпÑÐµÐ¶Ð´ÐµÐ½Ð¸Ñ 2066var cookies = { 2067 init: function () { 2068 // ÐоказÑваем cookie-пÑедÑпÑеждение 2069 var hideTheModal = $.cookie('cookie_enable'); 2070 // еÑли cookie не ÑÑÑановлено... 2071 2072 if (hideTheModal == "true") { 2073 2074 $('.js-coockies-alert').addClass('hidden') 2075 } 2076 if (hideTheModal == null) { 2077 2078 console.log('cookie null'); 2079 // вÑзваÑÑ Ð¼Ð¾Ð´Ð°Ð»Ñное окно 2080 $('.js-coockies-alert').removeClass('hidden') 2081 // еÑли кнопка "ÐакÑÑÑÑ" нажаÑа 2082 $('.js-coockies-accept').click(function () { 2083 // добавиÑÑ cookie 2084 $.cookie('cookie_enable', 'true', { 2085 expires: 30, 2086 path: '/' 2087 }); 2088 $('.js-coockies-alert').addClass('hidden') 2089 // $('.js-modal-cookie').removeClass('isOpen') 2090 // $('.js-modal-cookie').addClass('isClose') 2091 }); 2092 } 2093 // var showCookie = getCookie('cookie_enable'); 2094 // var sessionID = BX.bitrix_sessid();
2095 // if (showCookie !== sessionID) { 2096 // // опÑеделÑем паÑамеÑÑÑ Ð´Ð»Ñ cookie 2097 // // var date = new Date(new Date().getTime() + 1000 * 60 * 24); // 24 минÑÑÑ 2098 // var date = new Date().getMonth() + 1; // 24 минÑÑÑ 2099 // var options = { 2100 // path: '/', 2101 // expires: 30 2102 // }; 2103 2104 // // ÑÑÑанавливаем cookie 2105 // setCookie('cookie_enable', 'true', options); 2106 2107 // //показÑваем cookie-пÑедÑпÑеждение 2108 // $('.js-coockies-alert').show(); 2109 // } 2110 2111 // //ÑкÑÑваем cookie-пÑедÑпÑеждение 2112 // $(document).on('click', '.js-coockies-accept', function (e) { 2113 // $('.coockies-alert, .js-coockies-alert').hide(); 2114 // }); 2115 } 2116}; 2117 2118var commonTemplateInit = { 2119 init: function () { 2120 cookies.init(); 2121 } 2122}; 2123 2124$(function () { 2125 commonTemplateInit.init(); 2126}); 2127 2128// возвÑаÑÐ°ÐµÑ cookie Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ name, еÑли еÑÑÑ, еÑли неÑ, Ñо undefined 2129function getCookie(name) { 2130 var matches = document.cookie.match(new RegExp( 2131 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 2132 )); 2133 return matches ? decodeURIComponent(matches[1]) : undefined; 2134} 2135 2136// запиÑÑ Ð² cookie 2137function setCookie(name, value, options) { 2138 options = options || {}; 2139 2140 var expires = options.expires; 2141 2142 if (typeof expires == "number" && expires) { 2143 var d = new Date(); 2144 d.setTime(d.getTime() + expires * 1000); 2145 expires = options.expires = d; 2146 } 2147 if (expires && expires.toUTCString) { 2148 options.expires = expires.toUTCString(); 2149 } 2150 2151 value = encodeURIComponent(value); 2152 2153 var updatedCookie = name + "=" + value; 2154 2155 for (var propName in options) { 2156 updatedCookie += "; " + propName; 2157 var propValue = options[propName]; 2158 if (propValue !== true) { 2159 updatedCookie += "=" + propValue; 2160 } 2161 } 2162 2163 document.cookie = updatedCookie; 2164} 2165 2166// Ñдаление cookie 2167function deleteCookie(name) { 2168 setCookie(name, "", { 2169 expires: -1 2170 }) 2171} 2172 2173 2174Share = { 2175 vkontakte: function(purl, ptitle, pimg, text) { 2176 url = 'http://vkontakte.ru/share.php?'; 2177 url += 'url=' + encodeURIComponent(purl); 2178 url += '&title=' + encodeURIComponent(ptitle); 2179 url += '&description=' + encodeURIComponent(text); 2180 url += '&image=' + encodeURIComponent(pimg); 2181 url += '&noparse=true'; 2182 Share.popup(url); 2183 }, 2184 facebook: function(purl, ptitle, pimg, text) { 2185 url = 'https://www.facebook.com/sharer/sharer.php?'; 2186 url += 'kid_directed_site=0'; 2187 url += '&sdk=joey'; 2188 url += '&u=' + encodeURIComponent(purl); 2189 Share.popup(url); 2190 }, 2191 twitter: function(purl, ptitle) { 2192 url = 'http://twitter.com/share?'; 2193 url += 'text=' + encodeURIComponent(ptitle); 2194 url += '&url=' + encodeURIComponent(purl); 2195 url += '&counturl=' + encodeURIComponent(purl); 2196 Share.popup(url); 2197 }, 2198 popup: function(url) { 2199 window.open(url,'','toolbar=0,status=0,width=626,height=436'); 2200 } 2201}; 2202 2203$(document).ready(function(){ 2204 $('.js-file-input').change( function() { 2205 var filename = $(this).val().replace(/C:\\fakepath\\/i, ''); 2206 $('.js-filename').html( filename ); 2207 }); 2208}); 2209/* End */ 2210; 2211; /* Start:"a:4:{s:4:"full";s:66:"/local/templates/fondpotanin/build/script/main.js?1777307775258755";s:6:"source";s:49:"/local/templates/fondpotanin/build/script/main.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2212'use strict'; 2213 2214$(document).ready(function () { 2215 new WOW().init(); 2216}) 2217 2218var accordeon = { 2219 init: function () { 2220 var faqItem = $('.faq__item'); 2221 2222 if (faqItem.length !== 0) { 2223 var faqItemHeader = faqItem.find('.faq__item-header'); 2224 2225 faqItemHeader.on('click', function (e) { 2226 var $this = $(this), 2227 parent = $this.parents('.faq__item'), 2228 target = e.target; 2229 2230 if ($(target).hasClass('faq__item-answer')) { 2231 return; 2232 } 2233 if (!parent.hasClass('faq__item--no-click')) { 2234 parent.toggleClass('active'); 2235 } 2236 }); 2237 } 2238 }, 2239}; 2240 2241var analyticalMaterialsSlider = { 2242 init: function () { 2243 if ($('.js-analytical-materials-slider').length !== 0) { 2244 var mySwiper = new Swiper('.js-analytical-materials-slider', { 2245 slideClass: 'js-analytical-materials-slider-item', 2246 wrapperClass: 'js-analytical-materials-slider-wrap', 2247 slidesPerView: 4, 2248 loop: true, 2249 setWrapperSize: true,
2250 nextButton: '.js-slider-button-next', 2251 prevButton: '.js-slider-button-prev', 2252 observer: true, 2253 observeParents: true, 2254 breakpoints: { 2255 1280: { 2256 spaceBetween: 10, 2257 }, 2258 1060: { 2259 slidesPerView: 3, 2260 spaceBetween: 20, 2261 }, 2262 860: { 2263 slidesPerView: 2, 2264 spaceBetween: 20, 2265 }, 2266 767: { 2267 slidesPerView: 1, 2268 spaceBetween: 0, 2269 pagination: '.js-analitic-material-pagination', 2270 paginationType: 'bullets', 2271 paginationElement: 'span', 2272 paginationClickable: true, 2273 bulletClass: 'bullet-pagination__dot-dark', 2274 bulletActiveClass: 'bullet-pagination__dot--active', 2275 }, 2276 }, 2277 }); 2278 } 2279 }, 2280}; 2281 2282var askQuestionPopup = { 2283 init: function () { 2284 if ($('.js-ask-question-open').length != 0) { 2285 $(document).on('click', '.js-ask-question-open', function (e) { 2286 e.preventDefault(); 2287 var askQuestionModal = $('.js-ask-question'); 2288 if (askQuestionModal.length === 0) { 2289 return; 2290 } 2291 2292 var fancybox = $.fancybox.open(askQuestionModal, { 2293 clickOutside: 'close', 2294 modal: true, 2295 buttons: ['none'], 2296 smallBtn: false, 2297 maxWidth: 368, 2298 beforeShow: function(){} 2299 }); 2300 2301 const err= $(".err-mess"); 2302 2303 askQuestionModal.removeClass("is-success"); 2304 askQuestionModal.removeClass("is-catch"); 2305 err && err.remove(); 2306 }); 2307 2308 // if($('.js-form-wrap').length != 0) { 2309 // $('.js-form-wrap')[0].submit(function() { 2310 // $('.js-form-submit-popup').removeClass('hidden'); 2311 // }) 2312 // } 2313 2314 $(window).click(function () { 2315 $('.js-form-submit-popup').addClass('hidden'); 2316 }); 2317 2318 function validateEmail(sEmail) { 2319 var filter = 2320 /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 2321 if (filter.test(sEmail)) { 2322 return true; 2323 } else { 2324 return false; 2325 } 2326 } 2327 2328 $('.js-ask-question-submit-button').on('click', function (e) { 2329 var emailVal = $('#email').val(); 2330 if (!validateEmail(emailVal)) { 2331 $(this) 2332 .parents('.js-form-wrap') 2333 .find('#email') 2334 .addClass('validate_error'); 2335 } else { 2336 $(this) 2337 .parents('.js-form-wrap') 2338 .find('#email') 2339 .removeClass('validate_error'); 2340 } 2341 }); 2342 2343 $('.js-ask-question form').on('submit', function (e) { 2344 e.preventDefault(); 2345 let ext = ['pdf', 'docx', 'doc', 'txt', 'jpg', 'png']; 2346 let file = document.getElementById("files"); 2347 if (file) { 2348 file = file.files[0]; 2349 } else { 2350 file = null; 2351 } 2352 if (!file || file['size'] < 10485760 && ext.includes(file.name.split('.').pop())) { 2353 const self = this; 2354 const action = $(this).attr('action'); 2355 const askQuestionMod = $('.js-ask-question'); 2356 const btnSubmit = $(".js-ask-question-submit-button"); 2357 2358 //const data = $(this).serializeArray(); 2359 2360 let data = new FormData($(this)[0]); 2361 2362 if ($(this).find('#AGREEMENT').prop('checked') == false) { 2363 $(this).find('.input-alert[data-for="#AGREEMENT"]').show(); 2364 return; 2365 } else { 2366 $(this).find('.input-alert[data-for="#AGREEMENT"]').hide(); 2367 } 2368 2369 $(this) 2370 .find('#AGREEMENT') 2371 .on('change', function (e) { 2372 if ($(this).prop('checked')) { 2373 $(this).find('.input-alert[data-for="#AGREEMENT"]').hide(); 2374 } 2375 }); 2376 2377 $.ajax({
2378 url: action, 2379 method: 'POST', 2380 data: data, 2381 processData: false, 2382 contentType: false, 2383 beforeSend: function() { 2384 btnSubmit.prop("disabled",true); 2385 }, 2386 success: function (response) { 2387 askQuestionMod.addClass("is-success"); 2388 btnSubmit.prop("disabled",false); 2389 }, 2390 error: function (err) { 2391 if(err.responseText === "Error: оÑибка капÑи") { 2392 $("p#yandex-captcha-error").text('Captcha не пÑойдена') 2393 } else { 2394 askQuestionMod.addClass("is-catch"); 2395 } 2396 btnSubmit.prop("disabled",false); 2397 }, 2398 }); 2399 } 2400 }); 2401 } 2402 }, 2403}; 2404 2405var authorizationPopup = { 2406 init: function () { 2407 if ($('.js-authorization-open').length != 0) { 2408 $(document).on('click', '.js-authorization-open', function (e) { 2409 e.preventDefault(); 2410 var authorizationModal = $('.js-authorization'); 2411 if (authorizationModal.length === 0) { 2412 return; 2413 } 2414 var fancybox = $.fancybox.open(authorizationModal, { 2415 clickOutside: 'close', 2416 modal: false, 2417 buttons: ['none'], 2418 smallBtn: false, 2419 }); 2420 }); 2421 } 2422 }, 2423}; 2424 2425var bestPracticeSlider = { 2426 init: function () { 2427 if ($('.js-best-practice-slider').length !== 0) { 2428 var mySwiper = new Swiper('.js-best-practice-slider', { 2429 slideClass: 'js-best-practice-slider-item', 2430 wrapperClass: 'js-best-practice-slider-wrap', 2431 slidesPerView: 1, 2432 loop: false, 2433 setWrapperSize: true, 2434 nextButton: '.js-photo-slider-images-button-next', 2435 prevButton: '.js-photo-slider-images-button-prev', 2436 pagination: '.js-photo-slider-images-pagination', 2437 paginationType: 'fraction', 2438 paginationClickable: true, 2439 observer: true, 2440 observeParents: true, 2441 }); 2442 } 2443 }, 2444}; 2445 2446var biographySlider = { 2447 init: function () { 2448 if ($('.js-biography-block-slider').length !== 0) { 2449 var swiper = new Swiper('.js-biography-block-slider', { 2450 direction: 'vertical', 2451 wrapperClass: 'js-biography-block-slider-wrap', 2452 slideClass: 'js-biography-block-slider-item', 2453 slidesPerView: 'auto', 2454 loop: false, 2455 centeredSlides: false, 2456 spaceBetween: 30, 2457 scrollContainer: 'true', 2458 pagination: '.js-slider-progress-pagination', 2459 watchSlidesProgress: true, 2460 mousewheelControl: true, 2461 //nextButton: '.js-slider-slim-arrow', 2462 paginationType: 'progress', 2463 breakpoints: { 2464 1440: { 2465 spaceBetween: 32, 2466 }, 2467 1024: { 2468 spaceBetween: 32, 2469 }, 2470 900: { 2471 spaceBetween: 32, 2472 }, 2473 767: { 2474 spaceBetween: 32, 2475 }, 2476 }, 2477 }); 2478 } 2479 }, 2480}; 2481 2482var blocksSectionSlider = { 2483 init: function () { 2484 if ($('.js-blocks-section-slider').length !== 0) { 2485 var mySwiper = new Swiper('.js-blocks-section-slider', { 2486 slideClass: 'js-blocks-section-slider-item', 2487 wrapperClass: 'js-blocks-section-slider-wrap', 2488 slidesPerView: 1, 2489 loop: true, 2490 setWrapperSize: true, 2491 nextButton: '.js-slider-button-next', 2492 prevButton: '.js-slider-button-prev', 2493 pagination: '.js-slider-fraction-pagination', 2494 paginationType: 'fraction', 2495 paginationClickable: true, 2496 autoplay: 2000, 2497 }); 2498 } 2499 }, 2500}; 2501 2502var blogDetSlider = { 2503 init: function () { 2504 if ($('.js-blog-detailed-slider').length !== 0) { 2505 var mySwiper = new Swiper('.js-blog-detailed-slider', { 2506 slideClass: 'js-blog-detailed-slider-item', 2507 wrapperClass: 'js-blog-detailed-slider-wrapper', 2508 slidesPerView: 3, 2509 2510 spaceBetween: 15, 2511 setWrapperSize: true,
2512 nextButton: '.js-slider-button-next-blog', 2513 prevButton: '.js-slider-button-prev-blog', 2514 breakpoints: { 2515 1000: { 2516 slidesPerView: 2, 2517 spaceBetween: 20, 2518 }, 2519 767: { 2520 slidesPerView: 1, 2521 spaceBetween: 0, 2522 pagination: '.js-blog-detailed-bullet-pagination', 2523 paginationType: 'bullets', 2524 paginationElement: 'span', 2525 paginationClickable: true, 2526 bulletClass: 'bullet-pagination__dot-dark', 2527 bulletActiveClass: 'bullet-pagination__dot--active', 2528 }, 2529 }, 2530 }); 2531 } 2532 }, 2533}; 2534 2535var blogSlider = { 2536 init: function () { 2537 if ($('.js-blog-slider').length !== 0) { 2538 var mySwiper = new Swiper('.js-blog-slider', { 2539 slideClass: 'js-blog-slider-slider-item', 2540 wrapperClass: 'js-blog-slider-slider-wrap', 2541 slidesPerView: 3, 2542 spaceBetween: 33, 2543 loop: false, 2544 setWrapperSize: true, 2545 nextButton: '.js-slider-button-next', 2546 prevButton: '.js-slider-button-prev', 2547 breakpoints: { 2548 950: { 2549 slidesPerView: 2, 2550 }, 2551 767: { 2552 slidesPerView: 1, 2553 spaceBetween: 30, 2554 pagination: '.js-blog-detailed-bullet-pagination', 2555 paginationType: 'bullets', 2556 paginationElement: 'span', 2557 paginationClickable: true, 2558 bulletClass: 'bullet-pagination__dot-dark', 2559 bulletActiveClass: 'bullet-pagination__dot--active', 2560 }, 2561 }, 2562 }); 2563 } 2564 }, 2565}; 2566 2567const shorthandWeekRu = ['ÐÑ', 'Ðн', 'ÐÑ', 'СÑ', 'ЧÑ', 'ÐÑ', 'Сб']; 2568const shorthandMonthsRu = [ 'Янв', 'Фев', 'ÐаÑÑ', 'ÐпÑ', 'Ðай', 'ÐÑнÑ', 'ÐÑлÑ', 'Ðвг', 'Сен', 'ÐкÑ','ÐоÑ', 'Ðек']; 2569const longhandWeekRu = ['ÐоÑкÑеÑенÑе','ÐонеделÑник','ÐÑоÑник','СÑеда','ЧеÑвеÑг','ÐÑÑниÑа','СÑббоÑа',]; 2570const longhandMontsRu = [ 'ЯнваÑÑ', 'ФевÑалÑ', 'ÐаÑÑ', 'ÐпÑелÑ', 'Ðай', 'ÐÑнÑ', 'ÐÑлÑ', 'ÐвгÑÑÑ', 'СенÑÑбÑÑ', 'ÐкÑÑбÑÑ', 'ÐоÑбÑÑ', 'ÐекабÑÑ',]; 2571 2572const shorthandWeekEn = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; 2573const shorthandMonthsEn = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] 2574const longhandWeekEn = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; 2575const longhandMontsEn = ["January", "February", "March", "April", "May", "June","July", "August", "September", "October", "
2575November", "December"]; 2576 2577 2578var calendar = { 2579 init: function () { 2580 if ($('.js-date-field-input').length !== 0) { 2581 var calendar = $('.js-date-field-input').flatpickr({ 2582 inline: true, 2583 mode: 'range', 2584 dateFormat: 'd-m-Y', 2585 allowInput: true, 2586 "locale": (document.documentElement.getAttribute("lang") === "ru") ? "ru" : "en", 2587 //altFormat: 'd-m-Y', 2588 locale: { 2589 firstDayOfWeek: 1, 2590 weekdays: { 2591 shorthand: (document.documentElement.getAttribute("lang") === "ru") ? shorthandWeekRu : shorthandWeekEn, 2592 longhand: (document.documentElement.getAttribute("lang") === "ru") ? longhandWeekRu : longhandWeekEn, 2593 }, 2594 months: { 2595 shorthand: (document.documentElement.getAttribute("lang") === "ru") ? shorthandMonthsRu : shorthandMonthsEn, 2596 longhand: (document.documentElement.getAttribute("lang") === "ru") ? longhandMontsRu : longhandMontsEn, 2597 }, 2598 rangeSeparator: ' / ', 2599 }, 2600 onValueUpdate: function (selectedDates, dateStr, instance) { 2601 let isDublicateDate = 2602 selectedDates.length == 2 && 2603 selectedDates[0].toString() == selectedDates[1].toString(); 2604 2605 if (isDublicateDate) { 2606 instance.input.value = dateStr + ' / ' + dateStr; 2607 } 2608 }, 2609 onReady: function (dateObj, dateStr, instance) { 2610 var $cal = $(instance.calendarContainer); 2611 if ($cal.find('.flatpickr-clear').length < 1) { 2612 $cal.append((document.documentElement.getAttribute('lang') === 'ru') ? '<div class="flatpickr-clear">ÐÑмена</div>': '<div class="flatpickr-clear">Cancel</div>'); 2613 $cal.find('.flatpickr-clear').on('click', function (e) { 2614 e.stopPropagation(); 2615 instance.clear(); 2616 $('.flatpickr-calendar').removeClass('inline'); 2617 }); 2618 } 2619 if ($cal.find('.flatpickr-submit').length < 1) { 2620 $cal.append('<div class="flatpickr-submit">OK</div>'); 2621 $cal.find('.flatpickr-submit').on('click', function (e) { 2622 e.stopPropagation(); 2623 $('.flatpickr-calendar').removeClass('inline'); 2624 }); 2625 } 2626 $('.js-calendar-icon').on('click', function (e) { 2627 e.stopPropagation(); 2628 }); 2629 $(window).click(function () { 2630 $('.flatpickr-calendar').removeClass('inline'); 2631 }); 2632 2633 $('.flatpickr-calendar').on('click', function (e) { 2634 e.stopPropagation(); 2635 }); 2636 }, 2637 }); 2638 $('.flatpickr-calendar').removeClass('inline'); 2639 $('.js-calendar-icon').on('click', function (e) { 2640 e.stopPropagation(); 2641 $('.flatpickr-calendar').toggleClass('inline'); 2642 calendar.open(); 2643 }); 2644 } 2645 2646 if ($('.js-birth-date-field-input').length !== 0) { 2647 var calendar = $('.js-birth-date-field-input').flatpickr({ 2648 inline: true, 2649 dateFormat: 'd-m-Y', 2650 allowInput: true, 2651 locale: { 2652 firstDayOfWeek: 1, 2653 weekdays: { 2654 shorthand: (document.documentElement.getAttribute("lang") === "ru") ? shorthandWeekRu : shorthandWeekEn, 2655 longhand: (document.documentElement.getAttribute("lang") === "ru") ? longhandWeekRu : longhandWeekEn, 2656 }, 2657 months: { 2658 shorthand: (document.documentElement.getAttribute("lang") === "ru") ? shorthandMonthsRu : shorthandMonthsEn,
2659 longhand: (document.documentElement.getAttribute("lang") === "ru") ? longhandMontsRu : longhandMontsEn, 2660 }, 2661 rangeSeparator: ' - ', 2662 }, 2663 onReady: function (dateObj, dateStr, instance) { 2664 var $cal = $(instance.calendarContainer); 2665 if ($cal.find('.flatpickr-clear').length < 1) { 2666 $cal.append('<div class="flatpickr-clear">ÐÑмена</div>'); 2667 $cal.find('.flatpickr-clear').on('click', function (e) { 2668 e.stopPropagation(); 2669 instance.clear(); 2670 $('.flatpickr-calendar').removeClass('inline'); 2671 }); 2672 } 2673 if ($cal.find('.flatpickr-submit').length < 1) { 2674 $cal.append('<div class="flatpickr-submit">OK</div>'); 2675 $cal.find('.flatpickr-submit').on('click', function (e) { 2676 e.stopPropagation(); 2677 $('.flatpickr-calendar').removeClass('inline'); 2678 }); 2679 } 2680 $('.js-birth-date-calendar-icon').on('click', function (e) { 2681 e.stopPropagation(); 2682 }); 2683 $(window).click(function () { 2684 $('.flatpickr-calendar').removeClass('inline'); 2685 }); 2686 2687 $('.flatpickr-calendar').on('click', function (e) { 2688 e.stopPropagation(); 2689 }); 2690 }, 2691 }); 2692 $('.flatpickr-calendar').removeClass('inline'); 2693 $('.js-birth-date-calendar-icon').on('click', function (e) { 2694 e.stopPropagation(); 2695 var parentEl = $(this).parents('.calendar--single'); 2696 parentEl.find('.flatpickr-calendar').toggleClass('inline'); 2697 calendar.open(); 2698 }); 2699 } 2700 }, 2701}; 2702 2703var contactsSlider = { 2704 init: function () { 2705 if (isMobileView()) { 2706 if ( 2707 $('.js-contacts-slider').length !== 0 && 2708 $('.js-contacts-slider-item').length > 1 2709 ) { 2710 var mySwiper = new Swiper('.js-contacts-slider', { 2711 slideClass: 'js-contacts-slider-item', 2712 wrapperClass: 'js-contacts-slider-wrap', 2713 slidesPerView: 1, 2714 loop: true, 2715 spaceBetween: 20, 2716 setWrapperSize: true, 2717 pagination: '.js-contacts-slider-pagination', 2718 paginationType: 'bullets', 2719 paginationElement: 'span', 2720 paginationClickable: true, 2721 bulletClass: 'bullet-pagination__dot-dark', 2722 bulletActiveClass: 'bullet-pagination__dot--active', 2723 observer: true, 2724 observeParents: true, 2725 }); 2726 } 2727 } 2728 }, 2729}; 2730 2731var contestsBannersSlider = { 2732 init: function () { 2733 if ($('.js-baners-slider').length !== 0) { 2734 if (isMobileView()) { 2735 var mySwiper = new Swiper('.js-baners-slider', { 2736 slideClass: 'js-baners-slider-item', 2737 wrapperClass: 'js-baners-slider-wrap', 2738 slidesPerView: 1, 2739 setWrapperSize: true, 2740 nextButton: '.js-slider-button-next', 2741 prevButton: '.js-slider-button-prev', 2742 pagination: '.js-slider-fraction-pagination', 2743 paginationType: 'fraction', 2744 paginationClickable: true, 2745 observer: true, 2746 observeParents: true, 2747 }); 2748 } 2749 } 2750 }, 2751}; 2752 2753var divLink = { 2754 blockLink: $('.js-block-link'), 2755 init: function () { 2756 this.blockLink.on('click', function () { 2757 var $this = $(this); 2758 window.location = $this.data('href'); 2759 }); 2760 }, 2761}; 2762 2763var scrollToAnchor = { 2764 anchor: window.location.hash || false, 2765 init: function () { 2766 // анкоÑÑ Ð¸ÑполÑзÑÑÑÑÑ Ð½Ð° ÑÑÑаниÑе "иÑÑоÑиÑ" в ÑлайдеÑе 2767 if (this.anchor && $('.js-history-slider-tabs').length === 0) { 2768 $('html, body').animate( 2769 { 2770 scrollTop: $(this.anchor).offset().top - 189, // вÑÑоÑа Ñапки + padding-top 2771 }, 2772 50 2773 ); 2774 } 2775 }, 2776}; 2777 2778$(function () { 2779 isMobileView.init(); 2780 svgForEverybody.init(); 2781 headerSearchToggle.init(); 2782 languageToggle.init(); 2783 menuToggle.init(); 2784 tabsToggle.init(); 2785 eventsSlider.init(); 2786 accordeon.init(); 2787 introSlider.init(); 2788 selects.init();
2789 formSearchToggle.init(); 2790 blocksSectionSlider.init(); 2791 opinionsSlider.init(); 2792 upBtn.init(); 2793 videoPlay.init(); 2794 videoPopup.init(); 2795 historySlider.init(); 2796 analyticalMaterialsSlider.init(); 2797 blogSlider.init(); 2798 biographySlider.init(); 2799 blogDetSlider.init(); 2800 mapBlock.init(); 2801 timelineSlider.init(); 2802 photoSlider.init(); 2803 issuesSlider.init(); 2804 authorizationPopup.init(); 2805 newsSlider.init(); 2806 askQuestionPopup.init(); 2807 sendModal.init(); 2808 bestPracticeSlider.init(); 2809 calendar.init(); 2810 formSwitcher.init(); 2811 showCoockiesAlert.init(); 2812 inputDateMask.init(); 2813 inputNumberValidate.init(); 2814 showMoreButton.init(); 2815 statusShowContentMore.init(); 2816 newsSectionSlider.init(); 2817 programmsSlider.init(); 2818 specialBannersSlider.init(); 2819 contestsBannersSlider.init(); 2820 formShow.init(); 2821 contactsSlider.init(); 2822 showMoreLinks.init(); 2823 scrollDown.init(); 2824 ellipsisClip.init(); 2825 divLink.init(); 2826 scrollToAnchor.init(); 2827 publictionsFilter.init(); 2828 checkoHref.init(); 2829}); 2830 2831var ellipsisClip = { 2832 init: function () { 2833 if ($('.breadcrumbs').length !== 0) { 2834 var containerWidth = $('.breadcrumbs').closest('div').width(); 2835 var elWidth = $('.breadcrumbs').width(); 2836 2837 if (elWidth >= containerWidth) { 2838 $('.breadcrumbs').addClass('ellipsis'); 2839 } else { 2840 $('.breadcrumbs').removeClass('ellipsis'); 2841 } 2842 } 2843 2844 if ($('.js-events-slider .events-slider__item-info').length !== 0) { 2845 var elements = $('.js-events-slider .events-slider__item-info'); 2846 for (var i = 0; i < elements.length; i++) { 2847 var elHeight = elements[i].offsetHeight; 2848 if (elHeight >= 250) { 2849 elements[i].classList.add('clip'); 2850 } else { 2851 elements[i].classList.remove('clip'); 2852 } 2853 } 2854 } 2855 }, 2856}; 2857 2858var eventsSlider = { 2859 init: function () { 2860 if ($('.js-events-slider').length !== 0) { 2861 var mySwiper = new Swiper('.js-events-slider', { 2862 slideClass: 'js-events-slider-item', 2863 wrapperClass: 'js-events-slider-wrapper', 2864 slidesPerView: 4, 2865 loop: false, 2866 spaceBetween: 30, 2867 setWrapperSize: true, 2868 nextButton: '.js-slider-button-next', 2869 prevButton: '.js-slider-button-prev', 2870 observer: true, 2871 observeParents: true, 2872 simulateTouch: false, 2873 followFinger: false, 2874 breakpoints: { 2875 1310: { 2876 slidesPerView: 3, 2877 }, 2878 880: { 2879 slidesPerView: 2, 2880 }, 2881 625: { 2882 slidesPerView: 1, 2883 pagination: '.js-events-bullet-pagination', 2884 paginationType: 'bullets', 2885 paginationElement: 'span', 2886 paginationClickable: true, 2887 bulletClass: 'bullet-pagination__dot-dark', 2888 bulletActiveClass: 'bullet-pagination__dot--active', 2889 }, 2890 }, 2891 }); 2892 var disabledPrev = $('.js-events-slider .js-slider-button-prev').hasClass( 2893 'swiper-button-disabled' 2894 ); 2895 var disabledNext = $('.js-events-slider .js-slider-button-next').hasClass( 2896 'swiper-button-disabled' 2897 ); 2898 2899 if (disabledPrev && disabledNext) { 2900 $('.js-events-slider .js-slider-button-prev').hide(); 2901 $('.js-events-slider .js-slider-button-next').hide(); 2902 } 2903 2904 if ($('.js-events-slider .js-events-slider-item').length == 1) { 2905 $('.js-events-slider').addClass('single'); 2906 } 2907 } 2908 }, 2909}; 2910 2911var fancyBoxGallery = { 2912 init: function () { 2913 $('.fancybox').fancybox({ 2914 openEffect: 'none', 2915 closeEffect: 'none', 2916 nextEffect: 'none', 2917 prevEffect: 'none', 2918 padding: 0, 2919 margin: [20, 60, 20, 60], 2920 }); 2921 }, 2922}; 2923 2924var sendModal = { 2925 init: function () { 2926 var askQuestionModal = document.querySelector("resume-modal"); 2927 if (!askQuestionModal) return; 2928 2929 this.checkbox = askQuestionModal.querySelector("#checkbox-vacancy"); 2930 this.checkboxLabel = askQuestionModal.querySelector( 2931 '[for="checkbox-vacancy"]' 2932 ); 2933 this.submitButton = askQuestionModal.querySelector( 2934 ".ask-question__submit-button" 2935 ); 2936 this.errorText = askQuestionModal.querySelector(".input-alert"); 2937 this.phoneInput = askQuestionModal.querySelector("#phone"); 2938 this.emailInput = askQuestionModal.querySelector("#email"); 2939 this.form = askQuestionModal.querySelector("form"); 2940 this.vacancies = document.querySelectorAll("#vacancy .ac"); 2941 this.fileInput = askQuestionModal.querySelector("#files_main"); 2942 this.arrows = askQuestionModal.querySelector(".fancybox-button"); 2943 2944 this.bindEvents(); 2945 }, 2946 2947 bindEvents: function () { 2948 var _this = this; 2949 2950 if (this.checkbox) { 2951 this.checkboxLabel.addEventListener("click", (event) => { 2952 event.preventDefault(); 2953 2954 this.checkbox.checked = !this.checkbox.checked; 2955 this.toggleSubmitButton(); 2956 }); 2957 } 2958 2959 if (this.fileInput) { 2960 this.fileInput.addEventListener("change", function () { 2961 if (_this.fileInput.files.length > 0) { 2962 _this.toggleSubmitButton(); 2963 } 2964 }); 2965 } 2966 2967 if (this.form) { 2968 this.form.addEventListener("submit", function (event) { 2969 // Ðзменено: ÐÑовеÑка как ÑекбокÑа, Ñак и Ñайла 2970 if (!_this.checkbox.checked || _this.fileInput.files.length === 0) { 2971 event.preventDefault(); 2972 2973 if (_this.errorText) { 2974 _this.errorText.style.display = "block"; 2975 } 2976 console.log( 2977 "ÐÑпÑавка ÑоÑÐ¼Ñ Ð¿ÑедоÑвÑаÑена, ÑÐµÐºÐ±Ð¾ÐºÑ Ð½Ðµ оÑмеÑен или Ñайл не загÑÑжен." 2978 ); // Ðобавлено 2979 } else { 2980 if (_this.errorText) { 2981 _this.errorText.style.display = "none"; 2982 } 2983 } 2984 }); 2985 } 2986 2987 if (this.vacancies) {
2988 this.vacancies.forEach(function (item, idx) { 2989 item.addEventListener("click", function () { 2990 document.querySelector("#vacancy_number").value = item.id; 2991 }); 2992 }); 2993 } 2994 2995 if (this.phoneInput) { 2996 this.phoneInput.addEventListener( 2997 "keydown", 2998 this.onPhoneKeyDown.bind(this) 2999 ); 3000 this.phoneInput.addEventListener( 3001 "input", 3002 this.onPhoneInput.bind(this), 3003 false 3004 ); 3005 this.phoneInput.addEventListener( 3006 "paste", 3007 this.onPhonePaste.bind(this), 3008 false 3009 ); 3010 } 3011 }, 3012 3013 validateEmail: function (email) { 3014 var filter = 3015 /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 3016 return filter.test(email); 3017 }, 3018 3019 // Ðобавлено: ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð¿ÑовеÑки ÑоÑÑоÑÐ½Ð¸Ñ ÑекбокÑа и Ñайлов 3020 toggleSubmitButton: function () { 3021 console.log('file:' + this.fileInput.files.length) 3022 console.log('checkbox:' + this.checkbox.checked) 3023 3024 if (this.checkbox.checked && this.fileInput.files.length > 0) { 3025 this.submitButton.type = "submit"; 3026 } else { 3027 this.submitButton.type = "button"; 3028 } 3029 }, 3030 3031 getInputNumbersValue: function (input) { 3032 return input.value.replace(/\D/g, ""); 3033 }, 3034 3035 onPhonePaste: function (e) { 3036 var input = e.target; 3037 var inputNumbersValue = this.getInputNumbersValue(input); 3038 var pasted = e.clipboardData || window.clipboardData; 3039 if (pasted) { 3040 var pastedText = pasted.getData("Text"); 3041 if (/\D/g.test(pastedText)) { 3042 input.value = inputNumbersValue; 3043 return; 3044 } 3045 } 3046 }, 3047 3048 onPhoneInput: function (e) { 3049 var input = e.target; 3050 var inputNumbersValue = this.getInputNumbersValue(input); 3051 var selectionStart = input.selectionStart; 3052 var formattedInputValue = ""; 3053 3054 if (!inputNumbersValue) { 3055 return (input.value = ""); 3056 } 3057 3058 if (input.value.length != selectionStart) { 3059 if (e.data && /\D/g.test(e.data)) { 3060 input.value = inputNumbersValue; 3061 3062 var askQuestionModal = document.querySelector("resume-modal"); 3063 if (askQuestionModal) { 3064 sendModal.init(); 3065 } 3066 } 3067 return; 3068 } 3069 3070 if (["7", "8", "9"].indexOf(inputNumbersValue[0]) > -1) { 3071 if (inputNumbersValue[0] == "9") 3072 inputNumbersValue = "7" + inputNumbersValue; 3073 var firstSymbols = inputNumbersValue[0] == "8" ? "8" : "+7"; 3074 formattedInputValue = firstSymbols + " "; 3075 if (inputNumbersValue.length > 1) { 3076 formattedInputValue += "(" + inputNumbersValue.substring(1, 4); 3077 } 3078 if (inputNumbersValue.length >= 5) { 3079 formattedInputValue += ") " + inputNumbersValue.substring(4, 7); 3080 } 3081 if (inputNumbersValue.length >= 8) { 3082 formattedInputValue += "-" + inputNumbersValue.substring(7, 9); 3083 } 3084 if (inputNumbersValue.length >= 10) { 3085 formattedInputValue += "-" + inputNumbersValue.substring(9, 11); 3086 } 3087 } else { 3088 formattedInputValue = "+" + inputNumbersValue.substring(0, 16); 3089 } 3090 input.value = formattedInputValue; 3091 }, 3092 3093 onPhoneKeyDown: function (e) { 3094 var inputValue = e.target.value.replace(/\D/g, ""); 3095 if (e.keyCode == 8 && inputValue.length == 1) { 3096 e.target.value = ""; 3097 } 3098 }, 3099}; 3100 3101var formSearchToggle = { 3102 init: function () { 3103 let that = this; 3104 if ($('.js-form-search').length != 0) { 3105 $('.js-form-search-button').on('click', function (e) { 3106 e.preventDefault(); 3107 3108 $('.js-form-search').hasClass('active') 3109 ? that.close(false) 3110 : that.open(); 3111 }); 3112 $('.js-form-close-button').on('click', function (e) { 3113 e.preventDefault(); 3114 that.close(true); 3115 }); 3116 } 3117 3118 $('.js-form-search-results-item').on('click', function () { 3119 var txt = $(this).text(); 3120 $('.js-form-search-input').val(txt); 3121 if ($('.js-form-search-results').hasClass('active')) { 3122 $('.js-form-search-results').removeClass('active'); 3123 } 3124 });
3125 }, 3126 3127 close: function (clear = true) { 3128 if (clear) { 3129 $('.js-form-search-input').val(''); 3130 // обновление ÑÑÑаниÑÑ 3131 var params = getTableParams(); 3132 params.name = null; 3133 updateTable(params); 3134 } 3135 3136 $('.js-form-search').removeClass('active'); 3137 if ($('.js-form-search-results').hasClass('active')) { 3138 $('.js-form-search-results').removeClass('active'); 3139 } 3140 if ($('.js-form-search-no-results').hasClass('active')) { 3141 $('.js-form-search-no-results').removeClass('active'); 3142 } 3143 searchInput.deleteHints(); 3144 }, 3145 3146 open: function () { 3147 $('.js-form-search').addClass('active'); 3148 $('.form-search__results').removeClass('active'); 3149 $('.js-form-search-input').focus(); 3150 }, 3151}; 3152 3153var formShow = { 3154 init: function () { 3155 if ($('.js-form-show').length != 0) { 3156 $('.js-form-show').on('click', function () { 3157 $('.js-form-show').toggleClass('active'); 3158 var block = $(this).parents('.js-form').find('.js-form-wrap'); 3159 block.toggleClass('hidden'); 3160 }); 3161 } 3162 }, 3163}; 3164 3165var formSwitcher = { 3166 init: function () { 3167 if ($('.js-checkbox-news').length != 0) { 3168 if ($('.js-checkbox-news').is(':checked')) { 3169 $('.js-select').prop('disabled', true); 3170 } 3171 $('.js-checkbox-news').on('change', function () { 3172 if ($('.js-checkbox-news').is(':checked')) { 3173 $('.js-select').prop('disabled', true); 3174 } else { 3175 $('.js-select').prop('disabled', false); 3176 } 3177 }); 3178 } 3179 }, 3180}; 3181 3182var headerSearchToggle = { 3183 init: function () { 3184 if ($('.js-header-search').length != 0) { 3185 $('.js-header-search-button').on('click', function (e) { 3186 e.preventDefault(); 3187 $('.js-person-cabinet').addClass('hidden'); 3188 $('.js-page-nav').addClass('hidden'); 3189 $('.js-header-search').addClass('active'); 3190 $('.js-header-search-input').focus(); 3191 $('.js-header-search-input').addClass('input-focus'); 3192 3193 $('.js-header-search-input').keypress(function () { 3194 $(this).removeClass('input-focus'); 3195 }); 3196 3197 $('.js-header-search-input').blur(function () { 3198 if ($(this).val() == '') { 3199 $(this).addClass('input-focus'); 3200 } else { 3201 $(this).removeClass('input-focus'); 3202 } 3203 }); 3204 3205 if (isMobileHeaderView()) { 3206 $('.js-logo').addClass('hidden'); 3207 $('.js-burger-button').addClass('hidden'); 3208 } 3209 }); 3210 3211 $('.js-header-search-button-close').on('click', function (e) { 3212 e.preventDefault(); 3213 $('.js-person-cabinet').removeClass('hidden'); 3214 $('.js-page-nav').removeClass('hidden'); 3215 $('.js-header-search').removeClass('active'); 3216 $('.js-header-search-input').val(''); 3217 $('.js-header-search-input').removeClass('input-focus'); 3218 3219 if (isMobileHeaderView()) { 3220 $('.js-logo').removeClass('hidden'); 3221 $('.js-burger-button').removeClass('hidden'); 3222 } 3223 }); 3224 } 3225 }, 3226}; 3227 3228var historySlider = { 3229 init: function () { 3230 if ($('.js-history-slider-tabs').length > 0) { 3231 var prevBtn = $('.js-slider-thumbs-button-prev'), 3232 nextBtn = $('.js-slider-thumbs-button-next'), 3233 thumbsItems = $('.js-history-slider-tabs-item'); 3234
3235 var thumbs = new Swiper('.js-history-slider-tabs', { 3236 slideClass: 'js-history-slider-tabs-item', 3237 wrapperClass: 'js-history-slider-tabs-wrap', 3238 slidesPerView: 8, 3239 spaceBetween: 50, 3240 centeredSlides: false, 3241 loop: false, 3242 setWrapperSize: true, 3243 followFinger: true, 3244 buttonDisabledClass: 'slider-buttons-wrap--disabled', 3245 slideToClickedSlide: true, 3246 normalizeSlideIndex: false, 3247 observer: true, 3248 // nextButton: '.js-slider-thumbs-button-next', 3249 // prevButton: '.js-slider-button-prev', 3250 breakpoints: { 3251 1050: { 3252 slidesPerView: 8, 3253 spaceBetween: 40, 3254 followFinger: true, 3255 }, 3256 800: { 3257 slidesPerView: 4, 3258 spaceBetween: 20, 3259 followFinger: true, 3260 }, 3261 }, 3262 onSlideChangeStart: function (swiper) { 3263 var activeIndex = swiper.activeIndex, 3264 currentThumb = $('.js-history-slider-tabs-item').eq( 3265 thumbs.realIndex 3266 ), 3267 thumbAnchor = currentThumb.data('id'); 3268 3269 banners.slideTo(activeIndex); 3270 window.location.hash = thumbAnchor; 3271 3272 if (activeIndex === 0) { 3273 prevBtn.addClass('swiper-button-disabled'); 3274 } else { 3275 prevBtn.removeClass('swiper-button-disabled'); 3276 } 3277 3278 if (activeIndex === thumbsItems.length - 1) { 3279 nextBtn.addClass('swiper-button-disabled'); 3280 } else { 3281 nextBtn.removeClass('swiper-button-disabled'); 3282 } 3283 }, 3284 }); 3285
3286 var banners = new Swiper('.js-history-slider-wrap', { 3287 slideClass: 'js-intro-section', 3288 wrapperClass: 'js-history-slider-content', 3289 slidesPerView: 1, 3290 centeredSlides: false, 3291 normalizeSlideIndex: false, 3292 spaceBetween: 0, 3293 loop: false, 3294 slideToClickedSlide: true, 3295 setWrapperSize: true, 3296 nextButton: '.js-slider-button-next', 3297 prevButton: '.js-slider-button-prev', 3298 observer: true, 3299 autoHeight: true, 3300 onSlideChangeStart: function (swiper) { 3301 var activeIndex = swiper.activeIndex, 3302 thumbAncor = $('.js-history-slider-tabs-item').eq( 3303 banners.realIndex 3304 ), 3305 thumbHash = thumbAncor.data('id'); 3306 3307 thumbs.slideTo(activeIndex); 3308 window.location.hash = thumbHash; 3309 if (activeIndex === 0) { 3310 prevBtn.addClass('swiper-button-disabled'); 3311 } else { 3312 prevBtn.removeClass('swiper-button-disabled'); 3313 } 3314 3315 if (activeIndex === thumbsItems.length - 1) { 3316 nextBtn.addClass('swiper-button-disabled'); 3317 } else { 3318 nextBtn.removeClass('swiper-button-disabled'); 3319 } 3320 }, 3321 }); 3322 3323 var activeSlide = $('.js-history-slider-tabs-wrap').find( 3324 '[data-id="' + window.location.hash.split('#')[1] + '"]' 3325 ); 3326 3327 $('.js-history-slider-tabs-link').on('click', function (e) { 3328 var currentThumb = $('.js-history-slider-tabs-item').eq( 3329 thumbs.realIndex 3330 ), 3331 thumbAnchor = currentThumb.data('id'); 3332 e.preventDefault(); 3333 banners.slideTo(thumbs.activeIndex); 3334 window.location.hash = thumbAnchor; 3335 }); 3336 3337 if (activeSlide.index() > -1) { 3338 thumbs.slideTo(activeSlide.index()); 3339 } 3340 3341 nextBtn.on('click', function (e) { 3342 e.preventDefault(); 3343 if (thumbs.activeIndex === thumbsItems.length - 1) { 3344 thumbs.lockSwipeToNext(); 3345 } else { 3346 thumbs.unlockSwipeToNext(); 3347 banners.slideNext(); 3348 } 3349 }); 3350 prevBtn.on('click', function (e) { 3351 e.preventDefault(); 3352 if (thumbs.activeIndex === 0) { 3353 thumbs.lockSwipeToPrev(); 3354 } else { 3355 thumbs.unlockSwipeToPrev(); 3356 banners.slidePrev(); 3357 } 3358 }); 3359 } 3360 }, 3361}; 3362 3363var inputDateMask = { 3364 init: function () { 3365 if ($('#period-calendar').length != 0) { 3366 $('#period-calendar').mask('99-99-9999? / 99-99-9999'); 3367 } 3368 3369 if ($('#birth-date').length != 0) { 3370 $('#birth-date').mask('99-99-9999'); 3371 } 3372 }, 3373}; 3374 3375var inputNumberValidate = { 3376 init: function () { 3377 if ($('.js-input-price').length != 0) { 3378 // var validate = function(evt) { 3379 // var theEvent = evt || window.event; 3380 // if (theEvent.type === 'paste') { 3381 // key = event.clipboardData.getData('text/plain'); 3382 // } else { 3383 // var key = theEvent.keyCode || theEvent.which; 3384 // key = String.fromCharCode(key); 3385 // } 3386 // var regex = /[0-9]|\./; 3387 // if( !regex.test(key) ) { 3388 // theEvent.returnValue = false; 3389 // if(theEvent.preventDefault) theEvent.preventDefault(); 3390 // } 3391 // if ((evt.which != 46 || $(this).val().indexOf('.') != -1) && (evt.which < 48 || evt.which > 57) && evt.which != 8) { 3392 // theEvent.returnValue = false; 3393 // } 3394 // } 3395 // $('.js-input-price').keypress(validate); 3396 3397 $('.js-input-price').keypress(function (event) { 3398 if ( 3399 (event.which != 46 || $(this).val().indexOf('.') != -1) && 3400 (event.which < 48 || event.which > 57) && 3401 event.which != 8 3402 ) { 3403 event.preventDefault(); 3404 } 3405 }); 3406 } 3407 }, 3408}; 3409 3410var introSlider = { 3411 settings: { 3412 slideClass: 'js-intro-slider-item', 3413 wrapperClass: 'js-intro-slider-wrap', 3414 slidesPerView: 1, 3415 loop: true, 3416 spaceBetween: 30, 3417 setWrapperSize: true, 3418 autoplay: 2000, 3419 observer: true, 3420 observeParents: true, 3421 pagination: '.js-bullet-pagination', 3422 paginationType: 'bullets', 3423 paginationElement: 'span', 3424 paginationClickable: true, 3425 bulletClass: 'bullet-pagination__dot', 3426 bulletActiveClass: 'bullet-pagination__dot--active', 3427 breakpoints: { 3428 // 1199: { 3429 // }, 3430 // 767: { 3431 // spaceBetween: 0, 3432 // pagination: '.js-bullet-pagination', 3433 // paginationType: 'bullets', 3434 // paginationElement: 'span', 3435 // paginationClickable: true, 3436 // bulletClass: 'bullet-pagination__dot', 3437 // bulletActiveClass: 'bullet-pagination__dot--active' 3438 // } 3439 }, 3440 }, 3441 init: function () { 3442 var sliderWrapper = $('.js-intro-slider-wrap'); 3443 3444 if (sliderWrapper.length !== 0) {
3445 var nextBtn = '.js-slider-button-next'; 3446 var prevBtn = '.js-slider-button-prev'; 3447 3448 this.settings.nextButton = sliderWrapper.find(nextBtn); 3449 this.settings.prevButton = sliderWrapper.find(prevBtn); 3450 3451 new Swiper('.js-intro-slider', this.settings); 3452 } 3453 }, 3454}; 3455 3456var issuesSlider = { 3457 init: function () { 3458 if ($('.js-issues-slider').length !== 0) { 3459 var mySwiper = new Swiper('.js-issues-slider', { 3460 slideClass: 'js-issues-slider-item', 3461 wrapperClass: 'js-issues-slider-wrap', 3462 slidesPerView: 4, 3463 //loop: true, 3464 spaceBetween: 50, 3465 setWrapperSize: true, 3466 nextButton: '.js-slider-button-next', 3467 prevButton: '.js-slider-button-prev', 3468 breakpoints: { 3469 1110: { 3470 slidesPerView: 3, 3471 spaceBetween: 10, 3472 }, 3473 880: { 3474 slidesPerView: 2, 3475 spaceBetween: 10, 3476 }, 3477 767: { 3478 slidesPerView: 1, 3479 spaceBetween: 30, 3480 pagination: '.js-issue-bullet-pagination', 3481 paginationType: 'bullets', 3482 paginationElement: 'span', 3483 paginationClickable: true, 3484 bulletClass: 'bullet-pagination__dot-dark', 3485 bulletActiveClass: 'bullet-pagination__dot--active', 3486 }, 3487 }, 3488 }); 3489 } 3490 }, 3491}; 3492 3493var languageToggle = { 3494 init: function () { 3495 if ($('.js-language-control').length > 0) { 3496 var langBlock = $('.js-language-control'), 3497 target = {}; 3498 3499 langBlock.on('click', function (e) { 3500 var $this = $(this); 3501 $this.toggleClass('active'); 3502 target = e.currentTarget; 3503 }); 3504 $(target).on('click', function () { 3505 langBlock.find('.language-control__link').toggleClass('active'); 3506 }); 3507 } 3508 }, 3509}; 3510 3511var menuToggle = { 3512 init: function () { 3513 if ($('.js-burger-button').length != 0) { 3514 $('.js-burger-button').on('click', function (e) { 3515 e.preventDefault(); 3516 $('.js-main-header-wrapper').addClass('active'); 3517 $('.js-burger-menu').removeClass('hidden'); 3518 $('.js-page').addClass('fix'); 3519 }); 3520 3521 $('.js-burger-menu-close').on('click', function (e) { 3522 e.preventDefault(); 3523 $('.js-main-header-wrapper').removeClass('active'); 3524 $('.js-burger-menu').addClass('hidden'); 3525 $('.js-page').removeClass('fix'); 3526 $('.js-burger-menu').removeClass('submenu-open'); 3527 $('.js-burger-menu-item').removeClass('active'); 3528 $('.js-burger-submenu').removeClass('active'); 3529 $('.js-burger-menu-item').removeClass('hidden'); 3530 }); 3531 3532 var link = $('.js-burger-menu-item').find('a'); 3533 3534 link.on('click', function () { 3535 $('.js-burger-menu').removeClass('submenu-open'); 3536 var parentLi = $(this).parent('.js-burger-menu-item'); 3537 parentLi.find('.js-burger-submenu').addClass('active'); 3538 $('.js-burger-menu').addClass('submenu-open'); 3539 $('.js-burger-menu-item').addClass('hidden'); 3540 parentLi.addClass('active'); 3541 }); 3542 3543 $('.js-burger-menu-arrow').on('click', function (e) { 3544 e.preventDefault(); 3545 $('.js-burger-menu').removeClass('submenu-open'); 3546 $('.js-burger-menu-item').removeClass('active'); 3547 $('.js-burger-submenu').removeClass('active'); 3548 $('.js-burger-menu-item').removeClass('hidden'); 3549 }); 3550 3551 // var onScroll = function(){ 3552 // if(isMobileHeaderView()) { 3553 // if ($(window).scrollTop() > 5){ 3554 // $('.js-main-header-wrapper').addClass('fixed'); 3555 // } else { 3556 // $('.js-main-header-wrapper').removeClass('fixed'); 3557 // } 3558 // } else { 3559 // if ($(window).scrollTop() > 50){ 3560 // $('.js-main-header-wrapper').addClass('fixed'); 3561 // } else { 3562 // $('.js-main-header-wrapper').removeClass('fixed'); 3563 // } 3564 // } 3565 3566 // }; 3567 3568 // $(window).scroll(onScroll); 3569 } 3570 }, 3571}; 3572 3573var mapBlock = { 3574 init: function () { 3575 if ($('#map').length != 0) { 3576 var init = function () { 3577 var myMap = new ymaps.Map('map', { 3578 center: [55.764539, 37.606499], 3579 zoom: 14, 3580 controls: [], 3581 }); 3582
3583 // УказÑваем кооÑдинаÑÑ Ð¼ÐµÑки 3584 myGeoObjects = new ymaps.Placemark([55.764539,37.606499],{ 3585 balloonContentBody: 'ÐлагоÑвоÑиÑелÑнÑй Ñонд ÐладимиÑа ÐоÑанина', 3586 },{ 3587 iconLayout: 'default#image', 3588 // ÐÑÑÑ Ð´Ð¾ наÑей каÑÑинки 3589 iconImageHref: '/upload/images/logo/logo_map2.png', 3590 // РазмеÑÑ Ð¸ÐºÐ¾Ð½ÐºÐ¸ 3591 iconImageSize: [50, 50], 3592 // СмеÑение веÑÑ Ð½ÐµÐ³Ð¾ Ñгла оÑноÑиÑелÑно оÑÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸ÐºÐ¾Ð½ÐºÐ¸ 3593 iconImageOffset: [-20, -55] 3594 }); 3595 3596 3597 3598 // var myPlacemark = new ymaps.Placemark([55.764539, 37.606499], {}); 3599 3600 myMap.geoObjects.add(myGeoObjects); 3601 3602 /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( 3603 navigator.userAgent 3604 ) && myMap.behaviors.disable('drag'); 3605 }; 3606 3607 ymaps.ready(init); 3608 } 3609 }, 3610}; 3611 3612var isMobileView = { 3613 init: function () { 3614 var getScrollbarWidth = function () { 3615 var documentWidth = parseInt(document.documentElement.clientWidth); 3616 var windowsWidth = parseInt(window.innerWidth); 3617 return windowsWidth - documentWidth; 3618 }; 3619 3620 window.isMobileView = function () { 3621 return $(window).width() < 767 - getScrollbarWidth(); 3622 }; 3623 3624 window.isMobileHeaderView = function () { 3625 return $(window).width() < 900 - getScrollbarWidth(); 3626 }; 3627 }, 3628}; 3629 3630var showMoreLinks = { 3631 init: function () { 3632 if ($('.js-more-links').length !== 0) { 3633 $('.js-more-links').on('click', function () { 3634 $(this).toggleClass('active'); 3635 $('.js-links-list').toggleClass('hidden'); 3636 }); 3637 } 3638 }, 3639}; 3640 3641var newsSectionSlider = { 3642 init: function () { 3643 if (isMobileView()) { 3644 if ($('.js-news-section-slider').length !== 0) { 3645 var mySwiper = new Swiper('.js-news-section-slider', { 3646 slideClass: 'js-news-item', 3647 wrapperClass: 'js-news-list', 3648 slidesPerView: 1, 3649 loop: true, 3650 spaceBetween: 0, 3651 setWrapperSize: true, 3652 pagination: '.js-news-bullet-pagination', 3653 paginationType: 'bullets', 3654 paginationElement: 'span', 3655 paginationClickable: true, 3656 bulletClass: 'bullet-pagination__dot-dark', 3657 bulletActiveClass: 'bullet-pagination__dot--active', 3658 observer: true, 3659 observeParents: true, 3660 }); 3661 } 3662 } 3663 }, 3664}; 3665 3666var newsSlider = { 3667 init: function () { 3668 if ($('.js-news-slider').length !== 0) { 3669 var mySwiper = new Swiper('.js-news-slider', { 3670 slideClass: 'js-news-slider-item', 3671 wrapperClass: 'js-news-slider-wrapper', 3672 slidesPerView: 2, 3673 loop: false, 3674 spaceBetween: 30, 3675 setWrapperSize: true, 3676 nextButton: '.js-slider-button-next', 3677 prevButton: '.js-slider-button-prev', 3678 followFinger: false, 3679 simulateTouch: false, 3680 breakpoints: { 3681 767: { 3682 slidesPerView: 1, 3683 spaceBetween: 30, 3684 pagination: '.js-news-slider-bullet-pagination', 3685 paginationType: 'bullets', 3686 paginationElement: 'span', 3687 paginationClickable: true, 3688 bulletClass: 'bullet-pagination__dot-dark', 3689 bulletActiveClass: 'bullet-pagination__dot--active', 3690 }, 3691 }, 3692 }); 3693 } 3694 }, 3695}; 3696 3697var opinionsSlider = { 3698 init: function () { 3699 if ($('.js-opinions-slider').length !== 0) { 3700 var mySwiper = new Swiper('.js-opinions-slider', { 3701 slideClass: 'js-opinions-slider-item', 3702 wrapperClass: 'js-opinions-slider-wrap', 3703 loop: true, 3704 setWrapperSize: true, 3705 nextButton: '.js-slider-button-next', 3706 prevButton: '.js-slider-button-prev', 3707 observer: true, 3708 observeParents: true, 3709 breakpoints: { 3710 767: { 3711 spaceBetween: 20, 3712 slidesPerView: 1, 3713 pagination: '.js-opinions-slider-pagination', 3714 paginationType: 'bullets', 3715 paginationElement: 'span', 3716 paginationClickable: true, 3717 bulletClass: 'bullet-pagination__dot-dark', 3718 bulletActiveClass: 'bullet-pagination__dot--active', 3719 }, 3720 }, 3721 }); 3722 3723 var showMoreButton = $('.js-opinions-slider').find('.js-show-more'); 3724 showMoreButton.on('click', function (e) { 3725 e.preventDefault(); 3726 $('.js-opinions-person-opinion').removeClass('mobile-hidden'); 3727 }); 3728 } 3729 }, 3730}; 3731 3732var photoSlider = { 3733 init: function () { 3734 if ($('.js-photo-slider').length !== 0) { 3735 var images = new Swiper('.js-photo-slider-images', { 3736 slideClass: 'js-photo-slide', 3737 wrapperClass: 'js-photo-slider-images-wrap', 3738 slidesPerView: 'auto', 3739 loop: true, 3740 loopedSlides: 4, 3741 setWrapperSize: true, 3742 nextButton: '.js-photo-slider-images-button-next', 3743 prevButton: '.js-photo-slider-images-button-prev',
3744 pagination: '.js-photo-slider-images-pagination', 3745 paginationType: 'fraction', 3746 breakpoints: { 3747 767: { 3748 slidesPerView: 1, 3749 }, 3750 }, 3751 }); 3752 3753 if(window.innerWidth >=767) { 3754 var thumbs = new Swiper('.js-photo-slider-thumbs', { 3755 slideClass: 'js-photo-slide', 3756 wrapperClass: 'js-photo-slider-thumbs-wrap', 3757 direction: 'vertical', 3758 slidesPerView: 4, 3759 loopedSlides: 4, 3760 centeredSlides: true, 3761 loop: true, 3762 spaceBetween: 23, 3763 setWrapperSize: true, 3764 slideToClickedSlide: true, 3765 nextButton: '.js-photo-slider-thumbs-button-next', 3766 breakpoints: { 3767 768: { 3768 spaceBetween: 20, 3769 }, 3770 }, 3771 }); 3772 3773 const thumbsItems = document.querySelectorAll('.photo-slider__thumb'); 3774 document.addEventListener('click', (evt) => { 3775 if (evt.target.closest('.js-photo-slide')) { 3776 evt.preventDefault(); 3777 thumbsItems.forEach((item) => { 3778 item.classList.add('thumb--no-hover'); 3779 item.addEventListener('mouseenter', function () { 3780 item.classList.remove('thumb--no-hover'); 3781 }); 3782 }); 3783 } 3784 }); 3785 3786 images.params.control = thumbs; 3787 thumbs.params.control = images; 3788 3789 } 3790 3791 3792 3793 // var swiper = new Swiper(".js-photo-slider-thumbs", { 3794 // loop: true, 3795 // spaceBetween: 10, 3796 // slidesPerView: 4, 3797 // freeMode: true, 3798 // watchSlidesProgress: true, 3799 // }); 3800 // var swiper2 = new Swiper(".js-photo-slider-images'", { 3801 // loop: true, 3802 // spaceBetween: 10, 3803 // navigation: { 3804 // nextEl: '.js-photo-slider-images-button-next', 3805 // prevEl: '.js-photo-slider-images-button-prev', 3806 // }, 3807 // thumbs: { 3808 // swiper: swiper, 3809 // }, 3810 // }); 3811 } 3812 }, 3813}; 3814 3815var programmsSlider = { 3816 init: function () { 3817 if ($('.js-programms-slider').length !== 0) { 3818 if (isMobileView()) { 3819 var mySwiper = new Swiper('.js-programms-slider', { 3820 slideClass: 'js-programms-item', 3821 wrapperClass: 'js-programms-list', 3822 slidesPerView: 1, 3823 setWrapperSize: true, 3824 nextButton: '.js-slider-button-next', 3825 prevButton: '.js-slider-button-prev', 3826 pagination: '.js-slider-fraction-pagination', 3827 paginationType: 'fraction', 3828 paginationClickable: true, 3829 observer: true, 3830 observeParents: true, 3831 }); 3832 } 3833 } 3834 }, 3835}; 3836 3837var scrollDown = { 3838 init: function () { 3839 if ($('.js-slider-slim-arrow-top').length !== 0) { 3840 $('.js-slider-slim-arrow-top').click(function () { 3841 $('html, body').animate( 3842 { 3843 scrollTop: $('#timeline').offset().top, 3844 }, 3845 1500 3846 ); 3847 }); 3848 } 3849 3850 if ($('.js-slider-slim-arrow-bottom').length !== 0) { 3851 $('.js-slider-slim-arrow-bottom').click(function () { 3852 $('html, body').animate( 3853 { 3854 scrollTop: $('#quote-section').offset().top, 3855 }, 3856 1500 3857 ); 3858 }); 3859 } 3860 }, 3861}; 3862 3863var selects = { 3864 select2options: { 3865 width: 'width: 230px', 3866 //placeholder: '', 3867 minimumResultsForSearch: -1, 3868 required: true, 3869 }, 3870 init: function () { 3871 if ($('.js-select').length !== 0) { 3872 var selects = $('.js-select'); 3873 3874 for (var i = 0; i < selects.length; i++) { 3875 var select = $(selects[i]); 3876 if (select.hasClass('js-select-no-placeholder')) { 3877 this.select2options.placeholder = ''; 3878 } 3879 select.select2(this.select2options); 3880 3881 select.on('select2:select', function (e) { 3882 var selectParent = $(this).parents('.js-form-group-select'); 3883 var label = selectParent.find('.form-group__label'); 3884 var renderedOption = selectParent.find( 3885 '.select2-selection__rendered' 3886 ); 3887 if (renderedOption.text() !== '') { 3888 label.hide(); 3889 } 3890 //selects.fixedTouch(select) 3891 //this.fixedTouch(select) 3892 fixedTouchGlobal(select); 3893 }); 3894 3895 $('select') 3896 .closest('form') 3897 .on('reset', function (ev) { 3898 var targetJQForm = $(ev.target); 3899 setTimeout( 3900 function () { 3901 this.find('select').trigger('change'); 3902 }.bind(targetJQForm), 3903 0 3904 ); 3905 }); 3906 } 3907 // this.fixedTouch(select) 3908 } 3909 }, 3910 fixedTouch: function (select) { 3911 var $selectContainer = $('.select2-container'); 3912 3913 $selectContainer.on('touchstart', function () { 3914 isHasClass = $(this).hasClass('select2-container--open'); 3915 3916 !isHasClass ? select.select2('open') : select.select2('close'); 3917 });
3918 }, 3919 searchInput: function (select) { 3920 let options = { ...this.select2options }; 3921 this.addLanguage(); 3922 options['minimumResultsForSearch'] = 1; 3923 options['language'] = 'ru'; 3924 3925 $(document).ready(function () { 3926 select.select2(options); 3927 }); 3928 }, 3929 addLanguage: function () { 3930 $.fn.select2.amd.define('select2/i18n/ru', [], function () { 3931 return { 3932 errorLoading: function () { 3933 return 'РезÑлÑÑÐ°Ñ Ð½Ðµ Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð·Ð°Ð³ÑÑжен.'; 3934 }, 3935 inputTooLong: function (args) { 3936 var overChars = args.input.length - args.maximum; 3937 var message = 'ÐожалÑйÑÑа, ÑдалиÑе ' + overChars + ' Ñимвол'; 3938 if (overChars >= 2 && overChars <= 4) { 3939 message += 'а'; 3940 } else if (overChars >= 5) { 3941 message += 'ов'; 3942 } 3943 return message; 3944 }, 3945 inputTooShort: function (args) { 3946 var remainingChars = args.minimum - args.input.length; 3947 3948 var message = 3949 'ÐожалÑйÑÑа, введиÑе ' + remainingChars + ' или более Ñимволов'; 3950 3951 return message; 3952 }, 3953 loadingMore: function () { 3954 return 'ÐагÑÑжаем еÑÑ ÑеÑÑÑÑÑâ¦'; 3955 }, 3956 maximumSelected: function (args) { 3957 var message = 'ÐÑ Ð¼Ð¾Ð¶ÐµÑе вÑбÑаÑÑ ' + args.maximum + ' ÑлеменÑ'; 3958 3959 if (args.maximum >= 2 && args.maximum <= 4) { 3960 message += 'а'; 3961 } else if (args.maximum >= 5) { 3962 message += 'ов'; 3963 } 3964 3965 return message; 3966 }, 3967 noResults: function () { 3968 return 'ÐиÑего не найдено'; 3969 }, 3970 searching: function () { 3971 return 'ÐоиÑкâ¦'; 3972 }, 3973 }; 3974 }); 3975 }, 3976}; 3977 3978function fixedTouchGlobal(select) { 3979 var $selectContainer = $('.select2-container'); 3980 3981 $selectContainer.on('touchstart', function () { 3982 isHasClass = $(this).hasClass('select2-container--open'); 3983 3984 !isHasClass ? select.select2('open') : select.select2('close'); 3985 }); 3986} 3987 3988var showCoockiesAlert = { 3989 init: function () { 3990 if ($('.js-coockies-alert').length != 0) { 3991 $('.js-coockies-accept').on('click', function () { 3992 $('.js-coockies-alert').addClass('hidden'); 3993 }); 3994 } 3995 }, 3996}; 3997 3998var showMoreButton = { 3999 init: function () { 4000 if ($('.js-show-more').length !== 0) { 4001 $('.js-show-more').on('click', function () { 4002 $('.js-text').removeClass('hidden'); 4003 $('.js-contests-banners-banner').removeClass('hidden'); 4004 $('.js-contest-info').removeClass('mobile-hidden'); 4005 $(this).hide(); 4006 }); 4007 } 4008 }, 4009}; 4010 4011var statusShowContentMore = { 4012 container: '.js-content-wrapper', 4013 btn: '.js-button-more', 4014 contentShort: '.js-content-short', 4015 contentFull: '.js-content-full', 4016 4017 init: function () { 4018 if ($(this.container).length !== 0) { 4019 var that = this; 4020 this.showShort(); 4021 4022 $(this.btn).on('click', function (e) { 4023 e.preventDefault(); 4024 if ($(that.contentShort).hasClass('active')) { 4025 that.showFull(); 4026 } else { 4027 that.showShort(); 4028 } 4029 }); 4030 } 4031 }, 4032 showFull: function () { 4033 $(this.btn).text((document.documentElement.getAttribute("lang") === "ru") ?'СвеÑнÑÑÑ': 'Roll up'); 4034 $(this.contentShort).removeClass('active'); 4035 $(this.contentFull).addClass('active'); 4036 $(this.btn).removeClass('link--arrow-down'); 4037 $(this.btn).addClass('link--arrow-up'); 4038 }, 4039 showShort: function () { 4040 // $('body,html').animate({scrollTop:0},0); 4041 $(this.btn).text((document.documentElement.getAttribute("lang") === "ru") ?'ÐоказаÑÑ Ð±Ð¾Ð»ÑÑе' : 'Read more'); 4042 $(this.contentShort).addClass('active'); 4043 $(this.contentFull).removeClass('active'); 4044 $(this.btn).removeClass('link--arrow-up'); 4045 $(this.btn).addClass('link--arrow-down'); 4046 }, 4047}; 4048 4049var specialBannersSlider = { 4050 init: function () {
4051 if ($('.js-special-banners-slider').length !== 0) { 4052 if (isMobileView()) { 4053 var mySwiper = new Swiper('.js-special-banners-slider', { 4054 slideClass: 'js-special-banners-slider-item', 4055 wrapperClass: 'js-special-banners-slider-wrap', 4056 slidesPerView: 1, 4057 setWrapperSize: true, 4058 nextButton: '.js-slider-button-next', 4059 prevButton: '.js-slider-button-prev', 4060 pagination: '.js-slider-fraction-pagination', 4061 paginationType: 'fraction', 4062 paginationClickable: true, 4063 observer: true, 4064 observeParents: true, 4065 }); 4066 } 4067 } 4068 }, 4069}; 4070 4071var svgForEverybody = { 4072 init: function () { 4073 svg4everybody(); 4074 }, 4075}; 4076 4077var tabsToggle = { 4078 init: function () { 4079 if ($('.js-tabs').length !== 0) { 4080 $('.js-tabs .tabs__nav-item a').on('click', function (e) { 4081 e.preventDefault(); 4082 var tabId = $(this).attr('href'); 4083 if ($(this).hasClass('disabled')) { 4084 return; 4085 } 4086 4087 if (!$('.js-tabs').hasClass('multichoice')) { 4088 $('.js-tabs .tabs__nav-item a').removeClass('active'); 4089 } 4090 4091 $(this).toggleClass('active').parent().siblings().children(); 4092 4093 if (!$('.js-tabs').hasClass('multichoice')) { 4094 $('.tabs__content-item').removeClass('active'); 4095 } 4096 $(tabId).toggleClass('active'); 4097 4098 var currentSliderWrap = $('.tabs__content').find(tabId); 4099 var currentSlider = $(currentSliderWrap).find('.js-programms-slider'); 4100 if (isMobileView()) { 4101 if (currentSlider.length !== 0) { 4102 var mySwiper = new Swiper(currentSlider, { 4103 slideClass: 'js-programms-item', 4104 wrapperClass: 'js-programms-list', 4105 slidesPerView: 1, 4106 setWrapperSize: true, 4107 nextButton: '.js-slider-button-next', 4108 prevButton: '.js-slider-button-prev', 4109 pagination: '.js-slider-fraction-pagination', 4110 paginationType: 'fraction', 4111 paginationClickable: true, 4112 }); 4113 } 4114 } 4115 }); 4116 } 4117 }, 4118}; 4119 4120var timelineSlider = { 4121 init: function () { 4122 if ($('.js-timeline-slider').length !== 0) { 4123 var swiper = new Swiper('.js-timeline-slider', { 4124 direction: 'vertical', 4125 wrapperClass: 'js-timeline-slider-wrap', 4126 slideClass: 'js-timeline-slider-item', 4127 slidesPerView: 'auto', 4128 loop: false, 4129 centeredSlides: false, 4130 scrollContainer: 'true', 4131 pagination: '.js-slider-progress-pagination', 4132 watchSlidesProgress: true, 4133 mousewheelControl: true, 4134 //nextButton: '.js-slider-slim-arrow', 4135 paginationType: 'progress', 4136 }); 4137 } 4138 }, 4139}; 4140 4141var upBtn = { 4142 init: function () { 4143 if ($('.js-up-btn').length !== 0) { 4144 var positionTop = 200; 4145 $(window).scroll(function () { 4146 if ($(this).scrollTop() > positionTop) { 4147 $('.js-up-btn').show().addClass('active'); 4148 } else { 4149 $('.js-up-btn').hide().removeClass('active'); 4150 } 4151 }); 4152 $('.js-up-btn').click(function (e) { 4153 e.preventDefault(); 4154 $('body, html').animate({ scrollTop: 0 }, 1000); 4155 }); 4156 } 4157 }, 4158}; 4159 4160var videoPopup = { 4161 init: function () { 4162 var that = this; 4163 var playBtns = $('.js-video-popup-btn'); 4164 if (playBtns.length !== 0) { 4165 $(document).on('click','.js-video-popup-btn',function (e) { 4166 e.preventDefault(); 4167 var videoModal = $('.js-video-item'); 4168 if (videoModal.length === 0) { 4169 return; 4170 } 4171 var index = $(this).parents('.video-card').index(); 4172 if(index===-1){ 4173 index = $(this).parents('.publications__card-container').index('.publications__card-container'); 4174 }; 4175 var fancybox = $.fancybox.open( 4176 videoModal, 4177 { 4178 clickOutside: 'close', 4179 modal: true, 4180 buttons: ['close'], 4181 smallBtn: false, 4182 loop: true, 4183 arrows: true, 4184 autoStart: 0, 4185 wheel: false, 4186 afterShow: function (fb, target) { 4187 var video = $(target.src).find('video'); 4188 $(video).data('counter', 0); 4189 $(video).on('play', that.preventFirstPlay); 4190 $('.js-video-overlay').removeClass('hidden'); 4191 // console.log('aftershow'); 4192 }, 4193 baseTpl: 4194 '<div role="dialog" class="fancybox-container"><div class="fancybox-bg"></div><div class="fancybox-stage"></div></div>', 4195 }, 4196 index 4197 ); 4198 }); 4199 } 4200 }, 4201 preventFirstPlay: function (e) { 4202 var counter = $(this).data('counter'); 4203 if (counter == 0) { 4204 e.preventDefault(); 4205 } 4206 counter = counter + 1; 4207 $(this).data('counter', counter); 4208 }, 4209}; 4210 4211var videoPlay = { 4212 init: function () { 4213 if ($('.js-video').length !== 0) { 4214 var iframeSrc; 4215 var stopIframePlay = function () { 4216 var parent = $(this).parents('.js-video-item'); 4217 var iframe = parent.find('iframe'); 4218 iframe.attr('src', iframeSrc); 4219 parent.find('.js-video-icon-wrap').removeClass('hidden'); 4220 };
4221 $(document).on('click','.js-video-icon-wrap', function (e) { 4222 e.preventDefault(); 4223 $('.js-video-overlay').addClass('hidden'); 4224 var videoWrapper = $(this).parents('.js-video-wrap'); 4225 var p = videoWrapper.find('.js-video-media'); 4226 p.prop('controls', true); 4227 p.trigger('play'); 4228 $(this).addClass('hidden'); 4229 var video = $(this).parents('.js-video-wrap').find('.js-video-media'); 4230 4231 var iframe = $(this).parents('.js-video-wrap').find('iframe'); 4232 iframeSrc = iframe.attr('src'); 4233 $(this) 4234 .parents('.js-video-item') 4235 .find('.js-slider-button-next') 4236 .on('click', stopIframePlay); 4237 $(this) 4238 .parents('.js-video-item') 4239 .find('.js-slider-button-prev') 4240 .on('click', stopIframePlay); 4241 iframe.attr('allow', 'autoplay'); 4242 iframe.attr( 4243 'src', 4244 $(iframe, parent).attr('src') + 4245 '?autoplay=1&enablejsapi=1&version=3&playerapiid=ytplayer' 4246 ); 4247 }); 4248 4249 if ($('.video-item__controls').length !== 0) { 4250 $('.video-item__controls').on('click', stopIframePlay); 4251 } 4252 } 4253 }, 4254}; 4255 4256var checkoHref = { 4257 init: function () { 4258 var href = window.location.href; 4259 var to = href.search('#values'); 4260 var newstr = href.substring(100, to); 4261 if (newstr === '#values') { 4262 var top = $('#values').offset().top - 200; 4263 4264 $('body,html').animate({ scrollTop: top }, 1000); 4265 $('#values').addClass('active'); 4266 } 4267 }, 4268}; 4269 4270var checkSelec = { 4271 init: function () { 4272 $('#program').on('select2:select', function (e) { 4273 var data = e.params.data; 4274 var selectParent = parseInt(e.params.data.element.dataset.parent); 4275 if (selectParent !== '') { 4276 $('#competition option').each(function () { 4277 var $this = $(this); 4278 dataProgramm = $this.data('program'); 4279 if ( 4280 selectParent !== dataProgramm && 4281 $this.prop('disabled') === true 4282 ) { 4283 $this.css('display', 'none'); 4284 } 4285 }); 4286 } 4287 }); 4288 4289 $('#competition').on('select2:select', function (e) { 4290 var data = e.params.data; 4291 }); 4292 }, 4293}; 4294 4295var swiper = new Swiper('.js-tabs-slider', { 4296 slidesPerView: 'auto', 4297 watchSlidesProgress: true, 4298 freeMode: true, 4299 breakpoints: { 4300 1200: { 4301 slidesPerView: 'auto', 4302 }, 4303 }, 4304}); 4305 4306$(document).ready(function () { 4307 checkSelec.init(); 4308 $(document).on('click', '.js-fancy-close', function () { 4309 $.fancybox.close(); 4310 }); 4311}); /* Start:"a:4:{s:4:"full";s:105:"/local/templates/main/components/defa/controller/analytics/defa/block/analytics/script.js?155326962710850";s:6:"source";s:89:"/local/templates/main/components/defa/controller/analytics/defa/block/analytics/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4312// иниÑиализаÑÐ¸Ñ Ð¾Ð±ÑабоÑÑиков ÑилÑÑÑаÑии 4313var filterTable = { 4314 lockChange: false, 4315 init: function () { 4316 // изменение ÑазмеÑа ÑÑÑаниÑÑ 4317 $(document).on('change', '#pageSize', function () { 4318 if (!filterTable.lockChange) { 4319 var params = getTableParams(); 4320 params.page_size = $(this).val(); 4321 4322 // обновление ÑÑÑаниÑÑ 4323 updateTable(params); 4324 4325 // ÑÐ¾Ñ ÑанÑем 4326 $('#pageSize').val(params.page_size); 4327 } 4328 }); 4329 4330 // изменение ÑвойÑÑва "ФизиÑеÑкое лиÑо" 4331 $(document).on('change', '#individual', function () { 4332 if (!filterTable.lockChange) { 4333 var params = getTableParams(); 4334 4335 // обновление ÑÑÑаниÑÑ 4336 updateTable(params); 4337 4338 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4339 $('#filter_individual').val(params.individual); 4340 4341 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4342 if (params.individual !== '') { 4343 $('#clear_filter').show(); 4344 } else { 4345 checkEmptyFilter(params); 4346 } 4347 } 4348 });
4349 4350 // изменение ÑвойÑÑва "ЮÑидиÑеÑкое лиÑо" 4351 $(document).on('change', '#legal_entity', function () { 4352 if (!filterTable.lockChange) { 4353 var params = getTableParams(); 4354 4355 // обновление ÑÑÑаниÑÑ 4356 updateTable(params); 4357 4358 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4359 $('#filter_legal_entity').val(params.legal_entity); 4360 4361 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4362 if (params.legal_entity !== '') { 4363 $('#clear_filter').show(); 4364 } else { 4365 checkEmptyFilter(params); 4366 } 4367 } 4368 }); 4369 4370 // изменение ÑеалÑного клÑÑа пÑогÑÐ°Ð¼Ð¼Ñ 4371 $(document).on('change', '#program_real', function () { 4372 if (!filterTable.lockChange) { 4373 var params = getTableParams(); 4374 params.program_real = $(this).val(); 4375 params.name = $(this).attr('name'); 4376 // обновление ÑÑÑаниÑÑ 4377 updateTable(params); 4378 4379 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4380 $('#filter_program_real').val(params.program_real); 4381 4382 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4383 if (params.program_real !== '') { 4384 $('#clear_filter').show(); 4385 } else { 4386 checkEmptyFilter(params); 4387 } 4388 } 4389 }); 4390 4391 // изменение пÑогÑÐ°Ð¼Ð¼Ñ (на Ñамом деле ÑÑо year, не Ð·Ð½Ð°Ñ Ð¿Ð¾ÑÐµÐ¼Ñ Ñделали program) 4392 $(document).on('change', '#program', function () { 4393 if (!filterTable.lockChange) { 4394 var params = getTableParams(); 4395 params.program = $(this).val(); 4396 params.name = $(this).attr('name'); 4397 // обновление ÑÑÑаниÑÑ 4398 updateTable(params); 4399 4400 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4401 $('#filter_program').val(params.program); 4402 4403 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4404 if (params.program !== '') { 4405 $('#clear_filter').show(); 4406 } else { 4407 checkEmptyFilter(params); 4408 } 4409 } 4410 }); 4411 4412 // изменение конкÑÑÑа 4413 $(document).on('change', '#competition', function () { 4414 if (!filterTable.lockChange) { 4415 var params = getTableParams(); 4416 params.competition = $(this).val(); 4417 4418 // обновление ÑÑÑаниÑÑ 4419 updateTable(params); 4420 4421 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4422 $('#filter_competition').val(params.competition); 4423 4424 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4425 if (params.competition !== '') { 4426 $('#clear_filter').show(); 4427 } else { 4428 checkEmptyFilter(params); 4429 } 4430 } 4431 }); 4432 4433 // изменение даÑÑ Ð¿ÑбликаÑии, ÑобÑÑие 'focusout' 4434 $(document).on('focusout', '#period-calendar', function () { 4435 if (!filterTable.lockChange) { 4436 var period = $(this).val(); 4437 4438 // пÑовеÑка на пеÑиод 4439 var regex = new RegExp( 4440 '\\d{2}-\\d{2}-\\d{4} / \\d{2}-\\d{2}-\\d{4}', 4441 'gi' 4442 ); 4443 var checkPeriod = regex.test(period); 4444 4445 // пÑовеÑка на даÑÑ 4446 regex = new RegExp('\\d{2}-\\d{2}-\\d{4}', 'gi'); 4447 var checkDate = regex.test(period); 4448 if (checkPeriod === false && checkDate) { 4449 period = period.substr(0, 10); 4450 } 4451 4452 if (checkPeriod || checkDate) { 4453 var params = getTableParams(); 4454 params.period = period; 4455 4456 // обновление ÑÑÑаниÑÑ 4457 updateTable(params); 4458 4459 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4460 $('#filter_period').val(params.period); 4461 4462 if (params.period !== '') { 4463 $('#clear_filter').show(); 4464 } else { 4465 checkEmptyFilter(params); 4466 } 4467 } 4468 } 4469 }); 4470 4471 // изменение меÑÑа 4472 // ÑÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ Ð¿Ð¾Ð¸Ñк по options 4473 selects.searchInput($('#place')); 4474 $(document).on('change', '#place', function () { 4475 if (!filterTable.lockChange) { 4476 var params = getTableParams(); 4477 params.place = $(this).val(); 4478 4479 // пеÑеиниÑиализаÑÐ¸Ñ select 4480 // selects.init(); 4481 var o = $(this).find('option'); 4482 for (var i = 0; i <= o.length; i++) { 4483 console.log($(o[i]).text()); 4484 } 4485 4486 // обновление ÑÑÑаниÑÑ 4487 updateTable(params); 4488 4489 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4490 $('#filter_place').val(params.place); 4491 4492 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4493 if (params.place !== '') { 4494 $('#clear_filter').show(); 4495 } else { 4496 checkEmptyFilter(params); 4497 } 4498 } 4499 });
4500 4501 // ÑилÑÑÑ Ð¿Ð¾ ÑÑÑлке "ÐÑе ÑезÑлÑÑаÑÑ" 4502 $(document).on('click', '.form-search__results .all_result', function (e) { 4503 e.preventDefault(); 4504 4505 var params = getTableParams(); 4506 params.name = $('.js-form-search-input').val(); 4507 4508 // обновление ÑÑÑаниÑÑ 4509 updateTable(params); 4510 4511 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4512 $('#filter_name').val(params.name); 4513 4514 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4515 if (params.name !== '') { 4516 $('#clear_filter').show(); 4517 } 4518 }); 4519 4520 // ÑилÑÑÑ Ð¿Ð¾ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÑ 4521 $(document).on( 4522 'click', 4523 '#form-search .js-form-search-button', 4524 function (e) { 4525 e.preventDefault(); 4526 4527 var params = getTableParams(); 4528 params.name = $('.js-form-search-input').val(); 4529 4530 // обновление ÑÑÑаниÑÑ 4531 updateTable(params); 4532 4533 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4534 $('#filter_name').val(params.name); 4535 4536 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4537 if (params.name !== '') { 4538 $('#clear_filter').show(); 4539 } 4540 } 4541 ); 4542 4543 // изменение оÑганизаÑии 4544 // ÑÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ Ð¿Ð¾Ð¸Ñк по options 4545 selects.searchInput($('#organization')); 4546 $(document).on('change', '#organization', function () { 4547 if (!filterTable.lockChange) { 4548 var params = getTableParams(); 4549 params.organization = $(this).val(); 4550 4551 // пеÑеиниÑиализаÑÐ¸Ñ select 4552 // selects.init(); 4553 4554 // обновление ÑÑÑаниÑÑ 4555 updateTable(params); 4556 4557 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4558 $('#filter_organization').val(params.organization); 4559 4560 //показÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4561 if (params.organization !== '') { 4562 $('#clear_filter').show(); 4563 } else { 4564 checkEmptyFilter(params); 4565 } 4566 } 4567 }); 4568 4569 // изменение ÑазмеÑа гÑанÑа, ÑобÑÑие 'focusout' 4570 $(document).on('focusout keydown', '#grant_from', function (e) { 4571 if (e.type === 'focusout' || (e.type === 'keydown' && e.which === 13)) { 4572 if (!filterTable.lockChange) { 4573 var grant_from = $(this).val(); 4574 if (grant_from === '' || $.isNumeric(grant_from)) { 4575 var params = getTableParams(); 4576 4577 if (params.grant_from != grant_from) { 4578 params.grant_from = grant_from; 4579 // обновление ÑÑÑаниÑÑ 4580 updateTable(params); 4581 } 4582 4583 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4584 $('#filter_grant_from').val(params.grant_from); 4585 4586 if (params.grant_from !== '') { 4587 $('#clear_filter').show(); 4588 } else { 4589 checkEmptyFilter(params); 4590 } 4591 } 4592 } 4593 } 4594 }); 4595 4596 // изменение ÑазмеÑа гÑанÑа, ÑобÑÑие 'focusout' 4597 $(document).on('focusout keydown', '#grant_to', function (e) { 4598 if (e.type === 'focusout' || (e.type === 'keydown' && e.which === 13)) { 4599 if (!filterTable.lockChange) { 4600 var grant_to = $(this).val(); 4601 if (grant_to === '' || $.isNumeric(grant_to)) { 4602 var params = getTableParams(); 4603 4604 if (params.grant_to != grant_to) { 4605 params.grant_to = grant_to; 4606 // обновление ÑÑÑаниÑÑ 4607 updateTable(params); 4608 } 4609 4610 // ÑÐ¾Ñ ÑанÑем ÑилÑÑÑ 4611 $('#filter_grant_to').val(params.grant_to); 4612 4613 if (params.grant_to !== '') { 4614 $('#clear_filter').show(); 4615 } else { 4616 checkEmptyFilter(params); 4617 } 4618 } 4619 } 4620 } 4621 }); 4622 4623 // ÑбÑÐ¾Ñ ÑилÑÑÑа 4624 $(document).on('click', '#clear_filter', function (e) { 4625 e.preventDefault(); 4626 4627 // ÑбÑаÑÑваем ÑилÑÑÑ 4628 filterTable.lockChange = true; 4629 $('#individual').prop('checked', false).trigger('change'); 4630 $('#legal_entity').prop('checked', false).trigger('change'); 4631 $('#program_real').val(null).trigger('change'); 4632 $('#program').val(null).trigger('change'); 4633 4634 // акÑивиÑÑем конкÑÑÑÑ 4635 $('#competition option').each(function (index, value) { 4636 $(this).prop('disabled', false); 4637 }); 4638 $('#competition').val(null).trigger('change'); 4639 4640 $('#period-calendar').val(null).trigger('change'); 4641 $('#place').val(null).trigger('change'); 4642 $('#organization').val(null).trigger('change'); 4643 $('#grant_from').val(null).trigger('change'); 4644 $('#grant_to').val(null).trigger('change'); 4645 4646 $('#filter_individual').val(''); 4647 $('#filter_legal_entity').val(''); 4648 $('#filter_program_real').val(''); 4649 $('#filter_program').val(''); 4650 $('#filter_competition').val('');
4651 $('#filter_period').val(''); 4652 $('#filter_place').val(''); 4653 $('#filter_name').val(''); 4654 $('#filter_organization').val(''); 4655 $('#filter_grant_from').val(''); 4656 $('#filter_grant_to').val(''); 4657 4658 // news 4659 $('#filter_checkbox_news_only').prop('checked', false); 4660 $('.js-select').prop('disabled', false); 4661 4662 $('.js-form-search').removeClass('active'); 4663 $('.js-form-search-input').val(''); 4664 4665 // пеÑеиниÑиализаÑÐ¸Ñ select 4666 selects.init(); 4667 4668 filterTable.lockChange = false; 4669 4670 // обновление ÑÑÑаниÑÑ 4671 var params = getTableParams(); 4672 updateTable(params); 4673 4674 //ÑкÑÑваем ÐºÐ½Ð¾Ð¿ÐºÑ ÑбÑоÑа ÑилÑÑÑа 4675 $('#clear_filter').hide(); 4676 }); 4677 }, 4678}; 4679 4680$(function () { 4681 checkboxNews.init(); 4682}); 4683 4684var checkboxNews = { 4685 init: function () { 4686 $('.js-checkbox-news-only').on('change', function () { 4687 let isChecked = $(this).is(':checked'); 4688 4689 if (isChecked) { 4690 $('.js-select').prop('disabled', true); 4691 $('#program').val(null).trigger('change'); 4692 selects.init(); 4693 } else { 4694 $('.js-select').prop('disabled', false); 4695 } 4696 4697 $('#clear_filter').show(); 4698 var params = getTableParams(); 4699 updateTable(params); 4700 }); 4701 }, 4702}; 4703 4704// пÑовеÑÑем ÑилÑÑÑ Ð½Ð° пÑÑÑоÑÑ 4705function checkEmptyFilter(params) { 4706 if ( 4707 params.individual === '' && 4708 params.legal_entity === '' && 4709 params.program_real === '' && 4710 params.program === '' && 4711 params.competition === '' && 4712 params.period === '' && 4713 params.place === '' && 4714 params.organization === '' && 4715 params.grant_from === '' && 4716 params.grant_to === '' 4717 ) { 4718 $('#clear_filter').hide(); 4719 } 4720} 4721 4722// ÑилÑÑÑаÑÐ¸Ñ 4723function updateTable(params) { 4724 // оÑпÑавлÑем запÑÐ¾Ñ Ð½Ð° ÑеÑÐ²ÐµÑ 4725 $.ajax({ 4726 type: 'GET', 4727 data: params, 4728 success: function (data) { 4729 if ($('.grant-page').length) { 4730 updateGrantPage(data); 4731 } else { 4732 // обновление конÑенÑа 4733 $('#ajax_area').html(data); 4734 4735 // пеÑеиниÑиализаÑÐ¸Ñ Ð¾Ð±ÑабоÑÑиков 4736 pagination.init(); 4737 sort.init(); 4738 videoPlay.init(); 4739 videoPopup.init(); 4740 } 4741 }, 4742 }); 4743} 4744 4745// // пагинаÑÐ¸Ñ 4746// var pagination = { 4747// init: function () { 4748// var params = getTableParams(); 4749// $(".page-pagination__item a").on('click', function (e) { 4750// e.preventDefault(); 4751// var url = $(this).attr('href'); 4752 4753// // оÑпÑавлÑем запÑÐ¾Ñ Ð½Ð° ÑеÑÐ²ÐµÑ 4754// $.ajax({
4755// type: 'GET', 4756// url: url, 4757// data: params, 4758// success: function (data) { 4759// // обновление конÑенÑа 4760// $('#ajax_area').html(data); 4761 4762// // пеÑеиниÑиализаÑÐ¸Ñ Ð¾Ð±ÑабоÑÑиков 4763// pagination.init(); 4764// } 4765// }); 4766// }); 4767// } 4768// }; 4769 4770// пÑовеÑÑем ÑилÑÑÑ Ð½Ð° пÑÑÑоÑÑ 4771function checkEmptyFilter(params) { 4772 if ( 4773 params.program_real === '' && 4774 params.program === '' && 4775 params.theme === '' && 4776 params.competition === '' 4777 ) { 4778 $('#clear_filter').hide(); 4779 } 4780} 4781 4782// паÑамеÑÑÑ ÑÑÑаниÑÑ 4783function getTableParams() { 4784 var params = { 4785 ajax: 'Y', 4786 page_size: $('#pageSize').val(), 4787 program_real: $('#filter_program_real').val(), 4788 program: $('#filter_program').val(), 4789 competition: $('#filter_competition').val(), 4790 period: $('#filter_period').val(), 4791 place: $('#filter_place').val(), 4792 name: $('#filter_name').val(), 4793 organization: $('#filter_organization').val(), 4794 grant_from: $('#filter_grant_from').val(), 4795 grant_to: $('#filter_grant_to').val(), 4796 sort_name: $('#filter_sort_name').val(), 4797 sort_type: $('#filter_sort_type').val(), 4798 4799 // news page 4800 sort_check_news: $('#filter_checkbox_news_only').is(':checked'), 4801 }; 4802 // checkbox "ФизиÑеÑкое лиÑо" 4803 var individual = $('#individual').is(':checked'); 4804 if (individual) { 4805 params.individual = 'Y'; 4806 } else { 4807 params.individual = ''; 4808 } 4809 4810 // checkbox "ЮÑидиÑеÑкое лиÑо" 4811 var legal_entity = $('#legal_entity').is(':checked'); 4812 if (legal_entity) { 4813 params.legal_entity = 'Y'; 4814 } else { 4815 params.legal_entity = ''; 4816 } 4817 4818 return params; 4819} 4820 4821$(function () { 4822 filterTable.init(); 4823 searchInput.init(); 4824 sort.init(); 4825 pagination.init(); 4826 pagination.observer(); 4827 pagination.addEventScrollinit(); 4828}); 4829 4830var statusShowContentMore = { 4831 container: '.js-content-wrapper', 4832 btn: '.js-button-more', 4833 contentShort: '.js-content-short', 4834 contentFull: '.js-content-full', 4835 4836 init: function () { 4837 if ($(this.container).length !== 0) { 4838 var that = this; 4839 this.showShort(); 4840 4841 $(this.btn).on('click', function (e) { 4842 e.preventDefault(); 4843 if ($(that.contentShort).hasClass('active')) { 4844 that.showFull(); 4845 } else { 4846 that.showShort(); 4847 } 4848 }); 4849 } 4850 }, 4851 showFull: function () { 4852 $(this.btn).text((document.documentElement.getAttribute("lang") === "ru") ?'СвеÑнÑÑÑ': 'Roll up'); 4853 $(this.contentShort).removeClass('active'); 4854 $(this.contentFull).addClass('active'); 4855 $(this.btn).removeClass('link--arrow-down'); 4856 $(this.btn).addClass('link--arrow-up'); 4857 }, 4858 showShort: function () { 4859 // $('body,html').animate({scrollTop:0},0); 4860 $(this.btn).text((document.documentElement.getAttribute("lang") === "ru") ?'ÐоказаÑÑ Ð±Ð¾Ð»ÑÑе' : 'Read more'); 4861 $(this.contentShort).addClass('active'); 4862 $(this.contentFull).removeClass('active'); 4863 $(this.btn).removeClass('link--arrow-up'); 4864 $(this.btn).addClass('link--arrow-down'); 4865 }, 4866}; 4867 4868var searchInput = { 4869 searchElem: document.querySelector('.js-form-search'), 4870 searchINputWrapper: document.querySelector('.js-form-search-form'), 4871 4872 init: function () { 4873 let that = this; 4874 let linkHint = this.searchElem?.dataset.autocompleteLink; 4875 this.createHintsWrapper(); 4876 $('.js-form-search-input').on('input', function () { 4877 if (this.value.length < 3 || !linkHint) { 4878 that.deleteHints(); 4879 return; 4880 } 4881 4882 $.ajax({
4883 type: 'GET', 4884 url: linkHint, 4885 data: { 4886 name: this.value, 4887 }, 4888 success: function (data) { 4889 let response = JSON.parse(data); 4890 that.updateHints(response); 4891 }, 4892 }); 4893 }); 4894 }, 4895 createHintsWrapper: function () { 4896 let divHintWrapper = document.createElement('div'); 4897 divHintWrapper.classList.add('form-search-hint-wrapper'); 4898 this.searchINputWrapper && this.searchINputWrapper.append(divHintWrapper); 4899 }, 4900 updateHints: function (data) { 4901 this.deleteHints(); 4902 4903 let divHintWrapper = document.querySelector('.form-search-hint-wrapper'); 4904 4905 if (data == null) { 4906 let linkHint = document.createElement('span'); 4907 linkHint.classList.add( 4908 'form-search-hint__not-search', 4909 'form-search-hint' 4910 ); 4911 linkHint.innerText = 'ÐиÑего не найдено'; 4912 divHintWrapper.append(linkHint); 4913 return; 4914 } 4915 4916 data.forEach((el) => { 4917 let linkHint = document.createElement('a'); 4918 linkHint.classList.add('form-search-hint'); 4919 linkHint.innerText = el.NAME; 4920 linkHint.href = el.DETAIL_PAGE_URL; 4921 divHintWrapper.append(linkHint); 4922 }); 4923 }, 4924 deleteHints: function () { 4925 let divHintWrapper = document.querySelector('.form-search-hint-wrapper'); 4926 divHintWrapper.innerHTML = ''; 4927 }, 4928}; 4929 4930// ÐУÐÐÐ Ð ÐФÐÐТÐÐ ÐÐÐ 4931$(document).ready(function () { 4932 $(document).on('click', '#show_more', function () { 4933 var targetContainer = $('#ajax_area #area_list'), 4934 url = $('#show_more').attr('data-url'); 4935 4936 if (url !== undefined) { 4937 $.ajax({
4938 type: 'GET', 4939 url: url, 4940 dataType: 'html', 4941 success: function (data) { 4942 $('#show_more').remove(); 4943 var elements = $(data).find('#ajax_area #area_list > *'); 4944 4945 targetContainer.html(elements); 4946 }, 4947 }); 4948 } 4949 }); 4950}); 4951 4952// пагинаÑÐ¸Ñ 4953var pagination = { 4954 init: function () { 4955 $('.page-pagination__item a').on('click', function (e) { 4956 var params = getTableParams(); 4957 e.preventDefault(); 4958 var url = $(this).attr('href'); 4959 4960 // оÑпÑавлÑем запÑÐ¾Ñ Ð½Ð° ÑеÑÐ²ÐµÑ 4961 $.ajax({ 4962 type: 'GET', 4963 url: url, 4964 data: params, 4965 4966 success: function (data) { 4967 if ($('.grant-page').length) { 4968 updateGrantPage(data); 4969 } else { 4970 // обновление конÑенÑа 4971 $('#ajax_area').html(data); 4972 4973 // пеÑеиниÑиализаÑÐ¸Ñ Ð¾Ð±ÑабоÑÑиков 4974 pagination.init(); 4975 sort.init(); 4976 } 4977 }, 4978 }); 4979 }); 4980 }, 4981 observer: function () { 4982 // вÑбиÑаем нÑжнÑй ÑÐ»ÐµÐ¼ÐµÐ½Ñ 4983 var target = document.querySelector('.page-main'); 4984 if (!target) return false; 4985 4986 let that = this; 4987 // Ñоздаем новÑй ÑкземплÑÑ Ð½Ð°Ð±Ð»ÑдаÑÐµÐ»Ñ 4988 var observer = new MutationObserver(function (mutations) { 4989 mutations.forEach(function (mutation) { 4990 that.addEventScrollinit(); 4991 }); 4992 }); 4993 4994 // Ñоздаем конÑигÑÑаÑии Ð´Ð»Ñ Ð½Ð°Ð±Ð»ÑдаÑÐµÐ»Ñ 4995 var config = { childList: true, subtree: true }; 4996 4997 // запÑÑкаем Ð¼ÐµÑ Ð°Ð½Ð¸Ð·Ð¼ наблÑÐ´ÐµÐ½Ð¸Ñ 4998 observer.observe(target, config); 4999 }, 5000 addEventScrollinit: function () { 5001 $('.page-pagination__item a').on('click', function (e) { 5002 let header = document.querySelector('header'); 5003 scrollToElement(header); 5004 }); 5005 }, 5006}; 5007 5008// ÑоÑÑиÑовка 5009var sort = { 5010 init: function () { 5011 var titleTableElems = document.querySelectorAll('.table th.table__cell');
5012 titleTableElems.forEach((el) => { 5013 el.addEventListener('click', function (e) { 5014 var params = getTableParams(); 5015 e.preventDefault(); 5016 5017 // if (params.sort_type === '') { 5018 // params.sort_type = 'asc'; // по-ÑмолÑÐ°Ð½Ð¸Ñ 5019 5020 // } 5021 // if (params.sort_type === '') { 5022 // params.sort_type = 'asc'; // по-ÑмолÑÐ°Ð½Ð¸Ñ 5023 // } 5024 // ÑÑÑанавливаем паÑамеÑÑÑ ÑоÑÑиÑовки 5025 // params.sort_name = this.dataset.sort_name; 5026 // params.sort_type = this.dataset.sort_type; 5027 if (this.dataset.sort_type == '') { 5028 this.dataset.sort_type = 'ASC'; 5029 } else if (this.dataset.sort_type == 'ASC') { 5030 this.dataset.sort_type = 'DESC'; 5031 } else if (this.dataset.sort_type == 'DESC') { 5032 this.dataset.sort_type = ''; 5033 } 5034 5035 titleTableElems.forEach((el) => { 5036 if (el != this) el.dataset.sort_type = ''; 5037 }); 5038 5039 params.sort_name = this.dataset.sort_name; 5040 params.sort_type = this.dataset.sort_type; 5041 5042 // ÑÐ¾Ñ ÑанÑем ÑоÑÑиÑÐ¾Ð²ÐºÑ 5043 $('#filter_sort_name').val(params.sort_name); 5044 $('#filter_sort_type').val(params.sort_type); 5045 5046 // оÑпÑавлÑем запÑÐ¾Ñ Ð½Ð° ÑеÑÐ²ÐµÑ 5047 5048 updateTable(params); 5049 }); 5050 }); 5051 }, 5052}; 5053 5054function updateGrantPage(data) { 5055 var el = document.createElement('html'); 5056 el.innerHTML = data; 5057 5058 var table = $.parseHTML(data)[1]; 5059 $('#ajax_area').remove(); 5060 $('.table__wrap').append(table); 5061 5062 let newPagination = el.querySelector('#page_pagination'); 5063 let parentPagination = document.querySelector('.page-pagination')?.parentNode; 5064 if (parentPagination) { 5065 parentPagination.querySelector('.page-pagination').remove(); 5066 parentPagination.appendChild(newPagination); 5067 } 5068 pagination.init(); 5069} 5070 5071function scrollToElement(elem, topHeight = 0) { 5072 const topOffset = window.scrollY; 5073 const elementPosition = elem.offsetTop; 5074 const offsetPosition = elementPosition - topOffset - topHeight; 5075 5076 window.scrollBy({ 5077 top: offsetPosition, 5078 behavior: 'smooth', 5079 }); 5080} 5081 5082/***валидаÑÐ¸Ñ input file */ 5083const inputFile = document.querySelector(".js-file-input"); 5084 5085function fileValidation(input) { 5086 let fileInput = input; 5087 let filePath = fileInput.value; 5088 let allowedExtensions = /(\.doc|\.docx|\.pdf|\.txt|\.jpg|\.jpg|\.png|)$/i; 5089 5090 if (!allowedExtensions.exec(filePath)[0]) { 5091 input.parentElement.insertAdjacentHTML('beforeend',`<p class='file-err err-mess'>${document.querySelector(".js-file-validate-text").innerText}</p>`); 5092 fileInput.value = ''; 5093 return false; 5094 } 5095} 5096 5097!!inputFile && inputFile.addEventListener("change", function(event) { 5098 fileValidation(this); 5099}) 5100 5101 5102 5103/*Start ÐовÑе ÑÑÑаниÑÑ /Ñаздел докÑменÑÑ. СкÑолл ÑÑÑ Ðº ÑооÑвеÑÑÑвÑÑÑим Ñазделам пÑи клике по ÑÑÑлкам и загÑÑзке ÑÑÑиниÑÑ. */ 5104const docsLInks = document.querySelectorAll('.js-docs-link'); 5105const docsLInkActive = document.querySelector('.docs-content__blocks-item.is-active'); 5106 5107function strollToDocsBlock() { 5108 const href = location.hash; 5109 const element = document.querySelector(href); 5110 5111 if(!!element){ 5112 const top = element.getBoundingClientRect().top; 5113 const scroll = top - headerHight; 5114 window.scrollBy({top: scroll, behavior: 'smooth'}); 5115 } 5116} 5117 5118window.addEventListener("load", () => { 5119 const headerHight = document.querySelector('.js-main-header').offsetHeight; 5120 5121 window.innerWidth <= 767 && !!docsLInkActive && docsLInkActive.scrollIntoView({block: 'nearest',inline: 'center'}); 5122 if(location.hash) { 5123 strollToDocsBlock(); 5124 } 5125 5126}); 5127 5128if(docsLInks.length) { 5129 for (const link of docsLInks) { 5130 link.addEventListener('click', function(event) { 5131 setTimeout(() => { 5132 strollToDocsBlock(); 5133 },0); 5134 }); 5135 } 5136} 5137 5138/*End ÐовÑе ÑÑÑаниÑÑ /Ñаздел докÑменÑÑ. СкÑолл ÑÑÑ Ðº ÑооÑвеÑÑÑвÑÑÑим Ñазделам пÑи клике по ÑÑÑлкам и загÑÑзке ÑÑÑиниÑÑ. */ 5139 5140/*Start ÐовÑй ÑенÑÑ ÑиланÑÑопии */ 5141(() => { 5142
vendor: 2,913 bytes, lines 5142-5286
5142// node_modules/ssr-window/ssr-window.esm.js 5143 function isObject(obj) { 5144 return obj !== null && typeof obj === "object" && "constructor" in obj && obj.constructor === Object; 5145 } 5146 function extend(target = {}, src = {}) { 5147 Object.keys(src).forEach((key) => { 5148 if (typeof target[key] === "undefined") 5149 target[key] = src[key]; 5150 else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) { 5151 extend(target[key], src[key]); 5152 } 5153 }); 5154 } 5155 var ssrDocument = { 5156 body: {}, 5157 addEventListener() { 5158 }, 5159 removeEventListener() { 5160 }, 5161 activeElement: { 5162 blur() { 5163 }, 5164 nodeName: "" 5165 }, 5166 querySelector() { 5167 return null; 5168 }, 5169 querySelectorAll() { 5170 return []; 5171 }, 5172 getElementById() { 5173 return null; 5174 }, 5175 createEvent() { 5176 return { 5177 initEvent() { 5178 } 5179 }; 5180 }, 5181 createElement() { 5182 return { 5183 children: [], 5184 childNodes: [], 5185 style: {}, 5186 setAttribute() { 5187 }, 5188 getElementsByTagName() { 5189 return []; 5190 } 5191 }; 5192 }, 5193 createElementNS() { 5194 return {}; 5195 }, 5196 importNode() { 5197 return null; 5198 }, 5199 location: { 5200 hash: "", 5201 host: "", 5202 hostname: "", 5203 href: "", 5204 origin: "", 5205 pathname: "", 5206 protocol: "", 5207 search: "" 5208 } 5209 }; 5210 function getDocument() { 5211 const doc = typeof document !== "undefined" ? document : {}; 5212 extend(doc, ssrDocument); 5213 return doc; 5214 } 5215 var ssrWindow = { 5216 document: ssrDocument, 5217 navigator: { 5218 userAgent: "" 5219 }, 5220 location: { 5221 hash: "", 5222 host: "", 5223 hostname: "", 5224 href: "", 5225 origin: "", 5226 pathname: "", 5227 protocol: "", 5228 search: "" 5229 }, 5230 history: { 5231 replaceState() { 5232 }, 5233 pushState() { 5234 }, 5235 go() { 5236 }, 5237 back() { 5238 } 5239 }, 5240 CustomEvent: function CustomEvent() { 5241 return this; 5242 }, 5243 addEventListener() { 5244 }, 5245 removeEventListener() { 5246 }, 5247 getComputedStyle() { 5248 return { 5249 getPropertyValue() { 5250 return ""; 5251 } 5252 }; 5253 }, 5254 Image() { 5255 }, 5256 Date() { 5257 }, 5258 screen: {}, 5259 setTimeout() { 5260 }, 5261 clearTimeout() { 5262 }, 5263 matchMedia() { 5264 return {}; 5265 }, 5266 requestAnimationFrame(callback) { 5267 if (typeof setTimeout === "undefined") { 5268 callback(); 5269 return null; 5270 } 5271 return setTimeout(callback, 0); 5272 }, 5273 cancelAnimationFrame(id) { 5274 if (typeof setTimeout === "undefined") { 5275 return; 5276 } 5277 clearTimeout(id); 5278 } 5279 }; 5280 function getWindow() { 5281 const win = typeof window !== "undefined" ? window : {}; 5282 extend(win, ssrWindow); 5283 return win; 5284 } 5285 5286
vendor: 20,669 bytes, lines 5286-5968
5286// node_modules/dom7/dom7.esm.js 5287 function makeReactive(obj) { 5288 const proto = obj.__proto__; 5289 Object.defineProperty(obj, "__proto__", { 5290 get() { 5291 return proto; 5292 }, 5293 set(value) { 5294 proto.__proto__ = value; 5295 } 5296 }); 5297 } 5298 var Dom7 = class extends Array { 5299 constructor(items) { 5300 if (typeof items === "number") { 5301 super(items); 5302 } else { 5303 super(...items || []); 5304 makeReactive(this); 5305 } 5306 } 5307 }; 5308 function arrayFlat(arr = []) { 5309 const res = []; 5310 arr.forEach((el) => { 5311 if (Array.isArray(el)) { 5312 res.push(...arrayFlat(el)); 5313 } else { 5314 res.push(el); 5315 } 5316 }); 5317 return res; 5318 } 5319 function arrayFilter(arr, callback) { 5320 return Array.prototype.filter.call(arr, callback); 5321 } 5322 function arrayUnique(arr) { 5323 const uniqueArray = []; 5324 for (let i = 0; i < arr.length; i += 1) { 5325 if (uniqueArray.indexOf(arr[i]) === -1) 5326 uniqueArray.push(arr[i]); 5327 } 5328 return uniqueArray; 5329 } 5330 function qsa(selector, context) { 5331 if (typeof selector !== "string") { 5332 return [selector]; 5333 } 5334 const a = []; 5335 const res = context.querySelectorAll(selector); 5336 for (let i = 0; i < res.length; i += 1) { 5337 a.push(res[i]); 5338 } 5339 return a; 5340 } 5341 function $(selector, context) { 5342 const window2 = getWindow(); 5343 const document2 = getDocument(); 5344 let arr = []; 5345 if (!context && selector instanceof Dom7) { 5346 return selector; 5347 } 5348 if (!selector) { 5349 return new Dom7(arr); 5350 } 5351 if (typeof selector === "string") { 5352 const html2 = selector.trim(); 5353 if (html2.indexOf("<") >= 0 && html2.indexOf(">") >= 0) { 5354 let toCreate = "div"; 5355 if (html2.indexOf("<li") === 0) 5356 toCreate = "ul"; 5357 if (html2.indexOf("<tr") === 0) 5358 toCreate = "tbody"; 5359 if (html2.indexOf("<td") === 0 || html2.indexOf("<th") === 0) 5360 toCreate = "tr"; 5361 if (html2.indexOf("<tbody") === 0) 5362 toCreate = "table"; 5363 if (html2.indexOf("<option") === 0) 5364 toCreate = "select"; 5365 const tempParent = document2.createElement(toCreate); 5366 tempParent.innerHTML = html2; 5367 for (let i = 0; i < tempParent.childNodes.length; i += 1) { 5368 arr.push(tempParent.childNodes[i]); 5369 } 5370 } else { 5371 arr = qsa(selector.trim(), context || document2); 5372 } 5373 } else if (selector.nodeType || selector === window2 || selector === document2) { 5374 arr.push(selector); 5375 } else if (Array.isArray(selector)) { 5376 if (selector instanceof Dom7) 5377 return selector; 5378 arr = selector; 5379 } 5380 return new Dom7(arrayUnique(arr)); 5381 } 5382 $.fn = Dom7.prototype; 5383 function addClass(...classes) { 5384 const classNames = arrayFlat(classes.map((c) => c.split(" "))); 5385 this.forEach((el) => { 5386 el.classList.add(...classNames); 5387 }); 5388 return this; 5389 } 5390 function removeClass(...classes) { 5391 const classNames = arrayFlat(classes.map((c) => c.split(" "))); 5392 this.forEach((el) => { 5393 el.classList.remove(...classNames); 5394 }); 5395 return this; 5396 } 5397 function toggleClass(...classes) { 5398 const classNames = arrayFlat(classes.map((c) => c.split(" "))); 5399 this.forEach((el) => { 5400 classNames.forEach((className) => { 5401 el.classList.toggle(className); 5402 }); 5403 }); 5404 } 5405 function hasClass(...classes) { 5406 const classNames = arrayFlat(classes.map((c) => c.split(" "))); 5407 return arrayFilter(this, (el) => { 5408 return classNames.filter((className) => el.classList.contains(className)).length > 0; 5409 }).length > 0; 5410 } 5411 function attr(attrs, value) { 5412 if (arguments.length === 1 && typeof attrs === "string") { 5413 if (this[0]) 5414 return this[0].getAttribute(attrs); 5415 return void 0; 5416 } 5417 for (let i = 0; i < this.length; i += 1) { 5418 if (arguments.length === 2) { 5419 this[i].setAttribute(attrs, value); 5420 } else { 5421 for (const attrName in attrs) { 5422 this[i][attrName] = attrs[attrName]; 5423 this[i].setAttribute(attrName, attrs[attrName]); 5424 } 5425 } 5426 } 5427 return this; 5428 } 5429 function removeAttr(attr2) { 5430 for (let i = 0; i < this.length; i += 1) { 5431 this[i].removeAttribute(attr2); 5432 } 5433 return this; 5434 } 5435 function transform(transform2) { 5436 for (let i = 0; i < this.length; i += 1) { 5437 this[i].style.transform = transform2; 5438 } 5439 return this; 5440 } 5441 function transition(duration) { 5442 for (let i = 0; i < this.length; i += 1) { 5443 this[i].style.transitionDuration = typeof duration !== "string" ? `${duration}ms` : duration; 5444 } 5445 return this; 5446 } 5447 function on(...args) { 5448 let [eventType, targetSelector, listener, capture] = args; 5449 if (typeof args[1] === "function") { 5450 [eventType, listener, capture] = args; 5451 targetSelector = void 0; 5452 } 5453 if (!capture) 5454 capture = false; 5455 function handleLiveEvent(e) { 5456 const target = e.target; 5457 if (!target) 5458 return; 5459 const eventData = e.target.dom7EventData || []; 5460 if (eventData.indexOf(e) < 0) { 5461 eventData.unshift(e); 5462 } 5463 if ($(target).is(targetSelector)) 5464 listener.apply(target, eventData); 5465 else { 5466 const parents2 = $(target).parents(); 5467 for (let k = 0; k < parents2.length; k += 1) { 5468 if ($(parents2[k]).is(targetSelector)) 5469 listener.apply(parents2[k], eventData); 5470 } 5471 } 5472 } 5473 function handleEvent(e) { 5474 const eventData = e && e.target ? e.target.dom7EventData || [] : []; 5475 if (eventData.indexOf(e) < 0) { 5476 eventData.unshift(e); 5477 } 5478 listener.apply(this, eventData); 5479 } 5480 const events2 = eventType.split(" "); 5481 let j; 5482 for (let i = 0; i < this.length; i += 1) { 5483 const el = this[i]; 5484 if (!targetSelector) { 5485 for (j = 0; j < events2.length; j += 1) { 5486 const event2 = events2[j]; 5487 if (!el.dom7Listeners) 5488 el.dom7Listeners = {}; 5489 if (!el.dom7Listeners[event2]) 5490 el.dom7Listeners[event2] = []; 5491 el.dom7Listeners[event2].push({ 5492 listener, 5493 proxyListener: handleEvent 5494 }); 5495 el.addEventListener(event2, handleEvent, capture); 5496 } 5497 } else { 5498 for (j = 0; j < events2.length; j += 1) { 5499 const event2 = events2[j]; 5500 if (!el.dom7LiveListeners) 5501 el.dom7LiveListeners = {}; 5502 if (!el.dom7LiveListeners[event2]) 5503 el.dom7LiveListeners[event2] = []; 5504 el.dom7LiveListeners[event2].push({ 5505 listener, 5506 proxyListener: handleLiveEvent 5507 }); 5508 el.addEventListener(event2, handleLiveEvent, capture); 5509 } 5510 } 5511 } 5512 return this; 5513 } 5514 function off(...args) { 5515 let [eventType, targetSelector, listener, capture] = args; 5516 if (typeof args[1] === "function") { 5517 [eventType, listener, capture] = args; 5518 targetSelector = void 0; 5519 } 5520 if (!capture) 5521 capture = false; 5522 const events2 = eventType.split(" "); 5523 for (let i = 0; i < events2.length; i += 1) { 5524 const event2 = events2[i]; 5525 for (let j = 0; j < this.length; j += 1) { 5526 const el = this[j]; 5527 let handlers; 5528 if (!targetSelector && el.dom7Listeners) { 5529 handlers = el.dom7Listeners[event2]; 5530 } else if (targetSelector && el.dom7LiveListeners) { 5531 handlers = el.dom7LiveListeners[event2]; 5532 } 5533 if (handlers && handlers.length) { 5534 for (let k = handlers.length - 1; k >= 0; k -= 1) { 5535 const handler = handlers[k]; 5536 if (listener && handler.listener === listener) { 5537 el.removeEventListener(event2, handler.proxyListener, capture); 5538 handlers.splice(k, 1); 5539 } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { 5540 el.removeEventListener(event2, handler.proxyListener, capture); 5541 handlers.splice(k, 1); 5542 } else if (!listener) { 5543 el.removeEventListener(event2, handler.proxyListener, capture); 5544 handlers.splice(k, 1); 5545 } 5546 } 5547 } 5548 } 5549 } 5550 return this; 5551 } 5552 function trigger(...args) { 5553 const window2 = getWindow(); 5554 const events2 = args[0].split(" "); 5555 const eventData = args[1]; 5556 for (let i = 0; i < events2.length; i += 1) { 5557 const event2 = events2[i]; 5558 for (let j = 0; j < this.length; j += 1) { 5559 const el = this[j]; 5560 if (window2.CustomEvent) { 5561 const evt = new window2.CustomEvent(event2, { 5562 detail: eventData, 5563 bubbles: true, 5564 cancelable: true 5565 }); 5566 el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); 5567 el.dispatchEvent(evt); 5568 el.dom7EventData = []; 5569 delete el.dom7EventData; 5570 } 5571 } 5572 } 5573 return this; 5574 } 5575 function transitionEnd(callback) { 5576 const dom = this; 5577 function fireCallBack(e) { 5578 if (e.target !== this) 5579 return; 5580 callback.call(this, e); 5581 dom.off("transitionend", fireCallBack); 5582 } 5583 if (callback) { 5584 dom.on("transitionend", fireCallBack); 5585 } 5586 return this; 5587 } 5588 function outerWidth(includeMargins) { 5589 if (this.length > 0) { 5590 if (includeMargins) { 5591 const styles2 = this.styles(); 5592 return this[0].offsetWidth + parseFloat(styles2.getPropertyValue("margin-right")) + parseFloat(styles2.getPropertyValue("margin-left")); 5593 } 5594 return this[0].offsetWidth; 5595 } 5596 return null; 5597 } 5598 function outerHeight(includeMargins) { 5599 if (this.length > 0) { 5600 if (includeMargins) { 5601 const styles2 = this.styles(); 5602 return this[0].offsetHeight + parseFloat(styles2.getPropertyValue("margin-top")) + parseFloat(styles2.getPropertyValue("margin-bottom")); 5603 } 5604 return this[0].offsetHeight; 5605 } 5606 return null; 5607 } 5608 function offset() { 5609 if (this.length > 0) { 5610 const window2 = getWindow(); 5611 const document2 = getDocument(); 5612 const el = this[0]; 5613 const box = el.getBoundingClientRect(); 5614 const body = document2.body; 5615 const clientTop = el.clientTop || body.clientTop || 0; 5616 const clientLeft = el.clientLeft || body.clientLeft || 0; 5617 const scrollTop = el === window2 ? window2.scrollY : el.scrollTop; 5618 const scrollLeft = el === window2 ? window2.scrollX : el.scrollLeft; 5619 return { 5620 top: box.top + scrollTop - clientTop, 5621 left: box.left + scrollLeft - clientLeft 5622 }; 5623 } 5624 return null; 5625 } 5626 function styles() { 5627 const window2 = getWindow(); 5628 if (this[0]) 5629 return window2.getComputedStyle(this[0], null); 5630 return {}; 5631 } 5632 function css(props, value) { 5633 const window2 = getWindow(); 5634 let i; 5635 if (arguments.length === 1) { 5636 if (typeof props === "string") { 5637 if (this[0]) 5638 return window2.getComputedStyle(this[0], null).getPropertyValue(props); 5639 } else { 5640 for (i = 0; i < this.length; i += 1) { 5641 for (const prop in props) { 5642 this[i].style[prop] = props[prop]; 5643 } 5644 } 5645 return this; 5646 } 5647 } 5648 if (arguments.length === 2 && typeof props === "string") { 5649 for (i = 0; i < this.length; i += 1) { 5650 this[i].style[props] = value; 5651 } 5652 return this; 5653 } 5654 return this; 5655 } 5656 function each(callback) { 5657 if (!callback) 5658 return this; 5659 this.forEach((el, index2) => { 5660 callback.apply(el, [el, index2]); 5661 }); 5662 return this; 5663 } 5664 function filter(callback) { 5665 const result = arrayFilter(this, callback); 5666 return $(result); 5667 } 5668 function html(html2) { 5669 if (typeof html2 === "undefined") { 5670 return this[0] ? this[0].innerHTML : null; 5671 } 5672 for (let i = 0; i < this.length; i += 1) { 5673 this[i].innerHTML = html2; 5674 } 5675 return this; 5676 } 5677 function text(text2) { 5678 if (typeof text2 === "undefined") { 5679 return this[0] ? this[0].textContent.trim() : null; 5680 } 5681 for (let i = 0; i < this.length; i += 1) { 5682 this[i].textContent = text2; 5683 } 5684 return this; 5685 } 5686 function is(selector) { 5687 const window2 = getWindow(); 5688 const document2 = getDocument(); 5689 const el = this[0]; 5690 let compareWith; 5691 let i; 5692 if (!el || typeof selector === "undefined") 5693 return false; 5694 if (typeof selector === "string") { 5695 if (el.matches) 5696 return el.matches(selector); 5697 if (el.webkitMatchesSelector) 5698 return el.webkitMatchesSelector(selector); 5699 if (el.msMatchesSelector) 5700 return el.msMatchesSelector(selector); 5701 compareWith = $(selector); 5702 for (i = 0; i < compareWith.length; i += 1) { 5703 if (compareWith[i] === el) 5704 return true; 5705 } 5706 return false; 5707 } 5708 if (selector === document2) { 5709 return el === document2; 5710 } 5711 if (selector === window2) { 5712 return el === window2; 5713 } 5714 if (selector.nodeType || selector instanceof Dom7) { 5715 compareWith = selector.nodeType ? [selector] : selector; 5716 for (i = 0; i < compareWith.length; i += 1) { 5717 if (compareWith[i] === el) 5718 return true; 5719 } 5720 return false; 5721 } 5722 return false; 5723 } 5724 function index() { 5725 let child = this[0]; 5726 let i; 5727 if (child) { 5728 i = 0; 5729 while ((child = child.previousSibling) !== null) { 5730 if (child.nodeType === 1) 5731 i += 1; 5732 } 5733 return i; 5734 } 5735 return void 0; 5736 } 5737 function eq(index2) { 5738 if (typeof index2 === "undefined") 5739 return this; 5740 const length = this.length; 5741 if (index2 > length - 1) { 5742 return $([]); 5743 } 5744 if (index2 < 0) { 5745 const returnIndex = length + index2; 5746 if (returnIndex < 0) 5747 return $([]); 5748 return $([this[returnIndex]]); 5749 } 5750 return $([this[index2]]); 5751 } 5752 function append(...els) { 5753 let newChild; 5754 const document2 = getDocument(); 5755 for (let k = 0; k < els.length; k += 1) { 5756 newChild = els[k]; 5757 for (let i = 0; i < this.length; i += 1) { 5758 if (typeof newChild === "string") { 5759 const tempDiv = document2.createElement("div"); 5760 tempDiv.innerHTML = newChild; 5761 while (tempDiv.firstChild) { 5762 this[i].appendChild(tempDiv.firstChild); 5763 } 5764 } else if (newChild instanceof Dom7) { 5765 for (let j = 0; j < newChild.length; j += 1) { 5766 this[i].appendChild(newChild[j]); 5767 } 5768 } else { 5769 this[i].appendChild(newChild); 5770 } 5771 } 5772 } 5773 return this; 5774 } 5775 function prepend(newChild) { 5776 const document2 = getDocument(); 5777 let i; 5778 let j; 5779 for (i = 0; i < this.length; i += 1) { 5780 if (typeof newChild === "string") { 5781 const tempDiv = document2.createElement("div"); 5782 tempDiv.innerHTML = newChild; 5783 for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { 5784 this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); 5785 } 5786 } else if (newChild instanceof Dom7) { 5787 for (j = 0; j < newChild.length; j += 1) { 5788 this[i].insertBefore(newChild[j], this[i].childNodes[0]); 5789 } 5790 } else { 5791 this[i].insertBefore(newChild, this[i].childNodes[0]); 5792 } 5793 } 5794 return this; 5795 } 5796 function next(selector) { 5797 if (this.length > 0) { 5798 if (selector) { 5799 if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { 5800 return $([this[0].nextElementSibling]); 5801 } 5802 return $([]); 5803 } 5804 if (this[0].nextElementSibling) 5805 return $([this[0].nextElementSibling]); 5806 return $([]); 5807 } 5808 return $([]); 5809 } 5810 function nextAll(selector) { 5811 const nextEls = []; 5812 let el = this[0]; 5813 if (!el) 5814 return $([]); 5815 while (el.nextElementSibling) { 5816 const next2 = el.nextElementSibling; 5817 if (selector) { 5818 if ($(next2).is(selector)) 5819 nextEls.push(next2); 5820 } else 5821 nextEls.push(next2); 5822 el = next2; 5823 } 5824 return $(nextEls); 5825 } 5826 function prev(selector) { 5827 if (this.length > 0) { 5828 const el = this[0]; 5829 if (selector) { 5830 if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { 5831 return $([el.previousElementSibling]); 5832 } 5833 return $([]); 5834 } 5835 if (el.previousElementSibling) 5836 return $([el.previousElementSibling]); 5837 return $([]); 5838 } 5839 return $([]); 5840 } 5841 function prevAll(selector) { 5842 const prevEls = []; 5843 let el = this[0]; 5844 if (!el) 5845 return $([]); 5846 while (el.previousElementSibling) { 5847 const prev2 = el.previousElementSibling; 5848 if (selector) { 5849 if ($(prev2).is(selector)) 5850 prevEls.push(prev2); 5851 } else 5852 prevEls.push(prev2); 5853 el = prev2; 5854 } 5855 return $(prevEls); 5856 } 5857 function parent(selector) { 5858 const parents2 = []; 5859 for (let i = 0; i < this.length; i += 1) { 5860 if (this[i].parentNode !== null) { 5861 if (selector) { 5862 if ($(this[i].parentNode).is(selector)) 5863 parents2.push(this[i].parentNode); 5864 } else { 5865 parents2.push(this[i].parentNode); 5866 } 5867 } 5868 } 5869 return $(parents2); 5870 } 5871 function parents(selector) { 5872 const parents2 = []; 5873 for (let i = 0; i < this.length; i += 1) { 5874 let parent2 = this[i].parentNode; 5875 while (parent2) { 5876 if (selector) { 5877 if ($(parent2).is(selector)) 5878 parents2.push(parent2); 5879 } else { 5880 parents2.push(parent2); 5881 } 5882 parent2 = parent2.parentNode; 5883 } 5884 } 5885 return $(parents2); 5886 } 5887 function closest(selector) { 5888 let closest2 = this; 5889 if (typeof selector === "undefined") { 5890 return $([]); 5891 } 5892 if (!closest2.is(selector)) { 5893 closest2 = closest2.parents(selector).eq(0); 5894 } 5895 return closest2; 5896 } 5897 function find(selector) { 5898 const foundElements = []; 5899 for (let i = 0; i < this.length; i += 1) { 5900 const found = this[i].querySelectorAll(selector); 5901 for (let j = 0; j < found.length; j += 1) { 5902 foundElements.push(found[j]); 5903 } 5904 } 5905 return $(foundElements); 5906 } 5907 function children(selector) { 5908 const children2 = []; 5909 for (let i = 0; i < this.length; i += 1) { 5910 const childNodes = this[i].children; 5911 for (let j = 0; j < childNodes.length; j += 1) { 5912 if (!selector || $(childNodes[j]).is(selector)) { 5913 children2.push(childNodes[j]); 5914 } 5915 } 5916 } 5917 return $(children2); 5918 } 5919 function remove() { 5920 for (let i = 0; i < this.length; i += 1) { 5921 if (this[i].parentNode) 5922 this[i].parentNode.removeChild(this[i]); 5923 } 5924 return this; 5925 } 5926 var noTrigger = "resize scroll".split(" "); 5927 function shortcut(name) { 5928 function eventHandler(...args) { 5929 if (typeof args[0] === "undefined") { 5930 for (let i = 0; i < this.length; i += 1) { 5931 if (noTrigger.indexOf(name) < 0) { 5932 if (name in this[i]) 5933 this[i][name](); 5934 else { 5935 $(this[i]).trigger(name); 5936 } 5937 } 5938 } 5939 return this; 5940 } 5941 return this.on(name, ...args); 5942 } 5943 return eventHandler; 5944 } 5945 var click = shortcut("click"); 5946 var blur = shortcut("blur"); 5947 var focus = shortcut("focus"); 5948 var focusin = shortcut("focusin"); 5949 var focusout = shortcut("focusout"); 5950 var keyup = shortcut("keyup"); 5951 var keydown = shortcut("keydown"); 5952 var keypress = shortcut("keypress"); 5953 var submit = shortcut("submit"); 5954 var change = shortcut("change"); 5955 var mousedown = shortcut("mousedown"); 5956 var mousemove = shortcut("mousemove"); 5957 var mouseup = shortcut("mouseup"); 5958 var mouseenter = shortcut("mouseenter"); 5959 var mouseleave = shortcut("mouseleave"); 5960 var mouseout = shortcut("mouseout"); 5961 var mouseover = shortcut("mouseover"); 5962 var touchstart = shortcut("touchstart"); 5963 var touchend = shortcut("touchend"); 5964 var touchmove = shortcut("touchmove"); 5965 var resize = shortcut("resize"); 5966 var scroll = shortcut("scroll"); 5967 5968
vendor: 744 bytes, lines 5968-6015
5968// node_modules/swiper/shared/dom.js 5969 var Methods = { 5970 addClass, 5971 removeClass, 5972 hasClass, 5973 toggleClass, 5974 attr, 5975 removeAttr, 5976 transform, 5977 transition, 5978 on, 5979 off, 5980 trigger, 5981 transitionEnd, 5982 outerWidth, 5983 outerHeight, 5984 styles, 5985 offset, 5986 css, 5987 each, 5988 html, 5989 text, 5990 is, 5991 index, 5992 eq, 5993 append, 5994 prepend, 5995 next, 5996 nextAll, 5997 prev, 5998 prevAll, 5999 parent, 6000 parents, 6001 closest, 6002 find, 6003 children, 6004 filter, 6005 remove 6006 }; 6007 Object.keys(Methods).forEach((methodName) => { 6008 Object.defineProperty($.fn, methodName, { 6009 value: Methods[methodName], 6010 writable: true 6011 }); 6012 }); 6013 var dom_default = $; 6014 6015
vendor: 5,903 bytes, lines 6015-6175
6015// node_modules/swiper/shared/utils.js 6016 function deleteProps(obj) { 6017 const object = obj; 6018 Object.keys(object).forEach((key) => { 6019 try { 6020 object[key] = null; 6021 } catch (e) { 6022 } 6023 try { 6024 delete object[key]; 6025 } catch (e) { 6026 } 6027 }); 6028 } 6029 function nextTick(callback, delay = 0) { 6030 return setTimeout(callback, delay); 6031 } 6032 function now() { 6033 return Date.now(); 6034 } 6035 function getComputedStyle2(el) { 6036 const window2 = getWindow(); 6037 let style; 6038 if (window2.getComputedStyle) { 6039 style = window2.getComputedStyle(el, null); 6040 } 6041 if (!style && el.currentStyle) { 6042 style = el.currentStyle; 6043 } 6044 if (!style) { 6045 style = el.style; 6046 } 6047 return style; 6048 } 6049 function getTranslate(el, axis = "x") { 6050 const window2 = getWindow(); 6051 let matrix; 6052 let curTransform; 6053 let transformMatrix; 6054 const curStyle = getComputedStyle2(el, null); 6055 if (window2.WebKitCSSMatrix) { 6056 curTransform = curStyle.transform || curStyle.webkitTransform; 6057 if (curTransform.split(",").length > 6) { 6058 curTransform = curTransform.split(", ").map((a) => a.replace(",", ".")).join(", "); 6059 } 6060 transformMatrix = new window2.WebKitCSSMatrix(curTransform === "none" ? "" : curTransform); 6061 } else { 6062 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"); 6063 matrix = transformMatrix.toString().split(","); 6064 } 6065 if (axis === "x") { 6066 if (window2.WebKitCSSMatrix) 6067 curTransform = transformMatrix.m41; 6068 else if (matrix.length === 16) 6069 curTransform = parseFloat(matrix[12]); 6070 else 6071 curTransform = parseFloat(matrix[4]); 6072 } 6073 if (axis === "y") { 6074 if (window2.WebKitCSSMatrix) 6075 curTransform = transformMatrix.m42; 6076 else if (matrix.length === 16) 6077 curTransform = parseFloat(matrix[13]); 6078 else 6079 curTransform = parseFloat(matrix[5]); 6080 } 6081 return curTransform || 0; 6082 } 6083 function isObject2(o) { 6084 return typeof o === "object" && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === "Object"; 6085 } 6086 function isNode(node) { 6087 if (typeof window !== "undefined" && typeof window.HTMLElement !== "undefined") { 6088 return node instanceof HTMLElement; 6089 } 6090 return node && (node.nodeType === 1 || node.nodeType === 11); 6091 } 6092 function extend2(...args) { 6093 const to = Object(args[0]); 6094 const noExtend = ["__proto__", "constructor", "prototype"]; 6095 for (let i = 1; i < args.length; i += 1) { 6096 const nextSource = args[i]; 6097 if (nextSource !== void 0 && nextSource !== null && !isNode(nextSource)) { 6098 const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0); 6099 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 6100 const nextKey = keysArray[nextIndex]; 6101 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 6102 if (desc !== void 0 && desc.enumerable) { 6103 if (isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) { 6104 if (nextSource[nextKey].__swiper__) { 6105 to[nextKey] = nextSource[nextKey]; 6106 } else { 6107 extend2(to[nextKey], nextSource[nextKey]); 6108 } 6109 } else if (!isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) { 6110 to[nextKey] = {}; 6111 if (nextSource[nextKey].__swiper__) { 6112 to[nextKey] = nextSource[nextKey]; 6113 } else { 6114 extend2(to[nextKey], nextSource[nextKey]); 6115 } 6116 } else { 6117 to[nextKey] = nextSource[nextKey]; 6118 } 6119 } 6120 } 6121 } 6122 } 6123 return to; 6124 } 6125 function setCSSProperty(el, varName, varValue) { 6126 el.style.setProperty(varName, varValue); 6127 } 6128 function animateCSSModeScroll({ 6129 swiper, 6130 targetPosition, 6131 side 6132 }) { 6133 const window2 = getWindow(); 6134 const startPosition = -swiper.translate; 6135 let startTime = null; 6136 let time; 6137 const duration = swiper.params.speed; 6138 swiper.wrapperEl.style.scrollSnapType = "none"; 6139 window2.cancelAnimationFrame(swiper.cssModeFrameID); 6140 const dir = targetPosition > startPosition ? "next" : "prev"; 6141 const isOutOfBound = (current, target) => { 6142 return dir === "next" && current >= target || dir === "prev" && current <= target; 6143 }; 6144 const animate = () => { 6145 time = new Date().getTime(); 6146 if (startTime === null) { 6147 startTime = time; 6148 } 6149 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 6150 const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; 6151 let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); 6152 if (isOutOfBound(currentPosition, targetPosition)) { 6153 currentPosition = targetPosition; 6154 } 6155 swiper.wrapperEl.scrollTo({ 6156 [side]: currentPosition 6157 }); 6158 if (isOutOfBound(currentPosition, targetPosition)) { 6159 swiper.wrapperEl.style.overflow = "hidden"; 6160 swiper.wrapperEl.style.scrollSnapType = ""; 6161 setTimeout(() => { 6162 swiper.wrapperEl.style.overflow = ""; 6163 swiper.wrapperEl.scrollTo({ 6164 [side]: currentPosition 6165 }); 6166 }); 6167 window2.cancelAnimationFrame(swiper.cssModeFrameID); 6168 return; 6169 } 6170 swiper.cssModeFrameID = window2.requestAnimationFrame(animate); 6171 }; 6172 animate(); 6173 } 6174 6175
vendor: 1,040 bytes, lines 6175-6208
6175// node_modules/swiper/shared/get-support.js 6176 var support; 6177 function calcSupport() { 6178 const window2 = getWindow(); 6179 const document2 = getDocument(); 6180 return { 6181 smoothScroll: document2.documentElement && "scrollBehavior" in document2.documentElement.style, 6182 touch: !!("ontouchstart" in window2 || window2.DocumentTouch && document2 instanceof window2.DocumentTouch), 6183 passiveListener: function checkPassiveListener() { 6184 let supportsPassive = false; 6185 try { 6186 const opts = Object.defineProperty({}, "passive", { 6187 get() { 6188 supportsPassive = true; 6189 } 6190 }); 6191 window2.addEventListener("testPassiveListener", null, opts); 6192 } catch (e) { 6193 } 6194 return supportsPassive; 6195 }(), 6196 gestures: function checkGestures() { 6197 return "ongesturestart" in window2; 6198 }() 6199 }; 6200 } 6201 function getSupport() { 6202 if (!support) { 6203 support = calcSupport(); 6204 } 6205 return support; 6206 } 6207 6208
vendor: 1,604 bytes, lines 6208-6253
6208// node_modules/swiper/shared/get-device.js 6209 var deviceCached; 6210 function calcDevice({ 6211 userAgent 6212 } = {}) { 6213 const support2 = getSupport(); 6214 const window2 = getWindow(); 6215 const platform = window2.navigator.platform; 6216 const ua = userAgent || window2.navigator.userAgent; 6217 const device = { 6218 ios: false, 6219 android: false 6220 }; 6221 const screenWidth = window2.screen.width; 6222 const screenHeight = window2.screen.height; 6223 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); 6224 let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 6225 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 6226 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 6227 const windows = platform === "Win32"; 6228 let macos = platform === "MacIntel"; 6229 const iPadScreens = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"]; 6230 if (!ipad && macos && support2.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { 6231 ipad = ua.match(/(Version)\/([\d.]+)/); 6232 if (!ipad) 6233 ipad = [0, 1, "13_0_0"]; 6234 macos = false; 6235 } 6236 if (android && !windows) { 6237 device.os = "android"; 6238 device.android = true; 6239 } 6240 if (ipad || iphone || ipod) { 6241 device.os = "ios"; 6242 device.ios = true; 6243 } 6244 return device; 6245 } 6246 function getDevice(overrides = {}) { 6247 if (!deviceCached) { 6248 deviceCached = calcDevice(overrides); 6249 } 6250 return deviceCached; 6251 } 6252 6253
vendor: 589 bytes, lines 6253-6273
6253// node_modules/swiper/shared/get-browser.js 6254 var browser; 6255 function calcBrowser() { 6256 const window2 = getWindow(); 6257 function isSafari() { 6258 const ua = window2.navigator.userAgent.toLowerCase(); 6259 return ua.indexOf("safari") >= 0 && ua.indexOf("chrome") < 0 && ua.indexOf("android") < 0; 6260 } 6261 return { 6262 isSafari: isSafari(), 6263 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window2.navigator.userAgent) 6264 }; 6265 } 6266 function getBrowser() { 6267 if (!browser) { 6268 browser = calcBrowser(); 6269 } 6270 return browser; 6271 } 6272 6273
vendor: 2,471 bytes, lines 6273-6345
6273// node_modules/swiper/core/modules/resize/resize.js 6274 function Resize({ 6275 swiper, 6276 on: on2, 6277 emit 6278 }) { 6279 const window2 = getWindow(); 6280 let observer = null; 6281 let animationFrame = null; 6282 const resizeHandler = () => { 6283 if (!swiper || swiper.destroyed || !swiper.initialized) 6284 return; 6285 emit("beforeResize"); 6286 emit("resize"); 6287 }; 6288 const createObserver = () => { 6289 if (!swiper || swiper.destroyed || !swiper.initialized) 6290 return; 6291 observer = new ResizeObserver((entries) => { 6292 animationFrame = window2.requestAnimationFrame(() => { 6293 const { 6294 width, 6295 height 6296 } = swiper; 6297 let newWidth = width; 6298 let newHeight = height; 6299 entries.forEach(({ 6300 contentBoxSize, 6301 contentRect, 6302 target 6303 }) => { 6304 if (target && target !== swiper.el) 6305 return; 6306 newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; 6307 newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; 6308 }); 6309 if (newWidth !== width || newHeight !== height) { 6310 resizeHandler(); 6311 } 6312 }); 6313 }); 6314 observer.observe(swiper.el); 6315 }; 6316 const removeObserver = () => { 6317 if (animationFrame) { 6318 window2.cancelAnimationFrame(animationFrame); 6319 } 6320 if (observer && observer.unobserve && swiper.el) { 6321 observer.unobserve(swiper.el); 6322 observer = null; 6323 } 6324 }; 6325 const orientationChangeHandler = () => { 6326 if (!swiper || swiper.destroyed || !swiper.initialized) 6327 return; 6328 emit("orientationchange"); 6329 }; 6330 on2("init", () => { 6331 if (swiper.params.resizeObserver && typeof window2.ResizeObserver !== "undefined") { 6332 createObserver(); 6333 return; 6334 } 6335 window2.addEventListener("resize", resizeHandler); 6336 window2.addEventListener("orientationchange", orientationChangeHandler); 6337 }); 6338 on2("destroy", () => { 6339 removeObserver(); 6340 window2.removeEventListener("resize", resizeHandler); 6341 window2.removeEventListener("orientationchange", orientationChangeHandler); 6342 }); 6343 } 6344 6345
vendor: 2,122 bytes, lines 6345-6408
6345// node_modules/swiper/core/modules/observer/observer.js 6346 function Observer({ 6347 swiper, 6348 extendParams, 6349 on: on2, 6350 emit 6351 }) { 6352 const observers = []; 6353 const window2 = getWindow(); 6354 const attach = (target, options = {}) => { 6355 const ObserverFunc = window2.MutationObserver || window2.WebkitMutationObserver; 6356 const observer = new ObserverFunc((mutations) => { 6357 if (mutations.length === 1) { 6358 emit("observerUpdate", mutations[0]); 6359 return; 6360 } 6361 const observerUpdate = function observerUpdate2() { 6362 emit("observerUpdate", mutations[0]); 6363 }; 6364 if (window2.requestAnimationFrame) { 6365 window2.requestAnimationFrame(observerUpdate); 6366 } else { 6367 window2.setTimeout(observerUpdate, 0); 6368 } 6369 }); 6370 observer.observe(target, { 6371 attributes: typeof options.attributes === "undefined" ? true : options.attributes, 6372 childList: typeof options.childList === "undefined" ? true : options.childList, 6373 characterData: typeof options.characterData === "undefined" ? true : options.characterData 6374 }); 6375 observers.push(observer); 6376 }; 6377 const init = () => { 6378 if (!swiper.params.observer) 6379 return; 6380 if (swiper.params.observeParents) { 6381 const containerParents = swiper.$el.parents(); 6382 for (let i = 0; i < containerParents.length; i += 1) { 6383 attach(containerParents[i]); 6384 } 6385 } 6386 attach(swiper.$el[0], { 6387 childList: swiper.params.observeSlideChildren 6388 }); 6389 attach(swiper.$wrapperEl[0], { 6390 attributes: false 6391 }); 6392 }; 6393 const destroy = () => { 6394 observers.forEach((observer) => { 6395 observer.disconnect(); 6396 }); 6397 observers.splice(0, observers.length); 6398 }; 6399 extendParams({ 6400 observer: false, 6401 observeParents: false, 6402 observeSlideChildren: false 6403 }); 6404 on2("init", init); 6405 on2("destroy", destroy); 6406 } 6407 6408
vendor: 3,748 bytes, lines 6408-6519
6408// node_modules/swiper/core/events-emitter.js 6409 var events_emitter_default = { 6410 on(events2, handler, priority) { 6411 const self = this; 6412 if (!self.eventsListeners || self.destroyed) 6413 return self; 6414 if (typeof handler !== "function") 6415 return self; 6416 const method = priority ? "unshift" : "push"; 6417 events2.split(" ").forEach((event2) => { 6418 if (!self.eventsListeners[event2]) 6419 self.eventsListeners[event2] = []; 6420 self.eventsListeners[event2][method](handler); 6421 }); 6422 return self; 6423 }, 6424 once(events2, handler, priority) { 6425 const self = this; 6426 if (!self.eventsListeners || self.destroyed) 6427 return self; 6428 if (typeof handler !== "function") 6429 return self; 6430 function onceHandler(...args) { 6431 self.off(events2, onceHandler); 6432 if (onceHandler.__emitterProxy) { 6433 delete onceHandler.__emitterProxy; 6434 } 6435 handler.apply(self, args); 6436 } 6437 onceHandler.__emitterProxy = handler; 6438 return self.on(events2, onceHandler, priority); 6439 }, 6440 onAny(handler, priority) { 6441 const self = this; 6442 if (!self.eventsListeners || self.destroyed) 6443 return self; 6444 if (typeof handler !== "function") 6445 return self; 6446 const method = priority ? "unshift" : "push"; 6447 if (self.eventsAnyListeners.indexOf(handler) < 0) { 6448 self.eventsAnyListeners[method](handler); 6449 } 6450 return self; 6451 }, 6452 offAny(handler) { 6453 const self = this; 6454 if (!self.eventsListeners || self.destroyed) 6455 return self; 6456 if (!self.eventsAnyListeners) 6457 return self; 6458 const index2 = self.eventsAnyListeners.indexOf(handler); 6459 if (index2 >= 0) { 6460 self.eventsAnyListeners.splice(index2, 1); 6461 } 6462 return self; 6463 }, 6464 off(events2, handler) { 6465 const self = this; 6466 if (!self.eventsListeners || self.destroyed) 6467 return self; 6468 if (!self.eventsListeners) 6469 return self; 6470 events2.split(" ").forEach((event2) => { 6471 if (typeof handler === "undefined") { 6472 self.eventsListeners[event2] = []; 6473 } else if (self.eventsListeners[event2]) { 6474 self.eventsListeners[event2].forEach((eventHandler, index2) => { 6475 if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { 6476 self.eventsListeners[event2].splice(index2, 1); 6477 } 6478 }); 6479 } 6480 }); 6481 return self; 6482 }, 6483 emit(...args) { 6484 const self = this; 6485 if (!self.eventsListeners || self.destroyed) 6486 return self; 6487 if (!self.eventsListeners) 6488 return self; 6489 let events2; 6490 let data; 6491 let context; 6492 if (typeof args[0] === "string" || Array.isArray(args[0])) { 6493 events2 = args[0]; 6494 data = args.slice(1, args.length); 6495 context = self; 6496 } else { 6497 events2 = args[0].events; 6498 data = args[0].data; 6499 context = args[0].context || self; 6500 } 6501 data.unshift(context); 6502 const eventsArray = Array.isArray(events2) ? events2 : events2.split(" "); 6503 eventsArray.forEach((event2) => { 6504 if (self.eventsAnyListeners && self.eventsAnyListeners.length) { 6505 self.eventsAnyListeners.forEach((eventHandler) => { 6506 eventHandler.apply(context, [event2, ...data]); 6507 }); 6508 } 6509 if (self.eventsListeners && self.eventsListeners[event2]) { 6510 self.eventsListeners[event2].forEach((eventHandler) => { 6511 eventHandler.apply(context, data); 6512 }); 6513 } 6514 }); 6515 return self; 6516 } 6517 }; 6518 6519
vendor: 1,089 bytes, lines 6519-6551
6519// node_modules/swiper/core/update/updateSize.js 6520 function updateSize() { 6521 const swiper = this; 6522 let width; 6523 let height; 6524 const $el = swiper.$el; 6525 if (typeof swiper.params.width !== "undefined" && swiper.params.width !== null) { 6526 width = swiper.params.width; 6527 } else { 6528 width = $el[0].clientWidth; 6529 } 6530 if (typeof swiper.params.height !== "undefined" && swiper.params.height !== null) { 6531 height = swiper.params.height; 6532 } else { 6533 height = $el[0].clientHeight; 6534 } 6535 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 6536 return; 6537 } 6538 width = width - parseInt($el.css("padding-left") || 0, 10) - parseInt($el.css("padding-right") || 0, 10); 6539 height = height - parseInt($el.css("padding-top") || 0, 10) - parseInt($el.css("padding-bottom") || 0, 10); 6540 if (Number.isNaN(width)) 6541 width = 0; 6542 if (Number.isNaN(height)) 6543 height = 0; 6544 Object.assign(swiper, { 6545 width, 6546 height, 6547 size: swiper.isHorizontal() ? width : height 6548 }); 6549 } 6550 6551
vendor: 11,262 bytes, lines 6551-6831
6551// node_modules/swiper/core/update/updateSlides.js 6552 function updateSlides() { 6553 const swiper = this; 6554 function getDirectionLabel(property) { 6555 if (swiper.isHorizontal()) { 6556 return property; 6557 } 6558 return { 6559 "width": "height", 6560 "margin-top": "margin-left", 6561 "margin-bottom ": "margin-right", 6562 "margin-left": "margin-top", 6563 "margin-right": "margin-bottom", 6564 "padding-left": "padding-top", 6565 "padding-right": "padding-bottom", 6566 "marginRight": "marginBottom" 6567 }[property]; 6568 } 6569 function getDirectionPropertyValue(node, label) { 6570 return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); 6571 } 6572 const params = swiper.params; 6573 const { 6574 $wrapperEl, 6575 size: swiperSize, 6576 rtlTranslate: rtl, 6577 wrongRTL 6578 } = swiper; 6579 const isVirtual = swiper.virtual && params.virtual.enabled; 6580 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 6581 const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); 6582 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 6583 let snapGrid = []; 6584 const slidesGrid = []; 6585 const slidesSizesGrid = []; 6586 let offsetBefore = params.slidesOffsetBefore; 6587 if (typeof offsetBefore === "function") { 6588 offsetBefore = params.slidesOffsetBefore.call(swiper); 6589 } 6590 let offsetAfter = params.slidesOffsetAfter; 6591 if (typeof offsetAfter === "function") { 6592 offsetAfter = params.slidesOffsetAfter.call(swiper); 6593 } 6594 const previousSnapGridLength = swiper.snapGrid.length; 6595 const previousSlidesGridLength = swiper.slidesGrid.length; 6596 let spaceBetween = params.spaceBetween; 6597 let slidePosition = -offsetBefore; 6598 let prevSlideSize = 0; 6599 let index2 = 0; 6600 if (typeof swiperSize === "undefined") { 6601 return; 6602 } 6603 if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) { 6604 spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiperSize; 6605 } 6606 swiper.virtualSize = -spaceBetween; 6607 if (rtl) 6608 slides.css({ 6609 marginLeft: "", 6610 marginBottom: "", 6611 marginTop: "" 6612 }); 6613 else 6614 slides.css({ 6615 marginRight: "", 6616 marginBottom: "", 6617 marginTop: "" 6618 }); 6619 if (params.centeredSlides && params.cssMode) { 6620 setCSSProperty(swiper.wrapperEl, "--swiper-centered-offset-before", ""); 6621 setCSSProperty(swiper.wrapperEl, "--swiper-centered-offset-after", ""); 6622 } 6623 const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; 6624 if (gridEnabled) { 6625 swiper.grid.initSlides(slidesLength); 6626 } 6627 let slideSize; 6628 const shouldResetSlideSize = params.slidesPerView === "auto" && params.breakpoints && Object.keys(params.breakpoints).filter((key) => { 6629 return typeof params.breakpoints[key].slidesPerView !== "undefined"; 6630 }).length > 0; 6631 for (let i = 0; i < slidesLength; i += 1) { 6632 slideSize = 0; 6633 const slide = slides.eq(i); 6634 if (gridEnabled) { 6635 swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); 6636 } 6637 if (slide.css("display") === "none") 6638 continue; 6639 if (params.slidesPerView === "auto") { 6640 if (shouldResetSlideSize) { 6641 slides[i].style[getDirectionLabel("width")] = ``; 6642 } 6643 const slideStyles = getComputedStyle(slide[0]); 6644 const currentTransform = slide[0].style.transform; 6645 const currentWebKitTransform = slide[0].style.webkitTransform; 6646 if (currentTransform) { 6647 slide[0].style.transform = "none"; 6648 } 6649 if (currentWebKitTransform) { 6650 slide[0].style.webkitTransform = "none"; 6651 } 6652 if (params.roundLengths) { 6653 slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); 6654 } else { 6655 const width = getDirectionPropertyValue(slideStyles, "width"); 6656 const paddingLeft = getDirectionPropertyValue(slideStyles, "padding-left"); 6657 const paddingRight = getDirectionPropertyValue(slideStyles, "padding-right"); 6658 const marginLeft = getDirectionPropertyValue(slideStyles, "margin-left"); 6659 const marginRight = getDirectionPropertyValue(slideStyles, "margin-right"); 6660 const boxSizing = slideStyles.getPropertyValue("box-sizing"); 6661 if (boxSizing && boxSizing === "border-box") { 6662 slideSize = width + marginLeft + marginRight; 6663 } else { 6664 const { 6665 clientWidth, 6666 offsetWidth 6667 } = slide[0]; 6668 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); 6669 } 6670 } 6671 if (currentTransform) { 6672 slide[0].style.transform = currentTransform; 6673 } 6674 if (currentWebKitTransform) { 6675 slide[0].style.webkitTransform = currentWebKitTransform; 6676 } 6677 if (params.roundLengths) 6678 slideSize = Math.floor(slideSize); 6679 } else { 6680 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 6681 if (params.roundLengths) 6682 slideSize = Math.floor(slideSize); 6683 if (slides[i]) { 6684 slides[i].style[getDirectionLabel("width")] = `${slideSize}px`; 6685 } 6686 } 6687 if (slides[i]) { 6688 slides[i].swiperSlideSize = slideSize; 6689 } 6690 slidesSizesGrid.push(slideSize); 6691 if (params.centeredSlides) { 6692 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 6693 if (prevSlideSize === 0 && i !== 0) 6694 slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 6695 if (i === 0) 6696 slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 6697 if (Math.abs(slidePosition) < 1 / 1e3) 6698 slidePosition = 0; 6699 if (params.roundLengths) 6700 slidePosition = Math.floor(slidePosition); 6701 if (index2 % params.slidesPerGroup === 0) 6702 snapGrid.push(slidePosition); 6703 slidesGrid.push(slidePosition); 6704 } else { 6705 if (params.roundLengths) 6706 slidePosition = Math.floor(slidePosition); 6707 if ((index2 - Math.min(swiper.params.slidesPerGroupSkip, index2)) % swiper.params.slidesPerGroup === 0) 6708 snapGrid.push(slidePosition); 6709 slidesGrid.push(slidePosition); 6710 slidePosition = slidePosition + slideSize + spaceBetween; 6711 } 6712 swiper.virtualSize += slideSize + spaceBetween; 6713 prevSlideSize = slideSize; 6714 index2 += 1; 6715 } 6716 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 6717 if (rtl && wrongRTL && (params.effect === "slide" || params.effect === "coverflow")) { 6718 $wrapperEl.css({ 6719 width: `${swiper.virtualSize + params.spaceBetween}px` 6720 }); 6721 } 6722 if (params.setWrapperSize) { 6723 $wrapperEl.css({ 6724 [getDirectionLabel("width")]: `${swiper.virtualSize + params.spaceBetween}px` 6725 }); 6726 } 6727 if (gridEnabled) { 6728 swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); 6729 } 6730 if (!params.centeredSlides) { 6731 const newSlidesGrid = []; 6732 for (let i = 0; i < snapGrid.length; i += 1) { 6733 let slidesGridItem = snapGrid[i]; 6734 if (params.roundLengths) 6735 slidesGridItem = Math.floor(slidesGridItem); 6736 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 6737 newSlidesGrid.push(slidesGridItem); 6738 } 6739 } 6740 snapGrid = newSlidesGrid; 6741 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 6742 snapGrid.push(swiper.virtualSize - swiperSize); 6743 } 6744 } 6745 if (snapGrid.length === 0) 6746 snapGrid = [0]; 6747 if (params.spaceBetween !== 0) { 6748 const key = swiper.isHorizontal() && rtl ? "marginLeft" : getDirectionLabel("marginRight"); 6749 slides.filter((_, slideIndex) => { 6750 if (!params.cssMode) 6751 return true; 6752 if (slideIndex === slides.length - 1) { 6753 return false; 6754 } 6755 return true; 6756 }).css({ 6757 [key]: `${spaceBetween}px` 6758 }); 6759 } 6760 if (params.centeredSlides && params.centeredSlidesBounds) { 6761 let allSlidesSize = 0; 6762 slidesSizesGrid.forEach((slideSizeValue) => { 6763 allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 6764 }); 6765 allSlidesSize -= params.spaceBetween; 6766 const maxSnap = allSlidesSize - swiperSize; 6767 snapGrid = snapGrid.map((snap) => { 6768 if (snap < 0) 6769 return -offsetBefore; 6770 if (snap > maxSnap) 6771 return maxSnap + offsetAfter; 6772 return snap; 6773 }); 6774 } 6775 if (params.centerInsufficientSlides) { 6776 let allSlidesSize = 0; 6777 slidesSizesGrid.forEach((slideSizeValue) => { 6778 allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 6779 }); 6780 allSlidesSize -= params.spaceBetween; 6781 if (allSlidesSize < swiperSize) { 6782 const allSlidesOffset = (swiperSize - allSlidesSize) / 2; 6783 snapGrid.forEach((snap, snapIndex) => { 6784 snapGrid[snapIndex] = snap - allSlidesOffset; 6785 }); 6786 slidesGrid.forEach((snap, snapIndex) => { 6787 slidesGrid[snapIndex] = snap + allSlidesOffset; 6788 }); 6789 } 6790 } 6791 Object.assign(swiper, { 6792 slides, 6793 snapGrid, 6794 slidesGrid, 6795 slidesSizesGrid 6796 }); 6797 if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { 6798 setCSSProperty(swiper.wrapperEl, "--swiper-centered-offset-before", `${-snapGrid[0]}px`); 6799 setCSSProperty(swiper.wrapperEl, "--swiper-centered-offset-after", `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); 6800 const addToSnapGrid = -swiper.snapGrid[0]; 6801 const addToSlidesGrid = -swiper.slidesGrid[0]; 6802 swiper.snapGrid = swiper.snapGrid.map((v) => v + addToSnapGrid); 6803 swiper.slidesGrid = swiper.slidesGrid.map((v) => v + addToSlidesGrid); 6804 } 6805 if (slidesLength !== previousSlidesLength) { 6806 swiper.emit("slidesLengthChange"); 6807 } 6808 if (snapGrid.length !== previousSnapGridLength) { 6809 if (swiper.params.watchOverflow) 6810 swiper.checkOverflow(); 6811 swiper.emit("snapGridLengthChange"); 6812 } 6813 if (slidesGrid.length !== previousSlidesGridLength) { 6814 swiper.emit("slidesGridLengthChange"); 6815 } 6816 if (params.watchSlidesProgress) { 6817 swiper.updateSlidesOffset(); 6818 } 6819 if (!isVirtual && !params.cssMode && (params.effect === "slide" || params.effect === "fade")) { 6820 const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; 6821 const hasClassBackfaceClassAdded = swiper.$el.hasClass(backFaceHiddenClass); 6822 if (slidesLength <= params.maxBackfaceHiddenSlides) { 6823 if (!hasClassBackfaceClassAdded) 6824 swiper.$el.addClass(backFaceHiddenClass); 6825 } else if (hasClassBackfaceClassAdded) { 6826 swiper.$el.removeClass(backFaceHiddenClass); 6827 } 6828 } 6829 } 6830 6831
vendor: 1,639 bytes, lines 6831-6875
6831// node_modules/swiper/core/update/updateAutoHeight.js 6832 function updateAutoHeight(speed) { 6833 const swiper = this; 6834 const activeSlides = []; 6835 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 6836 let newHeight = 0; 6837 let i; 6838 if (typeof speed === "number") { 6839 swiper.setTransition(speed); 6840 } else if (speed === true) { 6841 swiper.setTransition(swiper.params.speed); 6842 } 6843 const getSlideByIndex = (index2) => { 6844 if (isVirtual) { 6845 return swiper.slides.filter((el) => parseInt(el.getAttribute("data-swiper-slide-index"), 10) === index2)[0]; 6846 } 6847 return swiper.slides.eq(index2)[0]; 6848 }; 6849 if (swiper.params.slidesPerView !== "auto" && swiper.params.slidesPerView > 1) { 6850 if (swiper.params.centeredSlides) { 6851 (swiper.visibleSlides || dom_default([])).each((slide) => { 6852 activeSlides.push(slide); 6853 }); 6854 } else { 6855 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 6856 const index2 = swiper.activeIndex + i; 6857 if (index2 > swiper.slides.length && !isVirtual) 6858 break; 6859 activeSlides.push(getSlideByIndex(index2)); 6860 } 6861 } 6862 } else { 6863 activeSlides.push(getSlideByIndex(swiper.activeIndex)); 6864 } 6865 for (i = 0; i < activeSlides.length; i += 1) { 6866 if (typeof activeSlides[i] !== "undefined") { 6867 const height = activeSlides[i].offsetHeight; 6868 newHeight = height > newHeight ? height : newHeight; 6869 } 6870 } 6871 if (newHeight || newHeight === 0) 6872 swiper.$wrapperEl.css("height", `${newHeight}px`); 6873 } 6874 6875
vendor: 325 bytes, lines 6875-6884
6875// node_modules/swiper/core/update/updateSlidesOffset.js 6876 function updateSlidesOffset() { 6877 const swiper = this; 6878 const slides = swiper.slides; 6879 for (let i = 0; i < slides.length; i += 1) { 6880 slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; 6881 } 6882 } 6883 6884
vendor: 1,927 bytes, lines 6884-6925
6884// node_modules/swiper/core/update/updateSlidesProgress.js 6885 function updateSlidesProgress(translate = this && this.translate || 0) { 6886 const swiper = this; 6887 const params = swiper.params; 6888 const { 6889 slides, 6890 rtlTranslate: rtl, 6891 snapGrid 6892 } = swiper; 6893 if (slides.length === 0) 6894 return; 6895 if (typeof slides[0].swiperSlideOffset === "undefined") 6896 swiper.updateSlidesOffset(); 6897 let offsetCenter = -translate; 6898 if (rtl) 6899 offsetCenter = translate; 6900 slides.removeClass(params.slideVisibleClass); 6901 swiper.visibleSlidesIndexes = []; 6902 swiper.visibleSlides = []; 6903 for (let i = 0; i < slides.length; i += 1) { 6904 const slide = slides[i]; 6905 let slideOffset = slide.swiperSlideOffset; 6906 if (params.cssMode && params.centeredSlides) { 6907 slideOffset -= slides[0].swiperSlideOffset; 6908 } 6909 const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); 6910 const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); 6911 const slideBefore = -(offsetCenter - slideOffset); 6912 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 6913 const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 6914 if (isVisible) { 6915 swiper.visibleSlides.push(slide); 6916 swiper.visibleSlidesIndexes.push(i); 6917 slides.eq(i).addClass(params.slideVisibleClass); 6918 } 6919 slide.progress = rtl ? -slideProgress : slideProgress; 6920 slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; 6921 } 6922 swiper.visibleSlides = dom_default(swiper.visibleSlides); 6923 } 6924 6925
vendor: 1,363 bytes, lines 6925-6969
6925// node_modules/swiper/core/update/updateProgress.js 6926 function updateProgress(translate) { 6927 const swiper = this; 6928 if (typeof translate === "undefined") { 6929 const multiplier = swiper.rtlTranslate ? -1 : 1; 6930 translate = swiper && swiper.translate && swiper.translate * multiplier || 0; 6931 } 6932 const params = swiper.params; 6933 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 6934 let { 6935 progress, 6936 isBeginning, 6937 isEnd 6938 } = swiper; 6939 const wasBeginning = isBeginning; 6940 const wasEnd = isEnd; 6941 if (translatesDiff === 0) { 6942 progress = 0; 6943 isBeginning = true; 6944 isEnd = true; 6945 } else { 6946 progress = (translate - swiper.minTranslate()) / translatesDiff; 6947 isBeginning = progress <= 0; 6948 isEnd = progress >= 1; 6949 } 6950 Object.assign(swiper, { 6951 progress, 6952 isBeginning, 6953 isEnd 6954 }); 6955 if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) 6956 swiper.updateSlidesProgress(translate); 6957 if (isBeginning && !wasBeginning) { 6958 swiper.emit("reachBeginning toEdge"); 6959 } 6960 if (isEnd && !wasEnd) { 6961 swiper.emit("reachEnd toEdge"); 6962 } 6963 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 6964 swiper.emit("fromEdge"); 6965 } 6966 swiper.emit("progress", progress); 6967 } 6968 6969
vendor: 2,786 bytes, lines 6969-7020
6969// node_modules/swiper/core/update/updateSlidesClasses.js 6970 function updateSlidesClasses() { 6971 const swiper = this; 6972 const { 6973 slides, 6974 params, 6975 $wrapperEl, 6976 activeIndex, 6977 realIndex 6978 } = swiper; 6979 const isVirtual = swiper.virtual && params.virtual.enabled; 6980 slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); 6981 let activeSlide; 6982 if (isVirtual) { 6983 activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); 6984 } else { 6985 activeSlide = slides.eq(activeIndex); 6986 } 6987 activeSlide.addClass(params.slideActiveClass); 6988 if (params.loop) { 6989 if (activeSlide.hasClass(params.slideDuplicateClass)) { 6990 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); 6991 } else { 6992 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); 6993 } 6994 } 6995 let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); 6996 if (params.loop && nextSlide.length === 0) { 6997 nextSlide = slides.eq(0); 6998 nextSlide.addClass(params.slideNextClass); 6999 } 7000 let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); 7001 if (params.loop && prevSlide.length === 0) { 7002 prevSlide = slides.eq(-1); 7003 prevSlide.addClass(params.slidePrevClass); 7004 } 7005 if (params.loop) { 7006 if (nextSlide.hasClass(params.slideDuplicateClass)) { 7007 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr("data-swiper-slide-index")}"]`).addClass(params.slideDuplicateNextClass); 7008 } else { 7009 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr("data-swiper-slide-index")}"]`).addClass(params.slideDuplicateNextClass); 7010 } 7011 if (prevSlide.hasClass(params.slideDuplicateClass)) { 7012 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr("data-swiper-slide-index")}"]`).addClass(params.slideDuplicatePrevClass); 7013 } else { 7014 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr("data-swiper-slide-index")}"]`).addClass(params.slideDuplicatePrevClass); 7015 } 7016 } 7017 swiper.emitSlidesClasses(); 7018 } 7019 7020
vendor: 2,215 bytes, lines 7020-7083
7020// node_modules/swiper/core/update/updateActiveIndex.js 7021 function updateActiveIndex(newActiveIndex) { 7022 const swiper = this; 7023 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 7024 const { 7025 slidesGrid, 7026 snapGrid, 7027 params, 7028 activeIndex: previousIndex, 7029 realIndex: previousRealIndex, 7030 snapIndex: previousSnapIndex 7031 } = swiper; 7032 let activeIndex = newActiveIndex; 7033 let snapIndex; 7034 if (typeof activeIndex === "undefined") { 7035 for (let i = 0; i < slidesGrid.length; i += 1) { 7036 if (typeof slidesGrid[i + 1] !== "undefined") { 7037 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 7038 activeIndex = i; 7039 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 7040 activeIndex = i + 1; 7041 } 7042 } else if (translate >= slidesGrid[i]) { 7043 activeIndex = i; 7044 } 7045 } 7046 if (params.normalizeSlideIndex) { 7047 if (activeIndex < 0 || typeof activeIndex === "undefined") 7048 activeIndex = 0; 7049 } 7050 } 7051 if (snapGrid.indexOf(translate) >= 0) { 7052 snapIndex = snapGrid.indexOf(translate); 7053 } else { 7054 const skip = Math.min(params.slidesPerGroupSkip, activeIndex); 7055 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 7056 } 7057 if (snapIndex >= snapGrid.length) 7058 snapIndex = snapGrid.length - 1; 7059 if (activeIndex === previousIndex) { 7060 if (snapIndex !== previousSnapIndex) { 7061 swiper.snapIndex = snapIndex; 7062 swiper.emit("snapIndexChange"); 7063 } 7064 return; 7065 } 7066 const realIndex = parseInt(swiper.slides.eq(activeIndex).attr("data-swiper-slide-index") || activeIndex, 10); 7067 Object.assign(swiper, { 7068 snapIndex, 7069 realIndex, 7070 previousIndex, 7071 activeIndex 7072 }); 7073 swiper.emit("activeIndexChange"); 7074 swiper.emit("snapIndexChange"); 7075 if (previousRealIndex !== realIndex) { 7076 swiper.emit("realIndexChange"); 7077 } 7078 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 7079 swiper.emit("slideChange"); 7080 } 7081 } 7082 7083
vendor: 1,075 bytes, lines 7083-7116
7083// node_modules/swiper/core/update/updateClickedSlide.js 7084 function updateClickedSlide(e) { 7085 const swiper = this; 7086 const params = swiper.params; 7087 const slide = dom_default(e).closest(`.${params.slideClass}`)[0]; 7088 let slideFound = false; 7089 let slideIndex; 7090 if (slide) { 7091 for (let i = 0; i < swiper.slides.length; i += 1) { 7092 if (swiper.slides[i] === slide) { 7093 slideFound = true; 7094 slideIndex = i; 7095 break; 7096 } 7097 } 7098 } 7099 if (slide && slideFound) { 7100 swiper.clickedSlide = slide; 7101 if (swiper.virtual && swiper.params.virtual.enabled) { 7102 swiper.clickedIndex = parseInt(dom_default(slide).attr("data-swiper-slide-index"), 10); 7103 } else { 7104 swiper.clickedIndex = slideIndex; 7105 } 7106 } else { 7107 swiper.clickedSlide = void 0; 7108 swiper.clickedIndex = void 0; 7109 return; 7110 } 7111 if (params.slideToClickedSlide && swiper.clickedIndex !== void 0 && swiper.clickedIndex !== swiper.activeIndex) { 7112 swiper.slideToClickedSlide(); 7113 } 7114 } 7115 7116
vendor: 287 bytes, lines 7116-7129
7116// node_modules/swiper/core/update/index.js 7117 var update_default = { 7118 updateSize, 7119 updateSlides, 7120 updateAutoHeight, 7121 updateSlidesOffset, 7122 updateSlidesProgress, 7123 updateProgress, 7124 updateSlidesClasses, 7125 updateActiveIndex, 7126 updateClickedSlide 7127 }; 7128 7129
vendor: 573 bytes, lines 7129-7150
7129// node_modules/swiper/core/translate/getTranslate.js 7130 function getSwiperTranslate(axis = this.isHorizontal() ? "x" : "y") { 7131 const swiper = this; 7132 const { 7133 params, 7134 rtlTranslate: rtl, 7135 translate, 7136 $wrapperEl 7137 } = swiper; 7138 if (params.virtualTranslate) { 7139 return rtl ? -translate : translate; 7140 } 7141 if (params.cssMode) { 7142 return translate; 7143 } 7144 let currentTranslate = getTranslate($wrapperEl[0], axis); 7145 if (rtl) 7146 currentTranslate = -currentTranslate; 7147 return currentTranslate || 0; 7148 } 7149 7150
vendor: 1,281 bytes, lines 7150-7192
7150// node_modules/swiper/core/translate/setTranslate.js 7151 function setTranslate(translate, byController) { 7152 const swiper = this; 7153 const { 7154 rtlTranslate: rtl, 7155 params, 7156 $wrapperEl, 7157 wrapperEl, 7158 progress 7159 } = swiper; 7160 let x = 0; 7161 let y = 0; 7162 const z = 0; 7163 if (swiper.isHorizontal()) { 7164 x = rtl ? -translate : translate; 7165 } else { 7166 y = translate; 7167 } 7168 if (params.roundLengths) { 7169 x = Math.floor(x); 7170 y = Math.floor(y); 7171 } 7172 if (params.cssMode) { 7173 wrapperEl[swiper.isHorizontal() ? "scrollLeft" : "scrollTop"] = swiper.isHorizontal() ? -x : -y; 7174 } else if (!params.virtualTranslate) { 7175 $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); 7176 } 7177 swiper.previousTranslate = swiper.translate; 7178 swiper.translate = swiper.isHorizontal() ? x : y; 7179 let newProgress; 7180 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 7181 if (translatesDiff === 0) { 7182 newProgress = 0; 7183 } else { 7184 newProgress = (translate - swiper.minTranslate()) / translatesDiff; 7185 } 7186 if (newProgress !== progress) { 7187 swiper.updateProgress(translate); 7188 } 7189 swiper.emit("setTranslate", swiper.translate, byController); 7190 } 7191 7192
vendor: 124 bytes, lines 7192-7197
7192// node_modules/swiper/core/translate/minTranslate.js 7193 function minTranslate() { 7194 return -this.snapGrid[0]; 7195 } 7196 7197
vendor: 147 bytes, lines 7197-7202
7197// node_modules/swiper/core/translate/maxTranslate.js 7198 function maxTranslate() { 7199 return -this.snapGrid[this.snapGrid.length - 1]; 7200 } 7201 7202
vendor: 2,878 bytes, lines 7202-7280
7202// node_modules/swiper/core/translate/translateTo.js 7203 function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) { 7204 const swiper = this; 7205 const { 7206 params, 7207 wrapperEl 7208 } = swiper; 7209 if (swiper.animating && params.preventInteractionOnTransition) { 7210 return false; 7211 } 7212 const minTranslate2 = swiper.minTranslate(); 7213 const maxTranslate2 = swiper.maxTranslate(); 7214 let newTranslate; 7215 if (translateBounds && translate > minTranslate2) 7216 newTranslate = minTranslate2; 7217 else if (translateBounds && translate < maxTranslate2) 7218 newTranslate = maxTranslate2; 7219 else 7220 newTranslate = translate; 7221 swiper.updateProgress(newTranslate); 7222 if (params.cssMode) { 7223 const isH = swiper.isHorizontal(); 7224 if (speed === 0) { 7225 wrapperEl[isH ? "scrollLeft" : "scrollTop"] = -newTranslate; 7226 } else { 7227 if (!swiper.support.smoothScroll) { 7228 animateCSSModeScroll({ 7229 swiper, 7230 targetPosition: -newTranslate, 7231 side: isH ? "left" : "top" 7232 }); 7233 return true; 7234 } 7235 wrapperEl.scrollTo({ 7236 [isH ? "left" : "top"]: -newTranslate, 7237 behavior: "smooth" 7238 }); 7239 } 7240 return true; 7241 } 7242 if (speed === 0) { 7243 swiper.setTransition(0); 7244 swiper.setTranslate(newTranslate); 7245 if (runCallbacks) { 7246 swiper.emit("beforeTransitionStart", speed, internal); 7247 swiper.emit("transitionEnd"); 7248 } 7249 } else { 7250 swiper.setTransition(speed); 7251 swiper.setTranslate(newTranslate); 7252 if (runCallbacks) { 7253 swiper.emit("beforeTransitionStart", speed, internal); 7254 swiper.emit("transitionStart"); 7255 } 7256 if (!swiper.animating) { 7257 swiper.animating = true; 7258 if (!swiper.onTranslateToWrapperTransitionEnd) { 7259 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd3(e) { 7260 if (!swiper || swiper.destroyed) 7261 return; 7262 if (e.target !== this) 7263 return; 7264 swiper.$wrapperEl[0].removeEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd); 7265 swiper.$wrapperEl[0].removeEventListener("webkitTransitionEnd", swiper.onTranslateToWrapperTransitionEnd); 7266 swiper.onTranslateToWrapperTransitionEnd = null; 7267 delete swiper.onTranslateToWrapperTransitionEnd; 7268 if (runCallbacks) { 7269 swiper.emit("transitionEnd"); 7270 } 7271 }; 7272 } 7273 swiper.$wrapperEl[0].addEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd); 7274 swiper.$wrapperEl[0].addEventListener("webkitTransitionEnd", swiper.onTranslateToWrapperTransitionEnd); 7275 } 7276 } 7277 return true; 7278 } 7279 7280
vendor: 200 bytes, lines 7280-7289
7280// node_modules/swiper/core/translate/index.js 7281 var translate_default = { 7282 getTranslate: getSwiperTranslate, 7283 setTranslate, 7284 minTranslate, 7285 maxTranslate, 7286 translateTo 7287 }; 7288 7289
vendor: 292 bytes, lines 7289-7298
7289// node_modules/swiper/core/transition/setTransition.js 7290 function setTransition(duration, byController) { 7291 const swiper = this; 7292 if (!swiper.params.cssMode) { 7293 swiper.$wrapperEl.transition(duration); 7294 } 7295 swiper.emit("setTransition", duration, byController); 7296 } 7297 7298
vendor: 993 bytes, lines 7298-7333
7298// node_modules/swiper/core/transition/transitionEmit.js 7299 function transitionEmit({ 7300 swiper, 7301 runCallbacks, 7302 direction, 7303 step 7304 }) { 7305 const { 7306 activeIndex, 7307 previousIndex 7308 } = swiper; 7309 let dir = direction; 7310 if (!dir) { 7311 if (activeIndex > previousIndex) 7312 dir = "next"; 7313 else if (activeIndex < previousIndex) 7314 dir = "prev"; 7315 else 7316 dir = "reset"; 7317 } 7318 swiper.emit(`transition${step}`); 7319 if (runCallbacks && activeIndex !== previousIndex) { 7320 if (dir === "reset") { 7321 swiper.emit(`slideResetTransition${step}`); 7322 return; 7323 } 7324 swiper.emit(`slideChangeTransition${step}`); 7325 if (dir === "next") { 7326 swiper.emit(`slideNextTransition${step}`); 7327 } else { 7328 swiper.emit(`slidePrevTransition${step}`); 7329 } 7330 } 7331 } 7332 7333
vendor: 417 bytes, lines 7333-7352
7333// node_modules/swiper/core/transition/transitionStart.js 7334 function transitionStart(runCallbacks = true, direction) { 7335 const swiper = this; 7336 const { 7337 params 7338 } = swiper; 7339 if (params.cssMode) 7340 return; 7341 if (params.autoHeight) { 7342 swiper.updateAutoHeight(); 7343 } 7344 transitionEmit({ 7345 swiper, 7346 runCallbacks, 7347 direction, 7348 step: "Start" 7349 }); 7350 } 7351 7352
vendor: 402 bytes, lines 7352-7370
7352// node_modules/swiper/core/transition/transitionEnd.js 7353 function transitionEnd2(runCallbacks = true, direction) { 7354 const swiper = this; 7355 const { 7356 params 7357 } = swiper; 7358 swiper.animating = false; 7359 if (params.cssMode) 7360 return; 7361 swiper.setTransition(0); 7362 transitionEmit({ 7363 swiper, 7364 runCallbacks, 7365 direction, 7366 step: "End" 7367 }); 7368 } 7369 7370
vendor: 166 bytes, lines 7370-7377
7370// node_modules/swiper/core/transition/index.js 7371 var transition_default = { 7372 setTransition, 7373 transitionStart, 7374 transitionEnd: transitionEnd2 7375 }; 7376 7377
vendor: 5,774 bytes, lines 7377-7524
7377// node_modules/swiper/core/slide/slideTo.js 7378 function slideTo(index2 = 0, speed = this.params.speed, runCallbacks = true, internal, initial) { 7379 if (typeof index2 !== "number" && typeof index2 !== "string") { 7380 throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index2}] given.`); 7381 } 7382 if (typeof index2 === "string") { 7383 const indexAsNumber = parseInt(index2, 10); 7384 const isValidNumber = isFinite(indexAsNumber); 7385 if (!isValidNumber) { 7386 throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index2}] given.`); 7387 } 7388 index2 = indexAsNumber; 7389 } 7390 const swiper = this; 7391 let slideIndex = index2; 7392 if (slideIndex < 0) 7393 slideIndex = 0; 7394 const { 7395 params, 7396 snapGrid, 7397 slidesGrid, 7398 previousIndex, 7399 activeIndex, 7400 rtlTranslate: rtl, 7401 wrapperEl, 7402 enabled 7403 } = swiper; 7404 if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { 7405 return false; 7406 } 7407 const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 7408 let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 7409 if (snapIndex >= snapGrid.length) 7410 snapIndex = snapGrid.length - 1; 7411 const translate = -snapGrid[snapIndex]; 7412 if (params.normalizeSlideIndex) { 7413 for (let i = 0; i < slidesGrid.length; i += 1) { 7414 const normalizedTranslate = -Math.floor(translate * 100); 7415 const normalizedGrid = Math.floor(slidesGrid[i] * 100); 7416 const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); 7417 if (typeof slidesGrid[i + 1] !== "undefined") { 7418 if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { 7419 slideIndex = i; 7420 } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { 7421 slideIndex = i + 1; 7422 } 7423 } else if (normalizedTranslate >= normalizedGrid) { 7424 slideIndex = i; 7425 } 7426 } 7427 } 7428 if (swiper.initialized && slideIndex !== activeIndex) { 7429 if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { 7430 return false; 7431 } 7432 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 7433 if ((activeIndex || 0) !== slideIndex) 7434 return false; 7435 } 7436 } 7437 if (slideIndex !== (previousIndex || 0) && runCallbacks) { 7438 swiper.emit("beforeSlideChangeStart"); 7439 } 7440 swiper.updateProgress(translate); 7441 let direction; 7442 if (slideIndex > activeIndex) 7443 direction = "next"; 7444 else if (slideIndex < activeIndex) 7445 direction = "prev"; 7446 else 7447 direction = "reset"; 7448 if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { 7449 swiper.updateActiveIndex(slideIndex); 7450 if (params.autoHeight) { 7451 swiper.updateAutoHeight(); 7452 } 7453 swiper.updateSlidesClasses(); 7454 if (params.effect !== "slide") { 7455 swiper.setTranslate(translate); 7456 } 7457 if (direction !== "reset") { 7458 swiper.transitionStart(runCallbacks, direction); 7459 swiper.transitionEnd(runCallbacks, direction); 7460 } 7461 return false; 7462 } 7463 if (params.cssMode) { 7464 const isH = swiper.isHorizontal(); 7465 const t = rtl ? translate : -translate; 7466 if (speed === 0) { 7467 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 7468 if (isVirtual) { 7469 swiper.wrapperEl.style.scrollSnapType = "none"; 7470 swiper._immediateVirtual = true; 7471 } 7472 wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t; 7473 if (isVirtual) { 7474 requestAnimationFrame(() => { 7475 swiper.wrapperEl.style.scrollSnapType = ""; 7476 swiper._swiperImmediateVirtual = false; 7477 }); 7478 } 7479 } else { 7480 if (!swiper.support.smoothScroll) { 7481 animateCSSModeScroll({ 7482 swiper, 7483 targetPosition: t, 7484 side: isH ? "left" : "top" 7485 }); 7486 return true; 7487 } 7488 wrapperEl.scrollTo({ 7489 [isH ? "left" : "top"]: t, 7490 behavior: "smooth" 7491 }); 7492 } 7493 return true; 7494 } 7495 swiper.setTransition(speed); 7496 swiper.setTranslate(translate); 7497 swiper.updateActiveIndex(slideIndex); 7498 swiper.updateSlidesClasses(); 7499 swiper.emit("beforeTransitionStart", speed, internal); 7500 swiper.transitionStart(runCallbacks, direction); 7501 if (speed === 0) { 7502 swiper.transitionEnd(runCallbacks, direction); 7503 } else if (!swiper.animating) { 7504 swiper.animating = true; 7505 if (!swiper.onSlideToWrapperTransitionEnd) { 7506 swiper.onSlideToWrapperTransitionEnd = function transitionEnd3(e) { 7507 if (!swiper || swiper.destroyed) 7508 return; 7509 if (e.target !== this) 7510 return; 7511 swiper.$wrapperEl[0].removeEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd); 7512 swiper.$wrapperEl[0].removeEventListener("webkitTransitionEnd", swiper.onSlideToWrapperTransitionEnd); 7513 swiper.onSlideToWrapperTransitionEnd = null; 7514 delete swiper.onSlideToWrapperTransitionEnd; 7515 swiper.transitionEnd(runCallbacks, direction); 7516 }; 7517 } 7518 swiper.$wrapperEl[0].addEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd); 7519 swiper.$wrapperEl[0].addEventListener("webkitTransitionEnd", swiper.onSlideToWrapperTransitionEnd); 7520 } 7521 return true; 7522 } 7523 7524
vendor: 690 bytes, lines 7524-7542
7524// node_modules/swiper/core/slide/slideToLoop.js 7525 function slideToLoop(index2 = 0, speed = this.params.speed, runCallbacks = true, internal) { 7526 if (typeof index2 === "string") { 7527 const indexAsNumber = parseInt(index2, 10); 7528 const isValidNumber = isFinite(indexAsNumber); 7529 if (!isValidNumber) { 7530 throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index2}] given.`); 7531 } 7532 index2 = indexAsNumber; 7533 } 7534 const swiper = this; 7535 let newIndex = index2; 7536 if (swiper.params.loop) { 7537 newIndex += swiper.loopedSlides; 7538 } 7539 return swiper.slideTo(newIndex, speed, runCallbacks, internal); 7540 } 7541 7542
vendor: 995 bytes, lines 7542-7569
7542// node_modules/swiper/core/slide/slideNext.js 7543 function slideNext(speed = this.params.speed, runCallbacks = true, internal) { 7544 const swiper = this; 7545 const { 7546 animating, 7547 enabled, 7548 params 7549 } = swiper; 7550 if (!enabled) 7551 return swiper; 7552 let perGroup = params.slidesPerGroup; 7553 if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 7554 perGroup = Math.max(swiper.slidesPerViewDynamic("current", true), 1); 7555 } 7556 const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; 7557 if (params.loop) { 7558 if (animating && params.loopPreventsSlide) 7559 return false; 7560 swiper.loopFix(); 7561 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 7562 } 7563 if (params.rewind && swiper.isEnd) { 7564 return swiper.slideTo(0, speed, runCallbacks, internal); 7565 } 7566 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 7567 } 7568 7569
vendor: 2,137 bytes, lines 7569-7625
7569// node_modules/swiper/core/slide/slidePrev.js 7570 function slidePrev(speed = this.params.speed, runCallbacks = true, internal) { 7571 const swiper = this; 7572 const { 7573 params, 7574 animating, 7575 snapGrid, 7576 slidesGrid, 7577 rtlTranslate, 7578 enabled 7579 } = swiper; 7580 if (!enabled) 7581 return swiper; 7582 if (params.loop) { 7583 if (animating && params.loopPreventsSlide) 7584 return false; 7585 swiper.loopFix(); 7586 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 7587 } 7588 const translate = rtlTranslate ? swiper.translate : -swiper.translate; 7589 function normalize(val) { 7590 if (val < 0) 7591 return -Math.floor(Math.abs(val)); 7592 return Math.floor(val); 7593 } 7594 const normalizedTranslate = normalize(translate); 7595 const normalizedSnapGrid = snapGrid.map((val) => normalize(val)); 7596 let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 7597 if (typeof prevSnap === "undefined" && params.cssMode) { 7598 let prevSnapIndex; 7599 snapGrid.forEach((snap, snapIndex) => { 7600 if (normalizedTranslate >= snap) { 7601 prevSnapIndex = snapIndex; 7602 } 7603 }); 7604 if (typeof prevSnapIndex !== "undefined") { 7605 prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; 7606 } 7607 } 7608 let prevIndex = 0; 7609 if (typeof prevSnap !== "undefined") { 7610 prevIndex = slidesGrid.indexOf(prevSnap); 7611 if (prevIndex < 0) 7612 prevIndex = swiper.activeIndex - 1; 7613 if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 7614 prevIndex = prevIndex - swiper.slidesPerViewDynamic("previous", true) + 1; 7615 prevIndex = Math.max(prevIndex, 0); 7616 } 7617 } 7618 if (params.rewind && swiper.isBeginning) { 7619 const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 7620 return swiper.slideTo(lastIndex, speed, runCallbacks, internal); 7621 } 7622 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 7623 } 7624 7625
vendor: 246 bytes, lines 7625-7631
7625// node_modules/swiper/core/slide/slideReset.js 7626 function slideReset(speed = this.params.speed, runCallbacks = true, internal) { 7627 const swiper = this; 7628 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 7629 } 7630 7631
vendor: 1,200 bytes, lines 7631-7656
7631// node_modules/swiper/core/slide/slideToClosest.js 7632 function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) { 7633 const swiper = this; 7634 let index2 = swiper.activeIndex; 7635 const skip = Math.min(swiper.params.slidesPerGroupSkip, index2); 7636 const snapIndex = skip + Math.floor((index2 - skip) / swiper.params.slidesPerGroup); 7637 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 7638 if (translate >= swiper.snapGrid[snapIndex]) { 7639 const currentSnap = swiper.snapGrid[snapIndex]; 7640 const nextSnap = swiper.snapGrid[snapIndex + 1]; 7641 if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { 7642 index2 += swiper.params.slidesPerGroup; 7643 } 7644 } else { 7645 const prevSnap = swiper.snapGrid[snapIndex - 1]; 7646 const currentSnap = swiper.snapGrid[snapIndex]; 7647 if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { 7648 index2 -= swiper.params.slidesPerGroup; 7649 } 7650 } 7651 index2 = Math.max(index2, 0); 7652 index2 = Math.min(index2, swiper.slidesGrid.length - 1); 7653 return swiper.slideTo(index2, speed, runCallbacks, internal); 7654 } 7655 7656
vendor: 1,538 bytes, lines 7656-7694
7656// node_modules/swiper/core/slide/slideToClickedSlide.js 7657 function slideToClickedSlide() { 7658 const swiper = this; 7659 const { 7660 params, 7661 $wrapperEl 7662 } = swiper; 7663 const slidesPerView = params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : params.slidesPerView; 7664 let slideToIndex = swiper.clickedIndex; 7665 let realIndex; 7666 if (params.loop) { 7667 if (swiper.animating) 7668 return; 7669 realIndex = parseInt(dom_default(swiper.clickedSlide).attr("data-swiper-slide-index"), 10); 7670 if (params.centeredSlides) { 7671 if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { 7672 swiper.loopFix(); 7673 slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); 7674 nextTick(() => { 7675 swiper.slideTo(slideToIndex); 7676 }); 7677 } else { 7678 swiper.slideTo(slideToIndex); 7679 } 7680 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 7681 swiper.loopFix(); 7682 slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); 7683 nextTick(() => { 7684 swiper.slideTo(slideToIndex); 7685 }); 7686 } else { 7687 swiper.slideTo(slideToIndex); 7688 } 7689 } else { 7690 swiper.slideTo(slideToIndex); 7691 } 7692 } 7693 7694
vendor: 206 bytes, lines 7694-7705
7694// node_modules/swiper/core/slide/index.js 7695 var slide_default = { 7696 slideTo, 7697 slideToLoop, 7698 slideNext, 7699 slidePrev, 7700 slideReset, 7701 slideToClosest, 7702 slideToClickedSlide 7703 }; 7704 7705
vendor: 2,195 bytes, lines 7705-7752
7705// node_modules/swiper/core/loop/loopCreate.js 7706 function loopCreate() { 7707 const swiper = this; 7708 const document2 = getDocument(); 7709 const { 7710 params, 7711 $wrapperEl 7712 } = swiper; 7713 const $selector = $wrapperEl.children().length > 0 ? dom_default($wrapperEl.children()[0].parentNode) : $wrapperEl; 7714 $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); 7715 let slides = $selector.children(`.${params.slideClass}`); 7716 if (params.loopFillGroupWithBlank) { 7717 const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; 7718 if (blankSlidesNum !== params.slidesPerGroup) { 7719 for (let i = 0; i < blankSlidesNum; i += 1) { 7720 const blankNode = dom_default(document2.createElement("div")).addClass(`${params.slideClass} ${params.slideBlankClass}`); 7721 $selector.append(blankNode); 7722 } 7723 slides = $selector.children(`.${params.slideClass}`); 7724 } 7725 } 7726 if (params.slidesPerView === "auto" && !params.loopedSlides) 7727 params.loopedSlides = slides.length; 7728 swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); 7729 swiper.loopedSlides += params.loopAdditionalSlides; 7730 if (swiper.loopedSlides > slides.length && swiper.params.loopedSlidesLimit) { 7731 swiper.loopedSlides = slides.length; 7732 } 7733 const prependSlides = []; 7734 const appendSlides = []; 7735 slides.each((el, index2) => { 7736 const slide = dom_default(el); 7737 slide.attr("data-swiper-slide-index", index2); 7738 }); 7739 for (let i = 0; i < swiper.loopedSlides; i += 1) { 7740 const index2 = i - Math.floor(i / slides.length) * slides.length; 7741 appendSlides.push(slides.eq(index2)[0]); 7742 prependSlides.unshift(slides.eq(slides.length - index2 - 1)[0]); 7743 } 7744 for (let i = 0; i < appendSlides.length; i += 1) { 7745 $selector.append(dom_default(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 7746 } 7747 for (let i = prependSlides.length - 1; i >= 0; i -= 1) { 7748 $selector.prepend(dom_default(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 7749 } 7750 } 7751 7752
vendor: 1,339 bytes, lines 7752-7790
7752// node_modules/swiper/core/loop/loopFix.js 7753 function loopFix() { 7754 const swiper = this; 7755 swiper.emit("beforeLoopFix"); 7756 const { 7757 activeIndex, 7758 slides, 7759 loopedSlides, 7760 allowSlidePrev, 7761 allowSlideNext, 7762 snapGrid, 7763 rtlTranslate: rtl 7764 } = swiper; 7765 let newIndex; 7766 swiper.allowSlidePrev = true; 7767 swiper.allowSlideNext = true; 7768 const snapTranslate = -snapGrid[activeIndex]; 7769 const diff = snapTranslate - swiper.getTranslate(); 7770 if (activeIndex < loopedSlides) { 7771 newIndex = slides.length - loopedSlides * 3 + activeIndex; 7772 newIndex += loopedSlides; 7773 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 7774 if (slideChanged && diff !== 0) { 7775 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 7776 } 7777 } else if (activeIndex >= slides.length - loopedSlides) { 7778 newIndex = -slides.length + activeIndex + loopedSlides; 7779 newIndex += loopedSlides; 7780 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 7781 if (slideChanged && diff !== 0) { 7782 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 7783 } 7784 } 7785 swiper.allowSlidePrev = allowSlidePrev; 7786 swiper.allowSlideNext = allowSlideNext; 7787 swiper.emit("loopFix"); 7788 } 7789 7790
vendor: 379 bytes, lines 7790-7802
7790// node_modules/swiper/core/loop/loopDestroy.js 7791 function loopDestroy() { 7792 const swiper = this; 7793 const { 7794 $wrapperEl, 7795 params, 7796 slides 7797 } = swiper; 7798 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove(); 7799 slides.removeAttr("data-swiper-slide-index"); 7800 } 7801 7802
vendor: 125 bytes, lines 7802-7809
7802// node_modules/swiper/core/loop/index.js 7803 var loop_default = { 7804 loopCreate, 7805 loopFix, 7806 loopDestroy 7807 }; 7808 7809
vendor: 462 bytes, lines 7809-7819
7809// node_modules/swiper/core/grab-cursor/setGrabCursor.js 7810 function setGrabCursor(moving) { 7811 const swiper = this; 7812 if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) 7813 return; 7814 const el = swiper.params.touchEventsTarget === "container" ? swiper.el : swiper.wrapperEl; 7815 el.style.cursor = "move"; 7816 el.style.cursor = moving ? "grabbing" : "grab"; 7817 } 7818 7819
vendor: 358 bytes, lines 7819-7828
7819// node_modules/swiper/core/grab-cursor/unsetGrabCursor.js 7820 function unsetGrabCursor() { 7821 const swiper = this; 7822 if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { 7823 return; 7824 } 7825 swiper[swiper.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = ""; 7826 } 7827 7828
vendor: 132 bytes, lines 7828-7834
7828// node_modules/swiper/core/grab-cursor/index.js 7829 var grab_cursor_default = { 7830 setGrabCursor, 7831 unsetGrabCursor 7832 }; 7833 7834
vendor: 4,330 bytes, lines 7834-7947
7834// node_modules/swiper/core/events/onTouchStart.js 7835 function closestElement(selector, base = this) { 7836 function __closestFrom(el) { 7837 if (!el || el === getDocument() || el === getWindow()) 7838 return null; 7839 if (el.assignedSlot) 7840 el = el.assignedSlot; 7841 const found = el.closest(selector); 7842 if (!found && !el.getRootNode) { 7843 return null; 7844 } 7845 return found || __closestFrom(el.getRootNode().host); 7846 } 7847 return __closestFrom(base); 7848 } 7849 function onTouchStart(event2) { 7850 const swiper = this; 7851 const document2 = getDocument(); 7852 const window2 = getWindow(); 7853 const data = swiper.touchEventsData; 7854 const { 7855 params, 7856 touches, 7857 enabled 7858 } = swiper; 7859 if (!enabled) 7860 return; 7861 if (swiper.animating && params.preventInteractionOnTransition) { 7862 return; 7863 } 7864 if (!swiper.animating && params.cssMode && params.loop) { 7865 swiper.loopFix(); 7866 } 7867 let e = event2; 7868 if (e.originalEvent) 7869 e = e.originalEvent; 7870 let $targetEl = dom_default(e.target); 7871 if (params.touchEventsTarget === "wrapper") { 7872 if (!$targetEl.closest(swiper.wrapperEl).length) 7873 return; 7874 } 7875 data.isTouchEvent = e.type === "touchstart"; 7876 if (!data.isTouchEvent && "which" in e && e.which === 3) 7877 return; 7878 if (!data.isTouchEvent && "button" in e && e.button > 0) 7879 return; 7880 if (data.isTouched && data.isMoved) 7881 return; 7882 const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ""; 7883 const eventPath = event2.composedPath ? event2.composedPath() : event2.path; 7884 if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) { 7885 $targetEl = dom_default(eventPath[0]); 7886 } 7887 const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; 7888 const isTargetShadow = !!(e.target && e.target.shadowRoot); 7889 if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, $targetEl[0]) : $targetEl.closest(noSwipingSelector)[0])) { 7890 swiper.allowClick = true; 7891 return; 7892 } 7893 if (params.swipeHandler) { 7894 if (!$targetEl.closest(params.swipeHandler)[0]) 7895 return; 7896 } 7897 touches.currentX = e.type === "touchstart" ? e.targetTouches[0].pageX : e.pageX; 7898 touches.currentY = e.type === "touchstart" ? e.targetTouches[0].pageY : e.pageY; 7899 const startX = touches.currentX; 7900 const startY = touches.currentY; 7901 const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; 7902 const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; 7903 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window2.innerWidth - edgeSwipeThreshold)) { 7904 if (edgeSwipeDetection === "prevent") { 7905 event2.preventDefault(); 7906 } else { 7907 return; 7908 } 7909 } 7910 Object.assign(data, { 7911 isTouched: true, 7912 isMoved: false, 7913 allowTouchCallbacks: true, 7914 isScrolling: void 0, 7915 startMoving: void 0 7916 }); 7917 touches.startX = startX; 7918 touches.startY = startY; 7919 data.touchStartTime = now(); 7920 swiper.allowClick = true; 7921 swiper.updateSize(); 7922 swiper.swipeDirection = void 0; 7923 if (params.threshold > 0) 7924 data.allowThresholdMove = false; 7925 if (e.type !== "touchstart") { 7926 let preventDefault = true; 7927 if ($targetEl.is(data.focusableElements)) { 7928 preventDefault = false; 7929 if ($targetEl[0].nodeName === "SELECT") { 7930 data.isTouched = false; 7931 } 7932 } 7933 if (document2.activeElement && dom_default(document2.activeElement).is(data.focusableElements) && document2.activeElement !== $targetEl[0]) { 7934 document2.activeElement.blur(); 7935 } 7936 const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 7937 if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) { 7938 e.preventDefault(); 7939 } 7940 } 7941 if (swiper.params.freeMode && swiper.params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { 7942 swiper.freeMode.onTouchStart(); 7943 } 7944 swiper.emit("touchStart", e); 7945 } 7946 7947
vendor: 7,031 bytes, lines 7947-8134
7947// node_modules/swiper/core/events/onTouchMove.js 7948 function onTouchMove(event2) { 7949 const document2 = getDocument(); 7950 const swiper = this; 7951 const data = swiper.touchEventsData; 7952 const { 7953 params, 7954 touches, 7955 rtlTranslate: rtl, 7956 enabled 7957 } = swiper; 7958 if (!enabled) 7959 return; 7960 let e = event2; 7961 if (e.originalEvent) 7962 e = e.originalEvent; 7963 if (!data.isTouched) { 7964 if (data.startMoving && data.isScrolling) { 7965 swiper.emit("touchMoveOpposite", e); 7966 } 7967 return; 7968 } 7969 if (data.isTouchEvent && e.type !== "touchmove") 7970 return; 7971 const targetTouch = e.type === "touchmove" && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); 7972 const pageX = e.type === "touchmove" ? targetTouch.pageX : e.pageX; 7973 const pageY = e.type === "touchmove" ? targetTouch.pageY : e.pageY; 7974 if (e.preventedByNestedSwiper) { 7975 touches.startX = pageX; 7976 touches.startY = pageY; 7977 return; 7978 } 7979 if (!swiper.allowTouchMove) { 7980 if (!dom_default(e.target).is(data.focusableElements)) { 7981 swiper.allowClick = false; 7982 } 7983 if (data.isTouched) { 7984 Object.assign(touches, { 7985 startX: pageX, 7986 startY: pageY, 7987 currentX: pageX, 7988 currentY: pageY 7989 }); 7990 data.touchStartTime = now(); 7991 } 7992 return; 7993 } 7994 if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { 7995 if (swiper.isVertical()) { 7996 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 7997 data.isTouched = false; 7998 data.isMoved = false; 7999 return; 8000 } 8001 } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { 8002 return; 8003 } 8004 } 8005 if (data.isTouchEvent && document2.activeElement) { 8006 if (e.target === document2.activeElement && dom_default(e.target).is(data.focusableElements)) { 8007 data.isMoved = true; 8008 swiper.allowClick = false; 8009 return; 8010 } 8011 } 8012 if (data.allowTouchCallbacks) { 8013 swiper.emit("touchMove", e); 8014 } 8015 if (e.targetTouches && e.targetTouches.length > 1) 8016 return; 8017 touches.currentX = pageX; 8018 touches.currentY = pageY; 8019 const diffX = touches.currentX - touches.startX; 8020 const diffY = touches.currentY - touches.startY; 8021 if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) 8022 return; 8023 if (typeof data.isScrolling === "undefined") { 8024 let touchAngle; 8025 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 8026 data.isScrolling = false; 8027 } else { 8028 if (diffX * diffX + diffY * diffY >= 25) { 8029 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 8030 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 8031 } 8032 } 8033 } 8034 if (data.isScrolling) { 8035 swiper.emit("touchMoveOpposite", e); 8036 } 8037 if (typeof data.startMoving === "undefined") { 8038 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 8039 data.startMoving = true; 8040 } 8041 } 8042 if (data.isScrolling) { 8043 data.isTouched = false; 8044 return; 8045 } 8046 if (!data.startMoving) { 8047 return; 8048 } 8049 swiper.allowClick = false; 8050 if (!params.cssMode && e.cancelable) { 8051 e.preventDefault(); 8052 } 8053 if (params.touchMoveStopPropagation && !params.nested) { 8054 e.stopPropagation(); 8055 } 8056 if (!data.isMoved) { 8057 if (params.loop && !params.cssMode) { 8058 swiper.loopFix(); 8059 } 8060 data.startTranslate = swiper.getTranslate(); 8061 swiper.setTransition(0); 8062 if (swiper.animating) { 8063 swiper.$wrapperEl.trigger("webkitTransitionEnd transitionend"); 8064 } 8065 data.allowMomentumBounce = false; 8066 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 8067 swiper.setGrabCursor(true); 8068 } 8069 swiper.emit("sliderFirstMove", e); 8070 } 8071 swiper.emit("sliderMove", e); 8072 data.isMoved = true; 8073 let diff = swiper.isHorizontal() ? diffX : diffY; 8074 touches.diff = diff; 8075 diff *= params.touchRatio; 8076 if (rtl) 8077 diff = -diff; 8078 swiper.swipeDirection = diff > 0 ? "prev" : "next"; 8079 data.currentTranslate = diff + data.startTranslate; 8080 let disableParentSwiper = true; 8081 let resistanceRatio = params.resistanceRatio; 8082 if (params.touchReleaseOnEdges) { 8083 resistanceRatio = 0; 8084 } 8085 if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { 8086 disableParentSwiper = false; 8087 if (params.resistance) 8088 data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; 8089 } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { 8090 disableParentSwiper = false; 8091 if (params.resistance) 8092 data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; 8093 } 8094 if (disableParentSwiper) { 8095 e.preventedByNestedSwiper = true; 8096 } 8097 if (!swiper.allowSlideNext && swiper.swipeDirection === "next" && data.currentTranslate < data.startTranslate) { 8098 data.currentTranslate = data.startTranslate; 8099 } 8100 if (!swiper.allowSlidePrev && swiper.swipeDirection === "prev" && data.currentTranslate > data.startTranslate) { 8101 data.currentTranslate = data.startTranslate; 8102 } 8103 if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { 8104 data.currentTranslate = data.startTranslate; 8105 } 8106 if (params.threshold > 0) { 8107 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 8108 if (!data.allowThresholdMove) { 8109 data.allowThresholdMove = true; 8110 touches.startX = touches.currentX; 8111 touches.startY = touches.currentY; 8112 data.currentTranslate = data.startTranslate; 8113 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 8114 return; 8115 } 8116 } else { 8117 data.currentTranslate = data.startTranslate; 8118 return; 8119 } 8120 } 8121 if (!params.followFinger || params.cssMode) 8122 return; 8123 if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { 8124 swiper.updateActiveIndex(); 8125 swiper.updateSlidesClasses(); 8126 } 8127 if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) { 8128 swiper.freeMode.onTouchMove(); 8129 } 8130 swiper.updateProgress(data.currentTranslate); 8131 swiper.setTranslate(data.currentTranslate); 8132 } 8133 8134
vendor: 4,961 bytes, lines 8134-8270
8134// node_modules/swiper/core/events/onTouchEnd.js 8135 function onTouchEnd(event2) { 8136 const swiper = this; 8137 const data = swiper.touchEventsData; 8138 const { 8139 params, 8140 touches, 8141 rtlTranslate: rtl, 8142 slidesGrid, 8143 enabled 8144 } = swiper; 8145 if (!enabled) 8146 return; 8147 let e = event2; 8148 if (e.originalEvent) 8149 e = e.originalEvent; 8150 if (data.allowTouchCallbacks) { 8151 swiper.emit("touchEnd", e); 8152 } 8153 data.allowTouchCallbacks = false; 8154 if (!data.isTouched) { 8155 if (data.isMoved && params.grabCursor) { 8156 swiper.setGrabCursor(false); 8157 } 8158 data.isMoved = false; 8159 data.startMoving = false; 8160 return; 8161 } 8162 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 8163 swiper.setGrabCursor(false); 8164 } 8165 const touchEndTime = now(); 8166 const timeDiff = touchEndTime - data.touchStartTime; 8167 if (swiper.allowClick) { 8168 const pathTree = e.path || e.composedPath && e.composedPath(); 8169 swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); 8170 swiper.emit("tap click", e); 8171 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 8172 swiper.emit("doubleTap doubleClick", e); 8173 } 8174 } 8175 data.lastClickTime = now(); 8176 nextTick(() => { 8177 if (!swiper.destroyed) 8178 swiper.allowClick = true; 8179 }); 8180 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { 8181 data.isTouched = false; 8182 data.isMoved = false; 8183 data.startMoving = false; 8184 return; 8185 } 8186 data.isTouched = false; 8187 data.isMoved = false; 8188 data.startMoving = false; 8189 let currentPos; 8190 if (params.followFinger) { 8191 currentPos = rtl ? swiper.translate : -swiper.translate; 8192 } else { 8193 currentPos = -data.currentTranslate; 8194 } 8195 if (params.cssMode) { 8196 return; 8197 } 8198 if (swiper.params.freeMode && params.freeMode.enabled) { 8199 swiper.freeMode.onTouchEnd({ 8200 currentPos 8201 }); 8202 return; 8203 } 8204 let stopIndex = 0; 8205 let groupSize = swiper.slidesSizesGrid[0]; 8206 for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 8207 const increment2 = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 8208 if (typeof slidesGrid[i + increment2] !== "undefined") { 8209 if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment2]) { 8210 stopIndex = i; 8211 groupSize = slidesGrid[i + increment2] - slidesGrid[i]; 8212 } 8213 } else if (currentPos >= slidesGrid[i]) { 8214 stopIndex = i; 8215 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 8216 } 8217 } 8218 let rewindFirstIndex = null; 8219 let rewindLastIndex = null; 8220 if (params.rewind) { 8221 if (swiper.isBeginning) { 8222 rewindLastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 8223 } else if (swiper.isEnd) { 8224 rewindFirstIndex = 0; 8225 } 8226 } 8227 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 8228 const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 8229 if (timeDiff > params.longSwipesMs) { 8230 if (!params.longSwipes) { 8231 swiper.slideTo(swiper.activeIndex); 8232 return; 8233 } 8234 if (swiper.swipeDirection === "next") { 8235 if (ratio >= params.longSwipesRatio) 8236 swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment); 8237 else 8238 swiper.slideTo(stopIndex); 8239 } 8240 if (swiper.swipeDirection === "prev") { 8241 if (ratio > 1 - params.longSwipesRatio) { 8242 swiper.slideTo(stopIndex + increment); 8243 } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { 8244 swiper.slideTo(rewindLastIndex); 8245 } else { 8246 swiper.slideTo(stopIndex); 8247 } 8248 } 8249 } else { 8250 if (!params.shortSwipes) { 8251 swiper.slideTo(swiper.activeIndex); 8252 return; 8253 } 8254 const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 8255 if (!isNavButtonTarget) { 8256 if (swiper.swipeDirection === "next") { 8257 swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); 8258 } 8259 if (swiper.swipeDirection === "prev") { 8260 swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); 8261 } 8262 } else if (e.target === swiper.navigation.nextEl) { 8263 swiper.slideTo(stopIndex + increment); 8264 } else { 8265 swiper.slideTo(stopIndex); 8266 } 8267 } 8268 } 8269 8270
vendor: 1,144 bytes, lines 8270-8307
8270// node_modules/swiper/core/events/onResize.js 8271 function onResize() { 8272 const swiper = this; 8273 const { 8274 params, 8275 el 8276 } = swiper; 8277 if (el && el.offsetWidth === 0) 8278 return; 8279 if (params.breakpoints) { 8280 swiper.setBreakpoint(); 8281 } 8282 const { 8283 allowSlideNext, 8284 allowSlidePrev, 8285 snapGrid 8286 } = swiper; 8287 swiper.allowSlideNext = true; 8288 swiper.allowSlidePrev = true; 8289 swiper.updateSize(); 8290 swiper.updateSlides(); 8291 swiper.updateSlidesClasses(); 8292 if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { 8293 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 8294 } else { 8295 swiper.slideTo(swiper.activeIndex, 0, false, true); 8296 } 8297 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 8298 swiper.autoplay.run(); 8299 } 8300 swiper.allowSlidePrev = allowSlidePrev; 8301 swiper.allowSlideNext = allowSlideNext; 8302 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 8303 swiper.checkOverflow(); 8304 } 8305 } 8306 8307
vendor: 406 bytes, lines 8307-8322
8307// node_modules/swiper/core/events/onClick.js 8308 function onClick(e) { 8309 const swiper = this; 8310 if (!swiper.enabled) 8311 return; 8312 if (!swiper.allowClick) { 8313 if (swiper.params.preventClicks) 8314 e.preventDefault(); 8315 if (swiper.params.preventClicksPropagation && swiper.animating) { 8316 e.stopPropagation(); 8317 e.stopImmediatePropagation(); 8318 } 8319 } 8320 } 8321 8322
vendor: 1,008 bytes, lines 8322-8355
8322// node_modules/swiper/core/events/onScroll.js 8323 function onScroll() { 8324 const swiper = this; 8325 const { 8326 wrapperEl, 8327 rtlTranslate, 8328 enabled 8329 } = swiper; 8330 if (!enabled) 8331 return; 8332 swiper.previousTranslate = swiper.translate; 8333 if (swiper.isHorizontal()) { 8334 swiper.translate = -wrapperEl.scrollLeft; 8335 } else { 8336 swiper.translate = -wrapperEl.scrollTop; 8337 } 8338 if (swiper.translate === 0) 8339 swiper.translate = 0; 8340 swiper.updateActiveIndex(); 8341 swiper.updateSlidesClasses(); 8342 let newProgress; 8343 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 8344 if (translatesDiff === 0) { 8345 newProgress = 0; 8346 } else { 8347 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 8348 } 8349 if (newProgress !== swiper.progress) { 8350 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 8351 } 8352 swiper.emit("setTranslate", swiper.translate, false); 8353 } 8354 8355
vendor: 2,662 bytes, lines 8355-8432
8355// node_modules/swiper/core/events/index.js 8356 var dummyEventAttached = false; 8357 function dummyEventListener() { 8358 } 8359 var events = (swiper, method) => { 8360 const document2 = getDocument(); 8361 const { 8362 params, 8363 touchEvents, 8364 el, 8365 wrapperEl, 8366 device, 8367 support: support2 8368 } = swiper; 8369 const capture = !!params.nested; 8370 const domMethod = method === "on" ? "addEventListener" : "removeEventListener"; 8371 const swiperMethod = method; 8372 if (!support2.touch) { 8373 el[domMethod](touchEvents.start, swiper.onTouchStart, false); 8374 document2[domMethod](touchEvents.move, swiper.onTouchMove, capture); 8375 document2[domMethod](touchEvents.end, swiper.onTouchEnd, false); 8376 } else { 8377 const passiveListener = touchEvents.start === "touchstart" && support2.passiveListener && params.passiveListeners ? { 8378 passive: true, 8379 capture: false 8380 } : false; 8381 el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener); 8382 el[domMethod](touchEvents.move, swiper.onTouchMove, support2.passiveListener ? { 8383 passive: false, 8384 capture 8385 } : capture); 8386 el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener); 8387 if (touchEvents.cancel) { 8388 el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener); 8389 } 8390 } 8391 if (params.preventClicks || params.preventClicksPropagation) { 8392 el[domMethod]("click", swiper.onClick, true); 8393 } 8394 if (params.cssMode) { 8395 wrapperEl[domMethod]("scroll", swiper.onScroll); 8396 } 8397 if (params.updateOnWindowResize) { 8398 swiper[swiperMethod](device.ios || device.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, true); 8399 } else { 8400 swiper[swiperMethod]("observerUpdate", onResize, true); 8401 } 8402 }; 8403 function attachEvents() { 8404 const swiper = this; 8405 const document2 = getDocument(); 8406 const { 8407 params, 8408 support: support2 8409 } = swiper; 8410 swiper.onTouchStart = onTouchStart.bind(swiper); 8411 swiper.onTouchMove = onTouchMove.bind(swiper); 8412 swiper.onTouchEnd = onTouchEnd.bind(swiper); 8413 if (params.cssMode) { 8414 swiper.onScroll = onScroll.bind(swiper); 8415 } 8416 swiper.onClick = onClick.bind(swiper); 8417 if (support2.touch && !dummyEventAttached) { 8418 document2.addEventListener("touchstart", dummyEventListener); 8419 dummyEventAttached = true; 8420 } 8421 events(swiper, "on"); 8422 } 8423 function detachEvents() { 8424 const swiper = this; 8425 events(swiper, "off"); 8426 } 8427 var events_default = { 8428 attachEvents, 8429 detachEvents 8430 }; 8431 8432
vendor: 3,102 bytes, lines 8432-8504
8432// node_modules/swiper/core/breakpoints/setBreakpoint.js 8433 var isGridEnabled = (swiper, params) => { 8434 return swiper.grid && params.grid && params.grid.rows > 1; 8435 }; 8436 function setBreakpoint() { 8437 const swiper = this; 8438 const { 8439 activeIndex, 8440 initialized, 8441 loopedSlides = 0, 8442 params, 8443 $el 8444 } = swiper; 8445 const breakpoints = params.breakpoints; 8446 if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) 8447 return; 8448 const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); 8449 if (!breakpoint || swiper.currentBreakpoint === breakpoint) 8450 return; 8451 const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : void 0; 8452 const breakpointParams = breakpointOnlyParams || swiper.originalParams; 8453 const wasMultiRow = isGridEnabled(swiper, params); 8454 const isMultiRow = isGridEnabled(swiper, breakpointParams); 8455 const wasEnabled = params.enabled; 8456 if (wasMultiRow && !isMultiRow) { 8457 $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`); 8458 swiper.emitContainerClasses(); 8459 } else if (!wasMultiRow && isMultiRow) { 8460 $el.addClass(`${params.containerModifierClass}grid`); 8461 if (breakpointParams.grid.fill && breakpointParams.grid.fill === "column" || !breakpointParams.grid.fill && params.grid.fill === "column") { 8462 $el.addClass(`${params.containerModifierClass}grid-column`); 8463 } 8464 swiper.emitContainerClasses(); 8465 } 8466 ["navigation", "pagination", "scrollbar"].forEach((prop) => { 8467 const wasModuleEnabled = params[prop] && params[prop].enabled; 8468 const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled; 8469 if (wasModuleEnabled && !isModuleEnabled) { 8470 swiper[prop].disable(); 8471 } 8472 if (!wasModuleEnabled && isModuleEnabled) { 8473 swiper[prop].enable(); 8474 } 8475 }); 8476 const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 8477 const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 8478 if (directionChanged && initialized) { 8479 swiper.changeDirection(); 8480 } 8481 extend2(swiper.params, breakpointParams); 8482 const isEnabled = swiper.params.enabled; 8483 Object.assign(swiper, { 8484 allowTouchMove: swiper.params.allowTouchMove, 8485 allowSlideNext: swiper.params.allowSlideNext, 8486 allowSlidePrev: swiper.params.allowSlidePrev 8487 }); 8488 if (wasEnabled && !isEnabled) { 8489 swiper.disable(); 8490 } else if (!wasEnabled && isEnabled) { 8491 swiper.enable(); 8492 } 8493 swiper.currentBreakpoint = breakpoint; 8494 swiper.emit("_beforeBreakpoint", breakpointParams); 8495 if (needsReLoop && initialized) { 8496 swiper.loopDestroy(); 8497 swiper.loopCreate(); 8498 swiper.updateSlides(); 8499 swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); 8500 } 8501 swiper.emit("breakpoint", breakpointParams); 8502 } 8503 8504
vendor: 1,231 bytes, lines 8504-8542
8504// node_modules/swiper/core/breakpoints/getBreakpoint.js 8505 function getBreakpoint(breakpoints, base = "window", containerEl) { 8506 if (!breakpoints || base === "container" && !containerEl) 8507 return void 0; 8508 let breakpoint = false; 8509 const window2 = getWindow(); 8510 const currentHeight = base === "window" ? window2.innerHeight : containerEl.clientHeight; 8511 const points = Object.keys(breakpoints).map((point) => { 8512 if (typeof point === "string" && point.indexOf("@") === 0) { 8513 const minRatio = parseFloat(point.substr(1)); 8514 const value = currentHeight * minRatio; 8515 return { 8516 value, 8517 point 8518 }; 8519 } 8520 return { 8521 value: point, 8522 point 8523 }; 8524 }); 8525 points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); 8526 for (let i = 0; i < points.length; i += 1) { 8527 const { 8528 point, 8529 value 8530 } = points[i]; 8531 if (base === "window") { 8532 if (window2.matchMedia(`(min-width: ${value}px)`).matches) { 8533 breakpoint = point; 8534 } 8535 } else if (value <= containerEl.clientWidth) { 8536 breakpoint = point; 8537 } 8538 } 8539 return breakpoint || "max"; 8540 } 8541 8542
vendor: 130 bytes, lines 8542-8548
8542// node_modules/swiper/core/breakpoints/index.js 8543 var breakpoints_default = { 8544 setBreakpoint, 8545 getBreakpoint 8546 }; 8547 8548
vendor: 1,542 bytes, lines 8548-8602
8548// node_modules/swiper/core/classes/addClasses.js 8549 function prepareClasses(entries, prefix) { 8550 const resultClasses = []; 8551 entries.forEach((item) => { 8552 if (typeof item === "object") { 8553 Object.keys(item).forEach((classNames) => { 8554 if (item[classNames]) { 8555 resultClasses.push(prefix + classNames); 8556 } 8557 }); 8558 } else if (typeof item === "string") { 8559 resultClasses.push(prefix + item); 8560 } 8561 }); 8562 return resultClasses; 8563 } 8564 function addClasses() { 8565 const swiper = this; 8566 const { 8567 classNames, 8568 params, 8569 rtl, 8570 $el, 8571 device, 8572 support: support2 8573 } = swiper; 8574 const suffixes = prepareClasses(["initialized", params.direction, { 8575 "pointer-events": !support2.touch 8576 }, { 8577 "free-mode": swiper.params.freeMode && params.freeMode.enabled 8578 }, { 8579 "autoheight": params.autoHeight 8580 }, { 8581 "rtl": rtl 8582 }, { 8583 "grid": params.grid && params.grid.rows > 1 8584 }, { 8585 "grid-column": params.grid && params.grid.rows > 1 && params.grid.fill === "column" 8586 }, { 8587 "android": device.android 8588 }, { 8589 "ios": device.ios 8590 }, { 8591 "css-mode": params.cssMode 8592 }, { 8593 "centered": params.cssMode && params.centeredSlides 8594 }, { 8595 "watch-progress": params.watchSlidesProgress 8596 }], params.containerModifierClass); 8597 classNames.push(...suffixes); 8598 $el.addClass([...classNames].join(" ")); 8599 swiper.emitContainerClasses(); 8600 } 8601 8602
vendor: 259 bytes, lines 8602-8613
8602// node_modules/swiper/core/classes/removeClasses.js 8603 function removeClasses() { 8604 const swiper = this; 8605 const { 8606 $el, 8607 classNames 8608 } = swiper; 8609 $el.removeClass(classNames.join(" ")); 8610 swiper.emitContainerClasses(); 8611 } 8612 8613
vendor: 119 bytes, lines 8613-8619
8613// node_modules/swiper/core/classes/index.js 8614 var classes_default = { 8615 addClasses, 8616 removeClasses 8617 }; 8618 8619
vendor: 796 bytes, lines 8619-8650
8619// node_modules/swiper/core/images/loadImage.js 8620 function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { 8621 const window2 = getWindow(); 8622 let image; 8623 function onReady() { 8624 if (callback) 8625 callback(); 8626 } 8627 const isPicture = dom_default(imageEl).parent("picture")[0]; 8628 if (!isPicture && (!imageEl.complete || !checkForComplete)) { 8629 if (src) { 8630 image = new window2.Image(); 8631 image.onload = onReady; 8632 image.onerror = onReady; 8633 if (sizes) { 8634 image.sizes = sizes; 8635 } 8636 if (srcset) { 8637 image.srcset = srcset; 8638 } 8639 if (src) { 8640 image.src = src; 8641 } 8642 } else { 8643 onReady(); 8644 } 8645 } else { 8646 onReady(); 8647 } 8648 } 8649 8650
vendor: 891 bytes, lines 8650-8671
8650// node_modules/swiper/core/images/preloadImages.js 8651 function preloadImages() { 8652 const swiper = this; 8653 swiper.imagesToLoad = swiper.$el.find("img"); 8654 function onReady() { 8655 if (typeof swiper === "undefined" || swiper === null || !swiper || swiper.destroyed) 8656 return; 8657 if (swiper.imagesLoaded !== void 0) 8658 swiper.imagesLoaded += 1; 8659 if (swiper.imagesLoaded === swiper.imagesToLoad.length) { 8660 if (swiper.params.updateOnImagesReady) 8661 swiper.update(); 8662 swiper.emit("imagesReady"); 8663 } 8664 } 8665 for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { 8666 const imageEl = swiper.imagesToLoad[i]; 8667 swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute("src"), imageEl.srcset || imageEl.getAttribute("srcset"), imageEl.sizes || imageEl.getAttribute("sizes"), true, onReady); 8668 } 8669 } 8670 8671
vendor: 116 bytes, lines 8671-8677
8671// node_modules/swiper/core/images/index.js 8672 var images_default = { 8673 loadImage, 8674 preloadImages 8675 }; 8676 8677
vendor: 1,057 bytes, lines 8677-8711
8677// node_modules/swiper/core/check-overflow/index.js 8678 function checkOverflow() { 8679 const swiper = this; 8680 const { 8681 isLocked: wasLocked, 8682 params 8683 } = swiper; 8684 const { 8685 slidesOffsetBefore 8686 } = params; 8687 if (slidesOffsetBefore) { 8688 const lastSlideIndex = swiper.slides.length - 1; 8689 const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; 8690 swiper.isLocked = swiper.size > lastSlideRightEdge; 8691 } else { 8692 swiper.isLocked = swiper.snapGrid.length === 1; 8693 } 8694 if (params.allowSlideNext === true) { 8695 swiper.allowSlideNext = !swiper.isLocked; 8696 } 8697 if (params.allowSlidePrev === true) { 8698 swiper.allowSlidePrev = !swiper.isLocked; 8699 } 8700 if (wasLocked && wasLocked !== swiper.isLocked) { 8701 swiper.isEnd = false; 8702 } 8703 if (wasLocked !== swiper.isLocked) { 8704 swiper.emit(swiper.isLocked ? "lock" : "unlock"); 8705 } 8706 } 8707 var check_overflow_default = { 8708 checkOverflow 8709 }; 8710 8711
vendor: 2,881 bytes, lines 8711-8806
8711// node_modules/swiper/core/defaults.js 8712 var defaults_default = { 8713 init: true, 8714 direction: "horizontal", 8715 touchEventsTarget: "wrapper", 8716 initialSlide: 0, 8717 speed: 300, 8718 cssMode: false, 8719 updateOnWindowResize: true, 8720 resizeObserver: true, 8721 nested: false, 8722 createElements: false, 8723 enabled: true, 8724 focusableElements: "input, select, option, textarea, button, video, label", 8725 width: null, 8726 height: null, 8727 preventInteractionOnTransition: false, 8728 userAgent: null, 8729 url: null, 8730 edgeSwipeDetection: false, 8731 edgeSwipeThreshold: 20, 8732 autoHeight: false, 8733 setWrapperSize: false, 8734 virtualTranslate: false, 8735 effect: "slide", 8736 breakpoints: void 0, 8737 breakpointsBase: "window", 8738 spaceBetween: 0, 8739 slidesPerView: 1, 8740 slidesPerGroup: 1, 8741 slidesPerGroupSkip: 0, 8742 slidesPerGroupAuto: false, 8743 centeredSlides: false, 8744 centeredSlidesBounds: false, 8745 slidesOffsetBefore: 0, 8746 slidesOffsetAfter: 0, 8747 normalizeSlideIndex: true, 8748 centerInsufficientSlides: false, 8749 watchOverflow: true, 8750 roundLengths: false, 8751 touchRatio: 1, 8752 touchAngle: 45, 8753 simulateTouch: true, 8754 shortSwipes: true, 8755 longSwipes: true, 8756 longSwipesRatio: 0.5, 8757 longSwipesMs: 300, 8758 followFinger: true, 8759 allowTouchMove: true, 8760 threshold: 0, 8761 touchMoveStopPropagation: false, 8762 touchStartPreventDefault: true, 8763 touchStartForcePreventDefault: false, 8764 touchReleaseOnEdges: false, 8765 uniqueNavElements: true, 8766 resistance: true, 8767 resistanceRatio: 0.85, 8768 watchSlidesProgress: false, 8769 grabCursor: false, 8770 preventClicks: true, 8771 preventClicksPropagation: true, 8772 slideToClickedSlide: false, 8773 preloadImages: true, 8774 updateOnImagesReady: true, 8775 loop: false, 8776 loopAdditionalSlides: 0, 8777 loopedSlides: null, 8778 loopedSlidesLimit: true, 8779 loopFillGroupWithBlank: false, 8780 loopPreventsSlide: true, 8781 rewind: false, 8782 allowSlidePrev: true, 8783 allowSlideNext: true, 8784 swipeHandler: null, 8785 noSwiping: true, 8786 noSwipingClass: "swiper-no-swiping", 8787 noSwipingSelector: null, 8788 passiveListeners: true, 8789 maxBackfaceHiddenSlides: 10, 8790 containerModifierClass: "swiper-", 8791 slideClass: "swiper-slide", 8792 slideBlankClass: "swiper-slide-invisible-blank", 8793 slideActiveClass: "swiper-slide-active", 8794 slideDuplicateActiveClass: "swiper-slide-duplicate-active", 8795 slideVisibleClass: "swiper-slide-visible", 8796 slideDuplicateClass: "swiper-slide-duplicate", 8797 slideNextClass: "swiper-slide-next", 8798 slideDuplicateNextClass: "swiper-slide-duplicate-next", 8799 slidePrevClass: "swiper-slide-prev", 8800 slideDuplicatePrevClass: "swiper-slide-duplicate-prev", 8801 wrapperClass: "swiper-wrapper", 8802 runCallbacksOnInit: true, 8803 _emitClasses: false 8804 }; 8805 8806
vendor: 1,195 bytes, lines 8806-8840
8806// node_modules/swiper/core/moduleExtendParams.js 8807 function moduleExtendParams(params, allModulesParams) { 8808 return function extendParams(obj = {}) { 8809 const moduleParamName = Object.keys(obj)[0]; 8810 const moduleParams = obj[moduleParamName]; 8811 if (typeof moduleParams !== "object" || moduleParams === null) { 8812 extend2(allModulesParams, obj); 8813 return; 8814 } 8815 if (["navigation", "pagination", "scrollbar"].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { 8816 params[moduleParamName] = { 8817 auto: true 8818 }; 8819 } 8820 if (!(moduleParamName in params && "enabled" in moduleParams)) { 8821 extend2(allModulesParams, obj); 8822 return; 8823 } 8824 if (params[moduleParamName] === true) { 8825 params[moduleParamName] = { 8826 enabled: true 8827 }; 8828 } 8829 if (typeof params[moduleParamName] === "object" && !("enabled" in params[moduleParamName])) { 8830 params[moduleParamName].enabled = true; 8831 } 8832 if (!params[moduleParamName]) 8833 params[moduleParamName] = { 8834 enabled: false 8835 }; 8836 extend2(allModulesParams, obj); 8837 }; 8838 } 8839 8840
vendor: 16,997 bytes, lines 8840-9340
8840// node_modules/swiper/core/core.js 8841 var prototypes = { 8842 eventsEmitter: events_emitter_default, 8843 update: update_default, 8844 translate: translate_default, 8845 transition: transition_default, 8846 slide: slide_default, 8847 loop: loop_default, 8848 grabCursor: grab_cursor_default, 8849 events: events_default, 8850 breakpoints: breakpoints_default, 8851 checkOverflow: check_overflow_default, 8852 classes: classes_default, 8853 images: images_default 8854 }; 8855 var extendedDefaults = {}; 8856 var Swiper = class { 8857 constructor(...args) { 8858 let el; 8859 let params; 8860 if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === "Object") { 8861 params = args[0]; 8862 } else { 8863 [el, params] = args; 8864 } 8865 if (!params) 8866 params = {}; 8867 params = extend2({}, params); 8868 if (el && !params.el) 8869 params.el = el; 8870 if (params.el && dom_default(params.el).length > 1) { 8871 const swipers = []; 8872 dom_default(params.el).each((containerEl) => { 8873 const newParams = extend2({}, params, { 8874 el: containerEl 8875 }); 8876 swipers.push(new Swiper(newParams)); 8877 }); 8878 return swipers; 8879 } 8880 const swiper = this; 8881 swiper.__swiper__ = true; 8882 swiper.support = getSupport(); 8883 swiper.device = getDevice({ 8884 userAgent: params.userAgent 8885 }); 8886 swiper.browser = getBrowser(); 8887 swiper.eventsListeners = {}; 8888 swiper.eventsAnyListeners = []; 8889 swiper.modules = [...swiper.__modules__]; 8890 if (params.modules && Array.isArray(params.modules)) { 8891 swiper.modules.push(...params.modules); 8892 } 8893 const allModulesParams = {}; 8894 swiper.modules.forEach((mod) => { 8895 mod({ 8896 swiper, 8897 extendParams: moduleExtendParams(params, allModulesParams), 8898 on: swiper.on.bind(swiper), 8899 once: swiper.once.bind(swiper), 8900 off: swiper.off.bind(swiper), 8901 emit: swiper.emit.bind(swiper) 8902 }); 8903 }); 8904 const swiperParams = extend2({}, defaults_default, allModulesParams); 8905 swiper.params = extend2({}, swiperParams, extendedDefaults, params); 8906 swiper.originalParams = extend2({}, swiper.params); 8907 swiper.passedParams = extend2({}, params); 8908 if (swiper.params && swiper.params.on) { 8909 Object.keys(swiper.params.on).forEach((eventName) => { 8910 swiper.on(eventName, swiper.params.on[eventName]); 8911 }); 8912 } 8913 if (swiper.params && swiper.params.onAny) { 8914 swiper.onAny(swiper.params.onAny); 8915 } 8916 swiper.$ = dom_default; 8917 Object.assign(swiper, { 8918 enabled: swiper.params.enabled, 8919 el, 8920 classNames: [], 8921 slides: dom_default(), 8922 slidesGrid: [], 8923 snapGrid: [], 8924 slidesSizesGrid: [], 8925 isHorizontal() { 8926 return swiper.params.direction === "horizontal"; 8927 }, 8928 isVertical() { 8929 return swiper.params.direction === "vertical"; 8930 }, 8931 activeIndex: 0, 8932 realIndex: 0, 8933 isBeginning: true, 8934 isEnd: false, 8935 translate: 0, 8936 previousTranslate: 0, 8937 progress: 0, 8938 velocity: 0, 8939 animating: false, 8940 allowSlideNext: swiper.params.allowSlideNext, 8941 allowSlidePrev: swiper.params.allowSlidePrev, 8942 touchEvents: function touchEvents() { 8943 const touch = ["touchstart", "touchmove", "touchend", "touchcancel"]; 8944 const desktop = ["pointerdown", "pointermove", "pointerup"]; 8945 swiper.touchEventsTouch = { 8946 start: touch[0], 8947 move: touch[1], 8948 end: touch[2], 8949 cancel: touch[3] 8950 }; 8951 swiper.touchEventsDesktop = { 8952 start: desktop[0], 8953 move: desktop[1], 8954 end: desktop[2] 8955 }; 8956 return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; 8957 }(), 8958 touchEventsData: { 8959 isTouched: void 0, 8960 isMoved: void 0, 8961 allowTouchCallbacks: void 0, 8962 touchStartTime: void 0, 8963 isScrolling: void 0, 8964 currentTranslate: void 0, 8965 startTranslate: void 0, 8966 allowThresholdMove: void 0, 8967 focusableElements: swiper.params.focusableElements, 8968 lastClickTime: now(), 8969 clickTimeout: void 0, 8970 velocities: [], 8971 allowMomentumBounce: void 0, 8972 isTouchEvent: void 0, 8973 startMoving: void 0 8974 }, 8975 allowClick: true, 8976 allowTouchMove: swiper.params.allowTouchMove, 8977 touches: { 8978 startX: 0, 8979 startY: 0, 8980 currentX: 0, 8981 currentY: 0, 8982 diff: 0 8983 }, 8984 imagesToLoad: [], 8985 imagesLoaded: 0 8986 }); 8987 swiper.emit("_swiper"); 8988 if (swiper.params.init) { 8989 swiper.init(); 8990 } 8991 return swiper; 8992 } 8993 enable() { 8994 const swiper = this; 8995 if (swiper.enabled) 8996 return; 8997 swiper.enabled = true; 8998 if (swiper.params.grabCursor) { 8999 swiper.setGrabCursor(); 9000 } 9001 swiper.emit("enable"); 9002 } 9003 disable() { 9004 const swiper = this; 9005 if (!swiper.enabled) 9006 return; 9007 swiper.enabled = false; 9008 if (swiper.params.grabCursor) { 9009 swiper.unsetGrabCursor(); 9010 } 9011 swiper.emit("disable"); 9012 } 9013 setProgress(progress, speed) { 9014 const swiper = this; 9015 progress = Math.min(Math.max(progress, 0), 1); 9016 const min = swiper.minTranslate(); 9017 const max = swiper.maxTranslate(); 9018 const current = (max - min) * progress + min; 9019 swiper.translateTo(current, typeof speed === "undefined" ? 0 : speed); 9020 swiper.updateActiveIndex(); 9021 swiper.updateSlidesClasses(); 9022 } 9023 emitContainerClasses() { 9024 const swiper = this; 9025 if (!swiper.params._emitClasses || !swiper.el) 9026 return; 9027 const cls = swiper.el.className.split(" ").filter((className) => { 9028 return className.indexOf("swiper") === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; 9029 }); 9030 swiper.emit("_containerClasses", cls.join(" ")); 9031 } 9032 getSlideClasses(slideEl) { 9033 const swiper = this; 9034 if (swiper.destroyed) 9035 return ""; 9036 return slideEl.className.split(" ").filter((className) => { 9037 return className.indexOf("swiper-slide") === 0 || className.indexOf(swiper.params.slideClass) === 0; 9038 }).join(" "); 9039 } 9040 emitSlidesClasses() { 9041 const swiper = this; 9042 if (!swiper.params._emitClasses || !swiper.el) 9043 return; 9044 const updates = []; 9045 swiper.slides.each((slideEl) => { 9046 const classNames = swiper.getSlideClasses(slideEl); 9047 updates.push({ 9048 slideEl, 9049 classNames 9050 }); 9051 swiper.emit("_slideClass", slideEl, classNames); 9052 }); 9053 swiper.emit("_slideClasses", updates); 9054 } 9055 slidesPerViewDynamic(view = "current", exact = false) { 9056 const swiper = this; 9057 const { 9058 params, 9059 slides, 9060 slidesGrid, 9061 slidesSizesGrid, 9062 size: swiperSize, 9063 activeIndex 9064 } = swiper; 9065 let spv = 1; 9066 if (params.centeredSlides) { 9067 let slideSize = slides[activeIndex].swiperSlideSize; 9068 let breakLoop; 9069 for (let i = activeIndex + 1; i < slides.length; i += 1) { 9070 if (slides[i] && !breakLoop) { 9071 slideSize += slides[i].swiperSlideSize; 9072 spv += 1; 9073 if (slideSize > swiperSize) 9074 breakLoop = true; 9075 } 9076 } 9077 for (let i = activeIndex - 1; i >= 0; i -= 1) { 9078 if (slides[i] && !breakLoop) { 9079 slideSize += slides[i].swiperSlideSize; 9080 spv += 1; 9081 if (slideSize > swiperSize) 9082 breakLoop = true; 9083 } 9084 } 9085 } else { 9086 if (view === "current") { 9087 for (let i = activeIndex + 1; i < slides.length; i += 1) { 9088 const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; 9089 if (slideInView) { 9090 spv += 1; 9091 } 9092 } 9093 } else { 9094 for (let i = activeIndex - 1; i >= 0; i -= 1) { 9095 const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; 9096 if (slideInView) { 9097 spv += 1; 9098 } 9099 } 9100 } 9101 } 9102 return spv; 9103 } 9104 update() { 9105 const swiper = this; 9106 if (!swiper || swiper.destroyed) 9107 return; 9108 const { 9109 snapGrid, 9110 params 9111 } = swiper; 9112 if (params.breakpoints) { 9113 swiper.setBreakpoint(); 9114 } 9115 swiper.updateSize(); 9116 swiper.updateSlides(); 9117 swiper.updateProgress(); 9118 swiper.updateSlidesClasses(); 9119 function setTranslate2() { 9120 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 9121 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 9122 swiper.setTranslate(newTranslate); 9123 swiper.updateActiveIndex(); 9124 swiper.updateSlidesClasses(); 9125 } 9126 let translated; 9127 if (swiper.params.freeMode && swiper.params.freeMode.enabled) { 9128 setTranslate2(); 9129 if (swiper.params.autoHeight) { 9130 swiper.updateAutoHeight(); 9131 } 9132 } else { 9133 if ((swiper.params.slidesPerView === "auto" || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { 9134 translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); 9135 } else { 9136 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 9137 } 9138 if (!translated) { 9139 setTranslate2(); 9140 } 9141 } 9142 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 9143 swiper.checkOverflow(); 9144 } 9145 swiper.emit("update"); 9146 } 9147 changeDirection(newDirection, needUpdate = true) { 9148 const swiper = this; 9149 const currentDirection = swiper.params.direction; 9150 if (!newDirection) { 9151 newDirection = currentDirection === "horizontal" ? "vertical" : "horizontal"; 9152 } 9153 if (newDirection === currentDirection || newDirection !== "horizontal" && newDirection !== "vertical") { 9154 return swiper; 9155 } 9156 swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`); 9157 swiper.emitContainerClasses(); 9158 swiper.params.direction = newDirection; 9159 swiper.slides.each((slideEl) => { 9160 if (newDirection === "vertical") { 9161 slideEl.style.width = ""; 9162 } else { 9163 slideEl.style.height = ""; 9164 } 9165 }); 9166 swiper.emit("changeDirection"); 9167 if (needUpdate) 9168 swiper.update(); 9169 return swiper; 9170 } 9171 changeLanguageDirection(direction) { 9172 const swiper = this; 9173 if (swiper.rtl && direction === "rtl" || !swiper.rtl && direction === "ltr") 9174 return; 9175 swiper.rtl = direction === "rtl"; 9176 swiper.rtlTranslate = swiper.params.direction === "horizontal" && swiper.rtl; 9177 if (swiper.rtl) { 9178 swiper.$el.addClass(`${swiper.params.containerModifierClass}rtl`); 9179 swiper.el.dir = "rtl"; 9180 } else { 9181 swiper.$el.removeClass(`${swiper.params.containerModifierClass}rtl`); 9182 swiper.el.dir = "ltr"; 9183 } 9184 swiper.update(); 9185 } 9186 mount(el) { 9187 const swiper = this; 9188 if (swiper.mounted) 9189 return true; 9190 const $el = dom_default(el || swiper.params.el); 9191 el = $el[0]; 9192 if (!el) { 9193 return false; 9194 } 9195 el.swiper = swiper; 9196 const getWrapperSelector = () => { 9197 return `.${(swiper.params.wrapperClass || "").trim().split(" ").join(".")}`; 9198 }; 9199 const getWrapper = () => { 9200 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 9201 const res = dom_default(el.shadowRoot.querySelector(getWrapperSelector())); 9202 res.children = (options) => $el.children(options); 9203 return res; 9204 } 9205 if (!$el.children) { 9206 return dom_default($el).children(getWrapperSelector()); 9207 } 9208 return $el.children(getWrapperSelector()); 9209 }; 9210 let $wrapperEl = getWrapper(); 9211 if ($wrapperEl.length === 0 && swiper.params.createElements) { 9212 const document2 = getDocument(); 9213 const wrapper = document2.createElement("div"); 9214 $wrapperEl = dom_default(wrapper); 9215 wrapper.className = swiper.params.wrapperClass; 9216 $el.append(wrapper); 9217 $el.children(`.${swiper.params.slideClass}`).each((slideEl) => { 9218 $wrapperEl.append(slideEl); 9219 }); 9220 } 9221 Object.assign(swiper, { 9222 $el, 9223 el, 9224 $wrapperEl, 9225 wrapperEl: $wrapperEl[0], 9226 mounted: true, 9227 rtl: el.dir.toLowerCase() === "rtl" || $el.css("direction") === "rtl", 9228 rtlTranslate: swiper.params.direction === "horizontal" && (el.dir.toLowerCase() === "rtl" || $el.css("direction") === "rtl"), 9229 wrongRTL: $wrapperEl.css("display") === "-webkit-box" 9230 }); 9231 return true; 9232 } 9233 init(el) { 9234 const swiper = this; 9235 if (swiper.initialized) 9236 return swiper; 9237 const mounted = swiper.mount(el); 9238 if (mounted === false) 9239 return swiper; 9240 swiper.emit("beforeInit"); 9241 if (swiper.params.breakpoints) { 9242 swiper.setBreakpoint(); 9243 } 9244 swiper.addClasses(); 9245 if (swiper.params.loop) { 9246 swiper.loopCreate(); 9247 } 9248 swiper.updateSize(); 9249 swiper.updateSlides(); 9250 if (swiper.params.watchOverflow) { 9251 swiper.checkOverflow(); 9252 } 9253 if (swiper.params.grabCursor && swiper.enabled) { 9254 swiper.setGrabCursor(); 9255 } 9256 if (swiper.params.preloadImages) { 9257 swiper.preloadImages(); 9258 } 9259 if (swiper.params.loop) { 9260 swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true); 9261 } else { 9262 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); 9263 } 9264 swiper.attachEvents(); 9265 swiper.initialized = true; 9266 swiper.emit("init"); 9267 swiper.emit("afterInit"); 9268 return swiper; 9269 } 9270 destroy(deleteInstance = true, cleanStyles = true) { 9271 const swiper = this; 9272 const { 9273 params, 9274 $el, 9275 $wrapperEl, 9276 slides 9277 } = swiper; 9278 if (typeof swiper.params === "undefined" || swiper.destroyed) { 9279 return null; 9280 } 9281 swiper.emit("beforeDestroy"); 9282 swiper.initialized = false; 9283 swiper.detachEvents(); 9284 if (params.loop) { 9285 swiper.loopDestroy(); 9286 } 9287 if (cleanStyles) { 9288 swiper.removeClasses(); 9289 $el.removeAttr("style"); 9290 $wrapperEl.removeAttr("style"); 9291 if (slides && slides.length) { 9292 slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index"); 9293 } 9294 } 9295 swiper.emit("destroy"); 9296 Object.keys(swiper.eventsListeners).forEach((eventName) => { 9297 swiper.off(eventName); 9298 }); 9299 if (deleteInstance !== false) { 9300 swiper.$el[0].swiper = null; 9301 deleteProps(swiper); 9302 } 9303 swiper.destroyed = true; 9304 return null; 9305 } 9306 static extendDefaults(newDefaults) { 9307 extend2(extendedDefaults, newDefaults); 9308 } 9309 static get extendedDefaults() { 9310 return extendedDefaults; 9311 } 9312 static get defaults() { 9313 return defaults_default; 9314 } 9315 static installModule(mod) { 9316 if (!Swiper.prototype.__modules__) 9317 Swiper.prototype.__modules__ = []; 9318 const modules = Swiper.prototype.__modules__; 9319 if (typeof mod === "function" && modules.indexOf(mod) < 0) { 9320 modules.push(mod); 9321 } 9322 } 9323 static use(module) { 9324 if (Array.isArray(module)) { 9325 module.forEach((m) => Swiper.installModule(m)); 9326 return Swiper; 9327 } 9328 Swiper.installModule(module); 9329 return Swiper; 9330 } 9331 }; 9332 Object.keys(prototypes).forEach((prototypeGroup) => { 9333 Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => { 9334 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 9335 }); 9336 }); 9337 Swiper.use([Resize, Observer]); 9338 var core_default = Swiper; 9339 9340
vendor: 722 bytes, lines 9340-9360
9340// node_modules/swiper/shared/create-element-if-not-defined.js 9341 function createElementIfNotDefined(swiper, originalParams, params, checkProps) { 9342 const document2 = getDocument(); 9343 if (swiper.params.createElements) { 9344 Object.keys(checkProps).forEach((key) => { 9345 if (!params[key] && params.auto === true) { 9346 let element = swiper.$el.children(`.${checkProps[key]}`)[0]; 9347 if (!element) { 9348 element = document2.createElement("div"); 9349 element.className = checkProps[key]; 9350 swiper.$el.append(element); 9351 } 9352 params[key] = element; 9353 originalParams[key] = element; 9354 } 9355 }); 9356 } 9357 return params; 9358 } 9359 9360
vendor: 5,792 bytes, lines 9360-9544
9360// node_modules/swiper/modules/navigation/navigation.js 9361 function Navigation({ 9362 swiper, 9363 extendParams, 9364 on: on2, 9365 emit 9366 }) { 9367 extendParams({ 9368 navigation: { 9369 nextEl: null, 9370 prevEl: null, 9371 hideOnClick: false, 9372 disabledClass: "swiper-button-disabled", 9373 hiddenClass: "swiper-button-hidden", 9374 lockClass: "swiper-button-lock", 9375 navigationDisabledClass: "swiper-navigation-disabled" 9376 } 9377 }); 9378 swiper.navigation = { 9379 nextEl: null, 9380 $nextEl: null, 9381 prevEl: null, 9382 $prevEl: null 9383 }; 9384 function getEl(el) { 9385 let $el; 9386 if (el) { 9387 $el = dom_default(el); 9388 if (swiper.params.uniqueNavElements && typeof el === "string" && $el.length > 1 && swiper.$el.find(el).length === 1) { 9389 $el = swiper.$el.find(el); 9390 } 9391 } 9392 return $el; 9393 } 9394 function toggleEl($el, disabled) { 9395 const params = swiper.params.navigation; 9396 if ($el && $el.length > 0) { 9397 $el[disabled ? "addClass" : "removeClass"](params.disabledClass); 9398 if ($el[0] && $el[0].tagName === "BUTTON") 9399 $el[0].disabled = disabled; 9400 if (swiper.params.watchOverflow && swiper.enabled) { 9401 $el[swiper.isLocked ? "addClass" : "removeClass"](params.lockClass); 9402 } 9403 } 9404 } 9405 function update() { 9406 if (swiper.params.loop) 9407 return; 9408 const { 9409 $nextEl, 9410 $prevEl 9411 } = swiper.navigation; 9412 toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind); 9413 toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind); 9414 } 9415 function onPrevClick(e) { 9416 e.preventDefault(); 9417 if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) 9418 return; 9419 swiper.slidePrev(); 9420 emit("navigationPrev"); 9421 } 9422 function onNextClick(e) { 9423 e.preventDefault(); 9424 if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) 9425 return; 9426 swiper.slideNext(); 9427 emit("navigationNext"); 9428 } 9429 function init() { 9430 const params = swiper.params.navigation; 9431 swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, { 9432 nextEl: "swiper-button-next", 9433 prevEl: "swiper-button-prev" 9434 }); 9435 if (!(params.nextEl || params.prevEl)) 9436 return; 9437 const $nextEl = getEl(params.nextEl); 9438 const $prevEl = getEl(params.prevEl); 9439 if ($nextEl && $nextEl.length > 0) { 9440 $nextEl.on("click", onNextClick); 9441 } 9442 if ($prevEl && $prevEl.length > 0) { 9443 $prevEl.on("click", onPrevClick); 9444 } 9445 Object.assign(swiper.navigation, { 9446 $nextEl, 9447 nextEl: $nextEl && $nextEl[0], 9448 $prevEl, 9449 prevEl: $prevEl && $prevEl[0] 9450 }); 9451 if (!swiper.enabled) { 9452 if ($nextEl) 9453 $nextEl.addClass(params.lockClass); 9454 if ($prevEl) 9455 $prevEl.addClass(params.lockClass); 9456 } 9457 } 9458 function destroy() { 9459 const { 9460 $nextEl, 9461 $prevEl 9462 } = swiper.navigation; 9463 if ($nextEl && $nextEl.length) { 9464 $nextEl.off("click", onNextClick); 9465 $nextEl.removeClass(swiper.params.navigation.disabledClass); 9466 } 9467 if ($prevEl && $prevEl.length) { 9468 $prevEl.off("click", onPrevClick); 9469 $prevEl.removeClass(swiper.params.navigation.disabledClass); 9470 } 9471 } 9472 on2("init", () => { 9473 if (swiper.params.navigation.enabled === false) { 9474 disable(); 9475 } else { 9476 init(); 9477 update(); 9478 } 9479 }); 9480 on2("toEdge fromEdge lock unlock", () => { 9481 update(); 9482 }); 9483 on2("destroy", () => { 9484 destroy(); 9485 }); 9486 on2("enable disable", () => { 9487 const { 9488 $nextEl, 9489 $prevEl 9490 } = swiper.navigation; 9491 if ($nextEl) { 9492 $nextEl[swiper.enabled ? "removeClass" : "addClass"](swiper.params.navigation.lockClass); 9493 } 9494 if ($prevEl) { 9495 $prevEl[swiper.enabled ? "removeClass" : "addClass"](swiper.params.navigation.lockClass); 9496 } 9497 }); 9498 on2("click", (_s, e) => { 9499 const { 9500 $nextEl, 9501 $prevEl 9502 } = swiper.navigation; 9503 const targetEl = e.target; 9504 if (swiper.params.navigation.hideOnClick && !dom_default(targetEl).is($prevEl) && !dom_default(targetEl).is($nextEl)) { 9505 if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) 9506 return; 9507 let isHidden; 9508 if ($nextEl) { 9509 isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); 9510 } else if ($prevEl) { 9511 isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); 9512 } 9513 if (isHidden === true) { 9514 emit("navigationShow"); 9515 } else { 9516 emit("navigationHide"); 9517 } 9518 if ($nextEl) { 9519 $nextEl.toggleClass(swiper.params.navigation.hiddenClass); 9520 } 9521 if ($prevEl) { 9522 $prevEl.toggleClass(swiper.params.navigation.hiddenClass); 9523 } 9524 } 9525 }); 9526 const enable = () => { 9527 swiper.$el.removeClass(swiper.params.navigation.navigationDisabledClass); 9528 init(); 9529 update(); 9530 }; 9531 const disable = () => { 9532 swiper.$el.addClass(swiper.params.navigation.navigationDisabledClass); 9533 destroy(); 9534 }; 9535 Object.assign(swiper.navigation, { 9536 enable, 9537 disable, 9538 update, 9539 init, 9540 destroy 9541 }); 9542 } 9543 9544
9544// src/components/news/news.js 9545 document.addEventListener("DOMContentLoaded", () => { 9546 new core_default(".news__container", { 9547 modules: [Navigation], 9548 breakpoints: { 9549 1340: { 9550 slidesPerView: 4, 9551 spaceBetween: 20 9552 }, 9553 1060: { 9554 slidesPerView: 3, 9555 spaceBetween: 0 9556 }, 9557 860: { 9558 slidesPerView: 2, 9559 spaceBetween: 0 9560 }, 9561 767: { 9562 slidesPerView: 1, 9563 spaceBetween: 0, 9564 centerInsufficientSlides:true, 9565 } 9566 }, 9567 navigation: { 9568 nextEl: ".news__action-button--next", 9569 prevEl: ".news__action-button--prev" 9570 } 9571 }); 9572 }); 9573 9574
9574// src/components/events/events.js 9575 document.addEventListener("DOMContentLoaded", () => { 9576 new core_default(".events__container", { 9577 modules: [Navigation], 9578 breakpoints: { 9579 1340: { 9580 slidesPerView: 4, 9581 spaceBetween: 20 9582 }, 9583 1060: { 9584 slidesPerView: 3, 9585 spaceBetween: 20 9586 }, 9587 860: { 9588 slidesPerView: 2, 9589 spaceBetween: 20 9590 }, 9591 767: { 9592 slidesPerView: 1, 9593 spaceBetween: 0 9594 } 9595 }, 9596 navigation: { 9597 nextEl: ".events__action-button--next", 9598 prevEl: ".events__action-button--prev" 9599 } 9600 }); 9601 }); 9602})(); 9603 9604// ФилÑÑÑаÑÐ¸Ñ Ð¿ÑбликаÑий 9605var publictionsFilter = { 9606 init: function(){ 9607 var url = '/local/ajax/Components/philanthropyPublications.php'; 9608 var SHOW_ALL = false; 9609 var CODE = null; 9610 var PUBLICATIONS_TYPE_ID = $('.publications__header-title').attr('data-iblock'); 9611 var SITE_ID = $('.publications__header-title').attr('data-site'); 9612 $('.publications__cards-button').on('click',function(){ 9613 SHOW_ALL = true; 9614 $.ajax({
9615 url:url, 9616 type:'GET', 9617 data:{AJAX:true,CODE,SHOW_ALL:SHOW_ALL,PUBLICATIONS_TYPE_ID:PUBLICATIONS_TYPE_ID,SITE_ID:SITE_ID}, 9618 success: function(response){ 9619 if($(response).children().length>=9){ 9620 $('.publications__cards-button').css('display','none'); 9621 } 9622 $('.publications__cards-container').replaceWith(`<div class='publications__cards-container'>${response}</div>`); 9623 }, 9624 error:function(){ 9625 console.log('error'); 9626 } 9627 }) 9628 }) 9629 9630 $('.publications__tabs-item').on('click',function(){ 9631 $('.publications__tabs-item--active').removeClass('publications__tabs-item--active').addClass('publications__tabs-item'); 9632 $('.publications__tabs-text--active').removeClass('publications__tabs-text--active').addClass('publications__tabs-text'); 9633 $(this).removeClass('publications__tabs-item').addClass('publications__tabs-item--active'); 9634 $(this).children().removeClass('publications__tabs-text').addClass('publications__tabs-text--active'); 9635 CODE = $(this).attr('data-code'); 9636 $.ajax({
9637 url: url, 9638 type: 'GET', 9639 data: { AJAX: true,CODE, SHOW_ALL: SHOW_ALL,PUBLICATIONS_TYPE_ID:PUBLICATIONS_TYPE_ID,SITE_ID:SITE_ID }, 9640 success: function (response) { 9641 if($(response).children().length<=7){ 9642 $('.publications__cards-button').css('display','none'); 9643 } 9644 if($(response).children().length>7){ 9645 $('.publications__cards-button').css('display','flex'); 9646 } 9647 $('.publications__cards-container').replaceWith(response); 9648 }, 9649 error: function() { 9650 console.log('error'); 9651 }, 9652 }); 9653 }); 9654 } 9655} 9656// СвеÑнÑÑÑ - пÑокÑÑÑка ввеÑÑ 9657$(document).on('click','.goals__more-button',function(){ 9658 $('body,html').animate({scrollTop:0},0); 9659}) 9660 9661/*End ÐовÑй ÑенÑÑ ÑиланÑÑопии */ 9662 9663/*Start ÐовÑй endowment */ 9664 $(document).ready(function() { 9665 var __create = Object.create; 9666 var __defProp = Object.defineProperty; 9667 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 9668 var __getOwnPropNames = Object.getOwnPropertyNames; 9669 var __getProtoOf = Object.getPrototypeOf; 9670 var __hasOwnProp = Object.prototype.hasOwnProperty; 9671 var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); 9672 var __commonJS = (cb, mod) => function __require() { 9673 return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 9674 }; 9675 var __reExport = (target, module, desc) => { 9676 if (module && typeof module === "object" || typeof module === "function") { 9677 for (let key of __getOwnPropNames(module)) 9678 if (!__hasOwnProp.call(target, key) && key !== "default") 9679 __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable }); 9680 } 9681 return target; 9682 }; 9683 var __toModule = (module) => { 9684 return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module); 9685 }; 9686 9687
9687// src/components/asset-structure/asset-structure.js 9688 var require_asset_structure2 = __commonJS({ 9689 "src/components/asset-structure/asset-structure.js"(exports) { 9690 var list = $(".asset-structure__diagram-legend-list_2").children(); 9691 var labels = []; 9692 var colors = []; 9693 list.children(".asset-structure__diagram-legend-name").each((i, val) => { 9694 labels.push($(val).text()); 9695 colors.push($(val).attr("data-color")); 9696 $(val).change(() => { 9697 $(exports).css("border-left", `3px solid ${$(val).attr("data-color")}`); 9698 }); 9699 }).text(); 9700 var percent = []; 9701 list.children(".asset-structure__diagram-legend-percent").each((i, val) => { 9702 if (Number($(val).attr('data-percent')) < 1) { 9703 return percent.push(1); 9704 } 9705 percent.push(Number($(val).attr('data-percent'))); 9706 }); 9707 percent.reverse() 9708 labels.reverse() 9709 colors.reverse() 9710 $(document).on("scroll", function () { 9711 // if ($(".asset-structure__size-number_2").css("visibility") === "visible") { 9712 // if ($(".asset-structure__size-number_2").text() !== $(".asset-structure__size-number-hidden_2").text()) { 9713 // $(".asset-structure__size-number_2").prop("Counter", 0).animate({ 9714 // Counter: $(".asset-structure__size-number-hidden_2").text().split(' ')[0].replace(/\,/g, '.') 9715 // }, { 9716 // duration: 3e3, 9717 // easing: "swing", 9718 // step: function (now) { 9719 // if ($(".asset-structure__size-number_2").text() === $(".asset-structure__size-number-hidden_2").text()) { 9720 // $(".asset-structure__size-number_2").stop() 9721 // } 9722 // $(".asset-structure__size-number_2").text(now.toFixed(3).replace(/\./g, ',')+' '+$(".asset-structure__size-number-hidden_2").text().split(' ').slice(1).join(' ')); 9723 // } 9724 // }); 9725 // } 9726 // } 9727 if ($('.asset-structure__diagram-legend-item_2').css('visibility') === 'visible') { 9728 $('.asset-structure__diagram-legend-item_2').children('.asset-structure__diagram-legend-percent').each(function (i, val) { 9729 if (Number($(val).attr('data-percent')) < 1) { 9730 return $(val).text($(val).attr('data-percent')+'%') 9731 } 9732 if ($(val).text().split("")[1] !== '%' ) { 9733 $(val).prop("Counter", 0).animate({ 9734 Counter: $(val).attr('data-percent').replace(/\,/g, '.') 9735 }, { 9736 duration: 3e3, 9737 easing: "swing", 9738 step: function (now, tween) { 9739 $(val).text(now.toFixed(1).replace(/\./g, ',') + '%'); 9740 } 9741 }) 9742 } 9743 }) 9744 } 9745 if ($('#diagram_asset_structure_2').css('visibility') === 'visible') { 9746 if ($('#diagram_asset_structure_2').attr('data-process') !== 'ok') { 9747 $('#diagram_asset_structure_2').attr('data-process','ok') 9748 new Chart("diagram_asset_structure_2", { 9749 type: "doughnut", 9750 data: { 9751 labels, 9752 datasets: [{ 9753 backgroundColor: colors, 9754 data: percent 9755 }] 9756 }, 9757 options: { 9758 cutout: 110, 9759 datasets: { 9760 doughnut: { 9761 borderWidth: 4 9762 } 9763 }, 9764 plugins: { 9765 legend: { 9766 display: 0 9767 }, 9768 tooltip: { 9769 callbacks: { 9770 label: function (context) { 9771 let truePercent; 9772 list.each((i, val) => { 9773 if ($(val).children('.asset-structure__diagram-legend-name').text()===context.label) { 9774 truePercent = $(val).children('.asset-structure__diagram-legend-percent').attr('data-percent'); 9775 } 9776 }) 9777 return ' '+context.label+': '+Number(truePercent).toFixed(1)+'%'; 9778 } 9779 } 9780 } 9781 } 9782 } 9783 }); 9784 } 9785 } 9786 }); 9787 } 9788 9789 }); 9790 9791 var require_asset_structure = __commonJS({
9792 "src/components/asset-structure/asset-structure.js"(exports) { 9793 var list = $(".asset-structure__diagram-legend-list").children(); 9794 var labels = []; 9795 var colors = []; 9796 list.children(".asset-structure__diagram-legend-name").each((i, val) => { 9797 labels.push($(val).text()); 9798 colors.push($(val).attr("data-color")); 9799 $(val).change(() => { 9800 $(exports).css("border-left", `3px solid ${$(val).attr("data-color")}`); 9801 }); 9802 }).text(); 9803 var percent = []; 9804 list.children(".asset-structure__diagram-legend-percent").each((i, val) => { 9805 if (Number($(val).attr('data-percent')) < 1) { 9806 return percent.push(1); 9807 } 9808 percent.push(Number($(val).attr('data-percent'))); 9809 }); 9810 percent.reverse() 9811 labels.reverse() 9812 colors.reverse() 9813 $(document).on("scroll", function () { 9814 // if ($(".asset-structure__size-number").css("visibility") === "visible") { 9815 // if ($(".asset-structure__size-number").text() !== $(".asset-structure__size-number-hidden").text()) { 9816 // $(".asset-structure__size-number").prop("Counter", 0).animate({ 9817 // Counter: $(".asset-structure__size-number-hidden").text().split(' ')[0].replace(/\,/g, '.') 9818 // }, { 9819 // duration: 3e3, 9820 // easing: "swing", 9821 // step: function (now) { 9822 // if ($(".asset-structure__size-number").text() === $(".asset-structure__size-number-hidden").text()) { 9823 // $(".asset-structure__size-number").stop() 9824 // } 9825 // $(".asset-structure__size-number").text(now.toFixed(1).replace(/\./g, ',')+' '+$(".asset-structure__size-number-hidden").text().split(' ').slice(1).join(' ')); 9826 // } 9827 // }); 9828 // } 9829 // } 9830 9831 if ($('.asset-structure__diagram-legend-item').css('visibility') === 'visible') { 9832 $('.asset-structure__diagram-legend-item').children('.asset-structure__diagram-legend-percent').each(function (i, val) { 9833 if (Number($(val).attr('data-percent')) < 1) { 9834 return $(val).text($(val).attr('data-percent')+'%') 9835 } 9836 if ($(val).text().split("")[1] !== '%' ) { 9837 $(val).prop("Counter", 0).animate({ 9838 Counter: $(val).attr('data-percent').replace(/\,/g, '.') 9839 }, { 9840 duration: 3e3, 9841 easing: "swing", 9842 step: function (now, tween) { 9843 $(val).text(now.toFixed(1).replace(/\./g, ',') + '%'); 9844 } 9845 }) 9846 } 9847 }) 9848 } 9849 if ($('#diagram_asset_structure').css('visibility') === 'visible') { 9850 if ($('#diagram_asset_structure').attr('data-process') !== 'ok') { 9851 $('#diagram_asset_structure').attr('data-process','ok') 9852 new Chart("diagram_asset_structure", { 9853 type: "doughnut", 9854 data: { 9855 labels, 9856 datasets: [{ 9857 backgroundColor: colors, 9858 data: percent 9859 }] 9860 }, 9861 options: { 9862 cutout: 110, 9863 datasets: { 9864 doughnut: { 9865 borderWidth: 4 9866 } 9867 }, 9868 plugins: { 9869 legend: { 9870 display: 0 9871 }, 9872 tooltip: { 9873 callbacks: { 9874 label: function (context) { 9875 let truePercent; 9876 list.each((i, val) => { 9877 if ($(val).children('.asset-structure__diagram-legend-name').text()===context.label) { 9878 truePercent = $(val).children('.asset-structure__diagram-legend-percent').attr('data-percent'); 9879 } 9880 }) 9881 return ' '+context.label+': '+Number(truePercent).toFixed(1)+'%'; 9882 } 9883 } 9884 } 9885 } 9886 } 9887 }); 9888 } 9889 } 9890 }); 9891 } 9892 9893 }); 9894 9895
9895// src/components/index.js 9896 var import_asset_structure = __toModule(require_asset_structure()); 9897 __toModule(require_asset_structure2()) 9898 9899
9899// src/components/investment-management/investment-management.js 9900 var investSlider = null; 9901 var mediaQuerySize = 768; 9902 function investSliderInit() { 9903 if (!investSlider) { 9904 investSlider = new Swiper(".investment-management__container-slider", { 9905 pagination: ".investment-management__pagination", 9906 paginationType: 'bullets', 9907 paginationElement: 'span', 9908 paginationClickable: true, 9909 bulletClass: 'bullet-pagination__dot-dark', 9910 bulletActiveClass: 'bullet-pagination__dot--active', 9911 spaceBetween: 15, 9912 slidesPerView: 'auto', 9913 }); 9914 } 9915 } 9916 function investSliderDestroy() { 9917 if (investSlider) { 9918 investSlider.destroy(); 9919 investSlider = null; 9920 } 9921 } 9922 $(window).on("load resize", function() { 9923 var windowWidth = $(this).innerWidth(); 9924 if (windowWidth <= mediaQuerySize) { 9925 investSliderInit(); 9926 } else { 9927 investSliderDestroy(); 9928 } 9929 }); 9930 // $(".investment-management__card-container").each(function(index) { 9931 // $(this).css("animation-delay", `${index / 2}s`); 9932 // }); 9933 9934
9934// src/components/endowment-board/endowment-board.js 9935 $(".endowment-board__card--other").each(function(index) { 9936 $(this).css("animation-delay", `${(index + 1) / 2}s`); 9937 }); 9938 9939
9939// src/js/index.js 9940 }); 9941 9942/*End ÐовÑй endowment */ 9943 9944$(document).ready(function () { 9945 $('.main-bg-endowment').css('opacity', '1'); 9946}) 9947/* End */ 9948; 9949; /* Start:"a:4:{s:4:"full";s:106:"/local/templates/fondpotanin/components/bitrix/search.suggest.input/headerSearch/script.js?169390850212566";s:6:"source";s:90:"/local/templates/fondpotanin/components/bitrix/search.suggest.input/headerSearch/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 9950function JsSuggest(oHandler, sParams, sParser) 9951{ 9952 var t = this; 9953 9954 t.oObj = oHandler; 9955 t.sParams = sParams; 9956 // Arrays for data 9957 if (sParser) 9958 { 9959 t.sExp = new RegExp("["+sParser+"]+", "i"); 9960 } 9961 else 9962 { 9963 t.sExp = new RegExp(","); 9964 } 9965 t.oLast = {"str":false, "arr":false}; 9966 t.oThis = {"str":false, "arr":false}; 9967 t.oEl = {"start":false, "end":false}; 9968 t.oUnfinedWords = {}; 9969 // Flags 9970 t.bReady = true; 9971 t.eFocus = true; 9972 // Array with results & it`s showing 9973 t.aDiv = null; 9974 t.oDiv = null; 9975 // Pointers 9976 t.oActive = null; 9977 t.oPointer = []; 9978 t.oPointer_default = []; 9979 t.oPointer_this = 'input_field'; 9980 9981 t.oObj.onblur = function() 9982 { 9983 t.eFocus = false; 9984 }; 9985 9986 t.oObj.onfocus = function() 9987 { 9988 if (!t.eFocus) 9989 { 9990 t.eFocus = true; 9991 setTimeout(function(){t.CheckModif('focus')}, 500); 9992 } 9993 }; 9994 9995 t.oLast["arr"] = t.oObj.value.split(t.sExp); 9996 t.oLast["str"] = t.oLast["arr"].join(":"); 9997 9998 setTimeout(function(){t.CheckModif('this')}, 500); 9999 10000 this.CheckModif = function(__data) 10001 { 10002 var 10003 sThis = false, tmp = 0, 10004 bUnfined = false, word = "", 10005 cursor = {}; 10006 10007 if (!t.eFocus) 10008 return; 10009 10010 if (t.bReady && t.oObj.value.length > 0) 10011 { 10012 // Preparing input data 10013 t.oThis["arr"] = t.oObj.value.split(t.sExp); 10014 t.oThis["str"] = t.oThis["arr"].join(":"); 10015 10016 // Getting modificated element 10017 if (t.oThis["str"] && (t.oThis["str"] != t.oLast["str"])) 10018 { 10019 cursor['position'] = TCJsUtils.getCursorPosition(t.oObj); 10020 if (cursor['position']['end'] > 0 && !t.sExp.test(t.oObj.value.substr(cursor['position']['end']-1, 1))) 10021 { 10022 cursor['arr'] = t.oObj.value.substr(0, cursor['position']['end']).split(t.sExp); 10023 sThis = t.oThis["arr"][cursor['arr'].length - 1]; 10024 10025 t.oEl['start'] = cursor['position']['end'] - cursor['arr'][cursor['arr'].length - 1].length; 10026 t.oEl['end'] = t.oEl['start'] + sThis.length; 10027 t.oEl['content'] = sThis; 10028 10029 t.oLast["arr"] = t.oThis["arr"]; 10030 t.oLast["str"] = t.oThis["str"]; 10031 } 10032 } 10033 if (sThis) 10034 { 10035 // Checking for UnfinedWords 10036 for (tmp = 2; tmp <= sThis.length; tmp++) 10037 { 10038 word = sThis.substr(0, tmp); 10039 if (t.oUnfinedWords[word] == '!fined') 10040 { 10041 bUnfined = true; 10042 break; 10043 } 10044 } 10045 if (!bUnfined) 10046 t.Send(sThis); 10047 } 10048 } 10049 setTimeout(function(){t.CheckModif('this')}, 500); 10050 }; 10051 10052 t.Send = function(sSearch) 10053 { 10054 if (!sSearch) 10055 return false; 10056 10057 var oError = []; 10058 t.bReady = false; 10059 if (BX('wait_container')) 10060 { 10061 BX('wait_container').innerHTML = BX.message('JS_CORE_LOADING'); 10062 BX.show(BX('wait_container')); 10063 } 10064 BX.ajax.post( 10065 '/local/templates/fondpotanin/components/bitrix/search.suggest.input/headerSearch/search.php', 10066 {"search":sSearch, "params":t.sParams}, 10067 function(data) 10068 { 10069 var result = {}; 10070 t.bReady = true; 10071 10072 try 10073 { 10074 eval("result = " + data + ";"); 10075 } 10076 catch(e) 10077 { 10078 oError['result_unval'] = e; 10079 } 10080 10081 if (TCJsUtils.empty(result)) 10082 oError['result_empty'] = 'Empty result'; 10083 10084 try 10085 { 10086 if (TCJsUtils.empty(oError) && (typeof result == 'object')) 10087 { 10088 if (!(result.length == 1 && result[0]['NAME'] == t.oEl['content'])) 10089 { 10090 t.Show(result); 10091 return; 10092 } 10093 } 10094 else 10095 { 10096 t.oUnfinedWords[t.oEl['content']] = '!fined'; 10097 } 10098 } 10099 catch(e) 10100 { 10101 oError['unknown_error'] = e; 10102 } 10103 10104 if(BX('wait_container')) 10105 BX.hide(BX('wait_container')); 10106 } 10107 ); 10108 }; 10109 10110 t.Show = function(result) 10111 { 10112 t.Destroy(); 10113 t.oDiv = document.body.appendChild(document.createElement("DIV")); 10114 t.oDiv.id = t.oObj.id+'_div'; 10115 10116 t.oDiv.className = "search-popup search-popup-header"; 10117 t.oDiv.style.position = 'absolute'; 10118 10119 t.aDiv = t.Print(result); 10120 var pos = TCJsUtils.GetRealPos(t.oObj); 10121 t.oDiv.style.width = parseInt(pos["width"]) + "px"; 10122 TCJsUtils.show(t.oDiv, pos["left"], pos["bottom"]); 10123 TCJsUtils.addEvent(document, "click", t.CheckMouse); 10124 TCJsUtils.addEvent(document, "keydown", t.CheckKeyword); 10125 }; 10126 10127 t.Print = function(aArr) 10128 { 10129 var aEl = null; 10130 var aResult = {}; 10131 var iCnt = 0; 10132 var oDiv = null; 10133 var oSpan = null; 10134 var sPrefix = t.oDiv.id; 10135 10136 for (var tmp_ in aArr) 10137 { 10138 if (aArr.hasOwnProperty(tmp_)) 10139 { 10140 // Math 10141 aEl = aArr[tmp_]; 10142 10143 var aRes = {}; 10144 aRes['ID'] = (aEl['ID'] && aEl['ID'].length > 0) ? aEl['ID'] : iCnt++; 10145 aRes['GID'] = sPrefix + '_' + aRes['ID']; 10146 aRes['NAME'] = TCJsUtils.htmlspecialcharsEx(aEl['NAME']); 10147 aRes['CNT'] = aEl['CNT']; 10148 10149 aResult[aRes['GID']] = aRes; 10150 t.oPointer.push(aRes['GID']); 10151 // Graph 10152 oDiv = t.oDiv.appendChild(document.createElement("DIV")); 10153 oDiv.id = aRes['GID']; 10154 oDiv.name = sPrefix + '_div'; 10155 10156 oDiv.className = 'search-popup-row'; 10157 10158 oDiv.onmouseover = function(){t.Init(); this.className='search-popup-row-active';}; 10159 oDiv.onmouseout = function(){t.Init(); this.className='search-popup-row';};
10160 oDiv.onclick = function(){t.oActive = this.id}; 10161 10162 oSpan = oDiv.appendChild(document.createElement("a")); 10163 oSpan.id = oDiv.id + '_NAME'; 10164 oSpan.className = "search-popup-el search-popup-el-cnt"; 10165 oSpan.setAttribute("href", aRes["CNT"]); 10166 10167 oSpan = oSpan.appendChild(document.createElement("DIV")); 10168 oSpan.id = oDiv.id + '_NAME'; 10169 oSpan.className = "search-popup-el search-popup-el-name"; 10170 oSpan.innerHTML = aRes['NAME']; 10171 } 10172 } 10173 t.oPointer.push('input_field'); 10174 t.oPointer_default = t.oPointer; 10175 return aResult; 10176 }; 10177 10178 t.Destroy = function() 10179 { 10180 try 10181 { 10182 TCJsUtils.hide(t.oDiv); 10183 t.oDiv.parentNode.removeChild(t.oDiv); 10184 } 10185 catch(e) 10186 {} 10187 10188 t.aDiv = []; 10189 t.oPointer = []; 10190 t.oPointer_default = []; 10191 t.oPointer_this = 'input_field'; 10192 t.bReady = true; 10193 t.eFocus = true; 10194 t.oActive = null; 10195 10196 TCJsUtils.removeEvent(document, "click", t.CheckMouse); 10197 TCJsUtils.removeEvent(document, "keydown", t.CheckKeyword); 10198 }; 10199 10200 t.Replace = function() 10201 { 10202 if (typeof t.oActive == 'string') 10203 { 10204 var tmp = t.aDiv[t.oActive]; 10205 var tmp1 = ''; 10206 if (typeof tmp == 'object') 10207 { 10208 var elEntities = document.createElement("span"); 10209 elEntities.innerHTML = tmp['NAME'].replace(/"/g, '"').replace(/&/g, '&'); 10210 tmp1 = elEntities.innerHTML; 10211 } 10212 //this preserves leading spaces 10213 var start = t.oEl['start']; 10214 while(start < t.oObj.value.length && t.oObj.value.substring(start, start+1) == " ") 10215 start++; 10216 10217 t.oObj.value = t.oObj.value.substring(0, start) + tmp1.replace(/</g, '<').replace(/>/g, '>') + t.oObj.value.substr(t.oEl['end']); 10218 TCJsUtils.setCursorPosition(t.oObj, start + tmp1.length); 10219 } 10220 }; 10221 10222 t.Init = function() 10223 { 10224 t.oActive = false; 10225 t.oPointer = t.oPointer_default; 10226 t.Clear(); 10227 t.oPointer_this = 'input_pointer'; 10228 }; 10229 10230 t.Clear = function() 10231 { 10232 var oEl = t.oDiv.getElementsByTagName("div"); 10233 if (oEl.length > 0 && typeof oEl == 'object') 10234 { 10235 for (var ii in oEl) 10236 { 10237 if (oEl.hasOwnProperty(ii)) 10238 { 10239 var oE = oEl[ii]; 10240 if (oE && (typeof oE == 'object') && (oE.name == t.oDiv.id + '_div')) 10241 { 10242 oE.className = "search-popup-row"; 10243 } 10244 } 10245 } 10246 } 10247 }; 10248 10249 t.CheckMouse = function() 10250 { 10251 t.Replace(); 10252 t.Destroy(); 10253 }; 10254 10255 t.CheckKeyword = function(e) 10256 { 10257 if (!e) 10258 e = window.event; 10259 10260 var oP = null; 10261 var oEl = null; 10262 10263 if ((37 < e.keyCode && e.keyCode <41) || (e.keyCode == 13)) 10264 { 10265 t.Clear(); 10266 10267 switch (e.keyCode) 10268 { 10269 case 38: 10270 oP = t.oPointer.pop(); 10271 if (t.oPointer_this == oP) 10272 { 10273 t.oPointer.unshift(oP); 10274 oP = t.oPointer.pop(); 10275 } 10276 10277 if (oP != 'input_field') 10278 { 10279 t.oActive = oP; 10280 oEl = document.getElementById(oP); 10281 if (typeof oEl == 'object') 10282 { 10283 oEl.className = "search-popup-row-active"; 10284 } 10285 } 10286 t.oPointer.unshift(oP); 10287 break; 10288 case 40: 10289 oP = t.oPointer.shift(); 10290 if (t.oPointer_this == oP) 10291 { 10292 t.oPointer.push(oP); 10293 oP = t.oPointer.shift(); 10294 } 10295 if (oP != 'input_field') 10296 { 10297 t.oActive = oP; 10298 oEl = document.getElementById(oP); 10299 if (typeof oEl == 'object') 10300 { 10301 oEl.className = "search-popup-row-active"; 10302 } 10303 } 10304 t.oPointer.push(oP); 10305 break; 10306 case 39: 10307 t.Replace(); 10308 t.Destroy(); 10309 break; 10310 case 13: 10311 t.Replace(); 10312 t.Destroy(); 10313 break; 10314 } 10315 t.oPointer_this = oP; 10316 } 10317 else 10318 { 10319 t.Destroy(); 10320 } 10321 }; 10322} 10323 10324var TCJsUtils = 10325{ 10326 arEvents: [], 10327 10328 addEvent: function(el, evname, func) 10329 { 10330 if(el.attachEvent) // IE 10331 el.attachEvent("on" + evname, func); 10332 else if(el.addEventListener) // Gecko / W3C 10333 el.addEventListener(evname, func, false); 10334 else 10335 el["on" + evname] = func; 10336 this.arEvents[this.arEvents.length] = {'element': el, 'event': evname, 'fn': func}; 10337 }, 10338 10339 removeEvent: function(el, evname, func) 10340 { 10341 if(el.detachEvent) // IE 10342 el.detachEvent("on" + evname, func); 10343 else if(el.removeEventListener) // Gecko / W3C 10344 el.removeEventListener(evname, func, false); 10345 else 10346 el["on" + evname] = null; 10347 }, 10348 10349 getCursorPosition: function(oObj) 10350 { 10351 var result = {'start': 0, 'end': 0}; 10352 if (!oObj || (typeof oObj != 'object')) 10353 return result; 10354 try 10355 { 10356 if (document.selection != null && oObj.selectionStart == null) 10357 { 10358 oObj.focus(); 10359 var oRange = document.selection.createRange(); 10360 var oParent = oRange.parentElement(); 10361 var sBookmark = oRange.getBookmark(); 10362 var sContents = oObj.value; 10363 var sContents_ = oObj.value; 10364 var sMarker = '__' + Math.random() + '__'; 10365 10366 while(sContents.indexOf(sMarker) != -1) 10367 { 10368 sMarker = '__' + Math.random() + '__'; 10369 } 10370 10371 if (!oParent || oParent == null || (oParent.type != "textarea" && oParent.type != "text")) 10372 { 10373 return result; 10374 } 10375 10376 oRange.text = sMarker + oRange.text + sMarker; 10377 sContents = oObj.value; 10378 result['start'] = sContents.indexOf(sMarker); 10379 sContents = sContents.replace(sMarker, ""); 10380 result['end'] = sContents.indexOf(sMarker); 10381 oObj.value = sContents_; 10382 oRange.moveToBookmark(sBookmark); 10383 oRange.select(); 10384 return result; 10385 } 10386 else 10387 {
10388 return { 10389 'start': oObj.selectionStart, 10390 'end': oObj.selectionEnd 10391 }; 10392 } 10393 } 10394 catch(e){} 10395 return result; 10396 }, 10397 10398 setCursorPosition: function(oObj, iPosition) 10399 { 10400 if (typeof oObj != 'object') 10401 return false; 10402 10403 oObj.focus(); 10404 10405 try 10406 { 10407 if (document.selection != null && oObj.selectionStart == null) 10408 { 10409 var oRange = document.selection.createRange(); 10410 oRange.select(); 10411 } 10412 else 10413 { 10414 oObj.selectionStart = iPosition; 10415 oObj.selectionEnd = iPosition; 10416 } 10417 return true; 10418 } 10419 catch(e) 10420 { 10421 return false; 10422 } 10423 10424 }, 10425 10426 printArray: function (oObj, sParser, iLevel) 10427 { 10428 try 10429 { 10430 var result = ''; 10431 var space = ''; 10432 10433 if (iLevel==undefined) 10434 iLevel = 0; 10435 if (!sParser) 10436 sParser = "\n"; 10437 10438 for (var j = 0; j <= iLevel; j++) 10439 space += ' '; 10440 10441 for (var i in oObj) 10442 { 10443 if (oObj.hasOwnProperty(i)) 10444 { 10445 if (typeof oObj[i] == 'object') 10446 result += space+i + " = {"+ sParser + TCJsUtils.printArray(oObj[i], sParser, iLevel+1) + ", " + sParser + "}" + sParser; 10447 else 10448 result += space+i + " = " + oObj[i] + "; " + sParser; 10449 } 10450 } 10451 10452 return result; 10453 } 10454 catch(e) 10455 { 10456 } 10457 }, 10458 10459 empty: function(oObj) 10460 { 10461 var result = true; 10462 if (oObj) 10463 { 10464 for (var i in oObj) 10465 { 10466 if (oObj.hasOwnProperty(i)) 10467 { 10468 result = false;
10469 break; 10470 } 10471 } 10472 } 10473 return result; 10474 }, 10475 10476 show: function(oDiv, iLeft, iTop) 10477 { 10478 if (typeof oDiv != 'object') 10479 return; 10480 var zIndex = parseInt(oDiv.style.zIndex); 10481 if(zIndex <= 0 || isNaN(zIndex)) 10482 zIndex = 100; 10483 oDiv.style.zIndex = zIndex; 10484 oDiv.style.left = iLeft + "px"; 10485 oDiv.style.top = iTop + "px"; 10486 10487 return oDiv; 10488 }, 10489 10490 hide: function(oDiv) 10491 { 10492 if(oDiv) 10493 oDiv.style.display = 'none'; 10494 }, 10495 10496 GetRealPos: function(el) 10497 { 10498 if(!el || !el.offsetParent) 10499 return false; 10500 10501 var res = {}; 10502 var objParent = el.offsetParent; 10503 res["left"] = el.offsetLeft; 10504 res["top"] = el.offsetTop; 10505 while(objParent && objParent.tagName != "BODY") 10506 { 10507 res["left"] += objParent.offsetLeft; 10508 res["top"] += objParent.offsetTop; 10509 objParent = objParent.offsetParent; 10510 } 10511 res["right"]=res["left"] + el.offsetWidth; 10512 res["bottom"]=res["top"] + el.offsetHeight; 10513 res["width"]=el.offsetWidth; 10514 res["height"]=el.offsetHeight; 10515 10516 return res; 10517 }, 10518 10519 htmlspecialcharsEx: function(str) 10520 { 10521 return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); 10522 }, 10523 10524 htmlspecialcharsback: function(str) 10525 { 10526 return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/&/g, '&'); 10527 } 10528}; 10529 10530/* End */ 10531; 10532; /* Start:"a:4:{s:4:"full";s:92:"/local/templates/fondpotanin/components/bitrix/menu/right_burger/script.min.js?1693908502409";s:6:"source";s:74:"/local/templates/fondpotanin/components/bitrix/menu/right_burger/script.js";s:3:"min";s:78:"/local/templates/fondpotanin/components/bitrix/menu/right_burger/script.min.js";s:3:"map";s:78:"/local/templates/fondpotanin/components/bitrix/menu/right_burger/script.map.js";}"*/ 10533var jsvhover=function(){var e=document.getElementById("vertical-multilevel-menu");if(!e)return;var t=e.getElementsByTagName("li");for(var n=0;n<t.length;n++){t[n].onmouseover=function(){this.className+=" jsvhover"};t[n].onmouseout=function(){this.className=this.className.replace(new RegExp(" jsvhover\\b"),"")}}};if(window.attachEvent)window.attachEvent("onload",jsvhover); 10534/* End */ 10535;; /* /local/templates/fondpotanin/build/script/plugins/jquery-3.3.1.min.js?1693908502139824*/ 10536; /* /local/templates/fondpotanin/build/script/plugins/jquery.cookie.js?16939085023329*/ 10537; /* /local/templates/fondpotanin/build/script/plugins/jquery.fancybox.min.js?169390850280480*/ 10538; /* /local/templates/fondpotanin/build/script/plugins/jquery.maskedinput.min.js?16939085025998*/ 10539; /* /local/templates/fondpotanin/build/script/plugins/flatpickr.min.js?169390850245152*/ 10540; /* /local/templates/fondpotanin/build/script/plugins/select2.full.min.js?1693908502106005*/ 10541; /* /local/templates/fondpotanin/build/script/plugins/svg4everybody.min.js?16939085021321*/ 10542; /* /local/templates/fondpotanin/build/script/plugins/swiper.min.js?1693908502123081*/ 10543; /* /local/templates/fondpotanin/build/script/polyfills/includes.js?16939085021483*/ 10544;
10544 /* /local/templates/fondpotanin/script.js?16939085024891*/ 10545; /* /local/templates/fondpotanin/build/script/main.js?1777307775258755*/ 10546; /* /local/templates/fondpotanin/components/bitrix/search.suggest.input/headerSearch/script.js?169390850212566*/ 10547; /* /local/templates/fondpotanin/components/bitrix/menu/right_burger/script.min.js?1693908502409*/ 10548 10549//# sourceMappingURL=template_0542bf5ed462a7bd2221094a4afd6751.map.js
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.