1 2; /* Start:"a:4:{s:4:"full";s:76:"/bitrix/templates/concept_phoenix_s4/js/jqueryConcept.min.js?175034561186926";s:6:"source";s:60:"/bitrix/templates/concept_phoenix_s4/js/jqueryConcept.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
vendor: 86,927 bytes, lines 3-4
3/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ 4!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={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,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.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(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
5/* End */ 6; 7; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.min.js?175034561151039";s:6:"source";s:56:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.min.js";s:3:"min";s:56:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.min.js";s:3:"map";s:60:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.min.js.map";}"*/ 8/*! 9 * Bootstrap v4.1.3 (https://getbootstrap.com/) 10 * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 11 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 12 */ 13!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,h){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}e=e&&e.hasOwnProperty("default")?e.default:e,h=h&&h.hasOwnProperty("default")?h.default:h;var r,n,o,a,c,u,f,d,g,_,m,p,v,y,E,C,T,b,S,I,A,D,w,N,O,k,P,j,H,L,R,x,W,U,q,F,K,M,Q,B,V,Y,z,J,Z,G,$,X,tt,et,nt,it,rt,ot,st,at,lt,ct,ht,ut,ft,dt,gt,_t,mt,pt,vt,yt,Et,Ct,Tt,bt,St,It,At,Dt,wt,Nt,Ot,kt,Pt,jt,Ht,Lt,Rt,xt,Wt,Ut,qt,Ft,Kt,Mt,Qt,Bt,Vt,Yt,zt,Jt,Zt,Gt,$t,Xt,te,ee,ne,ie,re,oe,se,ae,le,ce,he,ue,fe,de,ge,_e,me,pe,ve,ye,Ee,Ce,Te,be,Se,Ie,Ae,De,we,Ne,Oe,ke,Pe,je,He,Le,Re,xe,We,Ue,qe,Fe,Ke,Me,Qe,Be,Ve,Ye,ze,Je,Ze,Ge,$e,Xe,tn,en,nn,rn,on,sn,an,ln,cn,hn,un,fn,dn,gn,_n,mn,pn,vn,yn,En,Cn,Tn,bn,Sn,In,An,Dn,wn,Nn,On,kn,Pn,jn,Hn,Ln,Rn,xn,Wn,Un,qn,Fn=function(i){var e="transitionend";function t(t){var e=this,n=!1;return i(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");e&&"#"!==e||(e=t.getAttribute("href")||"");try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i(t).css("transition-duration");return parseFloat(e)?(e=e.split(",")[0],1e3*parseFloat(e)):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],o=e[i],s=o&&l.isElement(o)?"element":(a=o,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(r).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+r+'".')}var a}};return i.fn.emulateTransitionEnd=t,i.event.special[l.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(i(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},l}(e),Kn=(n="alert",a="."+(o="bs.alert"),c=(r=e).fn[n],u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",d="fade",g="show",_=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){r.removeData(this._element,o),this._element=null},t._getRootElement=function(t){var e=Fn.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=r(t).closest("."+f)[0]),n},t._triggerCloseEvent=function(t){var e=r.Event(u.CLOSE);return r(t).trigger(e),e},t._removeElement=function(e){var n=this;if(r(e).removeClass(g),r(e).hasClass(d)){var t=Fn.getTransitionDurationFromElement(e);r(e).one(Fn.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){r(t).detach().trigger(u.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=r(this),e=t.data(o);e||(e=new i(this),t.data(o,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),r(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',_._handleDismiss(new _)),r.fn[n]=_._jQueryInterface,r.fn[n].
13Constructor=_,r.fn[n].noConflict=function(){return r.fn[n]=c,_._jQueryInterface},_),Mn=(p="button",y="."+(v="bs.button"),E=".data-api",C=(m=e).fn[p],T="active",b="btn",I='[data-toggle^="button"]',A='[data-toggle="buttons"]',D="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+y+E,FOCUS_BLUR_DATA_API:(S="focus")+y+E+" blur"+y+E},k=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=m(this._element).closest(A)[0];if(n){var i=this._element.querySelector(D);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(T))t=!1;else{var r=n.querySelector(w);r&&m(r).removeClass(T)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(T),m(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(T)),t&&m(this._element).toggleClass(T)},t.dispose=function(){m.removeData(this._element,v),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=m(this).data(v);t||(t=new n(this),m(this).data(v,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),m(document).on(O.CLICK_DATA_API,I,function(t){t.preventDefault();var e=t.target;m(e).hasClass(b)||(e=m(e).closest(N)),k._jQueryInterface.call(m(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,I,function(t){var e=m(t.target).closest(N)[0];m(e).toggleClass(S,/^focus(in)?$/.test(t.type))}),m.fn[p]=k._jQueryInterface,m.fn[p].Constructor=k,m.fn[p].noConflict=function(){return m.fn[p]=C,k._jQueryInterface},k),Qn=(j="carousel",L="."+(H="bs.carousel"),R=".data-api",x=(P=e).fn[j],W={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},U={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q="next",F="prev",K="left",M="right",Q={SLIDE:"slide"+L,SLID:"slid"+L,KEYDOWN:"keydown"+L,MOUSEENTER:"mouseenter"+L,MOUSELEAVE:"mouseleave"+L,TOUCHEND:"touchend"+L,LOAD_DATA_API:"load"+L+R,CLICK_DATA_API:"click"+L+R},B="carousel",V="active",Y="slide",z="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",G="carousel-item-prev",$=".active",X=".active.carousel-item",tt=".carousel-item",et=".carousel-item-next, .carousel-item-prev",nt=".carousel-indicators",it="[data-slide], [data-slide-to]",rt='[data-ride="carousel"]',ot=function(){function o(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=this._element.querySelector(nt),this._addEventListeners()}var t=o.prototype;return t.next=function(){this._isSliding||this._slide(q)},t.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(F)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(et)&&(Fn.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(X);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?q:F;this._slide(i,this._items[t])}},t.dispose=function(){P(this._element).off(L),P.removeData(this._element,H),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},W,t),Fn.typeCheckConfig(j,t,U),t},t._addEventListeners=function(){var e=this;this._config.keyboard&&P(this._element).on(Q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(P(this._element).on(Q.MOUSEENTER,function(t){return e.pause(t)}).on(Q.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&P(this._element).on(Q.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(tt)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===q,i=t===F,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var s=(r+(t===F?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(X)),r=P.Event(Q.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return P(this._element).trigger(r),r},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll($));P(e).removeClass(V);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&P(n).addClass(V)}},t._slide=function(t,e){var n,i,r,o=this,s=this._element.querySelector(X),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(t===q?(n=J,i=Z,r=K):(n=z,i=G,r=M),l&&P(l).hasClass(V))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=P.Event(Q.SLID,{relatedTarget:l,direction:r,from:a,to:c});if(P(this._element).hasClass(Y)){P(l).addClass(i),Fn.reflow(l),P(s).addClass(n),P(l).addClass(n);var f=Fn.getTransitionDurationFromElement(s);P(s).one(Fn.TRANSITION_END,function(){P(l).removeClass(n+" "+i).addClass(V),P(s).removeClass(V+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return P(o._element).trigger(u)},0)}).emulateTransitionEnd(f)}else P(s).removeClass(V),P(l).addClass(V),this._isSliding=!1,P(this._element).trigger(u);h&&this.cycle()}},o._jQueryInterface=function(i){return this.each(function(){var t=P(this).data(H),e=l({},W,P(this).data());"object"==typeof i&&(e=l({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new o(this,e),P(this).data(H,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method n
13amed "'+n+'"');t[n]()}else e.interval&&(t.pause(),t.cycle())})},o._dataApiClickHandler=function(t){var e=Fn.getSelectorFromElement(this);if(e){var n=P(e)[0];if(n&&P(n).hasClass(B)){var i=l({},P(n).data(),P(this).data()),r=this.getAttribute("data-slide-to");r&&(i.interval=!1),o._jQueryInterface.call(P(n),i),r&&P(n).data(H).to(r),t.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return W}}]),o}(),P(document).on(Q.CLICK_DATA_API,it,ot._dataApiClickHandler),P(window).on(Q.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(rt)),e=0,n=t.length;e<n;e++){var i=P(t[e]);ot._jQueryInterface.call(i,i.data())}}),P.fn[j]=ot._jQueryInterface,P.fn[j].Constructor=ot,P.fn[j].noConflict=function(){return P.fn[j]=x,ot._jQueryInterface},ot),Bn=(at="collapse",ct="."+(lt="bs.collapse"),ht=(st=e).fn[at],ut={toggle:!0,parent:""},ft={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+ct,SHOWN:"shown"+ct,HIDE:"hide"+ct,HIDDEN:"hidden"+ct,CLICK_DATA_API:"click"+ct+".data-api"},gt="show",_t="collapse",mt="collapsing",pt="collapsed",vt="width",yt="height",Et=".show, .collapsing",Ct='[data-toggle="collapse"]',Tt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=st.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(Ct)),i=0,r=n.length;i<r;i++){var o=n[i],s=Fn.getSelectorFromElement(o),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){st(this._element).hasClass(gt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!st(this._element).hasClass(gt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Et)).filter(function(t){return t.getAttribute("data-parent")===n._config.parent})).length&&(t=null),!(t&&(e=st(t).not(this._selector).data(lt))&&e._isTransitioning))){var i=st.Event(dt.SHOW);if(st(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(st(t).not(this._selector),"hide"),e||st(t).data(lt,null));var r=this._getDimension();st(this._element).removeClass(_t).addClass(mt),this._element.style[r]=0,this._triggerArray.length&&st(this._triggerArray).removeClass(pt).attr("aria-expanded",!0),this.setTransitioning(!0);var o="scroll"+(r[0].toUpperCase()+r.slice(1)),s=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){st(n._element).removeClass(mt).addClass(_t).addClass(gt),n._element.style[r]="",n.setTransitioning(!1),st(n._element).trigger(dt.SHOWN)}).emulateTransitionEnd(s),this._element.style[r]=this._element[o]+"px"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&st(this._element).hasClass(gt)){var e=st.Event(dt.HIDE);if(st(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",Fn.reflow(this._element),st(this._element).addClass(mt).removeClass(_t).removeClass(gt);var i=this._triggerArray.length;if(0<i)for(var r=0;r<i;r++){var o=this._triggerArray[r],s=Fn.getSelectorFromElement(o);if(null!==s)st([].slice.call(document.querySelectorAll(s))).hasClass(gt)||st(o).addClass(pt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){t.setTransitioning(!1),st(t._element).removeClass(mt).addClass(_t).trigger(dt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){st.removeData(this._element,lt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},ut,t)).toggle=Boolean(t.toggle),Fn.typeCheckConfig(at,t,ft),t},t._getDimension=function(){return st(this._element).hasClass(vt)?vt:yt},t._getParent=function(){var n=this,t=null;Fn.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return st(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){if(t){var n=st(t).hasClass(gt);e.length&&st(e).toggleClass(pt,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(t){var e=Fn.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=st(this),e=t.data(lt),n=l({},ut,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(lt,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method n
13amed "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ut}}]),a}(),st(document).on(dt.CLICK_DATA_API,Ct,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=st(this),e=Fn.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));st(i).each(function(){var t=st(this),e=t.data(lt)?"toggle":n.data();Tt._jQueryInterface.call(t,e)})}),st.fn[at]=Tt._jQueryInterface,st.fn[at].Constructor=Tt,st.fn[at].noConflict=function(){return st.fn[at]=ht,Tt._jQueryInterface},Tt),Vn=(St="dropdown",At="."+(It="bs.dropdown"),Dt=".data-api",wt=(bt=e).fn[St],Nt=new RegExp("38|40|27"),Ot={HIDE:"hide"+At,HIDDEN:"hidden"+At,SHOW:"show"+At,SHOWN:"shown"+At,CLICK:"click"+At,CLICK_DATA_API:"click"+At+Dt,KEYDOWN_DATA_API:"keydown"+At+Dt,KEYUP_DATA_API:"keyup"+At+Dt},kt="disabled",Pt="show",jt="dropup",Ht="dropright",Lt="dropleft",Rt="dropdown-menu-right",xt="position-static",Wt='[data-toggle="dropdown"]',Ut=".dropdown form",qt=".dropdown-menu",Ft=".navbar-nav",Kt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Mt="top-start",Qt="top-end",Bt="bottom-start",Vt="bottom-end",Yt="right-start",zt="left-start",Jt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Zt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Gt=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!bt(this._element).hasClass(kt)){var t=c._getParentFromElement(this._element),e=bt(this._menu).hasClass(Pt);if(c._clearMenus(),!e){var n={relatedTarget:this._element},i=bt.Event(Ot.SHOW,n);if(bt(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof h)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var r=this._element;"parent"===this._config.reference?r=t:Fn.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boundary&&bt(t).addClass(xt),this._popper=new h(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===bt(t).closest(Ft).length&&bt(document.body).children().on("mouseover",null,bt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),bt(this._menu).toggleClass(Pt),bt(t).toggleClass(Pt).trigger(bt.Event(Ot.SHOWN,n))}}}},t.dispose=function(){bt.removeData(this._element,It),bt(this._element).off(At),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;bt(this._element).on(Ot.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,bt(this._element).data(),t),Fn.typeCheckConfig(St,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(qt))}return this._menu},t._getPlacement=function(){var t=bt(this._element.parentNode),e=Bt;return t.hasClass(jt)?(e=Mt,bt(this._menu).hasClass(Rt)&&(e=Qt)):t.hasClass(Ht)?e=Yt:t.hasClass(Lt)?e=zt:bt(this._menu).hasClass(Rt)&&(e=Vt),e},t._detectNavbar=function(){return 0<bt(this._element).closest(".navbar").length},t._getPopperConfig=function(){var e=this,t={};"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset;var n={placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},c._jQueryInterface=function(e){return this.each(function(){var t=bt(this).data(It);if(t||(t=new c(this,"object"==typeof e?e:null),bt(this).data(It,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method n
13amed "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Wt)),n=0,i=e.length;n<i;n++){var r=c._getParentFromElement(e[n]),o=bt(e[n]).data(It),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),o){var a=o._menu;if(bt(r).hasClass(Pt)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&bt.contains(r,t.target))){var l=bt.Event(Ot.HIDE,s);bt(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&bt(document.body).children().off("mouseover",null,bt.noop),e[n].setAttribute("aria-expanded","false"),bt(a).removeClass(Pt),bt(r).removeClass(Pt).trigger(bt.Event(Ot.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=Fn.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||bt(t.target).closest(qt).length)):Nt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!bt(this).hasClass(kt))){var e=c._getParentFromElement(this),n=bt(e).hasClass(Pt);if((n||27===t.which&&32===t.which)&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(Kt));if(0!==i.length){var r=i.indexOf(t.target);38===t.which&&0<r&&r--,40===t.which&&r<i.length-1&&r++,r<0&&(r=0),i[r].focus()}}else{if(27===t.which){var o=e.querySelector(Wt);bt(o).trigger("focus")}bt(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Jt}},{key:"DefaultType",get:function(){return Zt}}]),c}(),bt(document).on(Ot.KEYDOWN_DATA_API,Wt,Gt._dataApiKeydownHandler).on(Ot.KEYDOWN_DATA_API,qt,Gt._dataApiKeydownHandler).on(Ot.CLICK_DATA_API+" "+Ot.KEYUP_DATA_API,Gt._clearMenus).on(Ot.CLICK_DATA_API,Wt,function(t){t.preventDefault(),t.stopPropagation(),Gt._jQueryInterface.call(bt(this),"toggle")}).on(Ot.CLICK_DATA_API,Ut,function(t){t.stopPropagation()}),bt.fn[St]=Gt._jQueryInterface,bt.fn[St].Constructor=Gt,bt.fn[St].noConflict=function(){return bt.fn[St]=wt,Gt._jQueryInterface},Gt),Yn=(Xt="modal",ee="."+(te="bs.modal"),ne=($t=e).fn[Xt],ie={backdrop:!0,keyboard:!0,focus:!0,show:!0},re={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},oe={HIDE:"hide"+ee,HIDDEN:"hidden"+ee,SHOW:"show"+ee,SHOWN:"shown"+ee,FOCUSIN:"focusin"+ee,RESIZE:"resize"+ee,CLICK_DISMISS:"click.dismiss"+ee,KEYDOWN_DISMISS:"keydown.dismiss"+ee,MOUSEUP_DISMISS:"mouseup.dismiss"+ee,MOUSEDOWN_DISMISS:"mousedown.dismiss"+ee,CLICK_DATA_API:"click"+ee+".data-api"},se="modal-scrollbar-measure",ae="modal-backdrop",le="modal-open",ce="fade",he="show",ue=".modal-dialog",fe='[data-toggle="modal"]',de='[data-dismiss="modal"]',ge=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_e=".sticky-top",me=function(){function r(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(ue),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._scrollbarWidth=0}var t=r.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){$t(this._element).hasClass(ce)&&(this._isTransitioning=!0);var n=$t.Event(oe.SHOW,{relatedTarget:t});$t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),$t(document.body).addClass(le),this._setEscapeEvent(),this._setResizeEvent(),$t(this._element).on(oe.CLICK_DISMISS,de,function(t){return e.hide(t)}),$t(this._dialog).on(oe.MOUSEDOWN_DISMISS,function(){$t(e._element).one(oe.MOUSEUP_DISMISS,function(t){$t(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=$t.Event(oe.HIDE);if($t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=$t(this._element).hasClass(ce);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$t(document).off(oe.FOCUSIN),$t(this._element).removeClass(he),$t(this._element).off(oe.CLICK_DISMISS),$t(this._dialog).off(oe.MOUSEDOWN_DISMISS),i){var r=Fn.getTransitionDurationFromElement(this._element);$t(this._element).one(Fn.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(r)}else this._hideModal()}}},t.dispose=function(){$t.removeData(this._element,te),$t(window,document,this._element,this._backdrop).off(ee),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({}
13,ie,t),Fn.typeCheckConfig(Xt,t,re),t},t._showElement=function(t){var e=this,n=$t(this._element).hasClass(ce);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&Fn.reflow(this._element),$t(this._element).addClass(he),this._config.focus&&this._enforceFocus();var i=$t.Event(oe.SHOWN,{relatedTarget:t}),r=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,$t(e._element).trigger(i)};if(n){var o=Fn.getTransitionDurationFromElement(this._element);$t(this._dialog).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},t._enforceFocus=function(){var e=this;$t(document).off(oe.FOCUSIN).on(oe.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===$t(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?$t(this._element).on(oe.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||$t(this._element).off(oe.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?$t(window).on(oe.RESIZE,function(t){return e.handleUpdate(t)}):$t(window).off(oe.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){$t(document.body).removeClass(le),t._resetAdjustments(),t._resetScrollbar(),$t(t._element).trigger(oe.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&($t(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=$t(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ae,n&&this._backdrop.classList.add(n),$t(this._backdrop).appendTo(document.body),$t(this._element).on(oe.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&Fn.reflow(this._backdrop),$t(this._backdrop).addClass(he),!t)return;if(!n)return void t();var i=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){$t(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if($t(this._element).hasClass(ce)){var o=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else t&&t()},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var r=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(ge)),e=[].slice.call(document.querySelectorAll(_e));$t(t).each(function(t,e){var n=e.style.paddingRight,i=$t(e).css("padding-right");$t(e).data("padding-right",n).css("padding-right",parseFloat(i)+r._scrollbarWidth+"px")}),$t(e).each(function(t,e){var n=e.style.marginRight,i=$t(e).css("margin-right");$t(e).data("margin-right",n).css("margin-right",parseFloat(i)-r._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=$t(document.body).css("padding-right");$t(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(ge));$t(t).each(function(t,e){var n=$t(e).data("padding-right");$t(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+_e));$t(e).each(function(t,e){var n=$t(e).data("margin-right");"undefined"!=typeof n&&$t(e).css("margin-right",n).removeData("margin-right")});var n=$t(document.body).data("padding-right");$t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=se,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},r._jQueryInterface=function(n,i){return this.each(function(){var t=$t(this).data(te),e=l({},ie,$t(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new r(this,e),$t(this).data(te,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method n
13amed "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(r,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ie}}]),r}(),$t(document).on(oe.CLICK_DATA_API,fe,function(t){var e,n=this,i=Fn.getSelectorFromElement(this);i&&(e=document.querySelector(i));var r=$t(e).data(te)?"toggle":l({},$t(e).data(),$t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var o=$t(e).one(oe.SHOW,function(t){t.isDefaultPrevented()||o.one(oe.HIDDEN,function(){$t(n).is(":visible")&&n.focus()})});me._jQueryInterface.call($t(e),r,this)}),$t.fn[Xt]=me._jQueryInterface,$t.fn[Xt].Constructor=me,$t.fn[Xt].noConflict=function(){return $t.fn[Xt]=ne,me._jQueryInterface},me),zn=(ve="tooltip",Ee="."+(ye="bs.tooltip"),Ce=(pe=e).fn[ve],Te="bs-tooltip",be=new RegExp("(^|\\s)"+Te+"\\S+","g"),Ae={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!(Ie={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(Se={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},we="out",Ne={HIDE:"hide"+Ee,HIDDEN:"hidden"+Ee,SHOW:(De="show")+Ee,SHOWN:"shown"+Ee,INSERTED:"inserted"+Ee,CLICK:"click"+Ee,FOCUSIN:"focusin"+Ee,FOCUSOUT:"focusout"+Ee,MOUSEENTER:"mouseenter"+Ee,MOUSELEAVE:"mouseleave"+Ee},Oe="fade",ke="show",Pe=".tooltip-inner",je=".arrow",He="hover",Le="focus",Re="click",xe="manual",We=function(){function i(t,e){if("undefined"==typeof h)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=pe(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(pe(this.getTipElement()).hasClass(ke))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),pe.removeData(this.element,this.constructor.DATA_KEY),pe(this.element).off(this.constructor.EVENT_KEY),pe(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&pe(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===pe(this.element).css("display"))throw new Error("Please use show on visible elements");var t=pe.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){pe(this.element).trigger(t);var n=pe.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Fn.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&pe(i).addClass(Oe);var o="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(o);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:pe(document).find(this.config.container);pe(i).data(this.constructor.DATA_KEY,this),pe.contains(this.element.ownerDocument.documentElement,this.tip)||pe(i).appendTo(a),pe(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new h(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:je}
13,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),pe(i).addClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().on("mouseover",null,pe.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,pe(e.element).trigger(e.constructor.Event.SHOWN),t===we&&e._leave(null,e)};if(pe(this.tip).hasClass(Oe)){var c=Fn.getTransitionDurationFromElement(this.tip);pe(this.tip).one(Fn.TRANSITION_END,l).emulateTransitionEnd(c)}else l()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=pe.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==De&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),pe(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(pe(this.element).trigger(i),!i.isDefaultPrevented()){if(pe(n).removeClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().off("mouseover",null,pe.noop),this._activeTrigger[Re]=!1,this._activeTrigger[Le]=!1,this._activeTrigger[He]=!1,pe(this.tip).hasClass(Oe)){var o=Fn.getTransitionDurationFromElement(n);pe(n).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){pe(this.getTipElement()).addClass(Te+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||pe(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(pe(t.querySelectorAll(Pe)),this.getTitle()),pe(t).removeClass(Oe+" "+ke)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?pe(e).parent().is(t)||t.empty().append(e):t.text(pe(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return Ie[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)pe(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==xe){var e=t===He?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===He?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;pe(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}pe(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Le:He]=!0),pe(e.getTipElement()).hasClass(ke)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===De&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Le:He]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=we,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===we&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,pe(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Fn.typeCheckConfig(ve,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=pe(this.getTipElement()),e=t.attr("class").match(be);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(pe(t).removeClass(Oe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=pe(this).data(ye),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),pe(this).data(ye,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method n
13amed "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ae}},{key:"NAME",get:function(){return ve}},{key:"DATA_KEY",get:function(){return ye}},{key:"Event",get:function(){return Ne}},{key:"EVENT_KEY",get:function(){return Ee}},{key:"DefaultType",get:function(){return Se}}]),i}(),pe.fn[ve]=We._jQueryInterface,pe.fn[ve].Constructor=We,pe.fn[ve].noConflict=function(){return pe.fn[ve]=Ce,We._jQueryInterface},We),Jn=(qe="popover",Ke="."+(Fe="bs.popover"),Me=(Ue=e).fn[qe],Qe="bs-popover",Be=new RegExp("(^|\\s)"+Qe+"\\S+","g"),Ve=l({},zn.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ye=l({},zn.DefaultType,{content:"(string|element|function)"}),ze="fade",Ze=".popover-header",Ge=".popover-body",$e={HIDE:"hide"+Ke,HIDDEN:"hidden"+Ke,SHOW:(Je="show")+Ke,SHOWN:"shown"+Ke,INSERTED:"inserted"+Ke,CLICK:"click"+Ke,FOCUSIN:"focusin"+Ke,FOCUSOUT:"focusout"+Ke,MOUSEENTER:"mouseenter"+Ke,MOUSELEAVE:"mouseleave"+Ke},Xe=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){Ue(this.getTipElement()).addClass(Qe+"-"+t)},r.getTipElement=function(){return this.tip=this.tip||Ue(this.config.template)[0],this.tip},r.setContent=function(){var t=Ue(this.getTipElement());this.setElementContent(t.find(Ze),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ge),e),t.removeClass(ze+" "+Je)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=Ue(this.getTipElement()),e=t.attr("class").match(Be);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=Ue(this).data(Fe),e="object"==typeof n?n:null;if((t||!/destroy|hide/.test(n))&&(t||(t=new i(this,e),Ue(this).data(Fe,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ve}},{key:"NAME",get:function(){return qe}},{key:"DATA_KEY",get:function(){return Fe}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return Ke}},{key:"DefaultType",get:function(){return Ye}}]),i}(zn),Ue.fn[qe]=Xe._jQueryInterface,Ue.fn[qe].Constructor=Xe,Ue.fn[qe].noConflict=function(){return Ue.fn[qe]=Me,Xe._jQueryInterface},Xe),Zn=(en="scrollspy",rn="."+(nn="bs.scrollspy"),on=(tn=e).fn[en],sn={offset:10,method:"auto",target:""},an={offset:"number",method:"string",target:"(string|element)"},ln={ACTIVATE:"activate"+rn,SCROLL:"scroll"+rn,LOAD_DATA_API:"load"+rn+".data-api"},cn="dropdown-item",hn="active",un='[data-spy="scroll"]',fn=".active",dn=".nav, .list-group",gn=".nav-link",_n=".nav-item",mn=".list-group-item",pn=".dropdown",vn=".dropdown-item",yn=".dropdown-toggle",En="offset",Cn="position",Tn=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+gn+","+this._config.target+" "+mn+","+this._config.target+" "+vn,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,tn(this._scrollElement).on(ln.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?En:Cn,r="auto"===this._config.method?t:this._config.method,o=r===Cn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=Fn.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[tn(e)[r]().top+o,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}
13).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){tn.removeData(this._element,nn),tn(this._scrollElement).off(rn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=l({},sn,"object"==typeof t&&t?t:{})).target){var e=tn(t.target).attr("id");e||(e=Fn.getUID(en),tn(t.target).attr("id",e)),t.target="#"+e}return Fn.typeCheckConfig(en,t,an),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",");t=t.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var n=tn([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(cn)?(n.closest(pn).find(yn).addClass(hn),n.addClass(hn)):(n.addClass(hn),n.parents(dn).prev(gn+", "+mn).addClass(hn),n.parents(dn).prev(_n).children(gn).addClass(hn)),tn(this._scrollElement).trigger(ln.ACTIVATE,{relatedTarget:e})},t._clear=function(){var t=[].slice.call(document.querySelectorAll(this._selector));tn(t).filter(fn).removeClass(hn)},n._jQueryInterface=function(e){return this.each(function(){var t=tn(this).data(nn);if(t||(t=new n(this,"object"==typeof e&&e),tn(this).data(nn,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return sn}}]),n}(),tn(window).on(ln.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(un)),e=t.length;e--;){var n=tn(t[e]);Tn._jQueryInterface.call(n,n.data())}}),tn.fn[en]=Tn._jQueryInterface,tn.fn[en].Constructor=Tn,tn.fn[en].noConflict=function(){return tn.fn[en]=on,Tn._jQueryInterface},Tn),Gn=(In="."+(Sn="bs.tab"),An=(bn=e).fn.tab,Dn={HIDE:"hide"+In,HIDDEN:"hidden"+In,SHOW:"show"+In,SHOWN:"shown"+In,CLICK_DATA_API:"click"+In+".data-api"},wn="dropdown-menu",Nn="active",On="disabled",kn="fade",Pn="show",jn=".dropdown",Hn=".nav, .list-group",Ln=".active",Rn="> li > .active",xn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Wn=".dropdown-toggle",Un="> .dropdown-menu .active",qn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&bn(this._element).hasClass(Nn)||bn(this._element).hasClass(On))){var t,i,e=bn(this._element).closest(Hn)[0],r=Fn.getSelectorFromElement(this._element);if(e){var o="UL"===e.nodeName?Rn:Ln;i=(i=bn.makeArray(bn(e).find(o)))[i.length-1]}var s=bn.Event(Dn.HIDE,{relatedTarget:this._element}),a=bn.Event(Dn.SHOW,{relatedTarget:i});if(i&&bn(i).trigger(s),bn(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(t=document.querySelector(r)),this._activate(this._element,e);var l=function(){var t=bn.Event(Dn.HIDDEN,{relatedTarget:n._element}),e=bn.Event(Dn.SHOWN,{relatedTarget:i});bn(i).trigger(t),bn(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){bn.removeData(this._element,Sn),this._element=null}
13,t._activate=function(t,e,n){var i=this,r=("UL"===e.nodeName?bn(e).find(Rn):bn(e).children(Ln))[0],o=n&&r&&bn(r).hasClass(kn),s=function(){return i._transitionComplete(t,r,n)};if(r&&o){var a=Fn.getTransitionDurationFromElement(r);bn(r).one(Fn.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){bn(e).removeClass(Pn+" "+Nn);var i=bn(e.parentNode).find(Un)[0];i&&bn(i).removeClass(Nn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(bn(t).addClass(Nn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),Fn.reflow(t),bn(t).addClass(Pn),t.parentNode&&bn(t.parentNode).hasClass(wn)){var r=bn(t).closest(jn)[0];if(r){var o=[].slice.call(r.querySelectorAll(Wn));bn(o).addClass(Nn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=bn(this),e=t.data(Sn);if(e||(e=new i(this),t.data(Sn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),bn(document).on(Dn.CLICK_DATA_API,xn,function(t){t.preventDefault(),qn._jQueryInterface.call(bn(this),"show")}),bn.fn.tab=qn._jQueryInterface,bn.fn.tab.Constructor=qn,bn.fn.tab.noConflict=function(){return bn.fn.tab=An,qn._jQueryInterface},qn);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=Fn,t.Alert=Kn,t.Button=Mn,t.Carousel=Qn,t.Collapse=Bn,t.Dropdown=Vn,t.Modal=Yn,t.Popover=Jn,t.Scrollspy=Zn,t.Tab=Gn,t.Tooltip=zn,Object.defineProperty(t,"__esModule",{value:!0})}); 14/* End */ 15; 16; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.bundle.min.js?175034561170966";s:6:"source";s:63:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.bundle.min.js";s:3:"min";s:63:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.bundle.min.js";s:3:"map";s:67:"/bitrix/templates/concept_phoenix_s4/js/bootstrap.bundle.min.js.map";}"*/ 17/*! 18 * Bootstrap v4.1.3 (https://getbootstrap.com/) 19 * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 20 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 21 */ 22!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t(e.bootstrap={},e.jQuery)}(this,function(e,t){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function l(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),t.forEach(function(e){var t,n,i;t=r,i=o[n=e],n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i})}return r}for(var r,n,o,a,c,u,f,h,d,p,m,g,_,v,y,E,b,w,C,T,S,D,A,I,O,N,k,x,P,L,j,H,M,F,W,R,U,B,q,K,Q,Y,V,z,G,J,Z,X,$,ee,te,ne,ie,re,oe,se,ae,le,ce,ue,fe,he,de,pe,me,ge,_e,ve,ye,Ee,be,we=function(i){var t="transitionend";function e(e){var t=this,n=!1;return i(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(t)},e),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");t&&"#"!==t||(t=e.getAttribute("href")||"");try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var t=i(e).css("transition-duration");return parseFloat(t)?(t=t.split(",")[0],1e3*parseFloat(t)):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){i(e).trigger(t)},supportsTransitionEnd:function(){return Boolean(t)},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],o=t[i],s=o&&l.isElement(o)?"element":(a=o,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(r).test(s))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+r+'".')}var a}};return i.fn.emulateTransitionEnd=e,i.event.special[l.TRANSITION_END]={bindType:t,delegateType:t,handle:function(e){if(i(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},l}(t=t&&t.hasOwnProperty("default")?t.default:t),Ce=(n="alert",a="."+(o="bs.alert"),c=(r=t).fn[n],u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",h="fade",d="show",p=function(){function i(e){this._element=e}var e=i.prototype;return e.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},e.dispose=function(){r.removeData(this._element,o),this._element=null},e._getRootElement=function(e){var t=we.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n||(n=r(e).closest("."+f)[0]),n},e._triggerCloseEvent=function(e){var t=r.Event(u.CLOSE);return r(e).trigger(t),t},e._removeElement=function(t){var n=this;if(r(t).removeClass(d),r(t).hasClass(h)){var e=we.getTransitionDurationFromElement(t);r(t).one(we.TRANSITION_END,function(e){return n._destroyElement(t,e)}).emulateTransitionEnd(e)}else this._destroyElement(t)},e._destroyElement=function(e){r(e).detach().trigger(u.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var e=r(this),t=e.data(o);t||(t=new i(this),e.data(o,t)),"close"===n&&t[n](this)})},i._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),r(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',p._handleDismiss(new p)),r.fn[n]=p._jQueryInterface,r.fn[n].
22Constructor=p,r.fn[n].noConflict=function(){return r.fn[n]=c,p._jQueryInterface},p),Te=(g="button",v="."+(_="bs.button"),y=".data-api",E=(m=t).fn[g],b="active",w="btn",T='[data-toggle^="button"]',S='[data-toggle="buttons"]',D="input",A=".active",I=".btn",O={CLICK_DATA_API:"click"+v+y,FOCUS_BLUR_DATA_API:(C="focus")+v+y+" blur"+v+y},N=function(){function n(e){this._element=e}var e=n.prototype;return e.toggle=function(){var e=!0,t=!0,n=m(this._element).closest(S)[0];if(n){var i=this._element.querySelector(D);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(b))e=!1;else{var r=n.querySelector(A);r&&m(r).removeClass(b)}if(e){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(b),m(i).trigger("change")}i.focus(),t=!1}}t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(b)),e&&m(this._element).toggleClass(b)},e.dispose=function(){m.removeData(this._element,_),this._element=null},n._jQueryInterface=function(t){return this.each(function(){var e=m(this).data(_);e||(e=new n(this),m(this).data(_,e)),"toggle"===t&&e[t]()})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),m(document).on(O.CLICK_DATA_API,T,function(e){e.preventDefault();var t=e.target;m(t).hasClass(w)||(t=m(t).closest(I)),N._jQueryInterface.call(m(t),"toggle")}).on(O.FOCUS_BLUR_DATA_API,T,function(e){var t=m(e.target).closest(I)[0];m(t).toggleClass(C,/^focus(in)?$/.test(e.type))}),m.fn[g]=N._jQueryInterface,m.fn[g].Constructor=N,m.fn[g].noConflict=function(){return m.fn[g]=E,N._jQueryInterface},N),Se=(x="carousel",L="."+(P="bs.carousel"),j=".data-api",H=(k=t).fn[x],M={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},F={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},W="next",R="prev",U="left",B="right",q={SLIDE:"slide"+L,SLID:"slid"+L,KEYDOWN:"keydown"+L,MOUSEENTER:"mouseenter"+L,MOUSELEAVE:"mouseleave"+L,TOUCHEND:"touchend"+L,LOAD_DATA_API:"load"+L+j,CLICK_DATA_API:"click"+L+j},K="carousel",Q="active",Y="slide",V="carousel-item-right",z="carousel-item-left",G="carousel-item-next",J="carousel-item-prev",Z=".active",X=".active.carousel-item",$=".carousel-item",ee=".carousel-item-next, .carousel-item-prev",te=".carousel-indicators",ne="[data-slide], [data-slide-to]",ie='[data-ride="carousel"]',re=function(){function o(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(t),this._element=k(e)[0],this._indicatorsElement=this._element.querySelector(te),this._addEventListeners()}var e=o.prototype;return e.next=function(){this._isSliding||this._slide(W)},e.nextWhenVisible=function(){!document.hidden&&k(this._element).is(":visible")&&"hidden"!==k(this._element).css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(R)},e.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(ee)&&(we.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(e){var t=this;this._activeElement=this._element.querySelector(X);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)k(this._element).one(q.SLID,function(){return t.to(e)});else{if(n===e)return this.pause(),void this.cycle();var i=n<e?W:R;this._slide(i,this._items[e])}},e.dispose=function(){k(this._element).off(L),k.removeData(this._element,P),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(e){return e=l({},M,e),we.typeCheckConfig(x,e,F),e},e._addEventListeners=function(){var t=this;this._config.keyboard&&k(this._element).on(q.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(k(this._element).on(q.MOUSEENTER,function(e){return t.pause(e)}).on(q.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&k(this._element).on(q.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},e._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},e._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll($)):[],this._items.indexOf(e)},e._getItemByDirection=function(e,t){var n=e===W,i=e===R,r=this._getItemIndex(t),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return t;var s=(r+(e===R?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(e,t){var n=this._getItemIndex(e),i=this._getItemIndex(this._element.querySelector(X)),r=k.Event(q.SLIDE,{relatedTarget:e,direction:t,from:i,to:n});return k(this._element).trigger(r),r},e._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var t=[].slice.call(this._indicatorsElement.querySelectorAll(Z));k(t).removeClass(Q);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&k(n).addClass(Q)}},e._slide=function(e,t){var n,i,r,o=this,s=this._element.querySelector(X),a=this._getItemIndex(s),l=t||s&&this._getItemByDirection(e,s),c=this._getItemIndex(l),u=Boolean(this._interval);if(e===W?(n=z,i=G,r=U):(n=V,i=J,r=B),l&&k(l).hasClass(Q))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&s&&l){this._isSliding=!0,u&&this.pause(),this._setActiveIndicatorElement(l);var f=k.Event(q.SLID,{relatedTarget:l,direction:r,from:a,to:c});if(k(this._element).hasClass(Y)){k(l).addClass(i),we.reflow(l),k(s).addClass(n),k(l).addClass(n);var h=we.getTransitionDurationFromElement(s);k(s).one(we.TRANSITION_END,function(){k(l).removeClass(n+" "+i).addClass(Q),k(s).removeClass(Q+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return k(o._element).trigger(f)},0)}).emulateTransitionEnd(h)}else k(s).removeClass(Q),k(l).addClass(Q),this._isSliding=!1,k(this._element).trigger(f);u&&this.cycle()}},o._jQueryInterface=function(i){return this.each(function(){var e=k(this).data(P),t=l({},M,k(this).data());"object"==typeof i&&(t=l({}
22,t,i));var n="string"==typeof i?i:t.slide;if(e||(e=new o(this,t),k(this).data(P,e)),"number"==typeof i)e.to(i);else if("string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}else t.interval&&(e.pause(),e.cycle())})},o._dataApiClickHandler=function(e){var t=we.getSelectorFromElement(this);if(t){var n=k(t)[0];if(n&&k(n).hasClass(K)){var i=l({},k(n).data(),k(this).data()),r=this.getAttribute("data-slide-to");r&&(i.interval=!1),o._jQueryInterface.call(k(n),i),r&&k(n).data(P).to(r),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return M}}]),o}(),k(document).on(q.CLICK_DATA_API,ne,re._dataApiClickHandler),k(window).on(q.LOAD_DATA_API,function(){for(var e=[].slice.call(document.querySelectorAll(ie)),t=0,n=e.length;t<n;t++){var i=k(e[t]);re._jQueryInterface.call(i,i.data())}}),k.fn[x]=re._jQueryInterface,k.fn[x].Constructor=re,k.fn[x].noConflict=function(){return k.fn[x]=H,re._jQueryInterface},re),De=(se="collapse",le="."+(ae="bs.collapse"),ce=(oe=t).fn[se],ue={toggle:!0,parent:""},fe={toggle:"boolean",parent:"(string|element)"},he={SHOW:"show"+le,SHOWN:"shown"+le,HIDE:"hide"+le,HIDDEN:"hidden"+le,CLICK_DATA_API:"click"+le+".data-api"},de="show",pe="collapse",me="collapsing",ge="collapsed",_e="width",ve="height",ye=".show, .collapsing",Ee='[data-toggle="collapse"]',be=function(){function a(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=oe.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(Ee)),i=0,r=n.length;i<r;i++){var o=n[i],s=we.getSelectorFromElement(o),a=[].slice.call(document.querySelectorAll(s)).filter(function(e){return e===t});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=a.prototype;return e.toggle=function(){oe(this._element).hasClass(de)?this.hide():this.show()},e.show=function(){var e,t,n=this;if(!this._isTransitioning&&!oe(this._element).hasClass(de)&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(ye)).filter(function(e){return e.getAttribute("data-parent")===n._config.parent})).length&&(e=null),!(e&&(t=oe(e).not(this._selector).data(ae))&&t._isTransitioning))){var i=oe.Event(he.SHOW);if(oe(this._element).trigger(i),!i.isDefaultPrevented()){e&&(a._jQueryInterface.call(oe(e).not(this._selector),"hide"),t||oe(e).data(ae,null));var r=this._getDimension();oe(this._element).removeClass(pe).addClass(me),this._element.style[r]=0,this._triggerArray.length&&oe(this._triggerArray).removeClass(ge).attr("aria-expanded",!0),this.setTransitioning(!0);var o="scroll"+(r[0].toUpperCase()+r.slice(1)),s=we.getTransitionDurationFromElement(this._element);oe(this._element).one(we.TRANSITION_END,function(){oe(n._element).removeClass(me).addClass(pe).addClass(de),n._element.style[r]="",n.setTransitioning(!1),oe(n._element).trigger(he.SHOWN)}).emulateTransitionEnd(s),this._element.style[r]=this._element[o]+"px"}}},e.hide=function(){var e=this;if(!this._isTransitioning&&oe(this._element).hasClass(de)){var t=oe.Event(he.HIDE);if(oe(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",we.reflow(this._element),oe(this._element).addClass(me).removeClass(pe).removeClass(de);var i=this._triggerArray.length;if(0<i)for(var r=0;r<i;r++){var o=this._triggerArray[r],s=we.getSelectorFromElement(o);if(null!==s)oe([].slice.call(document.querySelectorAll(s))).hasClass(de)||oe(o).addClass(ge).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=we.getTransitionDurationFromElement(this._element);oe(this._element).one(we.TRANSITION_END,function(){e.setTransitioning(!1),oe(e._element).removeClass(me).addClass(pe).trigger(he.HIDDEN)}).emulateTransitionEnd(a)}}},e.setTransitioning=function(e){this._isTransitioning=e},e.dispose=function(){oe.removeData(this._element,ae),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(e){return(e=l({},ue,e)).toggle=Boolean(e.toggle),we.typeCheckConfig(se,e,fe),e},e._getDimension=function(){return oe(this._element).hasClass(_e)?_e:ve},e._getParent=function(){var n=this,e=null;we.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var t='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(e.querySelectorAll(t));return oe(i).each(function(e,t){n._addAriaAndCollapsedClass(a._getTargetFromElement(t),[t])}),e},e._addAriaAndCollapsedClass=function(e,t){if(e){var n=oe(e).hasClass(de);t.length&&oe(t).toggleClass(ge,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(e){var t=we.getSelectorFromElement(e);return t?document.querySelector(t):null},a._jQueryInterface=function(i){return this.each(function(){var e=oe(this),t=e.data(ae),n=l({},ue,e.data(),"object"==typeof i&&i?i:{});if(!t&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),t||(t=new a(this,n),e.data(ae,t)),"string"==typeof i){if("undefined"==typeof t[i])throw new TypeError('No method n
22amed "'+i+'"');t[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ue}}]),a}(),oe(document).on(he.CLICK_DATA_API,Ee,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var n=oe(this),t=we.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(t));oe(i).each(function(){var e=oe(this),t=e.data(ae)?"toggle":n.data();be._jQueryInterface.call(e,t)})}),oe.fn[se]=be._jQueryInterface,oe.fn[se].Constructor=be,oe.fn[se].noConflict=function(){return oe.fn[se]=ce,be._jQueryInterface},be),Ae="undefined"!=typeof window&&"undefined"!=typeof document,Ie=["Edge","Trident","Firefox"],Oe=0,Ne=0;Ne<Ie.length;Ne+=1)if(Ae&&0<=navigator.userAgent.indexOf(Ie[Ne])){Oe=1;break}var ke=Ae&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Oe))}};function xe(e){return e&&"[object Function]"==={}.toString.call(e)}function Pe(e,t){if(1!==e.nodeType)return[];var n=getComputedStyle(e,null);return t?n[t]:n}function Le(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function je(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Pe(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+i)?e:je(Le(e))}var He=Ae&&!(!window.MSInputMethodContext||!document.documentMode),Me=Ae&&/MSIE 10/.test(navigator.userAgent);function Fe(e){return 11===e?He:10===e?Me:He||Me}function We(e){if(!e)return document.documentElement;for(var t=Fe(10)?document.body:null,n=e.offsetParent;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===Pe(n,"position")?We(n):n:e?e.ownerDocument.documentElement:document.documentElement}function Re(e){return null!==e.parentNode?Re(e.parentNode):e}function Ue(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var s,a,l=o.commonAncestorContainer;if(e!==l&&t!==l||i.contains(r))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&We(s.firstElementChild)!==s?We(l):l;var c=Re(e);return c.host?Ue(c.host,t):Ue(e,Re(t).host)}function Be(e){var t="top"===(1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var i=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||i)[t]}return e[t]}function qe(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function Ke(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],Fe(10)?n["offset"+e]+i["margin"+("Height"===e?"Top":"Left")]+i["margin"+("Height"===e?"Bottom":"Right")]:0)}function Qe(){var e=document.body,t=document.documentElement,n=Fe(10)&&getComputedStyle(t);return{height:Ke("Height",e,t,n),width:Ke("Width",e,t,n)}}var Ye=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Ve=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};function Ge(e){return ze({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Je(e){var t={};try{if(Fe(10)){t=e.getBoundingClientRect();var n=Be(e,"top"),i=Be(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?Qe():{},s=o.width||e.clientWidth||r.right-r.left,a=o.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,c=e.offsetHeight-a;if(l||c){var u=Pe(e);l-=qe(u,"x"),c-=qe(u,"y"),r.width-=l,r.height-=c}return Ge(r)}function Ze(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=Fe(10),r="HTML"===t.nodeName,o=Je(e),s=Je(t),a=je(e),l=Pe(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&"HTML"===t.nodeName&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var f=Ge({top:o.top-s.top-c,left:o.left-s.left-u,width:o.width,height:o.height});
vendor: 9,081 bytes, line 22
22if(f.marginTop=0,f.marginLeft=0,!i&&r){var h=parseFloat(l.marginTop,10),d=parseFloat(l.marginLeft,10);f.top-=c-h,f.bottom-=c-h,f.left-=u-d,f.right-=u-d,f.marginTop=h,f.marginLeft=d}return(i&&!n?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(f=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=Be(t,"top"),r=Be(t,"left"),o=n?-1:1;return e.top+=i*o,e.bottom+=i*o,e.left+=r*o,e.right+=r*o,e}(f,t)),f}function Xe(e){if(!e||!e.parentElement||Fe())return document.documentElement;for(var t=e.parentElement;t&&"none"===Pe(t,"transform");)t=t.parentElement;return t||document.documentElement}function $e(e,t,n,i){var r=4<arguments.length&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=r?Xe(e):Ue(e,t);if("viewport"===i)o=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=Ze(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:Be(n),a=t?0:Be(n,"left");return Ge({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:r,height:o})}(s,r);else{var a=void 0;"scrollParent"===i?"BODY"===(a=je(Le(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===i?e.ownerDocument.documentElement:i;var l=Ze(a,s,r);if("HTML"!==a.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===Pe(t,"position")||e(Le(t)))}(s))o=l;else{var c=Qe(),u=c.height,f=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=f+l.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function et(e,t,i,n,r){var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=$e(i,n,o,r),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},l=Object.keys(a).map(function(e){return ze({key:e},a[e],{area:(t=a[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),c=l.filter(function(e){var t=e.width,n=e.height;return t>=i.clientWidth&&n>=i.clientHeight}),u=0<c.length?c[0].key:l[0].key,f=e.split("-")[1];return u+(f?"-"+f:"")}function tt(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return Ze(n,i?Xe(t):Ue(t,n),i)}function nt(e){var t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function it(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function rt(e,t,n){n=n.split("-")[0];var i=nt(e),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[s]=t[s]+t[l]/2-i[l]/2,r[a]=n===a?t[a]-i[c]:t[it(a)],r}function ot(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function st(e,n,t){return(void 0===t?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=ot(e,function(e){return e[t]===n});return e.indexOf(i)}(e,"name",t))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&xe(t)&&(n.offsets.popper=Ge(n.offsets.popper),n.offsets.reference=Ge(n.offsets.reference),n=t(n,e))}),n}function at(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function lt(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var r=t[i],o=r?""+r+n:e;if("undefined"!=typeof document.body.style[o])return o}return null}function ct(e){var t=e.ownerDocument;return t?t.defaultView:window}function ut(e,t,n,i){n.updateBound=i,ct(e).addEventListener("resize",n.updateBound,{passive:!0});var r=je(e);return function e(t,n,i,r){var o="BODY"===t.nodeName,s=o?t.ownerDocument.defaultView:t;s.addEventListener(n,i,{passive:!0}),o||e(je(s.parentNode),n,i,r),r.push(s)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function ft(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ct(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function ht(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function dt(n,i){Object.keys(i).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&ht(i[e])&&(t="px"),n.style[e]=i[e]+t})}function pt(e,t,n){var i=ot(e,function(e){return e.name===t}),r=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!r){var o="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var mt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],gt=mt.slice(3);function _t(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=gt.indexOf(e),i=gt.slice(n+1).concat(gt.slice(0,n));return t?i.reverse():i}var vt="flip",yt="clockwise",Et="counterclockwise";function bt(e,r,o,t){var s=[0,0],a=-1!==["right","left"].indexOf(t),n=e.split(/(\+|\-)/).map(function(e){return e.trim()}),i=n.indexOf(ot(n,function(e){return-1!==e.search(/,|\s/)}));n[i]&&-1===n[i].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==i?[n.slice(0,i).concat([n[i].split(l)[0]]),[n[i].split(l)[1]].concat(n.slice(i+1))]:[n];return(c=c.map(function(e,t){var n=(1===t?!a:a)?"height":"width",i=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,i=!0,e):i?(e[e.length-1]+=t,i=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return Ge(a)[t]/100*o}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,n,r,o)})})).forEach(function(n,i){n.forEach(function(e,t){ht(e)&&(s[i]+=e*("-"===n[t-1]?-1:1))})}),s}var wt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets,o=r.reference,s=r.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:Ve({},l,o[l]),end:Ve({},l,o[l]+o[c]-s[c])};e.offsets.popper=ze({},s,u[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,i=e.placement,r=e.offsets,o=r.popper,s=r.reference,a=i.split("-")[0],l=void 0;return l=ht(+n)?[+n,0]:bt(n,o,s,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,i){var t=i.boundariesElement||We(e.instance.popper);e.instance.reference===t&&(t=We(t));var n=lt("transform"),r=e.instance.popper.style,o=r.top,s=r.left,a=r[n];r.top="",r.left="",r[n]="";var l=$e(e.instance.popper,e.instance.reference,i.padding,t,e.positionFixed);r.top=o,r.left=s,r[n]=a,i.boundaries=l;var c=i.priority,u=e.offsets.popper,f={primary:function(e){var t=u[e];return u[e]<l[e]&&!i.escapeWithReference&&(t=Math.max(u[e],l[e])),Ve({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=u[t];return u[e]>l[e]&&!i.escapeWithReference&&(n=Math.min(u[t],l[e]-("right"===e?u.width:u.height))),Ve({},t,n)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=ze({},u,f[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,r=e.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<o(i[l])&&(e.offsets.popper[l]=o(i[l])-n[c]),n[l]>o(i[a])&&(e.offsets.popper[l]=o(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!pt(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,s=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",u=l?"Top":"Left",f=u.toLowerCase(),h=l?"left"
vendor: 4,656 bytes, line 22
22:"top",d=l?"bottom":"right",p=nt(i)[c];a[d]-p<s[f]&&(e.offsets.popper[f]-=s[f]-(a[d]-p)),a[f]+p>s[d]&&(e.offsets.popper[f]+=a[f]+p-s[d]),e.offsets.popper=Ge(e.offsets.popper);var m=a[f]+a[c]/2-p/2,g=Pe(e.instance.popper),_=parseFloat(g["margin"+u],10),v=parseFloat(g["border"+u+"Width"],10),y=m-e.offsets.popper[f]-_-v;return y=Math.max(Math.min(s[c]-p,y),0),e.arrowElement=i,e.offsets.arrow=(Ve(n={},f,Math.round(y)),Ve(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,m){if(at(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var g=$e(p.instance.popper,p.instance.reference,m.padding,m.boundariesElement,p.positionFixed),_=p.placement.split("-")[0],v=it(_),y=p.placement.split("-")[1]||"",E=[];switch(m.behavior){case vt:E=[_,v];break;case yt:E=_t(_);break;case Et:E=_t(_,!0);break;default:E=m.behavior}return E.forEach(function(e,t){if(_!==e||E.length===t+1)return p;_=p.placement.split("-")[0],v=it(_);var n,i=p.offsets.popper,r=p.offsets.reference,o=Math.floor,s="left"===_&&o(i.right)>o(r.left)||"right"===_&&o(i.left)<o(r.right)||"top"===_&&o(i.bottom)>o(r.top)||"bottom"===_&&o(i.top)<o(r.bottom),a=o(i.left)<o(g.left),l=o(i.right)>o(g.right),c=o(i.top)<o(g.top),u=o(i.bottom)>o(g.bottom),f="left"===_&&a||"right"===_&&l||"top"===_&&c||"bottom"===_&&u,h=-1!==["top","bottom"].indexOf(_),d=!!m.flipVariations&&(h&&"start"===y&&a||h&&"end"===y&&l||!h&&"start"===y&&c||!h&&"end"===y&&u);(s||f||d)&&(p.flipped=!0,(s||f)&&(_=E[t+1]),d&&(y="end"===(n=y)?"start":"start"===n?"end":n),p.placement=_+(y?"-"+y:""),p.offsets.popper=ze({},p.offsets.popper,rt(p.instance.popper,p.offsets.reference,p.placement)),p=st(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,r=i.popper,o=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=o[n]-(a?r[s?"width":"height"]:0),e.placement=it(t),e.offsets.popper=Ge(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!pt(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ot(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,r=e.offsets.popper,o=ot(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:t.gpuAcceleration,a=Je(We(e.instance.popper)),l={position:r.position},c={left:Math.floor(r.left),top:Math.round(r.top),bottom:Math.round(r.bottom),right:Math.floor(r.right)},u="bottom"===n?"top":"bottom",f="right"===i?"left":"right",h=lt("transform"),d=void 0,p=void 0;if(p="bottom"===u?-a.height+c.bottom:c.top,d="right"===f?-a.width+c.right:c.left,s&&h)l[h]="translate3d("+d+"px, "+p+"px, 0)",l[u]=0,l[f]=0,l.willChange="transform";else{var m="bottom"===u?-1:1,g="right"===f?-1:1;l[u]=p*m,l[f]=d*g,l.willChange=u+", "+f}var _={"x-placement":e.placement};return e.attributes=ze({},_,e.attributes),e.styles=ze({},l,e.styles),e.arrowStyles=ze({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return dt(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&dt(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,i,r){var o=tt(r,t,e,n.positionFixed),s=et(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),dt(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Ct=function(){function o(e,t){var n=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=ke(this.update.bind(this)),this.options=ze({},o.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(ze({}
22,o.Defaults.modifiers,i.modifiers)).forEach(function(e){n.options.modifiers[e]=ze({},o.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ze({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&xe(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Ye(o,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=tt(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=et(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=rt(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=st(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,at(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[lt("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=ut(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return ft.call(this)}}]),o}();Ct.Utils=("undefined"!=typeof window?window:global).PopperUtils,Ct.placements=mt,Ct.Defaults=wt;var Tt,St,Dt,At,It,Ot,Nt,kt,xt,Pt,Lt,jt,Ht,Mt,Ft,Wt,Rt,Ut,Bt,qt,Kt,Qt,Yt,Vt,zt,Gt,Jt,Zt,Xt,$t,en,tn,nn,rn,on,sn,an,ln,cn,un,fn,hn,dn,pn,mn,gn,_n,vn,yn,En,bn,wn,Cn,Tn,Sn,Dn,An,In,On,Nn,kn,xn,Pn,Ln,jn,Hn,Mn,Fn,Wn,Rn,Un,Bn,qn,Kn,Qn,Yn,Vn,zn,Gn,Jn,Zn,Xn,$n,ei,ti,ni,ii,ri,oi,si,ai,li,ci,ui,fi,hi,di,pi,mi,gi,_i,vi,yi,Ei,bi,wi,Ci,Ti,Si,Di,Ai,Ii,Oi,Ni,ki,xi,Pi,Li,ji,Hi,Mi,Fi,Wi,Ri,Ui,Bi=(St="dropdown",At="."+(Dt="bs.dropdown"),It=".data-api",Ot=(Tt=t).fn[St],Nt=new RegExp("38|40|27"),kt={HIDE:"hide"+At,HIDDEN:"hidden"+At,SHOW:"show"+At,SHOWN:"shown"+At,CLICK:"click"+At,CLICK_DATA_API:"click"+At+It,KEYDOWN_DATA_API:"keydown"+At+It,KEYUP_DATA_API:"keyup"+At+It},xt="disabled",Pt="show",Lt="dropup",jt="dropright",Ht="dropleft",Mt="dropdown-menu-right",Ft="position-static",Wt='[data-toggle="dropdown"]',Rt=".dropdown form",Ut=".dropdown-menu",Bt=".navbar-nav",qt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Kt="top-start",Qt="top-end",Yt="bottom-start",Vt="bottom-end",zt="right-start",Gt="left-start",Jt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Zt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Xt=function(){function c(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=c.prototype;return e.toggle=function(){if(!this._element.disabled&&!Tt(this._element).hasClass(xt)){var e=c._getParentFromElement(this._element),t=Tt(this._menu).hasClass(Pt);if(c._clearMenus(),!t){var n={relatedTarget:this._element},i=Tt.Event(kt.SHOW,n);if(Tt(e).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof Ct)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var r=this._element;"parent"===this._config.reference?r=e:we.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boun
22dary&&Tt(e).addClass(Ft),this._popper=new Ct(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===Tt(e).closest(Bt).length&&Tt(document.body).children().on("mouseover",null,Tt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),Tt(this._menu).toggleClass(Pt),Tt(e).toggleClass(Pt).trigger(Tt.Event(kt.SHOWN,n))}}}},e.dispose=function(){Tt.removeData(this._element,Dt),Tt(this._element).off(At),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;Tt(this._element).on(kt.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},e._getConfig=function(e){return e=l({},this.constructor.Default,Tt(this._element).data(),e),we.typeCheckConfig(St,e,this.constructor.DefaultType),e},e._getMenuElement=function(){if(!this._menu){var e=c._getParentFromElement(this._element);e&&(this._menu=e.querySelector(Ut))}return this._menu},e._getPlacement=function(){var e=Tt(this._element.parentNode),t=Yt;return e.hasClass(Lt)?(t=Kt,Tt(this._menu).hasClass(Mt)&&(t=Qt)):e.hasClass(jt)?t=zt:e.hasClass(Ht)?t=Gt:Tt(this._menu).hasClass(Mt)&&(t=Vt),t},e._detectNavbar=function(){return 0<Tt(this._element).closest(".navbar").length},e._getPopperConfig=function(){var t=this,e={};"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=l({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset;var n={placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},c._jQueryInterface=function(t){return this.each(function(){var e=Tt(this).data(Dt);if(e||(e=new c(this,"object"==typeof t?t:null),Tt(this).data(Dt,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},c._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var t=[].slice.call(document.querySelectorAll(Wt)),n=0,i=t.length;n<i;n++){var r=c._getParentFromElement(t[n]),o=Tt(t[n]).data(Dt),s={relatedTarget:t[n]};if(e&&"click"===e.type&&(s.clickEvent=e),o){var a=o._menu;if(Tt(r).hasClass(Pt)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&Tt.contains(r,e.target))){var l=Tt.Event(kt.HIDE,s);Tt(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&Tt(document.body).children().off("mouseover",null,Tt.noop),t[n].setAttribute("aria-expanded","false"),Tt(a).removeClass(Pt),Tt(r).removeClass(Pt).trigger(Tt.Event(kt.HIDDEN,s)))}}}},c._getParentFromElement=function(e){var t,n=we.getSelectorFromElement(e);return n&&(t=document.querySelector(n)),t||e.parentNode},c._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||Tt(e.target).closest(Ut).length)):Nt.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!Tt(this).hasClass(xt))){var t=c._getParentFromElement(this),n=Tt(t).hasClass(Pt);if((n||27===e.which&&32===e.which)&&(!n||27!==e.which&&32!==e.which)){var i=[].slice.call(t.querySelectorAll(qt));if(0!==i.length){var r=i.indexOf(e.target);38===e.which&&0<r&&r--,40===e.which&&r<i.length-1&&r++,r<0&&(r=0),i[r].focus()}}else{if(27===e.which){var o=t.querySelector(Wt);Tt(o).trigger("focus")}Tt(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Jt}},{key:"DefaultType",get:function(){return Zt}}]),c}(),Tt(document).on(kt.KEYDOWN_DATA_API,Wt,Xt._dataApiKeydownHandler).on(kt.KEYDOWN_DATA_API,Ut,Xt._dataApiKeydownHandler).on(kt.CLICK_DATA_API+" "+kt.KEYUP_DATA_API,Xt._clearMenus).on(kt.CLICK_DATA_API,Wt,function(e){e.preventDefault(),e.stopPropagation(),Xt._jQueryInterface.call(Tt(this),"toggle")}).on(kt.CLICK_DATA_API,Rt,function(e){e.stopPropagation()}),Tt.fn[St]=Xt._jQueryInterface,Tt.fn[St].Constructor=Xt,Tt.fn[St].noConflict=function(){return Tt.fn[St]=Ot,Xt._jQueryInterface},Xt),qi=(en="modal",nn="."+(tn="bs.modal"),rn=($t=t).fn[en],on={backdrop:!0,keyboard:!0,focus:!0,show:!0},sn={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},an={HIDE:"hide"+nn,HIDDEN:"hidden"+nn,SHOW:"show"+nn,SHOWN:"shown"+nn,FOCUSIN:"focusin"+nn,RESIZE:"resize"+nn,CLICK_DISMISS:"click.dismiss"+nn,KEYDOWN_DISMISS:"keydown.dismiss"+nn,MOUSEUP_DISMISS:"mouseup.dismiss"+nn,MOUSEDOWN_DISMISS:"mousedown.dismiss"+nn,CLICK_DATA_API:"click"+nn+".data-api"},ln="modal-scrollbar-measure",cn="modal-backdrop",un="modal-open",fn="fade",hn="show",dn=".modal
22-dialog",pn='[data-toggle="modal"]',mn='[data-dismiss="modal"]',gn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_n=".sticky-top",vn=function(){function r(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(dn),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._scrollbarWidth=0}var e=r.prototype;return e.toggle=function(e){return this._isShown?this.hide():this.show(e)},e.show=function(e){var t=this;if(!this._isTransitioning&&!this._isShown){$t(this._element).hasClass(fn)&&(this._isTransitioning=!0);var n=$t.Event(an.SHOW,{relatedTarget:e});$t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),$t(document.body).addClass(un),this._setEscapeEvent(),this._setResizeEvent(),$t(this._element).on(an.CLICK_DISMISS,mn,function(e){return t.hide(e)}),$t(this._dialog).on(an.MOUSEDOWN_DISMISS,function(){$t(t._element).one(an.MOUSEUP_DISMISS,function(e){$t(e.target).is(t._element)&&(t._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return t._showElement(e)}))}},e.hide=function(e){var t=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var n=$t.Event(an.HIDE);if($t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=$t(this._element).hasClass(fn);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$t(document).off(an.FOCUSIN),$t(this._element).removeClass(hn),$t(this._element).off(an.CLICK_DISMISS),$t(this._dialog).off(an.MOUSEDOWN_DISMISS),i){var r=we.getTransitionDurationFromElement(this._element);$t(this._element).one(we.TRANSITION_END,function(e){return t._hideModal(e)}).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){$t.removeData(this._element,tn),$t(window,document,this._element,this._backdrop).off(nn),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(e){return e=l({},on,e),we.typeCheckConfig(en,e,sn),e},e._showElement=function(e){var t=this,n=$t(this._element).hasClass(fn);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&we.reflow(this._element),$t(this._element).addClass(hn),this._config.focus&&this._enforceFocus();var i=$t.Event(an.SHOWN,{relatedTarget:e}),r=function(){t._config.focus&&t._element.focus(),t._isTransitioning=!1,$t(t._element).trigger(i)};if(n){var o=we.getTransitionDurationFromElement(this._element);$t(this._dialog).one(we.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},e._enforceFocus=function(){var t=this;$t(document).off(an.FOCUSIN).on(an.FOCUSIN,function(e){document!==e.target&&t._element!==e.target&&0===$t(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?$t(this._element).on(an.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||$t(this._element).off(an.KEYDOWN_DISMISS)},e._setResizeEvent=function(){var t=this;this._isShown?$t(window).on(an.RESIZE,function(e){return t.handleUpdate(e)}):$t(window).off(an.RESIZE)},e._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){$t(document.body).removeClass(un),e._resetAdjustments(),e._resetScrollbar(),$t(e._element).trigger(an.HIDDEN)})},e._removeBackdrop=function(){this._backdrop&&($t(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(e){var t=this,n=$t(this._element).hasClass(fn)?fn:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=cn,n&&this._backdrop.classList.add(n),$t(this._backdrop).appendTo(document.body),$t(this._element).on(an.CLICK_DISMISS,function(e){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===t._config.backdrop?t._element.focus():t.hide())}),n&&we.reflow(this._backdrop),$t(this._backdrop).addClass(hn),!e)return;if(!n)return void e();var i=we.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(we.TRANSITION_END,e).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){$t(this._backdrop).removeClass(hn);var r=function(){t._removeBackdrop(),e&&e()};if($t(this._element).hasClass(fn)){var o=we.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(we.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else e&&e()},e._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var r=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(gn)),t=[].slice.call(document.querySelectorAll(_n));$t(e).each(function(e,t){var n=t.style.paddingRight,i=$t(t).css("padding-right");$t(t).data("padding-right",n).css("padding-right",parseFloat(i)+r._scrollbarWidth+"px")}),$t(t).each(function(e,t){var n=t.style.marginRight,i=$t(t).css("margin-right");$t(t).data("margin-right",n).css("margin-right",parseFloat(i)-r._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=$t(document.body).css("padding-right");$t(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},e._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(gn));$t(e).each(function(e,t){var n=$t(t).data("padding-right");$t(t).removeData("padding-right"),t.style.paddingRight=n||""});var t=[].slice.call(document.querySelectorAll(""+_n));$t(t).each(function(e,t){var n=$t(t).data("margin-right");"undefined"!=typeof n&&$t(t).css("margin-right",n).removeData("margin-right")});var n=$t(document.body).data("padding-right");$t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var e=document.createElement("div");e.className=ln,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},r._jQueryInterface=function(n,i){return this.each(function(){var e=$t(this).data(tn),t=l({},on,$t(this).data(),"object"==typeof n&&n?n:{});if(e||(e=new r(this,t),$t(this).data(tn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method n
22amed "'+n+'"');e[n](i)}else t.show&&e.show(i)})},s(r,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return on}}]),r}(),$t(document).on(an.CLICK_DATA_API,pn,function(e){var t,n=this,i=we.getSelectorFromElement(this);i&&(t=document.querySelector(i));var r=$t(t).data(tn)?"toggle":l({},$t(t).data(),$t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var o=$t(t).one(an.SHOW,function(e){e.isDefaultPrevented()||o.one(an.HIDDEN,function(){$t(n).is(":visible")&&n.focus()})});vn._jQueryInterface.call($t(t),r,this)}),$t.fn[en]=vn._jQueryInterface,$t.fn[en].Constructor=vn,$t.fn[en].noConflict=function(){return $t.fn[en]=rn,vn._jQueryInterface},vn),Ki=(En="tooltip",wn="."+(bn="bs.tooltip"),Cn=(yn=t).fn[En],Tn="bs-tooltip",Sn=new RegExp("(^|\\s)"+Tn+"\\S+","g"),In={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!(An={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(Dn={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},Nn="out",kn={HIDE:"hide"+wn,HIDDEN:"hidden"+wn,SHOW:(On="show")+wn,SHOWN:"shown"+wn,INSERTED:"inserted"+wn,CLICK:"click"+wn,FOCUSIN:"focusin"+wn,FOCUSOUT:"focusout"+wn,MOUSEENTER:"mouseenter"+wn,MOUSELEAVE:"mouseleave"+wn},xn="fade",Pn="show",Ln=".tooltip-inner",jn=".arrow",Hn="hover",Mn="focus",Fn="click",Wn="manual",Rn=function(){function i(e,t){if("undefined"==typeof Ct)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var e=i.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(e){if(this._isEnabled)if(e){var t=this.constructor.DATA_KEY,n=yn(e.currentTarget).data(t);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),yn(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(yn(this.getTipElement()).hasClass(Pn))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),yn.removeData(this.element,this.constructor.DATA_KEY),yn(this.element).off(this.constructor.EVENT_KEY),yn(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&yn(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===yn(this.element).css("display"))throw new Error("Please use show on visible elements");var e=yn.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){yn(this.element).trigger(e);var n=yn.contains(this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=we.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&yn(i).addClass(xn);var o="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(o);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:yn(document).find(this.config.container);yn(i).data(this.constructor.DATA_KEY,this),yn.contains(this.element.ownerDocument.documentElement,this.tip)||yn(i).appendTo(a),yn(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Ct
22(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:jn},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),yn(i).addClass(Pn),"ontouchstart"in document.documentElement&&yn(document.body).children().on("mouseover",null,yn.noop);var l=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,yn(t.element).trigger(t.constructor.Event.SHOWN),e===Nn&&t._leave(null,t)};if(yn(this.tip).hasClass(xn)){var c=we.getTransitionDurationFromElement(this.tip);yn(this.tip).one(we.TRANSITION_END,l).emulateTransitionEnd(c)}else l()}},e.hide=function(e){var t=this,n=this.getTipElement(),i=yn.Event(this.constructor.Event.HIDE),r=function(){t._hoverState!==On&&n.parentNode&&n.parentNode.removeChild(n),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),yn(t.element).trigger(t.constructor.Event.HIDDEN),null!==t._popper&&t._popper.destroy(),e&&e()};if(yn(this.element).trigger(i),!i.isDefaultPrevented()){if(yn(n).removeClass(Pn),"ontouchstart"in document.documentElement&&yn(document.body).children().off("mouseover",null,yn.noop),this._activeTrigger[Fn]=!1,this._activeTrigger[Mn]=!1,this._activeTrigger[Hn]=!1,yn(this.tip).hasClass(xn)){var o=we.getTransitionDurationFromElement(n);yn(n).one(we.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(e){yn(this.getTipElement()).addClass(Tn+"-"+e)},e.getTipElement=function(){return this.tip=this.tip||yn(this.config.template)[0],this.tip},e.setContent=function(){var e=this.getTipElement();this.setElementContent(yn(e.querySelectorAll(Ln)),this.getTitle()),yn(e).removeClass(xn+" "+Pn)},e.setElementContent=function(e,t){var n=this.config.html;"object"==typeof t&&(t.nodeType||t.jquery)?n?yn(t).parent().is(e)||e.empty().append(t):e.text(yn(t).text()):e[n?"html":"text"](t)},e.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},e._getAttachment=function(e){return An[e.toUpperCase()]},e._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)yn(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(e){return i.toggle(e)});else if(e!==Wn){var t=e===Hn?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=e===Hn?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;yn(i.element).on(t,i.config.selector,function(e){return i._enter(e)}).on(n,i.config.selector,function(e){return i._leave(e)})}yn(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||yn(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),yn(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?Mn:Hn]=!0),yn(t.getTipElement()).hasClass(Pn)||t._hoverState===On?t._hoverState=On:(clearTimeout(t._timeout),t._hoverState=On,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===On&&t.show()},t.config.delay.show):t.show())},e._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||yn(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),yn(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?Mn:Hn]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=Nn,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){t._hoverState===Nn&&t.hide()},t.config.delay.hide):t.hide())},e._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},e._getConfig=function(e){return"number"==typeof(e=l({},this.constructor.Default,yn(this.element).data(),"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),we.typeCheckConfig(En,e,this.constructor.DefaultType),e},e._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},e._cleanTipClass=function(){var e=yn(this.getTipElement()),t=e.attr("class").match(Sn);null!==t&&t.length&&e.removeClass(t.join(""))},e._handlePopperPlacementChange=function(e){var t=e.instance;this.tip=t.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},e._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(yn(e).removeClass(xn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},i._jQueryInterface=function(n){return this.each(function(){var e=yn(this).data(bn),t="object"==typeof n&&n;if((e||!/dispose|hide/.test(n))&&(e||(e=new i(this,t),yn(this).data(bn,e)),"string"==typeof n)){if("undefined"==typeof e[n])throw new TypeError('No method n
22amed "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return In}},{key:"NAME",get:function(){return En}},{key:"DATA_KEY",get:function(){return bn}},{key:"Event",get:function(){return kn}},{key:"EVENT_KEY",get:function(){return wn}},{key:"DefaultType",get:function(){return Dn}}]),i}(),yn.fn[En]=Rn._jQueryInterface,yn.fn[En].Constructor=Rn,yn.fn[En].noConflict=function(){return yn.fn[En]=Cn,Rn._jQueryInterface},Rn),Qi=(Bn="popover",Kn="."+(qn="bs.popover"),Qn=(Un=t).fn[Bn],Yn="bs-popover",Vn=new RegExp("(^|\\s)"+Yn+"\\S+","g"),zn=l({},Ki.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Gn=l({},Ki.DefaultType,{content:"(string|element|function)"}),Jn="fade",Xn=".popover-header",$n=".popover-body",ei={HIDE:"hide"+Kn,HIDDEN:"hidden"+Kn,SHOW:(Zn="show")+Kn,SHOWN:"shown"+Kn,INSERTED:"inserted"+Kn,CLICK:"click"+Kn,FOCUSIN:"focusin"+Kn,FOCUSOUT:"focusout"+Kn,MOUSEENTER:"mouseenter"+Kn,MOUSELEAVE:"mouseleave"+Kn},ti=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(e){Un(this.getTipElement()).addClass(Yn+"-"+e)},r.getTipElement=function(){return this.tip=this.tip||Un(this.config.template)[0],this.tip},r.setContent=function(){var e=Un(this.getTipElement());this.setElementContent(e.find(Xn),this.getTitle());var t=this._getContent();"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find($n),t),e.removeClass(Jn+" "+Zn)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var e=Un(this.getTipElement()),t=e.attr("class").match(Vn);null!==t&&0<t.length&&e.removeClass(t.join(""))},i._jQueryInterface=function(n){return this.each(function(){var e=Un(this).data(qn),t="object"==typeof n?n:null;if((e||!/destroy|hide/.test(n))&&(e||(e=new i(this,t),Un(this).data(qn,e)),"string"==typeof n)){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return zn}},{key:"NAME",get:function(){return Bn}},{key:"DATA_KEY",get:function(){return qn}},{key:"Event",get:function(){return ei}},{key:"EVENT_KEY",get:function(){return Kn}},{key:"DefaultType",get:function(){return Gn}}]),i}(Ki),Un.fn[Bn]=ti._jQueryInterface,Un.fn[Bn].Constructor=ti,Un.fn[Bn].noConflict=function(){return Un.fn[Bn]=Qn,ti._jQueryInterface},ti),Yi=(ii="scrollspy",oi="."+(ri="bs.scrollspy"),si=(ni=t).fn[ii],ai={offset:10,method:"auto",target:""},li={offset:"number",method:"string",target:"(string|element)"},ci={ACTIVATE:"activate"+oi,SCROLL:"scroll"+oi,LOAD_DATA_API:"load"+oi+".data-api"},ui="dropdown-item",fi="active",hi='[data-spy="scroll"]',di=".active",pi=".nav, .list-group",mi=".nav-link",gi=".nav-item",_i=".list-group-item",vi=".dropdown",yi=".dropdown-item",Ei=".dropdown-toggle",bi="offset",wi="position",Ci=function(){function n(e,t){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(t),this._selector=this._config.target+" "+mi+","+this._config.target+" "+_i+","+this._config.target+" "+yi,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,ni(this._scrollElement).on(ci.SCROLL,function(e){return n._process(e)}),this.refresh(),this._process()}var e=n.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?bi:wi,r="auto"===this._config.method?e:this._config.method,o=r===wi?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(e){var t,n=we.getSelectorFromElement(e);if(n&&(t=document.querySelector(n)),t){var i=t.getBoundingClientRect();if(i.width||i.height)return[ni(t)[r]().top+o,n]}return null}).filter(function(e){return e}).sort(function(e,t){return e[0]-t[0]}
22).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){ni.removeData(this._element,ri),ni(this._scrollElement).off(oi),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(e){if("string"!=typeof(e=l({},ai,"object"==typeof e&&e?e:{})).target){var t=ni(e.target).attr("id");t||(t=we.getUID(ii),ni(e.target).attr("id",t)),e.target="#"+t}return we.typeCheckConfig(ii,e,li),e},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),n<=e){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||e<this._offsets[r+1])&&this._activate(this._targets[r])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",");e=e.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var n=ni([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass(ui)?(n.closest(vi).find(Ei).addClass(fi),n.addClass(fi)):(n.addClass(fi),n.parents(pi).prev(mi+", "+_i).addClass(fi),n.parents(pi).prev(gi).children(mi).addClass(fi)),ni(this._scrollElement).trigger(ci.ACTIVATE,{relatedTarget:t})},e._clear=function(){var e=[].slice.call(document.querySelectorAll(this._selector));ni(e).filter(di).removeClass(fi)},n._jQueryInterface=function(t){return this.each(function(){var e=ni(this).data(ri);if(e||(e=new n(this,"object"==typeof t&&t),ni(this).data(ri,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ai}}]),n}(),ni(window).on(ci.LOAD_DATA_API,function(){for(var e=[].slice.call(document.querySelectorAll(hi)),t=e.length;t--;){var n=ni(e[t]);Ci._jQueryInterface.call(n,n.data())}}),ni.fn[ii]=Ci._jQueryInterface,ni.fn[ii].Constructor=Ci,ni.fn[ii].noConflict=function(){return ni.fn[ii]=si,Ci._jQueryInterface},Ci),Vi=(Di="."+(Si="bs.tab"),Ai=(Ti=t).fn.tab,Ii={HIDE:"hide"+Di,HIDDEN:"hidden"+Di,SHOW:"show"+Di,SHOWN:"shown"+Di,CLICK_DATA_API:"click"+Di+".data-api"},Oi="dropdown-menu",Ni="active",ki="disabled",xi="fade",Pi="show",Li=".dropdown",ji=".nav, .list-group",Hi=".active",Mi="> li > .active",Fi='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Wi=".dropdown-toggle",Ri="> .dropdown-menu .active",Ui=function(){function i(e){this._element=e}var e=i.prototype;return e.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&Ti(this._element).hasClass(Ni)||Ti(this._element).hasClass(ki))){var e,i,t=Ti(this._element).closest(ji)[0],r=we.getSelectorFromElement(this._element);if(t){var o="UL"===t.nodeName?Mi:Hi;i=(i=Ti.makeArray(Ti(t).find(o)))[i.length-1]}var s=Ti.Event(Ii.HIDE,{relatedTarget:this._element}),a=Ti.Event(Ii.SHOW,{relatedTarget:i});if(i&&Ti(i).trigger(s),Ti(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,t);var l=function(){var e=Ti.Event(Ii.HIDDEN,{relatedTarget:n._element}),t=Ti.Event(Ii.SHOWN,{relatedTarget:i});Ti(i).trigger(e),Ti(n._element).trigger(t)};e?this._activate(e,e.parentNode,l):l()}}},e.dispose=function(){Ti.removeData(this._element,Si),this._element=null},e._activate=function(e,t,n){var i=this,r=("UL"===t.nodeName?Ti(t).find(Mi):Ti(t).children(Hi))[0],o=n&&r&&Ti(r).hasClass(xi),s=function(){return i._transitionComplete(e,r,n)};if(r&&o){var a=we.getTransitionDurationFromElement(r);Ti(r).one(we.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},e._transitionComplete=function(e,t,n){if(t){Ti(t).removeClass(Pi+" "+Ni);var i=Ti(t.parentNode).find(Ri)[0];i&&Ti(i).removeClass(Ni),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}if(Ti(e).addClass(Ni),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),we.reflow(e),Ti(e).addClass(Pi),e.parentNode&&Ti(e.parentNode).hasClass(Oi)){var r=Ti(e).closest(Li)[0];if(r){var o=[].slice.call(r.querySelectorAll(Wi));Ti(o).addClass(Ni)}e.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var e=Ti(this),t=e.data(Si);if(t||(t=new i(this),e.data(Si,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method n
22amed "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),Ti(document).on(Ii.CLICK_DATA_API,Fi,function(e){e.preventDefault(),Ui._jQueryInterface.call(Ti(this),"show")}),Ti.fn.tab=Ui._jQueryInterface,Ti.fn.tab.Constructor=Ui,Ti.fn.tab.noConflict=function(){return Ti.fn.tab=Ai,Ui._jQueryInterface},Ui);!function(e){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(t),e.Util=we,e.Alert=Ce,e.Button=Te,e.Carousel=Se,e.Collapse=De,e.Dropdown=Bi,e.Modal=qi,e.Popover=Qi,e.Scrollspy=Yi,e.Tab=Vi,e.Tooltip=Ki,Object.defineProperty(e,"__esModule",{value:!0})}); 23/* End */ 24; 25; /* Start:"a:4:{s:4:"full";s:75:"/bitrix/templates/concept_phoenix_s4/js/jquery.plugin.min.js?17503456113400";s:6:"source";s:60:"/bitrix/templates/concept_phoenix_s4/js/jquery.plugin.min.js";s:3:"min";s:60:"/bitrix/templates/concept_phoenix_s4/js/jquery.plugin.min.js";s:3:"map";
25s:61:"/bitrix/templates/concept_phoenix_s4/js/jquery.plugin.min.map";}"*/ 26/*! Simple JavaScript Inheritance 27 * By John Resig http://ejohn.org/ 28 * MIT Licensed. 29 */ 30!function(){"use strict";var a=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultOptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! Abstract base class for collection plugins v1.0.2. 31 Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013. 32 Licensed under the MIT license (http://keith-wood.name/licence.html). */ 33function($){"use strict";function camelCase(a){return a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var a=camelCase(this.name);$[a]=this,$.fn[a]=function(b){var c=Array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"Unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasClass(this._getMarker())){a.addClass(this._getMarker()),b=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c),this._postAttach(a,c),this.option(a,b)}},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parseJSON("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasClass(this._getMarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionsChanged(a,d,e),$.extend(d.options,e)))},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasClass(this._getMarker())&&(this._preDestroy(a,this._getInst(a)),a.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(a,b){}}),$.JQPlugin={createPlugin:function(a,b){"object"==typeof a&&(b=a,a="JQPlugin"),a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b),new JQClass.classes[c]}}}(jQuery); 34/* End */ 35; 36; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/templates/concept_phoenix_s4/js/jquery.countdown.min.js?175034561113652";s:6:"source";s:63:"/bitrix/templates/concept_phoenix_s4/js/jquery.countdown.min.js";s:3:"min";s:63:"/bitrix/templates/concept_phoenix_s4/js/jquery.countdown.min.js";s:3:"map";s:64:"/bitrix/templates/concept_phoenix_s4/js/jquery.countdown.min.map";}"*/ 37/*! http://keith-wood.name/countdown.html 38 Countdown for jQuery v2.1.0. 39 Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2008. 40 Available under the MIT (http://keith-wood.name/licence.html) license. 41 Please attribute the author if you use it. */ 42!function(a){"use strict";var b="countdown",c=0,d=1,e=2,f=3,g=4,h=5,i=6;a.JQPlugin.createPlugin({name:b,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_rtlClass:b+"-rtl",_sectionClass:b+"-section",_amountClass:b+"-amount",_periodClass:b+"-period",_rowClass:b+"-row",_holdingClass:b+"-holding",_showClass:b+"-show",_descrClass:b+"-descr",_timerElems:[],_init:function(){function b(a){var h=a<1e12?e?window.performance.now()+window.performance.timing.navigationStart:d():a||d();h-g>=1e3&&(c._updateElems(),g=h),f(b)}var c=this;this._super(),this._serverSyncs=[];var d="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},e=window.performance&&"function"==typeof window.performance.now,f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,g=0;!f||a.noRequestAnimationFrame?(a.noRequestAnimationFrame=null,a.countdown._timer=setInterval(function(){c._updateElems()},1e3)):(g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d(),f(b))},UTCDate:function(a,b,c,d,e,f,g,h){"object"==typeof b&&b instanceof Date&&(h=b.getMilliseconds(),g=b.getSeconds(),f=b.getMinutes(),e=b.getHours(),d=b.getDate(),c=b.getMonth(),b=b.getFullYear());var i=new Date;return i.setUTCFullYear(b),i.setUTCDate(1),i.setUTCMonth(c||0),i.setUTCDate(d||1),i.setUTCHours(e||0),i.setUTCMinutes((f||0)-(Math.abs(a)<30?60*a:a)),i.setUTCSeconds(g||0),i.setUTCMilliseconds(h||0),i}
42,periodsToSeconds:function(a){return 31557600*a[0]+2629800*a[1]+604800*a[2]+86400*a[3]+3600*a[4]+60*a[5]+a[6]},resync:function(){var b=this;a("."+this._getMarker()).each(function(){var c=a.data(this,b.name);if(c.options.serverSync){for(var d=null,e=0;e<b._serverSyncs.length;e++)if(b._serverSyncs[e][0]===c.options.serverSync){d=b._serverSyncs[e];break}if(b._eqNull(d[2])){var f=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(this,[]):null;d[2]=(f?(new Date).getTime()-f.getTime():0)-d[1]}c._since&&c._since.setMilliseconds(c._since.getMilliseconds()+d[2]),c._until.setMilliseconds(c._until.getMilliseconds()+d[2])}});for(var c=0;c<b._serverSyncs.length;c++)b._eqNull(b._serverSyncs[c][2])||(b._serverSyncs[c][1]+=b._serverSyncs[c][2],delete b._serverSyncs[c][2])},_instSettings:function(a,b){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(a){this._hasElem(a)||this._timerElems.push(a)},_hasElem:function(b){return a.inArray(b,this._timerElems)>-1},_removeElem:function(b){this._timerElems=a.map(this._timerElems,function(a){return a===b?null:a})},_updateElems:function(){for(var a=this._timerElems.length-1;a>=0;a--)this._updateCountdown(this._timerElems[a])},_optionsChanged:function(b,c,d){d.layout&&(d.layout=d.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(c.options,d);var e=c.options.timezone!==d.timezone;a.extend(c.options,d),this._adjustSettings(b,c,!this._eqNull(d.until)||!this._eqNull(d.since)||e);var f=new Date;(c._since&&c._since<f||c._until&&c._until>f)&&this._addElem(b[0]),this._updateCountdown(b,c)},_updateCountdown:function(b,c){if(b=b.jquery?b:a(b),c=c||this._getInst(b)){if(b.html(this._generateHTML(c)).toggleClass(this._rtlClass,c.options.isRTL),"pause"!==c._hold&&a.isFunction(c.options.onT
42ick)){var d="lap"!==c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date);1!==c.options.tickInterval&&this.periodsToSeconds(d)%c.options.tickInterval!==0||c.options.onTick.apply(b[0],[d])}var e="pause"!==c._hold&&(c._since?c._now.getTime()<c._since.getTime():c._now.getTime()>=c._until.getTime());if(e&&!c._expiring){if(c._expiring=!0,this._hasElem(b[0])||c.options.alwaysExpire){if(this._removeElem(b[0]),a.isFunction(c.options.onExpiry)&&c.options.onExpiry.apply(b[0],[]),c.options.expiryText){var f=c.options.layout;c.options.layout=c.options.expiryText,this._updateCountdown(b[0],c),c.options.layout=f}c.options.expiryUrl&&(window.location=c.options.expiryUrl)}c._expiring=!1}else"pause"===c._hold&&this._removeElem(b[0])}},_resetExtraLabels:function(a,b){var c=null;for(c in b)c.match(/[Ll]abels[02-9]|compactLabels1/)&&(a[c]=b[c]);for(c in a)c.match(/[Ll]abels[02-9]|compactLabels1/)&&"undefined"==typeof b[c]&&(a[c]=null)},_eqNull:function(a){return"undefined"==typeof a||null===a},_adjustSettings:function(b,c,d){for(var e=null,f=0;f<this._serverSyncs.length;f++)if(this._serverSyncs[f][0]===c.options.serverSync){e=this._serverSyncs[f][1];break}var g=null,h=null;if(this._eqNull(e)){var i=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(b[0],[]):null;g=new Date,h=i?g.getTime()-i.getTime():0,this._serverSyncs.push([c.options.serverSync,h])}else g=new Date,h=c.options.serverSync?e:0;var j=c.options.timezone;j=this._eqNull(j)?-g.getTimezoneOffset():j,(d||!d&&this._eqNull(c._until)&&this._eqNull(c._since))&&(c._since=c.options.since,this._eqNull(c._since)||(c._since=this.UTCDate(j,this._determineTime(c._since,null)),c._since&&h&&c._since.setMilliseconds(c._since.getMilliseconds()+h)),c._until=this.UTCDate(j,this._determineTime(c.options.until,g)),h&&c._until.setMilliseconds(c._until.getMilliseconds()+h)),c._show=this._determineShow(c)},_preDestroy:function(a,b){this._removeElem(a[0]),a.empty()},pause:function(a){this._hold(a,"pause")},lap:function(a){this._hold(a,"lap")},resume:function(a){this._hold(a,null)},toggle:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"pause"](b)},toggleLap:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"lap"](b)},_hold:function(b,c){var d=a.data(b,this.name);if(d){if("pause"===d._hold&&!c){d._periods=d._savePeriods;var e=d._since?"-":"+";d[d._since?"_since":"_until"]=this._determineTime(e+d._periods[0]+"y"+e+d._periods[1]+"o"+e+d._periods[2]+"w"+e+d._periods[3]+"d"+e+d._periods[4]+"h"+e+d._periods[5]+"m"+e+d._periods[6]+"s"),this._addElem(b)}d._hold=c,d._savePeriods="pause"===c?d._periods:null,a.data(b,this.name,d),this._updateCountdown(b,d)}},getTimes:function(b){var c=a.data(b,this.name);return c?"pause"===c._hold?c._savePeriods:c._hold?this._calculatePeriods(c,c._show,c.options.significant,new Date):c._periods:null},_determineTime:function(a,b){var c=this,d=function(a){var b=new Date;return b.setTime(b.getTime()+1e3*a),b},e=function(a){a=a.toLowerCase();for(var b=new Date,d=b.getFullYear(),e=b.getMonth(),f=b.getDate(),g=b.getHours(),h=b.getMinutes(),i=b.getSeconds(),j=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,k=j.exec(a);k;){switch(k[2]||"s"){case"s":i+=parseInt(k[1],10);break;case"m":h+=parseInt(k[1],10);break;case"h":g+=parseInt(k[1],10);break;case"d":f+=parseInt(k[1],10);break;case"w":f+=7*parseInt(k[1],10);break;case"o":e+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e));break;case"y":d+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e))}k=j.exec(a)}return new Date(d,e,f,g,h,i,0)},f=this._eqNull(a)?b:"string"==typeof a?e(a):"number"==typeof a?d(a):a;return f&&f.setMilliseconds(0),f},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(b){var j=this;b._periods=b._hold?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date);var k=!1,l=0,m=b.options.significant,n=a.extend({},b._show),o=null;for(o=c;o<=i;o++)k=k||"?"===b._show[o]&&b._periods[o]>0,n[o]="?"!==b._show[o]||k?b._show[o]:null,l+=n[o]?1:0,m-=b._periods[o]>0?1:0;
42var p=[!1,!1,!1,!1,!1,!1,!1];for(o=i;o>=c;o--)b._show[o]&&(b._periods[o]?p[o]=!0:(p[o]=m>0,m--));var q=b.options.compact?b.options.compactLabels:b.options.labels,r=b.options.whichLabels||this._normalLabels,s=function(a){var c=b.options["compactLabels"+r(b._periods[a])];return n[a]?j._translateDigits(b,b._periods[a])+(c?c[a]:q[a])+" ":""},t=b.options.padZeroes?2:1,u=function(a){var c=b.options["labels"+r(b._periods[a])];return!b.options.significant&&n[a]||b.options.significant&&p[a]?'<span class="'+j._sectionClass+'"><span class="'+j._amountClass+'">'+j._minDigits(b,b._periods[a],t)+'</span><span class="'+j._periodClass+'">'+(c?c[a]:q[a])+"</span></span>":""};return b.options.layout?this._buildLayout(b,n,b.options.layout,b.options.compact,b.options.significant,p):(b.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(b._hold?" "+this._holdingClass:"")+'">'+s(c)+s(d)+s(e)+s(f)+(n[g]?this._minDigits(b,b._periods[g],2):"")+(n[h]?(n[g]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[h],2):"")+(n[i]?(n[g]||n[h]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[i],2):""):'<span class="'+this._rowClass+" "+this._showClass+(b.options.significant||l)+(b._hold?" "+this._holdingClass:"")+'">'+u(c)+u(d)+u(e)+u(f)+u(g)+u(h)+u(i))+"</span>"+(b.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+b.options.description+"</span>":"")},_buildLayout:function(b,j,k,l,m,n){for(var o=b.options[l?"compactLabels":"labels"],p=b.options.whichLabels||this._normalLabels,q=function(a){return(b.options[(l?"compactLabels":"labels")+p(b._periods[a])]||o)[a]},r=function(a,c){return b.options.digits[Math.floor(a/c)%10]},s={desc:b.options.description,sep:b.options.timeSeparator,yl:q(c),yn:this._minDigits(b,b._periods[c],1),ynn:this._minDigits(b,b._periods[c],2),ynnn:this._minDigits(b,b._periods[c],3),y1:r(b._periods[c],1),y10:r(b._periods[c],10),y100:r(b._periods[c],100),y1000:r(b._periods[c],1e3),ol:q(d),on:this._minDigits(b,b._periods[d],1),onn:this._minDigits(b,b._periods[d],2),onnn:this._minDigits(b,b._periods[d],3),o1:r(b._periods[d],1),o10:r(b._periods[d],10),o100:r(b._periods[d],100),o1000:r(b._periods[d],1e3),wl:q(e),wn:this._minDigits(b,b._periods[e],1),wnn:this._minDigits(b,b._periods[e],2),wnnn:this._minDigits(b,b._periods[e],3),w1:r(b._periods[e],1),w10:r(b._periods[e],10),w100:r(b._periods[e],100),w1000:r(b._periods[e],1e3),dl:q(f),dn:this._minDigits(b,b._periods[f],1),dnn:this._minDigits(b,b._periods[f],2),dnnn:this._minDigits(b,b._periods[f],3),d1:r(b._periods[f],1),d10:r(b._periods[f],10),d100:r(b._periods[f],100),d1000:r(b._periods[f],1e3),hl:q(g),hn:this._minDigits(b,b._periods[g],1),hnn:this._minDigits(b,b._periods[g],2),hnnn:this._minDigits(b,b._periods[g],3),h1:r(b._periods[g],1),h10:r(b._periods[g],10),h100:r(b._periods[g],100),h1000:r(b._periods[g],1e3),ml:q(h),mn:this._minDigits(b,b._periods[h],1),mnn:this._minDigits(b,b._periods[h],2),mnnn:this._minDigits(b,b._periods[h],3),m1:r(b._periods[h],1),m10:r(b._periods[h],10),m100:r(b._periods[h],100),m1000:r(b._periods[h],1e3),sl:q(i),sn:this._minDigits(b,b._periods[i],1),snn:this._minDigits(b,b._periods[i],2),snnn:this._minDigits(b,b._periods[i],3),s1:r(b._periods[i],1),s10:r(b._periods[i],10),s100:r(b._periods[i],100),s1000:r(b._periods[i],1e3)},t=k,u=c;u<=i;u++){var v="yowdhms".charAt(u),w=new RegExp("\\{"+v+"<\\}([\\s\\S]*)\\{"+v+">\\}","g");t=t.replace(w,!m&&j[u]||m&&n[u]?"$1":"")}return a.each(s,function(a,b){var c=new RegExp("\\{"+a+"\\}","g");t=t.replace(c,b)}),t},_minDigits:function(a,b,c){return b=""+b,b.length>=c?this._translateDigits(a,b):(b="0000000000"+b,this._translateDigits(a,b.substr(b.length-c)))},_translateDigits:function(a,b){return(""+b).replace(/[0-9]/g,function(b){return a.options.digits[b]})},_determineShow:function(a){var b=a.options.format,j=[];return j[c]=b.match("y")?"?":b.match("Y")?"!":null,j[d]=b.match("o")?"?":b.match("O")?"!":null,j[e]=b.match("w")?"?":b.match("W")?"!":null,j[f]=b.match("d")?"?":b.match("D")?"!":null,j[g]=b.match("h")?"?":b.match("H")?"!":null,j[h]=b.match("m")?"?":b.match("M")?"!":null,j[i]=b.match("s")?"?":b.match("S")?"!":null,j}
42,_calculatePeriods:function(a,b,j,k){a._now=k,a._now.setMilliseconds(0);var l=new Date(a._now.getTime());a._since?k.getTime()<a._since.getTime()?a._now=k=l:k=a._since:(l.setTime(a._until.getTime()),k.getTime()>a._until.getTime()&&(a._now=k=l));var m=[0,0,0,0,0,0,0];if(b[c]||b[d]){var n=this._getDaysInMonth(k.getFullYear(),k.getMonth()),o=this._getDaysInMonth(l.getFullYear(),l.getMonth()),p=l.getDate()===k.getDate()||l.getDate()>=Math.min(n,o)&&k.getDate()>=Math.min(n,o),q=function(a){return 60*(60*a.getHours()+a.getMinutes())+a.getSeconds()},r=Math.max(0,12*(l.getFullYear()-k.getFullYear())+l.getMonth()-k.getMonth()+(l.getDate()<k.getDate()&&!p||p&&q(l)<q(k)?-1:0));m[c]=b[c]?Math.floor(r/12):0,m[d]=b[d]?r-12*m[c]:0,k=new Date(k.getTime());var s=k.getDate()===n,t=this._getDaysInMonth(k.getFullYear()+m[c],k.getMonth()+m[d]);k.getDate()>t&&k.setDate(t),k.setFullYear(k.getFullYear()+m[c]),k.setMonth(k.getMonth()+m[d]),s&&k.setDate(t)}var u=Math.floor((l.getTime()-k.getTime())/1e3),v=null,w=function(a,c){m[a]=b[a]?Math.floor(u/c):0,u-=m[a]*c};if(w(e,604800),w(f,86400),w(g,3600),w(h,60),w(i,1),u>0&&!a._since){var x=[1,12,4.3482,7,24,60,60],y=i,z=1;for(v=i;v>=c;v--)b[v]&&(m[y]>=z&&(m[y]=0,u=1),u>0&&(m[v]++,u=0,y=v,z=1)),z*=x[v]}if(j)for(v=c;v<=i;v++)j&&m[v]?j--:j||(m[v]=0);return m}})}(jQuery); 43/* End */ 44; 45; /* Start:"a:4:{s:4:"full";s:85:"/bitrix/templates/concept_phoenix_s4/lang/ru/jquery.countdown-ru.min.js?1750345612787";s:6:"source";s:67:"/bitrix/templates/concept_phoenix_s4/lang/ru/jquery.countdown-ru.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 46(function($){'use strict';$.countdown.regionalOptions.ru ={labels:['ÐеÑ','ÐеÑÑÑев','ÐеделÑ','Ðней','ЧаÑов','ÐинÑÑ','СекÑнд'],labels1:['Ðод','ÐеÑÑÑ','ÐеделÑ','ÐенÑ','ЧаÑ','ÐинÑÑа','СекÑнда'],labels2:['Ðода','ÐеÑÑÑа','Ðедели','ÐнÑ','ЧаÑа','ÐинÑÑÑ','СекÑндÑ'],compactLabels:['л','м','н','д'],compactLabels1:['г','м','н','д'],whichLabels:function(amount){var units = amount % 10;var tens = Math.floor((amount % 100) / 10);return (amount === 1 ? 1 :(units >= 2 && units <= 4 && tens !== 1 ? 2 :(units === 1 && tens !== 1 ? 1 :0)))},digits:['0','1','2','3','4','5','6','7','8','9'],timeSeparator:':',isRTL:false};$.countdown.setDefaults($.countdown.regionalOptions.ru)})(jQuery); 47/* End */ 48; 49; /* Start:"a:4:{s:4:"full";s:68:"/bitrix/templates/concept_phoenix_s4/js/device.min.js?17503456112605";s:6:"source";s:53:"/bitrix/templates/concept_phoenix_s4/js/device.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 50/*! device.js 0.1.57 */ 51(function(){var a,b,c,d,e,f,g,h,i;window.device={},b=window.document.documentElement,i=window.navigator.userAgent.toLowerCase(),device.ios=function(){return device.iphone()||device.ipod()||device.ipad()},device.iphone=function(){return c("iphone")},device.ipod=function(){return c("ipod")},device.ipad=function(){return c("ipad")},device.android=function(){return c("android")},device.androidPhone=function(){return device.android()&&c("mobile")},device.androidTablet=function(){return device.android()&&!c("mobile")},device.blackberry=function(){return c("blackberry")||c("bb10")||c("rim")},device.blackberryPhone=function(){return device.blackberry()&&!c("tablet")},device.blackberryTablet=function(){return device.blackberry()&&c("tablet")},device.windows=function(){return c("windows")},device.windowsPhone=function(){return device.windows()&&c("phone")},device.windowsTablet=function(){return device.windows()&&c("touch")},device.fxos=function(){return c("(mobile; rv:")||c("(tablet; rv:")},device.fxosPhone=function(){return device.fxos()&&c("mobile")},device.fxosTablet=function(){return device.fxos()&&c("tablet")},device.mobile=function(){return device.androidPhone()||device.iphone()||device.ipod()||device.windowsPhone()||device.blackberryPhone()||device.fxosPhone()},device.tablet=function(){return device.ipad()||device.androidTablet()||device.blackberryTablet()||device.windowsTablet()||device.fxosTablet()},device.portrait=function(){return 90!==Math.abs(window.orientation)},device.landscape=function(){return 90===Math.abs(window.orientation)},c=function(a){return-1!==i.indexOf(a)},e=function(a){var c;return c=new RegExp(a,"i"),b.className.match(c)},a=function(a){return e(a)?void 0:b.className+=" "+a},g=function(a){return e(a)?b.className=b.className.replace(a,""):void 0},device.ios()?device.ipad()?a("ios ipad tablet"):device.iphone()?a("ios iphone mobile"):device.ipod()&&a("ios ipod mobile"):device.android()?device.androidTablet()?a("android tablet"):a("android mobile"):device.blackberry()?device.blackberryTablet()?a("blackberry tablet"):a("blackberry mobile"):device.windows()?device.windowsTablet()?a("windows tablet"):device.windowsPhone()?a("windows mobile"):a("desktop"):device.fxos()?device.fxosTablet()?a("fxos tablet"):a("fxos mobile"):a("desktop"),d=function(){return device.landscape()?(g("portrait"),a("landscape")):(g("landscape"),a("portrait"))},h="onorientationchange"in window,f=h?"orientationchange":"resize",window.addEventListener?window.addEventListener(f,d,
vendor: 8,775 bytes, lines 51-58
51!1):window.attachEvent?window.attachEvent(f,d):window[f]=d,d()}).call(this); 52/* End */ 53; 54; /* Start:"a:4:{s:4:"full";s:65:"/bitrix/templates/concept_phoenix_s4/js/wow.min.js?17503456168342";s:6:"source";s:46:"/bitrix/templates/concept_phoenix_s4/js/wow.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 55(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations,please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); 56/* End */ 57; 58; /* Start:"a:4:{s:4:"full";s:75:"/bitrix/templates/concept_phoenix_s4/js/jquery.enllax.min.js?17503456162560";s:6:"source";
58s:56:"/bitrix/templates/concept_phoenix_s4/js/jquery.enllax.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 59(function($){'use strict';$.fn.enllax = function(opt){var elem = $('[data-enllax-ratio]');var winHeight = $(window).height();var options = $.extend({ratio:0,type:'background',direction:'vertical',offset:0},opt);elem.each(function(){var ratio;var type;var dir;var offset;var $this = $(this);var docHeight = $(document).height();var offsettop= 0;var height = $this.outerHeight();var dataRat = $this.data('enllax-ratio');var dataType = $this.data('enllax-type');var dataDir = $this.data('enllax-direction');var dataOffset = $this.data('enllax-offset');if(dataRat){ratio = dataRat}else{ratio = options.ratio}if(dataType){type = dataType}else{type = options.type}if(dataDir){dir = dataDir}else{dir = options.direction}if(dataOffset){offset = dataOffset}else{offset = options.offset}var bgY = Math.round(offsettop * ratio);var transform = Math.round( ( offsettop - ( winHeight / 2 ) ) * ratio - offset );if(type == 'background'){if(dir == 'vertical'){$this.css({'background-position':'center ' + -bgY + 'px'})}else if(dir == 'horizontal'){$this.css({'background-position':-bgY + 'px' + ' center'})}}else if(type == 'foreground'){if(dir == 'vertical'){$this.css({'-webkit-transform':'translateY(' + transform + 'px)','-moz-transform':'translateY(' + transform + 'px)','transform':'translateY(' + transform + 'px)','position':'absolute','left':'0','right':'0'})}else if(dir == 'horizontal'){$this.css({'-webkit-transform':'translateX(' + transform + 'px)','-moz-transform':'translateX(' + transform + 'px)','transform':'translateX(' + transform + 'px)'})}}$(window).on('scroll',function(){var docHeight = $(document).height();var offsettop = $this.offset().top;var height = $this.outerHeight();var scrolling = $(this).scrollTop();bgY = Math.round((offsettop - scrolling) * ratio);transform = Math.round( ( ( offsettop - ( winHeight / 2 ) ) - scrolling ) * ratio - offset );if(type == 'background'){if(dir == 'vertical'){$this.css({'background-position':'center ' + -bgY + 'px'})}else if(dir == 'horizontal'){$this.css({'background-position':-bgY + 'px' + ' center'})}}else if((type == 'foreground') && (scrolling < docHeight)){if(dir == 'vertical'){$this.css({'-webkit-transform':'translateY(' + transform + 'px)','-moz-transform':'translateY(' + transform + 'px)','transform':'translateY(' + transform + 'px)','position':'absolute','left':'0','right':'0'})}else if(dir == 'horizontal'){$this.css({'-webkit-transform':'translateX(' + transform + 'px)','-moz-transform':'translateX(' + transform + 'px)','transform':'translateX(' + transform + 'px)'})}}})})}})(jQuery); 60/* End */ 61; 62; /* Start:"a:4:{s:4:"full";s:87:"/bitrix/templates/concept_phoenix_s4/js/jquery.maskedinputConcept.min.js?17503456114330";s:6:"source";s:72:"/bitrix/templates/concept_phoenix_s4/js/jquery.maskedinputConcept.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 63/* 64 jQuery Masked Input Plugin 65 Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com) 66 Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 67 Version: 1.4.1 68*/ 69!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function q(a){for(;++a<n&&!j[a];);return a}function r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(o&&o.length&&o.length>a.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function v(){A(),B.val()!=E&&B.change()}function w(a){if(!B.prop("readonly")){var b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function x(b){if(!B.prop("readonly")){var c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){B.get(0)===document.activeElement&&(z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a))},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})}); 70/* End */ 71; 72; /* Start:"a:4:{s:4:"full";
72s:85:"/bitrix/templates/concept_phoenix_s4/js/jquery.blueimp-gallery.min.js?175034561131993";s:6:"source";s:69:"/bitrix/templates/concept_phoenix_s4/js/jquery.blueimp-gallery.min.js";s:3:"min";s:69:"/bitrix/templates/concept_phoenix_s4/js/jquery.blueimp-gallery.min.js";s:3:"map";s:73:"/bitrix/templates/concept_phoenix_s4/js/jquery.blueimp-gallery.min.js.map";}"*/ 73!function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],t):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=t(window.blueimp.helper||window.jQuery))}(function(t){"use strict";function e(t,i){return void 0===document.body.style.maxHeight?null:this&&this.options===e.prototype.options?t&&t.length?(this.list=t,this.num=t.length,this.initOptions(i),void this.initialize()):void this.console.log("blueimp Gallery: No or empty list provided as first argument.",t):new e(t,i)}return t.extend(e.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",srcsetProperty:"urlset",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleControlsOnSlideClick:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(e){function i(){var t,i,s=o.transition;document.body.appendChild(e),s&&(t=s.name.slice(0,-9)+"ransform",void 0!==e.style[t]&&(e.style[t]="translateZ(0)",i=window.getComputedStyle(e).getPropertyValue(s.prefix+"transform"),o.transform={prefix:s.prefix,name:t,translate:!0,translateZ:!!i&&"none"!==i})),void 0!==e.style.backgroundSize&&(o.backgroundSize={},e.style.backgroundSize="contain",o.backgroundSize.contain="contain"===window.getComputedStyle(e).getPropertyValue("background-size"),e.style.backgroundSize="cover",o.backgroundSize.cover="cover"===window.getComputedStyle(e).getPropertyValue("background-size")),document.body.removeChild(e)}var s,o={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},n={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}};for(s in n)if(n.hasOwnProperty(s)&&void 0!==e.style[s]){o.transition=n[s],o.transition.name=s;break}return document.body?i():t(document).on("DOMContentLoaded",i),o}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,initialize:function(){return this.initStartIndex(),this.initWidget()===!1?!1:(this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),void(this.options.startSlideshow&&this.play()))},slide:function(t,e){window.clearTimeout(this.timeout);var i,s,o,n=this.index;if(n!==t&&1!==this.num){if(e||(e=this.options.transitionSpeed),this.support.transform){for(this.options.continuous||(t=this.circle(t)),i=Math.abs(n-t)/(n-t),this.options.continuous&&(s=i,i=-this.positions[this.circle(t)]/this.slideWidth,i!==s&&(t=-i*this.num+t)),o=Math.abs(n-t)-1;o;)o-=1,this.move(this.circle((t>n?t:n)-o-1),this.slideWidth*i,0);t=this.circle(t),this.move(n,this.slideWidth*i,e),this.move(t,0,e),this.options.continuous&&this.move(this.circle(t-i),-(this.slideWidth*i),0)}else t=this.circle(t),this.animate(n*-this.slideWidth,t*-this.slideWidth,e);this.onslide(t)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index<this.num-1)&&this.slide(this.index+1)},play:function(t){var e=this;window.clearTimeout(this.timeout),this.interval=t||this.options.slideshowInterval,this.elements[this.index]>1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(t,i){e.animationFrameId=e.requestAnimationFrame.call(window,function(){e.slide(t,i)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.container.removeClass(this.options.playingClass)},add:function(t){var e;
73for(t.concat||(t=Array.prototype.slice.call(t)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(t),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),e=this.num-t.length;e<this.num;e+=1)this.addSlide(e),this.positionSlide(e);this.positions.length=this.num,this.initSlides(!0)},resetSlides:function(){this.slidesContainer.empty(),this.unloadAllSlides(),this.slides=[]},handleClose:function(){var t=this.options;this.destroyEventListeners(),this.pause(),this.container[0].style.display="none",this.container.removeClass(t.displayClass).removeClass(t.singleClass).removeClass(t.leftEdgeClass).removeClass(t.rightEdgeClass),t.hidePageScrollbars&&(document.body.style.overflow=this.bodyOverflowStyle),this.options.clearSlides&&this.resetSlides(),this.options.onclosed&&this.options.onclosed.call(this)},close:function(){function t(i){i.target===e.container[0]&&(e.container.off(e.support.transition.end,t),e.handleClose())}var e=this;this.options.onclose&&this.options.onclose.call(this),this.support.transition&&this.options.displayTransition?(this.container.on(this.support.transition.end,t),this.container.removeClass(this.options.displayClass)):this.handleClose()},circle:function(t){return(this.num+t%this.num)%this.num},move:function(t,e,i){this.translateX(t,e,i),this.positions[t]=e},translate:function(t,e,i,s){var o=this.slides[t].style,n=this.support.transition,l=this.support.transform;o[n.name+"Duration"]=s+"ms",o[l.name]="translate("+e+"px, "+i+"px)"+(l.translateZ?" translateZ(0)":"")},translateX:function(t,e,i){this.translate(t,e,0,i)},translateY:function(t,e,i){this.translate(t,0,e,i)},animate:function(t,e,i){if(!i)return void(this.slidesContainer[0].style.left=e+"px");var s=this,o=(new Date).getTime(),n=window.setInterval(function(){var l=(new Date).getTime()-o;return l>i?(s.slidesContainer[0].style.left=e+"px",s.ontransitionend(),void window.clearInterval(n)):void(s.slidesContainer[0].style.left=(e-t)*(Math.floor(l/i*100)/100)+t+"px")},4)},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(t){t.which&&1===t.which&&"VIDEO"!==t.target.nodeName&&(t.preventDefault(),(t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchstart(t))},onmousemove:function(t){this.touchStart&&((t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchmove(t))},onmouseup:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},onmouseout:function(e){if(this.touchStart){var i=e.target,s=e.relatedTarget;(!s||s!==i&&!t.contains(i,s))&&this.onmouseup(e)}},ontouchstart:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e=(t.originalEvent||t).touches[0];this.touchStart={x:e.pageX,y:e.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s=(t.originalEvent||t).touches[0],o=(t.originalEvent||t).scale,n=this.index;if(!(s.length>1||o&&1!==o))if(this.options.disableScroll&&t.preventDefault(),this.touchDelta={x:s.pageX-this.touchStart.x,y:s.pageY-this.touchStart.y},e=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(e)<Math.abs(this.touchDelta.y)),this.isScrolling)this.options.closeOnSwipeUpOrDown&&this.translateY(n,this.touchDelta.y+this.positions[n],0);else for(t.preventDefault(),window.clearTimeout(this.timeout),this.options.continuous?i=[this.circle(n+1),n,this.circle(n-1)]:(this.touchDelta.x=e/=!n&&e>0||n===this.num-1&&0>e?Math.abs(e)/this.slideWidth+1:1,i=[n],n&&i.push(n-1),n<this.num-1&&i.unshift(n+1));i.length;)n=i.pop(),this.translateX(n,e+this.positions[n],0)},ontouchend:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s,o,n,l=this.index,a=this.options.transitionSpeed,r=this.slideWidth,h=Number(Date.now()-this.touchStart.time)<250,d=h&&Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.x)>r/2,c=!l&&this.touchDelta.x>0||l===this.num-1&&this.touchDelta.x<0,u=!d&&this.options.closeOnSwipeUpOrDown&&(h&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(c=!1),e=this.touchDelta.x<0?-1:1,this.isScrolling?u?this.close():this.translateY(l,0,a):d&&
73!c?(i=l+e,s=l-e,o=r*e,n=-r*e,this.options.continuous?(this.move(this.circle(i),o,0),this.move(this.circle(l-2*e),n,0)):i>=0&&i<this.num&&this.move(i,o,0),this.move(l,this.positions[l]+o,a),this.move(this.circle(s),this.positions[this.circle(s)]+o,a),l=this.circle(s),this.onslide(l)):this.options.continuous?(this.move(this.circle(l-1),-r,a),this.move(l,0,a),this.move(this.circle(l+1),r,a)):(l&&this.move(l-1,-r,a),this.move(l,0,a),l<this.num-1&&this.move(l+1,r,a))},ontouchcancel:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},ontransitionend:function(t){var e=this.slides[this.index];t&&e!==t.target||(this.interval&&this.play(),this.setTimeout(this.options.onslideend,[this.index,e]))},oncomplete:function(e){var i,s=e.target||e.srcElement,o=s&&s.parentNode;s&&o&&(i=this.getNodeIndex(o),t(o).removeClass(this.options.slideLoadingClass),"error"===e.type?(t(o).addClass(this.options.slideErrorClass),this.elements[i]=3):this.elements[i]=2,s.clientHeight>this.container[0].clientHeight&&(s.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===o&&this.play(),this.setTimeout(this.options.onslidecomplete,[i,o]))},onload:function(t){this.oncomplete(t)},onerror:function(t){this.oncomplete(t)},onkeydown:function(t){switch(t.which||t.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(t),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),t.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(t),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.next())}},handleClick:function(e){function i(e){return t(o).hasClass(e)||t(n).hasClass(e)}var s=this.options,o=e.target||e.srcElement,n=o.parentNode;i(s.toggleClass)?(this.preventDefault(e),this.toggleControls()):i(s.prevClass)?(this.preventDefault(e),this.prev()):i(s.nextClass)?(this.preventDefault(e),this.next()):i(s.closeClass)?(this.preventDefault(e),this.close()):i(s.playPauseClass)?(this.preventDefault(e),this.toggleSlideshow()):n===this.slidesContainer[0]?s.closeOnSlideClick?(this.preventDefault(e),this.close()):s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls()):n.parentNode&&n.parentNode===this.slidesContainer[0]&&s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls())},onclick:function(t){return this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)?void delete this.touchDelta:this.handleClick(t)},updateEdgeClasses:function(t){t?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),t===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(t){this.options.continuous||this.updateEdgeClasses(t),this.loadElements(t),this.options.unloadElements&&this.unloadElements(t),this.setTitle(t)},onslide:function(t){this.index=t,this.handleSlide(t),this.setTimeout(this.options.onslide,[t,this.slides[t]])},setTitle:function(t){var e=this.slides[t].firstChild.title,i=this.titleElement;i.length&&(this.titleElement.empty(),e&&i[0].appendChild(document.createTextNode(e)))},setTimeout:function(t,e,i){var s=this;return t&&window.setTimeout(function(){t.apply(s,e||[])},i||0)},imageFactory:function(e,i){function s(e){if(!o){if(e={type:e.type,target:n},!n.parentNode)return a.setTimeout(s,[e]);o=!0,t(r).off("load error",s),d&&"load"===e.type&&(n.style.background='url("'+h+'") center no-repeat',n.style.backgroundSize=d),i(e)}}var o,n,l,a=this,r=this.imagePrototype.cloneNode(!1),h=e,d=this.options.stretchImages;return"string"!=typeof h&&(h=this.getItemProperty(e,this.options.urlProperty),l=this.getItemProperty(e,this.options.titleProperty)),d===!0&&(d="contain"),d=this.support.backgroundSize&&this.support.backgroundSize[d]&&d,d?n=this.elementPrototype.cloneNode(!1):(n=r,r.draggable=!1),l&&(n.title=l),t(r).on("load error",s),r.src=h,n},createElement:function(e,i){var s=e&&this.getItemProperty(e,this.options.typeProperty),o=s&&this[s.split("/")[0]+"Factory"]||this.imageFactory,n=e&&o.call(this,e,i),l=this.getItemProperty(e,this.options.srcsetProperty);return n||(n=this.elementPrototype.cloneNode(!1),this.setTimeout(i,[{type:"error",target:n}])),l&&n.setAttribute("srcset",l),t(n).addClass(this.options.slideContentClass),n},loadElement:function(e){this.elements[e]||(this.slides[e].firstChild?this.elements[e]=t(this.slides[e]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[e]=1,t(this.slides[e]).addClass(this.options.slideLoadingClass),this.slides[e].appendChild(this.createElement(this.list[e],this.proxyListener))))},loadElements:function(t){var e,i=Math.min(this.num,2*this.options.preloadRange+1),s=t;for(e=0;i>e;e+=1)s+=e*(e%2===0?-1:1),s=this.circle(s),this.loadElement(s)},unloadElements:function(t){var e,i;for(e in this.elements)this.elements.hasOwnProperty(e)&&(i=Math.abs(t-e),i>this.options.preloadRange&&i+this.options.preloadRange<this.num&&(this.unloadSlide(e),delete this.elements[e]))},addSlide:function(t){var e=this.slidePrototype.cloneNode(!1);e.setAttribute("data-index",t),this.slidesContainer[0].appendChild(e),this.slides.push(e)},positionSlide:function(t){var e=this.slides[t];e.style.width=this.slideWidth+"px",this.support.transform&&(e.style.left=t*-this.slideWidth+"px",this.move(t,this.index>t?-this.slideWidth:this.index<t?this.slideWidth:0,0))},initSlides:function(e){var i,s;for(e||(this.positions=[],this.positions.length=this.num,this.elements={},this.imagePrototype=document.createElement("img"),this.elementPrototype=document.createElement("div"),this.slidePrototype=document.createElement("div"),t(this.slidePrototype).addClass(this.options.slideClass),this.slides=this.slidesContainer[0].children,i=this.options.clearSlides||this.slides.length!==this.num),this.slideWidth=this.container[0].offsetWidth,this.slideHeight=this.container[0].offsetHeight,this.slidesContainer[0].style.width=this.num*this.slideWidth+"px",i&&this.resetSlides(),s=0;s<this.num;s+=1)i&&this.addSlide(s),this.positionSlide(s);this.options.continuous&&this.support.transform&&(this.move(this.circle(this.index-1),-this.slideWidth,0),this.move(this.circle(this.index+1),this.slideWidth,0)),this.support.transform||(this.slidesContainer[0].style.left=this.index*-this.slideWidth+"px")},unloadSlide:function(t){var e,i;e=this.slides[t],i=e.firstChild,null!==i&&e.removeChild(i)},unloadAllSlides:function(){var t,e;for(t=0,e=this.slides.length;e>t;t++)this.unloadSlide(t)},toggleControls:function(){var t=this.options.controlsClass;this.container.hasClass(t)?this.container.removeClass(t):this.container.addClass(t)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(t){return parseInt(t.getAttribute("data-index"),10)},getNestedProperty:function(t,e){return e.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(e,i,s,o,n){var l=n||i||s||o&&parseInt(o,10);e&&t&&(t=t[l])}),t},getDataProperty:function(e,i){if(e.getAttribute){var s=e.getAttribute("data-"+i.replace(/([A-Z])/g,"-$1").toLowerCase());if("string"==typeof s){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(s))try{return t.parseJSON(s)}catch(o){}return s}}},getItemProperty:function(t,e){var i=t[e];return void 0===i&&(i=this.getDataProperty(t,e),void 0===i&&(i=this.getNestedProperty(t,e))),i},initStartIndex:function(){var t,e=this.options.index,i=this.options.urlProperty;if(e&&"number"!=typeof e)for(t=0;t<this.num;t+=1)if(this.list[t]===e||this.getItemProperty(this.list[t],i)===this.getItemProperty(e,i)){e=t;break}this.index=this.circle(parseInt(e,10)||0)},initEventListeners:function(){function e(t){var e=i.support.transition&&i.support.transition.end===t.type?"transitionend":t.type;i["on"+e](t)}var i=this,s=this.slidesContainer;t(window).on("resize",e),t(document.body).on("keydown",e),this.container.on("click",e),this.support.touch?s.on("touchstart touchmove touchend touchcancel",e):this.options.emulateTouchEvents&&this.support.transition&&s.on("mousedown mousemove mouseup mouseout",e),this.support.transition&&s.on(this.support.transition.end,e),this.proxyListener=e},destroyEventListeners:function(){var e=this.slidesContainer,i=this.proxyListener;t(window).off("resize",i),t(document.body).off("keydown",i),this.container.off("click",i),this.support.touch?e.off("touchstart touchmove touchend touchcancel",i):this.options.emulateTouchEvents&&this.support.transition&&e.off("mousedown mousemove mouseup mouseout",i),this.support.transition&&e.off(this.support.transition.end,i)},handleOpen:function(){this.options.onopened&&this.options.onopened.call(this)},initWidget:function(){function e(t){t.target===i.container[0]&&(i.container.off(i.support.transition.end,e),i.handleOpen())}var i=this;return this.container=t(this.options.container),this.container.length?(this.slidesContainer=this.container.find(this.options.slidesContainer).first(),this.slidesContainer.length?(this.titleElement=this.container.find(this.options.titleElement).first(),1===this.num&&this.container.addClass(this.options.singleClass),this.options.onopen&&this.options.onopen.call(this),this.support.transition&&this.options.displayTransition?this.container.on(this.support.transition.end,e):this.handleOpen(),this.options.hidePageScrollbars&&(this.bodyOverflowStyle=document.body.style.overflow,document.body.style.overflow="hidden"),this.container[0].style.display="block",this.initSlides(),void this.container.addClass(this.options.displayClass)):(this.console.log("blueimp Gallery: Slides container not found.",this.options.slidesContainer),!1)):(this.console.log("blueimp Gallery: Widget container not found.",this.options.container),!1)},initOptions:function(e){this.options=t.extend({},this.options),(e&&e.carousel||this.options.carousel&&(!e||e.carousel!==!1))&&t.extend(this.options,this.carouselOptions),t.extend(this.options,e),this.num<3&&(this.options.continuous=this.options.continuous?null:!1),this.support.transition||(this.options.emulateTouchEvents=!1),this.options.event&&this.preventDefault(this.options.event)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{fullScreen:!1});var i=e.prototype.initialize,s=e.prototype.close;return t.extend(e.prototype,{getFullScreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullScreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},initialize:function(){i.call(this),this.options.fullScreen&&!this.getFullScreenElement()&&this.requestFullScreen(this.container[0])},close:function(){this.getFullScreenElement()===this.container[0]&&this.exitFullScreen(),s.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{indicatorContainer:"ol",activeIndicatorClass:"active",thumbnailProperty:"thumbnail",thumbnailIndicators:!0});var i=e.prototype.initSlides,s=e.prototype.addSlide,o=e.prototype.resetSlides,n=e.prototype.handleClick,l=e.prototype.handleSlide,a=e.prototype.handleClose;return t.extend(e.prototype,{createIndicator:function(e){var i,s,o=this.indicatorPrototype.cloneNode(!1),n=this.getItemProperty(e,this.options.titleProperty),l=this.options.thumbnailProperty;return this.options.thumbnailIndicators&&(l&&(i=this.getItemProperty(e,l)),void 0===i&&(s=e.getElementsByTagName&&t(e).find("img")[0],s&&(i=s.src
73)),i&&(o.style.backgroundImage='url("'+i+'")')),n&&(o.title=n),o},addIndicator:function(t){if(this.indicatorContainer.length){var e=this.createIndicator(this.list[t]);e.setAttribute("data-index",t),this.indicatorContainer[0].appendChild(e),this.indicators.push(e)}},setActiveIndicator:function(e){this.indicators&&(this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),this.activeIndicator=t(this.indicators[e]),this.activeIndicator.addClass(this.options.activeIndicatorClass))},initSlides:function(t){t||(this.indicatorContainer=this.container.find(this.options.indicatorContainer),this.indicatorContainer.length&&(this.indicatorPrototype=document.createElement("li"),this.indicators=this.indicatorContainer[0].children)),i.call(this,t)},addSlide:function(t){s.call(this,t),this.addIndicator(t)},resetSlides:function(){o.call(this),this.indicatorContainer.empty(),this.indicators=[]},handleClick:function(t){var e=t.target||t.srcElement,i=e.parentNode;if(i===this.indicatorContainer[0])this.preventDefault(t),this.slide(this.getNodeIndex(e));else{if(i.parentNode!==this.indicatorContainer[0])return n.call(this,t);this.preventDefault(t),this.slide(this.getNodeIndex(i))}},handleSlide:function(t){l.call(this,t),this.setActiveIndicator(t)},handleClose:function(){this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),a.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var i=e.prototype.handleSlide;return t.extend(e.prototype,{handleSlide:function(t){i.call(this,t),this.playingVideo&&this.playingVideo.pause()},videoFactory:function(e,i,s){var o,n,l,a,r,h=this,d=this.options,c=this.elementPrototype.cloneNode(!1),u=t(c),p=[{type:"error",target:c}],y=s||document.createElement("video"),m=this.getItemProperty(e,d.urlProperty),f=this.getItemProperty(e,d.typeProperty),g=this.getItemProperty(e,d.titleProperty),v=this.getItemProperty(e,d.videoPosterProperty),C=this.getItemProperty(e,d.videoSourcesProperty);if(u.addClass(d.videoContentClass),g&&(c.title=g),y.canPlayType)if(m&&f&&y.canPlayType(f))y.src=m;else for(;C&&C.length;)if(n=C.shift(),m=this.getItemProperty(n,d.urlProperty),f=this.getItemProperty(n,d.typeProperty),m&&f&&y.canPlayType(f)){y.src=m;break}return v&&(y.poster=v,o=this.imagePrototype.cloneNode(!1),t(o).addClass(d.toggleClass),o.src=v,o.draggable=!1,c.appendChild(o)),l=document.createElement("a"),l.setAttribute("target","_blank"),s||l.setAttribute("download",g),l.href=m,y.src&&(y.controls=!0,(s||t(y)).on("error",function(){h.setTimeout(i,p)}).on("pause",function(){a=!1,u.removeClass(h.options.videoLoadingClass).removeClass(h.options.videoPlayingClass),r&&h.container.addClass(h.options.controlsClass),delete h.playingVideo,h.interval&&h.play()}).on("playing",function(){a=!1,u.removeClass(h.options.videoLoadingClass).addClass(h.options.videoPlayingClass),h.container.hasClass(h.options.controlsClass)?(r=!0,h.container.removeClass(h.options.controlsClass)):r=!1}).on("play",function(){window.clearTimeout(h.timeout),a=!0,u.addClass(h.options.videoLoadingClass),h.playingVideo=y}),t(l).on("click",function(t){h.preventDefault(t),a?y.pause():y.play()}),c.appendChild(s&&s.element||y)),c.appendChild(l),this.setTimeout(i,[{type:"load",target:c}]),c}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{vimeoVideoIdProperty:"vimeo",vimeoPlayerUrl:"//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID",vimeoPlayerIdPrefix:"vimeo-player-",vimeoClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,
73i,s){this.url=t,this.videoId=e,this.playerId=i,this.clickToPlay=s,this.element=document.createElement("div"),this.listeners={}},o=0;return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){function e(){!s&&o.playOnReady&&o.play(),s=!0}for(var i,s,o=this,n="//f.vimeocdn.com/js/froogaloop2.min.js",l=document.getElementsByTagName("script"),a=l.length;a;)if(a-=1,l[a].src===n){i=l[a];break}i||(i=document.createElement("script"),i.src=n),t(i).on("load",e),l[0].parentNode.insertBefore(i,l[0]),/loaded|complete/.test(i.readyState)&&e()},onReady:function(){var t=this;this.ready=!0,this.player.addEvent("play",function(){t.hasPlayed=!0,t.onPlaying()}),this.player.addEvent("pause",function(){t.onPause()}),this.player.addEvent("finish",function(){t.onPause()}),this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){this.listeners.pause(),delete this.playStatus},insertIframe:function(){var t=document.createElement("iframe");t.src=this.url.replace("VIDEO_ID",this.videoId).replace("PLAYER_ID",this.playerId),t.id=this.playerId,this.element.parentNode.replaceChild(t,this.element),this.element=t},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.api("play"):(this.playOnReady=!0,window.$f?this.player||(this.insertIframe(),this.player=$f(this.element),this.player.addEvent("ready",function(){t.onReady()})):this.loadAPI())},pause:function(){this.ready?this.player.api("pause"):this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{VimeoPlayer:s,textFactory:function(t,e){var n=this.options,l=this.getItemProperty(t,n.vimeoVideoIdProperty);return l?(void 0===this.getItemProperty(t,n.urlProperty)&&(t[n.urlProperty]="//vimeo.com/"+l),o+=1,this.videoFactory(t,e,new s(n.vimeoPlayerUrl,l,n.vimeoPlayerIdPrefix+o,n.vimeoClickToPlay))):i.call(this,t,e)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{youTubeVideoIdProperty:"youtube",youTubePlayerVars:{wmode:"transparent"},youTubeClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,i){this.videoId=t,this.playerVars=e,this.clickToPlay=i,this.element=document.createElement("div"),this.listeners={}};return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){var t,e=this,i=window.onYouTubeIframeAPIReady,s="//www.youtube.com/iframe_api",o=document.getElementsByTagName("script"),n=o.length;for(window.onYouTubeIframeAPIReady=function(){i&&i.apply(this),e.playOnReady&&e.play()};n;)if(n-=1,o[n].src===s)return;t=document.createElement("script"),t.src=s,o[0].parentNode.insertBefore(t,o[0])},onReady:function(){this.ready=!0,this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){e.prototype.setTimeout.call(this,this.checkSeek,null,2e3)},checkSeek:function(){(this.stateChange===YT.PlayerState.PAUSED||this.stateChange===YT.PlayerState.ENDED)&&(this.listeners.pause(),delete this.playStatus)},onStateChange:function(t){switch(t.data){case YT.PlayerState.PLAYING:this.hasPlayed=!0,this.onPlaying();break;case YT.PlayerState.PAUSED:case YT.PlayerState.ENDED:this.onPause()}this.stateChange=t.data},onError:function(t){this.listeners.error(t)},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.playVideo():(this.playOnReady=!0,window.YT&&YT.Player?this.player||(this.player=new YT.Player(this.element,{videoId:this.videoId,playerVars:this.playerVars,events:{onReady:function(){t.onReady()},onStateChange:function(e){t.onStateChange(e)},onError:function(e){t.onError(e)}}})):this.loadAPI())},pause:function(){this.ready?this.player.pauseVideo():this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{YouTubePlayer:s,textFactory:function(t,e){var o=this.options,n=this.getItemProperty(t,o.youTubeVideoIdProperty);return n?(void 0===this.getItemProperty(t,o.urlProperty)&&(t[o.urlProperty]="//www.youtube.com/watch?v="+n),void 0===this.getItemProperty(t,o.videoPosterProperty)&&(t[o.videoPosterProperty]="//img.youtube.com/vi/"+n+"/maxresdefault.jpg"),this.videoFactory(t,e,new s(n,o.youTubePlayerVars,o.youTubeClickToPlay))):i.call(this,t,e)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./blueimp-gallery"],t):t(window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t(document).on("click","[data-gallery]",function(i){var s=t(this).data("gallery"),o=t(s),n=o.length&&o||t(e.prototype.options.container),l={onopen:function(){n.data("gallery",this).trigger("open")},onopened:function(){n.trigger("opened")},onslide:function(){n.trigger("slide",arguments)},onslideend:function(){n.trigger("slideend",arguments)},onslidecomplete:function(){n.trigger("slidecomplete",arguments)},onclose:function(){n.trigger("close")},onclosed:function(){n.trigger("closed").removeData("gallery")}},a=t.extend(n.data(),{container:n[0],index:this,event:i},l),r=t('[data-gallery="'+s+'"]');return a.filter&&(r=r.filter(a.filter)),new e(r,a)})}); 74/* End */ 75; 76; /* Start:"a:4:{s:4:"full";
vendor: 8,277 bytes, lines 76-77
76s:71:"/bitrix/templates/concept_phoenix_s4/slick/slick.min.js?175034561242863";s:6:"source";s:55:"/bitrix/templates/concept_phoenix_s4/slick/slick.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 77!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 77
77ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
77slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
77parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
77,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 77
77,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
77!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
77):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
77o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
77,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 78 79/* End */ 80; 81; /* Start:"a:4:{s:4:"full";s:94:"/bitrix/templates/concept_phoenix_s4/lang/ru/jquery.datetimepicker.full.min.js?175034561239852";s:6:"source";s:78:"/bitrix/templates/concept_phoenix_s4/lang/ru/jquery.datetimepicker.full.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 82var DateFormatter;!function(){"use strict";var e,t,n,o,a,r;a=864e5,r=3600,e=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},t=function(e,n,o){var a=o||"0",r=e.toString();return r.length<n?t(a+r,n):r},n=function(e){var t,o;for(e=e||{},t=1;t<arguments.length;t++)if(o=arguments[t])for(var a in o)o.hasOwnProperty(a)&&("object"==typeof o[a]?n(e[a],o[a]):e[a]=o[a]);return e},o={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(e){var t=e%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&n[t]?n[t]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},(DateFormatter=function(e){var t=this,a=n(o,e);t.dateSettings=a.dateSettings,t.separators=a.separators,t.validParts=a.validParts,t.intParts=a.intParts,t.tzParts=a.tzParts,t.tzClip=a.tzClip}).prototype={constructor:DateFormatter,parseDate:function(t,n){var o,a,r,i,s,d,l,u,f,c,h=this,m=!1,g=!1,p=h.dateSettings,x={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(t){if(t instanceof Date)return t;if("number"==typeof t)return new Date(t);if("U"===n)return r=parseInt(t),r?new Date(1e3*r):t;if("string"!=typeof t)return"";if(!(o=n.match(h.validParts))||0===o.length)throw new Error("Invalid date format definition.");for(a=t.replace(h.separators,"\0").split("\0"),r=0;r<a.length;r++)switch(i=a[r],s=parseInt(i),o[r]){case"y":case"Y":2===(f=i.length)?x.year=parseInt((70>s?"20":"19")+i):4===f&&(x.year=s),m=!0;break;case"m":case"n":case"M":case"F":isNaN(i)?((d=p.monthsShort.indexOf(i))>-1&&(x.month=d+1),(d=p.months.indexOf(i))>-1&&(x.month=d+1)):s>=1&&12>=s&&(x.month=s),m=!0;break;case"d":case"j":s>=1&&31>=s&&(x.day=s),m=!0;break;case"g":case"h":c=a[l=o.indexOf("a")>-1?o.indexOf("a"):o.indexOf("A")>-1?o.indexOf("A"):-1],l>-1?(u=e(c,p.meridiem[0])?0:e(c,p.meridiem[1])?12:-1,s>=1&&12>=s&&u>-1?x.hour=s+u:s>=0&&23>=s&&(x.hour=s)):s>=0&&23>=s&&(x.hour=s),g=!0;break;case"G":case"H":s>=0&&23>=s&&(x.hour=s),g=!0;break;case"i":s>=0&&59>=s&&(x.min=s),g=!0;break;case"s":s>=0&&59>=s&&(x.sec=s),g=!0}if(!0===m&&x.year&&x.month&&x.day)x.date=new Date(x.year,x.month-1,x.day,x.hour,x.min,x.sec,0);else{if(!0!==g)return!1;x.date=new Date(0,0,0,x.hour,x.min,x.sec,0)}return x.date}},guessDate:function(e,t){if("string"!=typeof e)return e;var n,o,a,r,i=this,s=e.replace(i.separators,"\0").split("\0"),d=/^[djmn]/g,l=t.match(i.validParts),u=new Date,f=0;if(!d.test(l[0]))return e;for(o=0;o<s.length;o++){switch(f=2,a=s[o],r=parseInt(a.substr(0,2)),o){case 0:"m"===l[0]||"n"===l[0]?u.setMonth(r-1):u.setDate(r);break;case 1:"m"===l[0]||"n"===l[0]?u.setDate(r):u.setMonth(r-1);break;case 2:n=u.getFullYear(),a.length<4?(u.setFullYear(parseInt(n.toString().substr(0,4-a.length)+a)),f=a.length):(u.setFullYear=parseInt(a.substr(0,4)),f=4);break;case 3:u.setHours(r);break;case 4:u.setMinutes(r);break;case 5:u.setSeconds(r)}a.substr(f).length>0&&s.splice(o+1,0,a.substr(f))}return u},parseFormat:function(e,n){var o,i=this,s=i.dateSettings,d=/\\?(.?)/gi,l=function(e,t){return o[e]?o[e]():t};return o={d:function(){return t(o.j(),2)},D:function(){return s.daysShort[o.w()]},j:function(){return n.getDate()},l:function(){return s.days[o.w()]},N:function(){return o.w()||7},w:function(){return n.getDay()},z:function(){var e=new Date(o.Y(),o.n()-1,o.j()),t=new Date(o.Y(),0,1);return Math.round((e-t)/a)},W:function(){var e=new Date(o.Y(),o.n()-1,o.j()-o.N()+3),n=new Date(e.getFullYear(),0,4);
82return t(1+Math.round((e-n)/a/7),2)},F:function(){return s.months[n.getMonth()]},m:function(){return t(o.n(),2)},M:function(){return s.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(o.Y(),o.n(),0).getDate()},L:function(){var e=o.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=o.n(),t=o.W();return o.Y()+(12===e&&9>t?1:1===e&&t>9?-1:0)},Y:function(){return n.getFullYear()},y:function(){return o.Y().toString().slice(-2)},a:function(){return o.A().toLowerCase()},A:function(){var e=o.G()<12?0:1;return s.meridiem[e]},B:function(){var e=n.getUTCHours()*r,o=60*n.getUTCMinutes(),a=n.getUTCSeconds();return t(Math.floor((e+o+a+r)/86.4)%1e3,3)},g:function(){return o.G()%12||12},G:function(){return n.getHours()},h:function(){return t(o.g(),2)},H:function(){return t(o.G(),2)},i:function(){return t(n.getMinutes(),2)},s:function(){return t(n.getSeconds(),2)},u:function(){return t(1e3*n.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(n))[1]||"Coordinated Universal Time"},T:function(){return(String(n).match(i.tzParts)||[""]).pop().replace(i.tzClip,"")||"UTC"},I:function(){return new Date(o.Y(),0)-Date.UTC(o.Y(),0)!=new Date(o.Y(),6)-Date.UTC(o.Y(),6)?1:0},O:function(){var e=n.getTimezoneOffset(),o=Math.abs(e);return(e>0?"-":"+")+t(100*Math.floor(o/60)+o%60,4)},P:function(){var e=o.O();return e.substr(0,3)+":"+e.substr(3,2)},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(d,l)},r:function(){return"D, d M Y H:i:s O".replace(d,l)},U:function(){return n.getTime()/1e3||0}},l(e,e)},formatDate:function(e,t){var n,o,a,r,i,s=this,d="";if("string"==typeof e&&!1===(e=s.parseDate(e,t)))return!1;if(e instanceof Date){for(a=t.length,n=0;a>n;n++)"S"!==(i=t.charAt(n))&&(r=s.parseFormat(i,e),n!==a-1&&s.intParts.test(i)&&"S"===t.charAt(n+1)&&(o=parseInt(r),r+=s.dateSettings.ordinal(o)),d+=r);return d}return""}}}(),function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){"use strict";function t(e,t,n){this.date=e,this.desc=t,this.style=n}var n={i18n:{ru:{months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],dayOfWeekShort:["ÐÑ","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],dayOfWeek:["ÐоÑкÑеÑенÑе","ÐонеделÑник","ÐÑоÑник","СÑеда","ЧеÑвеÑг","ÐÑÑниÑа","СÑббоÑа"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},o=null,a="en",r={meridiem:["AM","PM"]},i=function(){var t=n.i18n[a],i={days:t.dayOfWeek,daysShort:t.dayOfWeekShort,months:t.months,monthsShort:e.map(t.months,function(e){return e.substring(0,3)})};o=new DateFormatter({dateSettings:e.extend({},r,i)})};e.datetimepicker={setLocale:function(e){var t=n.i18n[e]?e:"en";a!=t&&(a=t,i())},setDateFormatter:function(e){o=e}
vendor: 23,224 bytes, line 82
82,RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},i(),window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(e,t,n){return n.toUpperCase()})),e.currentStyle[t]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,o;for(n=t||0,o=this.length;o>n;n+=1)if(this[n]===e)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each(function(){var n,o,a,r,i,s=e(this),d=function(e){var t,n={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],n.x=t.clientX,n.y=t.clientY):("mousedown"===e.type||"mouseup"===e.type||"mousemove"===e.type||"mouseover"===e.type||"mouseout"===e.type||"mouseenter"===e.type||"mouseleave"===e.type)&&(n.x=e.clientX,n.y=e.clientY),n},l=100,u=!1,f=0,c=0,h=0,m=!1,g=0,p=function(){};return"hide"===t?void s.find(".xdsoft_scrollbar").hide():(e(this).hasClass("xdsoft_scroller_box")||(n=s.children().eq(0),o=s[0].clientHeight,a=n[0].offsetHeight,r=e('<div class="xdsoft_scrollbar"></div>'),i=e('<div class="xdsoft_scroller"></div>'),r.append(i),s.addClass("xdsoft_scroller_box").append(r),p=function(e){var t=d(e).y-f+g;0>t&&(t=0),t+i[0].offsetHeight>h&&(t=h-i[0].offsetHeight),s.trigger("scroll_element.xdsoft_scroller",[l?t/l:0])},i.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(n){o||s.trigger("resize_scroll.xdsoft_scroller",[t]),f=d(n).y,g=parseInt(i.css("margin-top"),10),h=r[0].offsetHeight,"mousedown"===n.type||"touchstart"===n.type?(document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("touchend mouseup.xdsoft_scroller",function t(){e([document.body,window]).off("touchend mouseup.xdsoft_scroller",t).off("mousemove.xdsoft_scroller",p).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",p)):(m=!0,n.stopPropagation(),n.preventDefault())}).on("touchmove",function(e){m&&(e.preventDefault(),p(e))}).on("touchend touchcancel",function(){m=!1,g=0}),s.on("scroll_element.xdsoft_scroller",function(e,t){o||s.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,i.css("margin-top",l*t),setTimeout(function(){n.css("marginTop",-parseInt((n[0].offsetHeight-o)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,d){var u,f;o=s[0].clientHeight,a=n[0].offsetHeight,f=(u=o/a)*r[0].offsetHeight,u>1?i.hide():(i.show(),i.css("height",parseInt(f>10?f:10,10)),l=r[0].offsetHeight-i[0].offsetHeight,!0!==d&&s.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(n.css("marginTop"),10))/(a-o)]))}),s.on("mousewheel",function(e){var t=Math.abs(parseInt(n.css("marginTop"),10));return 0>(t-=20*e.deltaY)&&(t=0),s.trigger("scroll_element.xdsoft_scroller",[t/(a-o)]),e.stopPropagation(),!1}),s.on("touchstart",function(e){u=d(e),c=Math.abs(parseInt(n.css("marginTop"),10))}),s.on("touchmove",function(e){if(u){e.preventDefault();var t=d(e);s.trigger("scroll_element.xdsoft_scroller",[(c-(t.y-u.y))/(a-o)])}}),s.on("touchend touchcancel",function(){u=!1,c=0})),void s.trigger("resize_scroll.xdsoft_scroller",[t]))})},e.fn.datetimepicker=function(r,i){var s,d,l=this,u=48,f=57,c=96,h=105,m=17,g=46,p=13,x=27,v=8,D=37,y=38,w=39,T=40,b=9,_=116,k=65,M=67,S=86,C=90,O=89,Y=!1,F=e.isPlainObject(r)||!r?e.extend(!0,{},n,r):e.extend(!0,{},n),H=0,P=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function t(){e.is(":disabled")||e.data("xdsoft_datetimepicker")||(clearTimeout(H),H=setTimeout(function(){e.data("xdsoft_datetimepicker")||s(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",t).trigger("open.xdsoft")},100))})};return s=function(n){function i(){var e,t=!1;return F.startDate?t=I.strToDate(F.startDate):(t=F.value||(n&&n.val&&n.val()?n.val():""),t?t=I.strToDateTime(t):F.defaultDate&&(t=I.strToDateTime(F.defaultDate),F.defaultTime&&(e=I.strtotime(F.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes())))),t&&I.isValidDate(t)?A.data("changed",!0):t="",t||0}function s(t){var o=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(n).test(t)},a=function(e){try{if(document.selection&&document.selection.createRange)return document.selection.createRange().getBookmark().charCodeAt(2)-2;if(e.setSelectionRange)return e.selectionStart}catch(e){return 0}},r=function(e,t){if(!(e="string"==typeof e||e instanceof String?document.getElementById(e):e))return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};t.mask&&n.off("keydown.xdsoft"),!0===t.mask&&(t.mask="undefined"!=typeof moment?t.format.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59"):t.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(t.mask)&&(o(t.mask,n.val())||(n.val(t.mask.replace(/[0-9]/g,"_")),r(n[0],0)),n.on("keydown.xdsoft",function(i){var s,d,l=this.value,F=i.which;if(F>=u&&f>=F||F>=c&&h>=F||F===v||F===g){for(s=a(this),d=F!==v&&F!==g?String.fromCharCode(F>=c&&h>=F?F-u:F):"_",F!==v&&F!==g||!s||(s-=1,d="_");/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=F===v||F===g?-1:1;if(l=l.substr(0,s)+d+l.substr(s+1),""===e.trim(l))l=t.mask.replace(/[0-9]/g,"_");else if(s===t.mask.length)return i.preventDefault(),!1;for(s+=F===v||F===g?0:1;/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=F===v||F===g?-1:1;o(t.mask,l)?(this.value=l,r(this,s)):""===e.trim(l)?this.value=t.mask.replace(/[0-9]/g,"_"):n.trigger("error_input.xdsoft")}else if(-1!==[k,M,S,C,O].indexOf(F)&&Y||-1!==[x,y,T,D,w,_,m,b,p].indexOf(F))return!0;return i.preventDefault(),!1}))}var d,l,H,P,I,W,A=e('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),j=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),z=e('<div class="xdsoft_datepicker active"></div>'),R=e('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),B=e('<div class="xdsoft_calendar"></div>'),N=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),E=N.find(".xdsoft_time_box").eq(0),L=e('<div class="xdsoft_time_variant"></div>'),q=e('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),G=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),V=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),U=!1,X=0;F.id&&A.attr("id",F.id),F.style&&A.attr("style",F.style),F.weeks&&A.addClass("xdsoft_showweeks"),F.rtl&&A.addClass("xdsoft_rtl"),A.addClass("xdsoft_"+F.theme),A.addClass(F.className),R.find(".xdsoft_month span").after(G),R.find(".xdsoft_year span").after(V),R.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(t){var n,o,a=e(this).find(".xdsoft_select").eq(0),r=0,i=0,s=a.is(":visible");for(R.find(".xdsoft_select").hide(),I.currentTime&&(r=I.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),a[s?"hide":"show"](),n=a.find("div.xdsoft_option"),o=0;o<n.length&&n.eq(o).data("value")!==r;o+=1)i+=n[0].offsetHeight;return a.xdsoftScroller(i/(a.children()[0].offsetHeight-a[0].clientHeight)),t.stopPropagation(),!1}),R.find(".xdsoft_select").xdsoftScroller().on("touchstart mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("touchstart mousedown.xdsoft",".xdsoft_option",function(){(void 0===I.currentTime||null===I.currentTime)&&(I.currentTime=I.now());var t=I.currentTime.getFullYear();I&&I.currentTime&&I.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),A.trigger("xchange.xdsoft"),F.onChangeMonth&&e.isFunction(F.onChangeMonth)&&F.onChangeMonth.call(A,I.currentTime,A.data("input")),t!==I.currentTime.getFullYear()&&e.isFunction(F.onChangeYear)&&F.onChangeYear.call(A,I.currentTime,A.data("input"))}),A.getValue=function(){return I.getCurrentTime()},A.setOptions=function(a){var r={};F=e.extend(!0,{},F,a),a.allowTimes&&e.isArray(a.allowTimes)&&a.allowTimes.length&&(F.allowTimes=e.extend(!0,[],a.allowTimes)),a.weekends&&e.isArray(a.weekends)&&a.weekends.length&&(F.weekends=e.extend(!0,[],a.weekends)),a.allowDates&&e.isArray(a.allowDates)&&a.allowDates.length&&(F.allowDates=e.extend(!0,[],a.allowDates)),a.allowDateRe&&"[object String]"===Object.prototype.toString.call(a.allowDateRe)&&(F.allowDateRe=new RegExp(a.allowDateRe)),a.highlightedDates&&e.isArray(a.highlightedDates)&&a.highlightedDates.length&&(e.each(a.highlightedDates,function(n,a){var i,s=e.map(a.split(","),e.trim),d=new t(o.parseDate(s[0],F.formatDate),s[1],s[2]),l=o.formatDate(d.date,F.formatDate);void 0!==r[l]?(i=r[l].desc)&&i.length&&d.desc&&d.desc.length&&(r[l].desc=i+"\n"+d.desc):r[l]=d}),F.highlightedDates=e.extend(!0,[],r)),a.highlightedPeriods&&e.isArray(a.highlightedPeriods)&&a.highlightedPeriods.length&&(r=e.extend(!0,[],F.highlightedDates),e.each(a.highlightedPeriods,function(n,a){var i,s,d,l,u,f,c;if(e.isArray(a))i=a[0],s=a[1],d=a[2],c=a[3];else{var h=e.map(a.split(","),e.trim);i=o.parseDate(h[0],F.formatDate),s=o.parseDate(h[1],F.formatDate),d=h[2],c=h[3]}for(;s>=i;)l=new t(i,d,c),u=o.formatDate(i,F.formatDate),i.setDate(i.getDate()+1),void 0!==r[u]?(f=r[u].desc)&&f.length&&l.desc&&l.desc.length&&(r[u].desc=f+"\n"+l.desc):r[u]=l}),F.highlightedDates=e.extend(!0,[],r)),a.disabledDates&&e.isArray(a.disabledDates)&&a.disabledDates.length&&(F.disabledDates=e.extend(!0,[],a.disabledDates)),a.disabledWeekDays&&e.isArray(a.disabledWeekDays)&&a.disabledWeekDays.length&&(F.disabledWeekDays=e.extend(!0,[],a.disabledWeekDays)),!F.open&&!F.opened||F.inline||n.trigger("open.xdsoft"),F.inline&&(U=!0,A.addClass("xdsoft_inline"),n.after(A).hide()),F.inverseButton&&(F.next="xdsoft_prev",F.prev="xdsoft_next"),F.datepicker?z.addClass("active"):z.removeClass("active"),F.timepicker?N.addClass("active"):N.removeClass("active"),F.value&&(I.setCurrentTime(F.value),n&&n.val&&n.val(I.str)),F.dayOfWeekStart=isNaN(F.dayOfWeekStart)?0:parseInt(F.dayOfWeekStart,10)%7,F.timepickerScrollbar||E.xdsoftScroller("hide"),F.minDate&&/^[\+\-](.*)$/.test(F.minDate)&&(F.minDate=o.formatDate(I.strToDateTime(F.minDate),F.formatDate)),F.maxDate&&/^[\+\-](.*)$/.test(F.maxDate)&&(F.maxDate=o.formatDate(I.strToDateTime(F.maxDate),F.formatDate)),q.toggle(F.showApplyButton),R.find(".xdsoft_today_button").css("visibility",F.todayButton?"visible":"hidden"),R.find("."+F.prev).css("visibility",F.prevButton?"visible":"hidden"),R.find("."+F.next).css("visibility",F.nextButton?"visible":"hidden"),s(F),F.validateOnBlur&&n.off("blur.xdsoft").on("blur.xdsoft",function(){if(F.allowBlank&&(!e.trim(e(this).val()).length||"string"==typeof F.mask&&e.trim(e(this).val())===F.mask.replace(/[0-9]/g,"_")))e(this).val(null),A.data("xdsoft_datetime").empty();else{var t=o.parseDate(e(this).val(),F.format);if(t)e(this).val(o.formatDate(t,F.format));else{var n=+[e(this).val()[0],e(this).val()[1]].join(""),a=+[e(this).val()[2],e(this).val()[3]].join("");e(this).val(!F.datepicker&&F.timepicker&&n>=0&&24>n&&a>=0&&60>a?[n,a].map(function(e){return e>9?e:"0"+e}).join(":"):o.formatDate(I.now(),F.format))}A.data("xdsoft_datetime").setCurrentTime(e(this).val())}A.trigger("changedatetime.xdsoft"),A.trigger("close.xdsoft")}),F.dayOfWeekStartPrev=0===F.dayOfWeekStart?6:F.dayOfWeekStart-1,A.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},A.data("options",F).on("touchstart mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),V.hide(),G.hide(),!1}),E.append(L),E.xdsoftScroller(),A.on("afterOpen.xdsoft",function(){E.xdsoftScroller()}),A.append(z).append(N),!0!==F.withoutCopyright&&A.append(j),z.append(R).append(B).append(q),e(F.parentID).append(A),I=new function(){var t=this;t.now=function(e){var n,o,a=new Date;return!e&&F.defaultDate&&(n=t.strToDateTime(F.defaultDate),a.setFullYear(n.getFullYear()),a.setMonth(n.getMonth()),a.setDate(n.getDate())),F.yearOffset&&a.setFullYear(a.getFullYear()+F.yearOffset),!e&&F.defaultTime&&(o=t.strtotime(F.defaultTime),a.setHours(o.getHours()),a.setMinutes(o.getMinutes())),a},t.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},t.setCurrentTime=function(e,n){t.currentTime="string"==typeof e?t.strToDateTime(e):t.isValidDate(e)?e:e||n||!F.allowBlank?t.now():null,A.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var n,o=t.currentTime.getMonth()+1;return 12===o&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),o=0),n=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),o+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(o),F.onChangeMonth&&e.isFunction(F.onChangeMonth)&&F.onChangeMonth.call(A,I.currentTime,A.data("input")),n!==t.currentTime.getFullYear()&&e.isFunction(F.onChangeYear)&&F.onChangeYear.call(A,I.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),o},t.prevMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var n=t.currentTime.getMonth()-1;return-1===n&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),n=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),n+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(n),F.onChangeMonth&&e.isFunction(F.onChangeMonth)&&F.onChangeMonth.call(A,I.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),n},t.getWeekOfYear=function(t){if(F.onGetWeekOfYear&&e.isFunction(F.onGetWeekOfYear)){var n=F.onGetWeekOfYear.call(A,t);if(void 0!==n)return n}var o=new Date(t.getFullYear(),0,1);return 4!=o.getDay()&&o.setMonth(0,1+(4-o.getDay()+7)%7),Math.ceil(((t-o)/864e5+o.getDay()+1)/7)},t.strToDateTime=function(e){var n,a,r=[];return e&&e instanceof Date&&t.isValidDate(e)?e:((r=/^(\+|\-)(.*)$/.exec(e))&&(r[2]=o.parseDate(r[2],F.formatDate)),r&&r[2]?(n=r[2].getTime()-6e4*r[2].getTimezoneOffset(),a=new Date(t.now(!0).getTime()+parseInt(r[1]+"1",10)*n)):a=e?o.parseDate(e,F.format):t.now(),t.isValidDate(a)||(a=t.now()),a)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?o.parseDate(e,F.formatDate):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?o.parseDate(e,F.formatTime):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.str=function(){return o.formatDate(t.currentTime,F.format)},t.currentTime=this.now()},q.on("touchend click",function(e){e.preventDefault(),A.data("changed",!0),I.setCurrentTime(i()),n.val(I.str()),A.trigger("close.xdsoft")}),R.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",function(){A.data("changed",!0),I.setCurrentTime(0,!0),A.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var e,t,o=I.getCurrentTime();o=new Date(o.getFullYear(),o.getMonth(),o.getDate()),e=I.strToDate(F.minDate),(e=new Date(e.getFullYear(),e.getMonth(),e.getDate()))>o||(t=I.strToDate(F.maxDate),t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o>t||(n.val(I.str()),n.trigger("change"),A.trigger("close.xdsoft")))}),R.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),n=0,o=!1;!function e(a){t.hasClass(F.next)?I.nextMonth():t.hasClass(F.prev)&&I.prevMonth(),F.monthChangeSpinner&&(o||(n=setTimeout(e,a||100)))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function t(){clearTimeout(n),o=!0,e([document.body,window]).off("touchend mouseup.xdsoft",t)})}),N.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),n=0,o=!1,a=110;!function e(r){var i=E[0].clientHeight,s=L[0].offsetHeight,d=Math.abs(parseInt(L.css("marginTop"),10));t.hasClass(F.next)&&s-i-F.timeHeightInTimePicker>=d?L.css("marginTop","-"+(d+F.timeHeightInTimePicker)+"px"):t.hasClass(F.prev)&&d-F.timeHeightInTimePicker>=0&&L.css("marginTop","-"+(d-F.timeHeightInTimePicker)+"px"),E.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(L[0].style.marginTop,10)/(s-i))]),a=a>10?10:a-10,o||(n=setTimeout(e,r||a))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function t(){clearTimeout(n),o=!0,e([document.body,window]).off("touchend mouseup.xdsoft",t)})}),d=0,A.on("xchange.xdsoft",function(t){clearTimeout(d),d=setTimeout(function(){if(void 0===I.currentTime||null===I.currentTime){if(F.allowBlank)return;I.currentTime=I.now()}for(var t,i,s,d,l,u,f,c,h,m,g="",p=new Date(I.currentTime.getFullYear(),I.currentTime.getMonth(),1,12,0,0),x=0,v=I.now(),D=!1,y=!1,w=[],T=!0,b="",_="";p.getDay()!==F.dayOfWeekStart;)p.setDate(p.getDate()-1);for(g+="<table><thead><tr>",F.weeks&&(g+="<th></th>"),t=0;7>t;t+=1)g+="<th>"+F.i18n[a].dayOfWeekShort[(t+F.dayOfWeekStart)%7]+"</th>";for(g+="</tr></thead>",g+="<tbody>",!1!==F.maxDate&&(D=I.strToDate(F.maxDate),D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),23,59,59,999)),!1!==F.minDate&&(y=I.strToDate(F.minDate),y=new Date(y.getFullYear(),y.getMonth(),y.getDate()));x<I.currentTime.countDaysInMonth()||p.getDay()!==F.dayOfWeekStart||I.currentTime.getMonth()===p.getMonth();)w=[],x+=1,s=p.getDay(),d=p.getDate(),l=p.getFullYear(),u=p.getMonth(),f=I.getWeekOfYear(p),m="",w.push("xdsoft_date"),c=F.beforeShowDay&&e.isFunction(F.beforeShowDay.call)?F.beforeShowDay.call(A,p):null,F.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(F.allowDateRe)?F.allowDateRe.test(o.formatDate(p,F.formatDate))||w.push("xdsoft_disabled"):F.allowDates&&F.allowDates.length>0?-1===F.allowDates.indexOf(o.formatDate(p,F.formatDate))&&w.push("xdsoft_disabled"):!1!==D&&p>D||!1!==y&&y>p||c&&!1===c[0]?w.push("xdsoft_disabled"):-1!==F.disabledDates.indexOf(o.formatDate(p,F.formatDate))?w.push("xdsoft_disabled"):-1!==F.disabledWeekDays.indexOf(s)?w.push("xdsoft_disabled"):n.is("[readonly]")&&w.push("xdsoft_disabled"),c&&""!==c[1]&&w.push(c[1]),I.currentTime.getMonth()!==u&&w.push("xdsoft_other_month"),(F.defaultSelect||A.data("changed"))&&o.formatDate(I.currentTime,F.formatDate)===o.formatDate(p,F.formatDate)&&w.push("xdsoft_current"),o.formatDate(v,F.formatDate)===o.formatDate(p,F.formatDate)&&w.push("xdsoft_today"),(0===p.getDay()||6===p.getDay()||-1!==F.weekends.indexOf(o.formatDate(p,F.formatDate)))&&w.push("xdsoft_weekend"),void 0!==F.highlightedDates[o.formatDate(p,F.formatDate)]&&(i=F.highlightedDates[o.formatDate(p,F.formatDate)],w.push(void 0===i.style?"xdsoft_highlighted_default":i.style),m=void 0===i.desc?"":i.desc),F.beforeShowDay&&e.isFunction(F.beforeShowDay)&&w.push(F.beforeShowDay(p)),T&&(g+="<tr>",T=!1,F.weeks&&(g+="<th>"+f+"</th>")),g+='<td data-date="'+d+'" data-month="'+u+'" data-year="'+l+'" class="xdsoft_date xdsoft_day_of_week'+p.getDay()+" "+w.join(" ")+'" title="'+m+'"><div>'+d+"</div></td>",p.getDay()===F.dayOfWeekStartPrev&&(g+="</tr>",T=!0),p.setDate(d+1);if(g+="</tbody></table>",B.html(g),R.find(".xdsoft_label span").eq(0).text(F.i18n[a].months[I.currentTime.getMonth()]),R.find(".xdsoft_label span").eq(1).text(I.currentTime.getFullYear()),b="",_="",u="",h=function(t,a){var r,i,s=I.now(),d=F.allowTimes&&e.isArray(F.allowTimes)&&F.allowTimes.length;s.setHours(t),t=parseInt(s.getHours(),10),s.setMinutes(a),a=parseInt(s.getMinutes(),10),(r=new Date(I.currentTime)).setHours(t),r.setMinutes(a),w=[],!1!==F.minDateTime&&F.minDateTime>r||!1!==F.maxTime&&I.strtotime(F.maxTime).getTime()<s.getTime()||!1!==F.minTime&&I.strtotime(F.minTime).getTime()>s.getTime()?w.push("xdsoft_disabled"):!1!==F.minDateTime&&F.minDateTime>r||!1!==F.disabledMinTime&&s.getTime()>I.strtotime(F.disabledMinTime).getTime()&&!1!==F.disabledMaxTime&&s.getTime()<I.strtotime(F.disabledMaxTime).getTime()?w.push("xdsoft_disabled"):n.is("[readonly]")&&w.push("xdsoft_disabled"),(i=new Date(I.currentTime)).setHours(parseInt(I.currentTime.getHours(),10)),d||i.setMinutes(Math[F.roundTime](I.currentTime.getMinutes()/F.step)*F.step),(F.initTime||F.defaultSelect||A.data("changed"))&&i.getHours()===parseInt(t,10)&&(!d&&F.step>59||i.getMinutes()===parseInt(a,10))&&(F.defaultSelect||A.data("changed")?w.push("xdsoft_current"):F.initTime&&w.push("xdsoft_init_time")),parseInt(v.getHours(),10)===parseInt(t,10)&&parseInt(v.getMinutes(),10)===parseInt(a,10)&&w.push("xdsoft_today"),b+='<div class="xdsoft_time '+w.join(" ")+'" data-hour="'+t+'" data-minute="'+a+'">'+o.formatDate(s,F.formatTime)+"</div>"},F.allowTimes&&e.isArray(F.allowTimes)&&F.allowTimes.length)for(x=0;x<F.allowTimes.length;x+=1)_=I.strtotime(F.allowTimes[x]).getHours(),u=I.strtotime(F.allowTimes[x]).getMinutes(),h(_,u);else for(x=0,t=0;x<(F.hours12?12:24);x+=1)for(t=0;60>t;t+=F.step)_=(10>x?"0":"")+x,u=(10>t?"0":"")+t,h(_,u);for(L.html(b),r="",x=0,x=parseInt(F.yearStart,10)+F.yearOffset;x<=parseInt(F.yearEnd,10)+F.yearOffset;x+=1)r+='<div class="xdsoft_option '+(I.currentTime.getFullYear()===x?"xdsoft_current":"")+'" data-value="'+x+'">'+x+"</div>";for(V.children().eq(0).html(r),x=parseInt(F.monthStart,10),r="";x<=parseInt(F.monthEnd,10);x+=1)r+='<div class="xdsoft_option '+(I.currentTime.getMonth()===x?"xdsoft_current":"")+'" data-value="'+x+'">'+F.i18n[a].months[x]+"</div>";G.children().eq(0).html(r),e(A).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(F.timepicker){var e,t,n,o;L.find(".xdsoft_current").length?e=".xdsoft_current":L.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=E[0].clientHeight,n=L[0].offsetHeight,(o=L.find(e).index()*F.timeHeightInTimePicker+1)>n-t&&(o=n-t),E.trigger("scroll_element.xdsoft_scroller",[parseInt(o,10)/(n-t)])):E.trigger("scroll_element.xdsoft_scroller",[0])}}),l=0,B.on("touchend click.xdsoft","td",function(t){t.stopPropagation(),l+=1;var o=e(this),a=I.currentTime;return(void 0===a||null===a)&&(I.currentTime=I.now(),a=I.currentTime),!o.hasClass("xdsoft_disabled")&&(a.setDate(1),a.setFullYear(o.data("year")),a.setMonth(o.data("month")),a.setDate(o.data("date")),A.trigger("select.xdsoft",[a]),n.val(
82I.str()),F.onSelectDate&&e.isFunction(F.onSelectDate)&&F.onSelectDate.call(A,I.currentTime,A.data("input"),t),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),(l>1||!0===F.closeOnDateSelect||!1===F.closeOnDateSelect&&!F.timepicker)&&!F.inline&&A.trigger("close.xdsoft"),void setTimeout(function(){l=0},200))}),L.on("touchend click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),o=I.currentTime;return(void 0===o||null===o)&&(I.currentTime=I.now(),o=I.currentTime),!n.hasClass("xdsoft_disabled")&&(o.setHours(n.data("hour")),o.setMinutes(n.data("minute")),A.trigger("select.xdsoft",[o]),A.data("input").val(I.str()),F.onSelectTime&&e.isFunction(F.onSelectTime)&&F.onSelectTime.call(A,I.currentTime,A.data("input"),t),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),void(!0!==F.inline&&!0===F.closeOnTimeSelect&&A.trigger("close.xdsoft")))}),z.on("mousewheel.xdsoft",function(e){return!F.scrollMonth||(e.deltaY<0?I.nextMonth():I.prevMonth(),!1)}),n.on("mousewheel.xdsoft",function(e){return!F.scrollInput||(!F.datepicker&&F.timepicker?((H=L.find(".xdsoft_current").length?L.find(".xdsoft_current").eq(0).index():0)+e.deltaY>=0&&H+e.deltaY<L.children().length&&(H+=e.deltaY),L.children().eq(H).length&&L.children().eq(H).trigger("mousedown"),!1):F.datepicker&&!F.timepicker?(z.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),n.val&&n.val(I.str()),A.trigger("changedatetime.xdsoft"),!1):void 0)}),A.on("changedatetime.xdsoft",function(t){if(F.onChangeDateTime&&e.isFunction(F.onChangeDateTime)){var n=A.data("input");F.onChangeDateTime.call(A,I.currentTime,n,t),delete F.value,n.trigger("change")}}).on("generate.xdsoft",function(){F.onGenerate&&e.isFunction(F.onGenerate)&&F.onGenerate.call(A,I.currentTime,A.data("input")),U&&(A.trigger("afterOpen.xdsoft"),U=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),H=0,W=function(e,t){do{if(e=e.parentNode,!1===t(e))break}while("HTML"!==e.nodeName)},P=function(){var t,n,o,a,r,i,s,d,l,u,f,c,h;if(d=A.data("input"),t=d.offset(),n=d[0],u="top",o=t.top+n.offsetHeight-1,a=t.left,r="absolute",l=e(window).width(),c=e(window).height(),h=e(window).scrollTop(),document.documentElement.clientWidth-t.left<z.parent().outerWidth(!0)){var m=z.parent().outerWidth(!0)-n.offsetWidth;a-=m}"rtl"===d.parent().css("direction")&&(a-=A.outerWidth()-d.outerWidth()),F.fixed?(o-=h,a-=e(window).scrollLeft(),r="fixed"):(s=!1,W(n,function(e){return"fixed"===window.getComputedStyle(e).getPropertyValue("position")?(s=!0,!1):void 0}),s?(r="fixed",o+A.outerHeight()>c+h?(u="bottom",o=c+h-t.top):o-=h):o+n.offsetHeight>c+h&&(o=t.top-n.offsetHeight+1),0>o&&(o=0),a+n.offsetWidth>l&&(a=l-n.offsetWidth)),i=A[0],W(i,function(e){var t;return t=window.getComputedStyle(e).getPropertyValue("position"),"relative"===t&&l>=e.offsetWidth?(a-=(l-e.offsetWidth)/2,!1):void 0}),(f={position:r,left:a,top:"",bottom:""})[u]=o,A.css(f)},A.on("open.xdsoft",function(t){var n=!0;F.onShow&&e.isFunction(F.onShow)&&(n=F.onShow.call(A,I.currentTime,A.data("input"),t)),!1!==n&&(A.show(),P(),e(window).off("resize.xdsoft",P).on("resize.xdsoft",P),F.closeOnWithoutClick&&e([document.body,window]).on("touchstart mousedown.xdsoft",function t(){A.trigger("close.xdsoft"),e([document.body,window]).off("touchstart mousedown.xdsoft",t)}))}).on("close.xdsoft",function(t){var n=!0;R.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),F.onClose&&e.isFunction(F.onClose)&&(n=F.onClose.call(A,I.currentTime,A.data("input"),t)),!1===n||F.opened||F.inline||A.hide(),t.stopPropagation()}).on("toggle.xdsoft",function(){A.trigger(A.is(":visible")?"close.xdsoft":"open.xdsoft")}).data("input",n),X=0,A.data("xdsoft_datetime",I),A.setOptions(F),I.setCurrentTime(i()),n.data("xdsoft_datetimepicker",A).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){n.is(":disabled")||n.data("xdsoft_datetimepicker").is(":visible")&&F.closeOnInputClick||(clearTimeout(X),X=setTimeout(function(){n.is(":disabled")||(U=!0,I.setCurrentTime(i(),!0),F.mask&&s(F),A.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n,o=t.which;return-1!==[p].indexOf(o)&&F.enterLikeTab?(n=e("input:visible,textarea:visible,button:visible,a:visible"),A.trigger("close.xdsoft"),n.eq(n.index(this)+1).focus(),!1):-1!==[b].indexOf(o)?(A.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){A.trigger("close.xdsoft")})},d=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft touchstart"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===m&&(Y=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===m&&(Y=!1)}),this.each(function(){var t=e(this).data("xdsoft_datetimepicker");if(t){if("string"===e.type(r))switch(r){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;
vendor: 4,363 bytes, lines 82-86
82case"destroy":d(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(o.parseDate(this.value,F.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":t.data("input").trigger("blur.xdsoft");break;default:t[r]&&e.isFunction(t[r])&&(l=t[r](i))}else t.setOptions(r);return 0}"string"!==e.type(r)&&(!F.lazyInit||F.open||F.inline?s(e(this)):P(e(this)))}),l},e.fn.datetimepicker.defaults=n}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var i=t||window.event,s=d.call(arguments,1),l=0,f=0,c=0,h=0,m=0,g=0;if(t=e.event.fix(i),t.type="mousewheel","detail"in i&&(c=-1*i.detail),"wheelDelta"in i&&(c=i.wheelDelta),"wheelDeltaY"in i&&(c=i.wheelDeltaY),"wheelDeltaX"in i&&(f=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(f=-1*c,c=0),l=0===c?f:c,"deltaY"in i&&(c=-1*i.deltaY,l=c),"deltaX"in i&&(f=i.deltaX,0===c&&(l=-1*f)),0!==c||0!==f){if(1===i.deltaMode){var p=e.data(this,"mousewheel-line-height");l*=p,c*=p,f*=p}else if(2===i.deltaMode){var x=e.data(this,"mousewheel-page-height");l*=x,c*=x,f*=x}if(h=Math.max(Math.abs(c),Math.abs(f)),(!r||r>h)&&(r=h,o(i,h)&&(r/=40)),o(i,h)&&(l/=40,f/=40,c/=40),l=Math[l>=1?"floor":"ceil"](l/r),f=Math[f>=1?"floor":"ceil"](f/r),c=Math[c>=1?"floor":"ceil"](c/r),u.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();m=t.clientX-v.left,g=t.clientY-v.top}return t.deltaX=f,t.deltaY=c,t.deltaFactor=r,t.offsetX=m,t.offsetY=g,t.deltaMode=0,s.unshift(t,l,f,c),a&&clearTimeout(a),a=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function n(){r=null}function o(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var a,r,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],d=Array.prototype.slice;if(e.event.fixHooks)for(var l=i.length;l;)e.event.fixHooks[i[--l]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=s.length;n;)this.addEventListener(s[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=s.length;n;)this.removeEventListener(s[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),o=n["offsetParent"in e.fn?"offsetParent":"parent"]();return o.length||(o=e("body")),parseInt(o.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); 83/* End */ 84; 85; /* Start:"a:4:{s:4:"full";s:67:"/bitrix/templates/concept_phoenix_s4/js/typed.min.js?17503456113851";s:6:"source";s:52:"/bitrix/templates/concept_phoenix_s4/js/typed.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 86!function(t){"use strict";var s=function(s,e){this.el=t(s),this.options=t.extend({},t.fn.typed.defaults,e),this.isInput=this.el.is("input"),this.attr=this.options.attr,this.showCursor=this.isInput?!1:this.options.showCursor,this.elContent=this.attr?this.el.attr(this.attr):this.el.text(),this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};s.prototype={constructor:s,init:function(){var t=this;t.timeout=setTimeout(function(){for(var s=0;s<t.strings.length;++s)t.sequence[s]=s;t.shuffle&&(t.sequence=t.shuffleArray(t.sequence)),t.typewrite(t.strings[t.sequence[t.arrayPos
86]],t.strPos)},t.startDelay)},build:function(){var s=this;if(this.showCursor===!0&&(this.cursor=t('<span class="typed-cursor">'+this.cursorChar+"</span>"),this.el.after(this.cursor)),this.stringsElement){s.strings=[],this.stringsElement.hide();var e=this.stringsElement.find("p");t.each(e,function(e,i){s.strings.push(t(i).html())})}this.init()},typewrite:function(t,s){if(this.stop!==!0){var e=Math.round(70*Math.random())+this.typeSpeed,i=this;i.timeout=setTimeout(function(){var e=0,r=t.substr(s);if("^"===r.charAt(0)){var o=1;/^\^\d+/.test(r)&&(r=/\d+/.exec(r)[0],o+=r.length,e=parseInt(r)),t=t.substring(0,s)+t.substring(s+o)}if("html"===i.contentType){var n=t.substr(s).charAt(0);if("<"===n||"&"===n){var a="",h="";for(h="<"===n?">":";";t.substr(s).charAt(0)!==h;)a+=t.substr(s).charAt(0),s++;s++,a+=h}}i.timeout=setTimeout(function(){if(s===t.length){if(i.options.onStringTyped(i.arrayPos),i.arrayPos===i.strings.length-1&&(i.options.callback(),i.curLoop++,i.loop===!1||i.curLoop===i.loopCount))return;i.timeout=setTimeout(function(){i.backspace(t,s)},i.backDelay)}else{0===s&&i.options.preStringTyped(i.arrayPos);var e=t.substr(0,s+1);i.attr?i.el.attr(i.attr,e):i.isInput?i.el.val(e):"html"===i.contentType?i.el.html(e):i.el.text(e),s++,i.typewrite(t,s)}},e)},e)}},backspace:function(t,s){if(this.stop!==!0){var e=Math.round(70*Math.random())+this.backSpeed,i=this;i.timeout=setTimeout(function(){if("html"===i.contentType&&">"===t.substr(s).charAt(0)){for(var e="";"<"!==t.substr(s).charAt(0);)e-=t.substr(s).charAt(0),s--;s--,e+="<"}var r=t.substr(0,s);i.attr?i.el.attr(i.attr,r):i.isInput?i.el.val(r):"html"===i.contentType?i.el.html(r):i.el.text(r),s>i.stopNum?(s--,i.backspace(t,s)):s<=i.stopNum&&(i.arrayPos++,i.arrayPos===i.strings.length?(i.arrayPos=0,i.shuffle&&(i.sequence=i.shuffleArray(i.sequence)),i.init()):i.typewrite(i.strings[i.sequence[i.arrayPos]],s))},e)}},shuffleArray:function(t){var s,e,i=t.length;if(i)for(;--i;)e=Math.floor(Math.random()*(i+1)),s=t[e],t[e]=t[i],t[i]=s;return t},reset:function(){var t=this;clearInterval(t.timeout);var s=this.el.attr("id");this.el.after('<span id="'+s+'"/>'),this.el.remove(),"undefined"!=typeof this.cursor&&this.cursor.remove(),t.options.resetCallback()}},t.fn.typed=function(e){return this.each(function(){var i=t(this),r=i.data("typed"),o="object"==typeof e&&e;r||i.data("typed",r=new s(this,o)),"string"==typeof e&&r[e]()})},t.fn.typed.defaults={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback:function(){},preStringTyped:function(){},onStringTyped:function(){},resetCallback:function(){}}}(window.jQuery); 87/* End */ 88; 89; /* Start:"a:4:{s:4:"full";s:66:"/bitrix/templates/concept_phoenix_s4/js/sly.min.js?175034561631934";s:6:"source";s:46:"/bitrix/templates/concept_phoenix_s4/js/sly.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 90;(function ($,w,undefined){'use strict';var pluginName = 'sly';var className= 'Sly';var namespace= pluginName;var cAF = w.cancelAnimationFrame || w.cancelRequestAnimationFrame;var rAF = w.requestAnimationFrame;var transform,gpuAcceleration;var $doc = $(document);var dragInitEvents = 'touchstart.' + namespace + ' mousedown.' + namespace;var dragMouseEvents = 'mousemove.' + namespace + ' mouseup.' + namespace;var dragTouchEvents = 'touchmove.' + namespace + ' touchend.' + namespace;var wheelEvent = (document.implementation.hasFeature('Event.wheel','3.0') ? 'wheel.' :'mousewheel.') + namespace;var clickEvent = 'click.' + namespace;var mouseDownEvent = 'mousedown.' + namespace;var interactiveElements = ['INPUT','SELECT','BUTTON','TEXTAREA'];var tmpArray = [];var time;var abs = Math.abs;var sqrt = Math.sqrt;var pow = Math.pow;var round = Math.round;var max = Math.max;var min = Math.min;var lastGlobalWheel = 0;function Sly(frame,options,callbackMap){var o = $.extend({},Sly.defaults,options);var self = this;var parallax = isNumber(frame);var $frame = $(frame);var $slidee = o.slidee ? $(o.slidee).eq(0) :$frame.children().eq(0);var frameSize = 0;var slideeSize = 0;var pos ={start:0,center:0,end:0,cur:0,dest:0};var $sb = $(o.scrollBar).eq(0);var $handle = $sb.children().eq(0);var sbSize = 0;var handleSize = 0;var hPos ={start:0,end:0,cur:0};
90var $pb = $(o.pagesBar);var $pages = 0;var pages = [];var $items = 0;var items = [];var rel ={firstItem:0,lastItem:0,centerItem:0,activeItem:null,activePage:0};var frameStyles = new StyleRestorer($frame[0]);var slideeStyles = new StyleRestorer($slidee[0]);var sbStyles = new StyleRestorer($sb[0]);var handleStyles = new StyleRestorer($handle[0]);var basicNav = o.itemNav === 'basic';var forceCenteredNav = o.itemNav === 'forceCentered';var centeredNav = o.itemNav === 'centered' || forceCenteredNav;var itemNav = !parallax && (basicNav || centeredNav || forceCenteredNav);var $scrollSource = o.scrollSource ? $(o.scrollSource) :$frame;var $dragSource = o.dragSource ? $(o.dragSource) :$frame;var $forwardButton = $(o.forward);var $backwardButton = $(o.backward);var $prevButton = $(o.prev);var $nextButton = $(o.next);var $prevPageButton = $(o.prevPage);var $nextPageButton = $(o.nextPage);var callbacks ={};var last ={};var animation ={};var move ={};var dragging ={released:1};var scrolling ={last:0,delta:0,resetTime:200};var renderID = 0;var historyID = 0;var cycleID = 0;var continuousID = 0;var i,l;if (!parallax){frame = $frame[0]}self.initialized = 0;self.frame = frame;self.slidee = $slidee[0];self.pos = pos;self.rel = rel;self.items = items;self.pages = pages;self.isPaused = 0;self.options = o;self.dragging = dragging;function load(isInit){var lastItemsCount = 0;var lastPagesCount = pages.length;pos.old = $.extend({},pos);frameSize = parallax ? 0 :$frame[o.horizontal ? 'width' :'height']();sbSize = $sb[o.horizontal ? 'width' :'height']();slideeSize = parallax ? frame :$slidee[o.horizontal ? 'outerWidth' :'outerHeight']();pages.length = 0;pos.start = 0;pos.end = max(slideeSize - frameSize,0);if (itemNav){lastItemsCount = items.length;$items = $slidee.children(o.itemSelector);items.length = 0;var paddingStart = getPx($slidee,o.horizontal ? 'paddingLeft' :'paddingTop');var paddingEnd = getPx($slidee,o.horizontal ? 'paddingRight' :'paddingBottom');var borderBox = $($items).css('boxSizing') === 'border-box';var areFloated = $items.css('float') !== 'none';var ignoredMargin = 0;var lastItemIndex = $items.length - 1;var lastItem;slideeSize = 0;$items.each(function (i,element){var $item = $(element);var rect = element.getBoundingClientRect();var itemSize = round(o.horizontal ? rect.width || rect.right - rect.left :rect.height || rect.bottom - rect.top);var itemMarginStart = getPx($item,o.horizontal ? 'marginLeft' :'marginTop');var itemMarginEnd = getPx($item,o.horizontal ? 'marginRight' :'marginBottom');if($item.parents('.frame.props').length){if($item.find('td').eq(0).length){itemSize -= $item.find('td').eq(0).outerWidth()}}var itemSizeFull = itemSize + itemMarginStart + itemMarginEnd;var singleSpaced = !itemMarginStart || !itemMarginEnd;var item ={};item.el = element;item.size = singleSpaced ? itemSize :itemSizeFull;item.half = item.size / 2;item.start = slideeSize + (singleSpaced ? itemMarginStart :0);item.center = item.start - round(frameSize / 2 - item.size / 2);item.end = item.start - frameSize + item.size;if (!i){slideeSize += paddingStart}slideeSize += itemSizeFull;if (!o.horizontal && !areFloated){if (itemMarginEnd && itemMarginStart && i > 0){slideeSize -= min(itemMarginStart,itemMarginEnd)}}if (i === lastItemIndex){item.end += paddingEnd;slideeSize += paddingEnd;ignoredMargin = singleSpaced ? itemMarginEnd :0}items.push(item);lastItem = item});$slidee[0].style[o.horizontal ? 'width' :'height'] = (borderBox ? slideeSize:slideeSize - paddingStart - paddingEnd) + 'px';slideeSize -= ignoredMargin;if (items.length){pos.start =items[0][forceCenteredNav ? 'center' :'start'];pos.end = forceCenteredNav ? lastItem.center :frameSize < slideeSize ? lastItem.end :pos.start}else{pos.start = pos.end = 0}}pos.center = round(pos.end / 2 + pos.start / 2);updateRelatives();if ($handle.length && sbSize > 0){if (o.dynamicHandle){handleSize = pos.start === pos.end ? sbSize :round(sbSize * frameSize / slideeSize);handleSize = within(handleSize,o.minHandleSize,sbSize);$handle[0].style[o.horizontal ? 'width' :'height'] = handleSize + 'px';if(handleSize!=sbSize){$($sb).parent().animate({'opacity':1},50);$($sb).fadeIn();$($sb).closest('.wrapp_scrollbar').find('.slider_navigation').fadeIn()}else{$($sb).parent().animate({'opacity':0},50);$($sb).fadeOut();$($sb).closest('.wrapp_scrollbar').find('.slider_navigation').fadeOut()}}else{handleSize = $handle[o.horizontal ? 'outerWidth' :'outerHeight']()}hPos.end = sbSize - handleSize;if (!renderID){syncScrollbar()}}if (!parallax && frameSize > 0){var tempPagePos = pos.start;var pagesHtml = '';if (itemNav){$.each(items,function (i,item){if (forceCenteredNav){pages.push(item.center)}else if (item.start + item.size > tempPagePos && tempPagePos <= pos.end){tempPagePos = item.start;pages.push(tempPagePos);tempPagePos += frameSize;if (tempPagePos > pos.end && tempPagePos < pos.end + frameSize){pages.push(pos.end)}}})}else{while (tempPagePos - frameSize < pos.end){pages.push(tempPagePos);tempPagePos += frameSize}}if ($pb[0] && lastPagesCount !== pages.length){for (var i = 0;i < pages.length;i++){pagesHtml += o.pageBuilder.call(self,i)}$pages = $pb.html(pagesHtml).children();$pages.eq(rel.activePage).addClass(o.activeClass)}}rel.slideeSize = slideeSize;rel.frameSize = frameSize;rel.sbSize = sbSize;rel.handleSize = handleSize;if (itemNav){if (isInit && o.startAt != null){activate(o.startAt);self[centeredNav ? 'toCenter' :'toStart'](o.startAt)}var activeItem = items[rel.activeItem];slideTo(centeredNav && activeItem ? activeItem.center :within(pos.dest,pos.start,pos.end))}else{if (isInit){if (o.startAt != null) slideTo(o.startAt,1)}else{slideTo(within(pos.dest,pos.start,pos.end))}}trigger('load')}self.reload = function (){load()};function slideTo(newPos,immediate,dontAlign){if (dragging.init && dragging.slidee && o.elasticBounds){if (newPos > pos.end){newPos = pos.end + (newPos - pos.end) / 6}else if (newPos < pos.start){newPos = pos.start + (newPos - pos.start) / 6}}else{newPos = within(newPos,pos.start,pos.end)}animation.start = +new Date();animation.time = 0;animation.from = pos.cur;animation.to = newPos;animation.delta = newPos - pos.cur;animation.tweesing = dragging.tweese || dragging.init && !dragging.slidee;animation.immediate = !animation.tweesing && (immediate || dragging.init && dragging.slidee || !o.speed);dragging.tweese = 0;if (newPos !== pos.dest){pos.dest = newPos;trigger('change');if (!renderID){render()}}resetCycle();updateRelatives();updateButtonsState();syncPagesbar()}function render(){if (!self.initialized){return}if (!renderID){renderID = rAF(render);if (dragging.released){trigger('moveStart')}return}if (animation.immediate){pos.cur = animation.to}else if (animation.tweesing){animation.tweeseDelta = animation.to - pos.cur;pos.cur += animation.tweeseDelta * (dragging.released ? o.swingSpeed :o.syncS
90peed)}else{animation.time = min(+new Date() - animation.start,o.speed);pos.cur = animation.from + animation.delta * $.easing[o.easing](animation.time/o.speed,animation.time,0,1,o.speed)}if (animation.to === pos.cur){pos.cur = animation.to;dragging.tweese = renderID = 0}else{renderID = rAF(render)}trigger('move');if (!parallax){if (transform){$slidee[0].style[transform] = gpuAcceleration + (o.horizontal ? 'translateX' :'translateY') + '(' + (-pos.cur) + 'px)'}else{$slidee[0].style[o.horizontal ? 'left' :'top'] = -round(pos.cur) + 'px'}}if (!renderID && dragging.released){trigger('moveEnd')}syncScrollbar()}function syncScrollbar(){if ($handle.length){hPos.cur = pos.start === pos.end ? 0 :(((dragging.init && !dragging.slidee) ? pos.dest :pos.cur) - pos.start) / (pos.end - pos.start) * hPos.end;hPos.cur = within(round(hPos.cur),hPos.start,hPos.end);if (last.hPos !== hPos.cur){last.hPos = hPos.cur;if (transform){$handle[0].style[transform] = gpuAcceleration + (o.horizontal ? 'translateX' :'translateY') + '(' + hPos.cur + 'px)'}else{$handle[0].style[o.horizontal ? 'left' :'top'] = hPos.cur + 'px'}}}}function syncPagesbar(){if ($pages[0] && last.page !== rel.activePage){last.page = rel.activePage;$pages.removeClass(o.activeClass).eq(rel.activePage).addClass(o.activeClass);trigger('activePage',last.page)}}self.getPos = function (item){if (itemNav){var index = getIndex(item);return index !== -1 ? items[index] :false}else{var $item = $slidee.find(item).eq(0);if ($item[0]){var offset = o.horizontal ? $item.offset().left - $slidee.offset().left :$item.offset().top - $slidee.offset().top;var size = $item[o.horizontal ? 'outerWidth' :'outerHeight']();return{start:offset,center:offset - frameSize / 2 + size / 2,end:offset - frameSize + size,size:size}}else{return false}}};self.moveBy = function (speed){move.speed = speed;move.lastTime = +new Date();move.startPos = pos.cur;continuousInit('button');dragging.init = 1;trigger('moveStart');cAF(continuousID);moveLoop()};function moveLoop(){continuousID = dragging.init ? rAF(moveLoop) :0;move.now = +new Date();move.pos = pos.cur + (move.now - move.lastTime) / 1000 * move.speed;slideTo(dragging.init ? move.pos :round(move.pos));if (!dragging.init && pos.cur === pos.dest){trigger('moveEnd')}move.lastTime = move.now}self.stop = function (){if (dragging.source === 'button'){dragging.init = 0;dragging.released = 1}};self.prev = function (){self.activate(rel.activeItem == null ? 0 :rel.activeItem - 1)};self.next = function (){self.activate(rel.activeItem == null ? 0 :rel.activeItem + 1)};self.prevPage = function (){self.activatePage(rel.activePage - 1)};
90self.nextPage = function (){self.activatePage(rel.activePage + 1)};self.slideBy = function (delta,immediate){if (!delta){return}if (itemNav){self[centeredNav ? 'toCenter' :'toStart'](within((centeredNav ? rel.centerItem :rel.firstItem) + o.scrollBy * delta,0,items.length))}else{slideTo(pos.dest + delta,immediate)}};self.slideTo = function (pos,immediate){slideTo(pos,immediate)};function to(location,item,immediate){if (type(item) === 'boolean'){immediate = item;item = undefined}if (item === undefined){slideTo(pos[location],immediate)}else{if (centeredNav && location !== 'center'){return}var itemPos = self.getPos(item);if (itemPos){slideTo(itemPos[location],immediate,!centeredNav)}}}self.toStart = function (item,immediate){to('start',item,immediate)};self.toEnd = function (item,immediate){to('end',item,immediate)};self.toCenter = function (item,immediate){to('center',item,immediate)};function getIndex(item){return item != null ?isNumber(item) ?item >= 0 && item < items.length ? item :-1 :$items.index(item) :-1}self.getIndex = getIndex;function getRelativeIndex(item){return getIndex(isNumber(item) && item < 0 ? item + items.length :item)}function activate(item,force){var index = getIndex(item);if (!itemNav || index < 0){return false}if (last.active !== index || force){$items.eq(rel.activeItem).removeClass(o.activeClass);$items.eq(index).addClass(o.activeClass);last.active = rel.activeItem = index;updateButtonsState();trigger('active',index)}return index}self.activate = function (item,immediate){var index = activate(item);if (o.smart && index !== false){if (centeredNav){self.toCenter(index,immediate)}else if (index >= rel.lastItem){self.toStart(index,immediate)}else if (index <= rel.firstItem){self.toEnd(index,immediate)}else{resetCycle()}}};self.activatePage = function (index,immediate){if (isNumber(index)){slideTo(pages[within(index,0,pages.length - 1)],immediate)}};function getRelatives(slideePos){slideePos = within(isNumber(slideePos) ? slideePos :pos.dest,pos.start,pos.end);var relatives ={};var centerOffset = forceCenteredNav ? 0 :frameSize / 2;if (!parallax){for (var p = 0,pl = pages.length;p < pl;p++){if (slideePos >= pos.end || p === pages.length - 1){relatives.activePage = pages.length - 1;break}if (slideePos <= pages[p] + centerOffset){relatives.activePage = p;break}}}if (itemNav){var first = false;var last = false;var center = false;for (var i = 0,il = items.length;i < il;i++){if (first === false && slideePos <= items[i].start + items[i].half){first = i}if (center === false && slideePos <= items[i].center + items[i].half){center = i}if (i === il - 1 || slideePos <= items[i].end + items[i].half){last = i;break}}relatives.firstItem = isNumber(first) ? first :0;relatives.centerItem = isNumber(center) ? center :relatives.firstItem;relatives.lastItem = isNumber(last) ? last :relatives.centerItem}return relatives}function updateRelatives(newPos){$.extend(rel,getRelatives(newPos))}function updateButtonsState(){var isStart = pos.dest <= pos.start;var isEnd = pos.dest >= pos.end;var slideePosState = (isStart ? 1 :0) | (isEnd ? 2 :0);if (last.slideePosState !== slideePosState){last.slideePosState = slideePosState;if ($prevPageButton.is('button,input')){$prevPageButton.prop('disabled',isStart)}if ($nextPageButton.is('button,input')){$nextPageButton.prop('disabled',isEnd)}$prevPageButton.add($backwardButton)[isStart ? 'addClass' :'removeClass'](o.disabledClass);$nextPageButton.add($forwardButton)[isEnd ? 'addClass' :'removeClass'](o.disabledClass)}if (last.fwdbwdState !== slideePosState && dragging.released){last.fwdbwdState = slideePosState;if ($backwardButton.is('button,input')){$backwardButton.prop('disabled',isStart)}if ($forwardButton.is('button,input')){$forwardButton.prop('disabled',isEnd)}}if (itemNav && rel.activeItem != null){var isFirst = rel.activeItem === 0;var isLast = rel.activeItem >= items.length - 1;var itemsButtonState = (isFirst ? 1 :0) | (isLast ? 2 :0);if (last.itemsButtonState !== itemsButtonState){last.itemsButtonState = itemsButtonState;if ($prevButton.is('button,input')){$prevButton.prop('disabled',isFirst)}if ($nextButton.is('button,input')){$nextButton.prop('disabled',isLast)}$prevButton[isFirst ? 'addClass' :'removeClass'](o.disabledClass);$nextButton[isLast ? 'addClass' :'removeClass'](o.disabledClass)}}}self.resume = function (priority){if (!o.cycleBy || !o.cycleInterval || o.cycleBy === 'items' && (!items[0] || rel.activeItem == null) || priority < self.isPaused){return}self.isPaused = 0;if (cycleID){cycleID = clearTimeout(cycleID)}else{trigger('resume')}cycleID = setTimeout(function (){trigger('cycle');switch (o.cycleBy){case 'items':self.activate(rel.activeItem >= items.length - 1 ? 0 :rel.activeItem + 1);break;case 'pages':self.activatePage(rel.activePage >
90= pages.length - 1 ? 0 :rel.activePage + 1);break}},o.cycleInterval)};self.pause = function (priority){if (priority < self.isPaused){return}self.isPaused = priority || 100;if (cycleID){cycleID = clearTimeout(cycleID);trigger('pause')}};self.toggle = function (){self[cycleID ? 'pause' :'resume']()};self.set = function (name,value){if ($.isPlainObject(name)){$.extend(o,name)}else if (o.hasOwnProperty(name)){o[name] = value}};self.add = function (element,index){var $element = $(element);if (itemNav){if (index == null || !items[0] || index >= items.length){$element.appendTo($slidee)}else if (items.length){$element.insertBefore(items[index].el)}if (rel.activeItem != null && index <= rel.activeItem){last.active = rel.activeItem += $element.length}}else{$slidee.append($element)}load()};self.remove = function (element){if (itemNav){var index = getRelativeIndex(element);if (index > -1){$items.eq(index).remove();var reactivate = index === rel.activeItem;if (rel.activeItem != null && index < rel.activeItem){last.active = --rel.activeItem}load();if (reactivate){last.active = null;self.activate(rel.activeItem)}}}else{$(element).remove();load()}};function moveItem(item,position,after){item = getRelativeIndex(item);position = getRelativeIndex(position);if (item > -1 && position > -1 && item !== position && (!after || position !== item - 1) && (after || position !== item + 1)){$items.eq(item)[after ? 'insertAfter' :'insertBefore'](items[position].el);var shiftStart = item < position ? item :(after ? position :position - 1);var shiftEnd = item > position ? item :(after ? position + 1 :position);var shiftsUp = item > position;if (rel.activeItem != null){if (item === rel.activeItem){last.active = rel.activeItem = after ? (shiftsUp ? position + 1 :position) :(shiftsUp ? position :position - 1)}else if (rel.activeItem > shiftStart && rel.activeItem < shiftEnd){last.active = rel.activeItem += shiftsUp ? 1 :-1}}load()}}self.moveAfter = function (item,position){moveItem(item,position,1)};self.moveBefore = function (item,position){moveItem(item,position)};self.on = function (name,fn){if (type(name) === 'object'){for (var key in name){if (name.hasOwnProperty(key)){self.on(key,name[key])}}}else if (type(fn) === 'function'){var names = name.split(' ');for (var n = 0,nl = names.length;n < nl;n++){callbacks[names[n]] = callbacks[names[n]] || [];if (callbackIndex(names[n],fn) === -1){callbacks[names[n]].push(fn)}}}else if (type(fn) === 'array'){for (var f = 0,fl = fn.length;f < fl;f++){self.on(name,fn[f])}}};self.one = function (name,fn){function proxy(){fn.apply(self,arguments);self.off(name,proxy)}self.on(name,proxy)};self.off = function (name,fn){if (fn instanceof Array){for (var f = 0,fl = fn.length;f < fl;f++){self.off(name,fn[f])}}else{var names = name.split(' ');for (var n = 0,nl = names.length;n < nl;n++){callbacks[names[n]] = callbacks[names[n]] || [];if (fn == null){callbacks[names[n]].length = 0}else{var index = callbackIndex(names[n],fn);if (index !== -1){callbacks[names[n]].splice(index,1)}}}}};function callbackIndex(name,fn){for (var i = 0,l = callbacks[name].length;i < l;i++){if (callbacks[name][i] === fn){return i}}return -1}function resetCycle(){if (dragging.released && !self.isPaused){self.resume()}}function handleToSlidee(handlePos){return round(within(handlePos,hPos.start,hPos.end) / hPos.end * (pos.end - pos.start)) + pos.start}function draggingHistoryTick(){dragging.history[0] = dragging.history[1];dragging.history[1] = dragging.history[2];dragging.history[2] = dragging.history[3];dragging.history[3] = dragging.delta}function continuousInit(source){dragging.released = 0;dragging.source = source;dragging.slidee = source === 'slidee'}function dragInit(event){var isTouch = event.type === 'touchstart';var source = event.data.source;var isSlidee = source === 'slidee';if (dragging.init || !isTouch && isInteractive(event.target)){return}if (source === 'handle' && (!o.dragHandle || hPos.start === hPos.end)){return}if (isSlidee && !(isTouch ? o.touchDragging :o.mouseDragging && event.which < 2)){return}if (!isTouch){stopDefault(event)}continuousInit(source);dragging.init = 0;dragging.$source = $(event.target);dragging.touch = isTouch;dragging.pointer = isTouch ? event.originalEvent.touches[0] :event;dragging.initX = dragging.pointer.pageX;dragging.initY = dragging.pointer.pageY;
90dragging.initPos = isSlidee ? pos.cur :hPos.cur;dragging.start = +new Date();dragging.time = 0;dragging.path = 0;dragging.delta = 0;dragging.locked = 0;dragging.history = [0,0,0,0];dragging.pathToLock = isSlidee ? isTouch ? 30 :10 :0;$doc.on(isTouch ? dragTouchEvents :dragMouseEvents,dragHandler);self.pause(1);(isSlidee ? $slidee :$handle).addClass(o.draggedClass);trigger('moveStart');if (isSlidee){historyID = setInterval(draggingHistoryTick,10)}}function dragHandler(event){dragging.released = event.type === 'mouseup' || event.type === 'touchend';dragging.pointer = dragging.touch ? event.originalEvent[dragging.released ? 'changedTouches' :'touches'][0] :event;dragging.pathX = dragging.pointer.pageX - dragging.initX;dragging.pathY = dragging.pointer.pageY - dragging.initY;dragging.path = sqrt(pow(dragging.pathX,2) + pow(dragging.pathY,2));dragging.delta = o.horizontal ? dragging.pathX :dragging.pathY;if (!dragging.released && dragging.path < 1) return;if (!dragging.init){if (o.horizontal ? abs(dragging.pathX) > abs(dragging.pathY) :abs(dragging.pathX) < abs(dragging.pathY)){dragging.init = 1}else{return dragEnd()}}stopDefault(event);if (!dragging.locked && dragging.path > dragging.pathToLock && dragging.slidee){dragging.locked = 1;dragging.$source.on(clickEvent,disableOneEvent)}if (dragging.released){dragEnd();if (o.releaseSwing && dragging.slidee){dragging.swing = (dragging.delta - dragging.history[0]) / 40 * 300;dragging.delta += dragging.swing;dragging.tweese = abs(dragging.swing) > 10}}slideTo(dragging.slidee ? round(dragging.initPos - dragging.delta) :handleToSlidee(dragging.initPos + dragging.delta))}function dragEnd(){clearInterval(historyID);dragging.released = true;$doc.off(dragging.touch ? dragTouchEvents :dragMouseEvents,dragHandler);(dragging.slidee ? $slidee :$handle).removeClass(o.draggedClass);setTimeout(function (){dragging.$source.off(clickEvent,disableOneEvent)});if (pos.cur === pos.dest && dragging.init){trigger('moveEnd')}self.resume(1);dragging.init = 0}function isInteractive(element){return ~$.inArray(element.nodeName,interactiveElements) || $(element).is(o.interactive)}function movementReleaseHandler(){self.stop()}function buttonsHandler(event){stopDefault(event);switch (this){case $forwardButton[0]:case $backwardButton[0]:self.moveBy($forwardButton.is(this) ? o.moveBy :-o.moveBy);$doc.on('mouseup',movementReleaseHandler);break;case $prevButton[0]:self.prev();break;case $nextButton[0]:self.next();break;case $prevPageButton[0]:self.prevPage();break;case $nextPageButton[0]:self.nextPage();break}}function normalizeWheelDelta(event){scrolling.curDelta = ((o.horizontal ? event.deltaY || event.deltaX :event.deltaY) || -event.wheelDelta);scrolling.curDelta /= event.deltaMode === 1 ? 3 :100;if (!itemNav){return scrolling.curDelta}time = +new Date();if (scrolling.last < time - scrolling.resetTime){scrolling.delta = 0}scrolling.last = time;scrolling.delta += scrolling.curDelta;if (abs(scrolling.delta) < 1){scrolling.finalDelta = 0}else{scrolling.finalDelta = round(scrolling.delta / 1);scrolling.delta %= 1}return scrolling.finalDelta}function scrollHandler(event){event.originalEvent[namespace] = self;var time = +new Date();if (lastGlobalWheel + o.scrollHijack > time && $scrollSource[0] !== document && $scrollSource[0] !== window){lastGlobalWheel = time;return}if (!o.scrollBy || pos.start === pos.end){return}var delta = normalizeWheelDelta(event.originalEvent);if (o.scrollTrap || delta > 0 && pos.dest < pos.end || delta < 0 && pos.dest > pos.start){stopDefault(event,1)}self.slideBy(o.scrollBy * delta)}function scrollbarHandler(event){if (o.clickBar && event.target === $sb[0]){stopDefault(event);slideTo(handleToSlidee((o.horizontal ? event.pageX - $sb.offset().left :event.pageY - $sb.offset().top) - handleSize / 2))}}function keyboardHandler(event){if (!o.keyboardNavBy){return}switch (event.which){case o.horizontal ? 37 :38:stopDefault(event);self[o.keyboardNavBy === 'pages' ? 'prevPage' :'prev']();break;case o.horizontal ? 39 :40:stopDefault(event);self[o.keyboardNavBy === 'pages' ? 'nextPage' :'next']();break}}function activateHandler(event){if (isInteractive(this)){event.originalEvent[namespace + 'ignore'] = true;return}if (this.parentNode !== $slidee[0] || event.originalEvent[namespace + 'ignore']) return;self.activate(this)}function activatePageHandler(){if (this.parentNode === $pb[0]){self.activatePage($pages.index(this))}}function pauseOnHoverHandler(event){if (o.pauseOnHover){self[event.type === 'mouseenter' ? 'pause' :'resume'](2)}}function trigger(name,arg1){if (callbacks[name]){l = callbacks[name].length;tmpArray.length = 0;for (i = 0;i < l;i++){tmpArray.push(callbacks[name][i])}for (i = 0;i < l;i++){tmpArray[i].call(self,name,arg1)}}}self.destroy = function (){$scrollSource.add($handle).add($sb).add($pb).add($forwardButton).add($backwardButton).add($prevButton).add($nextButton).add($prevPageButton).add($nextPageButton).off('.' + namespace);$doc.off('keydown',keyboardHandler);$prevButton.add($nextButton).add($prevPageButton).add($nextPageButton).removeClass(o.disabledClass);if ($items && rel.activeItem != null){$items.eq(rel.activeItem).removeClass(o.activeClass)}$pb.empty();if (!parallax){$frame.off('.' + namespace);
90frameStyles.restore();slideeStyles.restore();sbStyles.restore();handleStyles.restore();$.removeData(frame,namespace)}items.length = pages.length = 0;last ={};self.initialized = 0;return self};self.init = function (){if (self.initialized){return}self.on(callbackMap);var holderProps = ['overflow','position'];var movableProps = ['position','webkitTransform','msTransform','transform','left','top','width','height'];frameStyles.save.apply(frameStyles,holderProps);sbStyles.save.apply(sbStyles,holderProps);slideeStyles.save.apply(slideeStyles,movableProps);handleStyles.save.apply(handleStyles,movableProps);var $movables = $handle;if (!parallax){$movables = $movables.add($slidee);$frame.css('overflow','hidden');if (!transform && $frame.css('position') === 'static'){$frame.css('position','relative')}}if (transform){if (gpuAcceleration){$movables.css(transform,gpuAcceleration)}}else{if ($sb.css('position') === 'static'){$sb.css('position','relative')}$movables.css({position:'absolute'})}if (o.forward){$forwardButton.on(mouseDownEvent,buttonsHandler)}if (o.backward){$backwardButton.on(mouseDownEvent,buttonsHandler)}if (o.prev){$prevButton.on(clickEvent,buttonsHandler)}if (o.next){$nextButton.on(clickEvent,buttonsHandler)}if (o.prevPage){$prevPageButton.on(clickEvent,buttonsHandler)}if (o.nextPage){$nextPageButton.on(clickEvent,buttonsHandler)}if ($sb[0]){$sb.on(clickEvent,scrollbarHandler)}if (itemNav && o.activateOn){$frame.on(o.activateOn + '.' + namespace,'*',activateHandler)}if ($pb[0] && o.activatePageOn){$pb.on(o.activatePageOn + '.' + namespace,'*',activatePageHandler)}$dragSource.on(dragInitEvents,{source:'slidee'},dragInit);if ($handle){$handle.on(dragInitEvents,{source:'handle'},dragInit)}$doc.on('keydown',keyboardHandler);if (!parallax){$frame.on('mouseenter.' + namespace + ' mouseleave.' + namespace,pauseOnHoverHandler);$frame.on('scroll.' + namespace,resetScroll)}self.initialized = 1;load(true);if (o.cycleBy && !parallax){self[o.startPaused ? 'pause' :'resume']()}return self}}function type(value){if (value == null){return String(value)}if (typeof value === 'object' || typeof value === 'function'){return Object.prototype.toString.call(value).match(/\s([a-z]+)/i)[1].toLowerCase() || 'object'}return typeof value}function stopDefault(event,noBubbles){event.preventDefault();if (noBubbles){event.stopPropagation()}}function disableOneEvent(event){stopDefault(event,1);$(this).off(event.type,disableOneEvent)}function resetScroll(){this.scrollLeft = 0;this.scrollTop = 0}function isNumber(value){return !isNaN(parseFloat(value)) && isFinite(value)}function getPx($item,property){return 0 | round(String($item.css(property)).replace(/[^\-0-9.]/g,''))}function within(number,min,max){return number < min ? min :number > max ? max :number}function StyleRestorer(element){var self ={};self.style ={};self.save = function (){if (!element || !element.nodeType) return;for (var i = 0;i < arguments.length;i++){self.style[arguments[i]] = element.style[arguments[i]]}return self};self.restore = function (){if (!element || !element.nodeType) return;for (var prop in self.style){if (self.style.hasOwnProperty(prop)) element.style[prop] = self.style[prop]}return self};return self}(function (w){rAF = w.requestAnimationFrame|| w.webkitRequestAnimationFrame|| fallback;var prev = new Date().getTime();function fallback(fn){var curr = new Date().getTime();var ms = Math.max(0,16 - (curr - prev));var req = setTimeout(fn,ms);prev = curr;return req}var cancel = w.cancelAnimationFrame|| w.webkitCancelAnimationFrame|| w.clearTimeout;cAF = function(id){cancel.call(w,id)}}(window));(function (){var prefixes = ['','webkit','moz','ms','o'];var el = document.createElement('div');function testProp(prop){for (var p = 0,pl = prefixes.length;p < pl;p++){var prefixedProp = prefixes[p] ? prefixes[p] + prop.charAt(0).toUpperCase() + prop.slice(1) :prop;if (el.style[prefixedProp] != null){return prefixedProp}}}transform = testProp('transform');gpuAcceleration = testProp('perspective') ? 'translateZ(0) ' :''}());w[className] = Sly;$.fn[pluginName] = function (options,callbackMap){var method,methodArgs;if (!$.isPlainObject(options)){if (type(options) === 'string' || options === false){method = options === false ? 'destroy' :options;
90methodArgs = Array.prototype.slice.call(arguments,1)}options ={}}return this.each(function (i,element){var plugin = $.data(element,namespace);if (!plugin && !method){plugin = $.data(element,namespace,new Sly(element,options,callbackMap).init())}else if (plugin && method){if (plugin[method]){plugin[method].apply(plugin,methodArgs)}}})};Sly.defaults ={slidee:null,horizontal:false,itemNav:null,itemSelector:null,smart:false,activateOn:null,activateMiddle:false,scrollSource:null,scrollBy:0,scrollHijack:300,scrollTrap:false,dragSource:null,mouseDragging:false,touchDragging:false,releaseSwing:false,swingSpeed:0.2,elasticBounds:false,interactive:null,scrollBar:null,dragHandle:false,dynamicHandle:false,minHandleSize:50,clickBar:false,syncSpeed:0.5,pagesBar:null,activatePageOn:null,pageBuilder:function (index){return '<li>' + (index + 1) + '</li>'},forward:null,backward:null,prev:null,next:null,prevPage:null,nextPage:null,cycleBy:null,cycleInterval:5000,pauseOnHover:false,startPaused:false,moveBy:300,speed:0,easing:'swing',startAt:null,keyboardNavBy:null,draggedClass:'dragged',activeClass:'active',disabledClass:'disabled'}}(jQuery,window));function initSly(){var $frame= $(document).find('.frame');var $slidee = $frame.children('ul').eq(0);var $wrap = $frame.parent();$frame.sly({horizontal:1,itemNav:'basic',smart:1,mouseDragging:0,touchDragging:0,releaseSwing:0,startAt:0,scrollBar:$wrap.find('.scrollbar'),scrollBy:1,speed:300,elasticBounds:0,easing:'swing',dragHandle:1,dynamicHandle:1,clickBar:1,forward:$wrap.find('.forward'),backward:$wrap.find('.backward'),});$frame.sly('reload')}function createTableCompare(originalTable,appendDiv,cloneTable){try{var clone = originalTable.clone().removeAttr('id').addClass('clone');if(cloneTable.length){cloneTable.remove();appendDiv.html('');appendDiv.html(clone)}else{appendDiv.append(clone)}}catch(e){}finally{}}$(document).on({mouseover:function(e){var _ = $(this);var tbodyIndex = _.closest('tbody').index()+1;var trIndex = _.index()+1;hoveredTrs = $(e.delegateTarget).find('.data_table_props') .children(':nth-child('+tbodyIndex+')') .children(':nth-child('+trIndex+')').addClass('hovered')},mouseleave:function(e){var _ = $(this);var tbodyIndex = _.closest('tbody').index()+1;var trIndex = _.index()+1;hoveredTrs = $(e.delegateTarget).find('.data_table_props') .children(':nth-child('+tbodyIndex+')') .children(':nth-child('+trIndex+')').addClass('hovered');if(hoveredTrs) hoveredTrs.removeClass('hovered')}},'.bx_compare .data_table_props tbody>tr'); 91/* End */ 92; 93; /* Start:"a:4:{s:4:"full";s:70:"/bitrix/templates/concept_phoenix_s4/js/lazyload.min.js?17503456115023";s:6:"source";s:55:"/bitrix/templates/concept_phoenix_s4/js/lazyload.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 94/*! jQuery & Zepto Lazy v1.7.10 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */ 95!function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1
95)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window); 96/* End */ 97; 98; /* Start:"a:4:{s:4:"full";s:73:"/bitrix/templates/concept_phoenix_s4/js/jquery.zoom.min.js?17503456112616";s:6:"source";s:58:"/bitrix/templates/concept_phoenix_s4/js/jquery.zoom.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 99/*! 100 Zoom 1.7.21 101 license: MIT 102 http://www.jacklmoore.com/zoom 103*/ 104(function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,n,e,i){var u,c,a,r,m,l,s,f=o(t),h=f.css("position"),d=o(n);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",e.style.width=e.style.height="",o(e).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*i,height:e.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){c=f.outerWidth(),u=f.outerHeight(),n===t?(r=c,a=u):(r=d.outerWidth(),a=d.outerHeight()),m=(e.width-c)/r,l=(e.height-u)/a,s=d.offset()},move:function(o){var t=o.pageX-s.left,n=o.pageY-s.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,r),0),e.style.left=t*-m+"px",e.style.top=n*-l+"px"}}},o.fn.zoom=function(n){return this.each(function(){var e=o.extend({},t,n||{}),i=e.target&&o(e.target)[0]||this,u=this,c=o(u),a=document.createElement("img"),r=o(a),m="mousemove.zoom",l=!1,s=!1;if(!e.url){var f=u.querySelector("img");if(f&&(e.url=f.getAttribute("data-src")||f.currentSrc||f.src),!e.url)return}c.one("zoom.destroy",function(o,t){c.off(".zoom"),i.style.position=o,i.style.overflow=t,a.onload=null,r.remove()}.bind(this,i.style.position,i.style.overflow)),a.onload=function(){function t(t){f.init(),f.move(t),r.stop().fadeTo(o.support.opacity?e.duration:0,1,o.isFunction(e.onZoomIn)?e.onZoomIn.call(a):!1)}function n(){r.stop().fadeTo(e.duration,0,o.isFunction(e.onZoomOut)?e.onZoomOut.call(a):!1)}var f=o.zoom(i,u,a,e.magnify);"grab"===e.on?c.on("mousedown.zoom",function(e){1===e.which&&(o(document).one("mouseup.zoom",function(){n(),o(document).off(m,f.move)}),t(e),o(document).on(m,f.move),e.preventDefault())}):"click"===e.on?c.on("click.zoom",function(e){return l?void 0:(l=!0,t(e),o(document).on(m,f.move),o(document).one("click.zoom",function(){n(),l=!1,o(document).off(m,f.move)}),!1)}):"toggle"===e.on?c.on("click.zoom",function(o){l?n():t(o),l=!l}):"mouseover"===e.on&&(f.init(),c.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(m,f.move)),e.touch&&c.on("touchstart.zoom",function(o){o.preventDefault(),s?(s=!1,n()):(s=!0,t(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),f.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),s&&(s=!1,n())}),o.isFunction(e.callback)&&e.callback.call(a)},a.setAttribute("role","presentation"),a.alt="",a.src=e.url})},o.fn.zoom.defaults=t})(window.jQuery); 105/* End */ 106; 107; /* Start:"a:4:{s:4:"full";s:73:"/bitrix/templates/concept_phoenix_s4/js/jquery-ui.min.js?1750345611519734";s:6:"source";
vendor: 16,384 bytes, lines 107-785
107s:56:"/bitrix/templates/concept_phoenix_s4/js/jquery-ui.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 108 109 110(function( factory ) { 111 if ( typeof define === "function" && define.amd ) { 112 113 114 define([ "jquery" ], factory ); 115 } else { 116 117 factory( jQuery ); 118 } 119}(function( $ ) { 120 121$.ui = $.ui || {}; 122 123var version = $.ui.version = "1.12.1"; 124 125var widgetUuid = 0; 126var widgetSlice = Array.prototype.slice; 127 128$.cleanData = ( function( orig ) { 129 return function( elems ) { 130 var events, elem, i; 131 for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 132 try { 133 134 135 events = $._data( elem, "events" ); 136 if ( events && events.remove ) { 137 $( elem ).triggerHandler( "remove" ); 138 } 139 140 } catch ( e ) {} 141 } 142 orig( elems ); 143 }; 144} )( $.cleanData ); 145 146$.widget = function( name, base, prototype ) { 147 var existingConstructor, constructor, basePrototype; 148 149 var proxiedPrototype = {}; 150 151 var namespace = name.split( "." )[ 0 ]; 152 name = name.split( "." )[ 1 ]; 153 var fullName = namespace + "-" + name; 154 155 if ( !prototype ) { 156 prototype = base; 157 base = $.Widget; 158 } 159 160 if ( $.isArray( prototype ) ) { 161 prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); 162 } 163 164 165 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 166 return !!$.data( elem, fullName ); 167 }; 168 169 $[ namespace ] = $[ namespace ] || {}; 170 existingConstructor = $[ namespace ][ name ]; 171 constructor = $[ namespace ][ name ] = function( options, element ) { 172 173 174 if ( !this._createWidget ) { 175 return new constructor( options, element ); 176 } 177 178 179 if ( arguments.length ) { 180 this._createWidget( options, element ); 181 } 182 }; 183 184 185 $.extend( constructor, existingConstructor, { 186 version: prototype.version, 187 188 189 _proto: $.extend( {}, prototype ), 190 191 192 _childConstructors: [] 193 } ); 194 195 basePrototype = new base(); 196 197 198 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 199 $.each( prototype, function( prop, value ) { 200 if ( !$.isFunction( value ) ) { 201 proxiedPrototype[ prop ] = value; 202 return; 203 } 204 proxiedPrototype[ prop ] = ( function() { 205 function _super() { 206 return base.prototype[ prop ].apply( this, arguments ); 207 } 208 209 function _superApply( args ) { 210 return base.prototype[ prop ].apply( this, args ); 211 } 212 213 return function() { 214 var __super = this._super; 215 var __superApply = this._superApply; 216 var returnValue; 217 218 this._super = _super; 219 this._superApply = _superApply; 220 221 returnValue = value.apply( this, arguments ); 222 223 this._super = __super; 224 this._superApply = __superApply; 225 226 return returnValue; 227 }; 228 } )(); 229 } ); 230 constructor.prototype = $.widget.extend( basePrototype, { 231 232 233 widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name 234 }, proxiedPrototype, { 235 constructor: constructor, 236 namespace: namespace, 237 widgetName: name, 238 widgetFullName: fullName 239 } ); 240 241 242 if ( existingConstructor ) { 243 $.each( existingConstructor._childConstructors, function( i, child ) { 244 var childPrototype = child.prototype; 245 246 247 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, 248 child._proto ); 249 } ); 250 251 252 delete existingConstructor._childConstructors; 253 } else { 254 base._childConstructors.push( constructor ); 255 } 256 257 $.widget.bridge( name, constructor ); 258 259 return constructor; 260}; 261 262$.widget.extend = function( target ) { 263 var input = widgetSlice.call( arguments, 1 ); 264 var inputIndex = 0; 265 var inputLength = input.length; 266 var key; 267 var value; 268 269 for ( ; inputIndex < inputLength; inputIndex++ ) { 270 for ( key in input[ inputIndex ] ) { 271 value = input[ inputIndex ][ key ]; 272 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 273 274 275 if ( $.isPlainObject( value ) ) { 276 target[ key ] = $.isPlainObject( target[ key ] ) ? 277 $.widget.extend( {}, target[ key ], value ) : 278 279 280 $.widget.extend( {}, value ); 281 282 283 } else { 284 target[ key ] = value; 285 } 286 } 287 } 288 } 289 return target; 290}; 291 292$.widget.bridge = function( name, object ) { 293 var fullName = object.prototype.widgetFullName || name; 294 $.fn[ name ] = function( options ) { 295 var isMethodCall = typeof options === "string"; 296 var args = widgetSlice.call( arguments, 1 ); 297 var returnValue = this; 298 299 if ( isMethodCall ) { 300 301 302 if ( !this.length && options === "instance" ) { 303 returnValue = undefined; 304 } else { 305 this.each( function() { 306 var methodValue; 307 var instance = $.data( this, fullName ); 308 309 if ( options === "instance" ) { 310 returnValue = instance; 311 return false; 312 } 313 314 if ( !instance ) { 315 return $.error( "cannot call methods on " + name + 316 " prior to initialization; " + 317 "attempted to call method '" + options + "'" ); 318 } 319 320 if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { 321 return $.error( "no such method '" + options + "' for " + name + 322 " widget instance" ); 323 } 324 325 methodValue = instance[ options ].apply( instance, args ); 326 327 if ( methodValue !== instance && methodValue !== undefined ) { 328 returnValue = methodValue && methodValue.jquery ? 329 returnValue.pushStack( methodValue.get() ) : 330 methodValue; 331 return false; 332 } 333 } ); 334 } 335 } else { 336 337 338 if ( args.length ) { 339 options = $.widget.extend.apply( null, [ options ].concat( args ) ); 340 } 341 342 this.each( function() { 343 var instance = $.data( this, fullName ); 344 if ( instance ) { 345 instance.option( options || {} ); 346 if ( instance._init ) { 347 instance._init(); 348 } 349 } else { 350 $.data( this, fullName, new object( options, this ) ); 351 } 352 } ); 353 } 354 355 return returnValue; 356 }; 357}; 358 359$.Widget = function( /* options, element */ ) {}; 360$.Widget._childConstructors = []; 361 362$.Widget.prototype = { 363 widgetName: "widget", 364 widgetEventPrefix: "", 365 defaultElement: "<div>", 366 367 options: { 368 classes: {}, 369 disabled: false, 370 371 372 create: null 373 }, 374 375 _createWidget: function( options, element ) { 376 element = $( element || this.defaultElement || this )[ 0 ]; 377 this.element = $( element ); 378 this.uuid = widgetUuid++; 379 this.eventNamespace = "." + this.widgetName + this.uuid; 380 381 this.bindings = $(); 382 this.hoverable = $(); 383 this.focusable = $(); 384 this.classesElementLookup = {}; 385 386 if ( element !== this ) { 387 $.data( element, this.widgetFullName, this ); 388 this._on( true, this.element, { 389 remove: function( event ) { 390 if ( event.target === element ) { 391 this.destroy(); 392 } 393 } 394 } ); 395 this.document = $( element.style ? 396 397 398 element.ownerDocument : 399 400 401 element.document || element ); 402 this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); 403 } 404 405 this.options = $.widget.extend( {}, 406 this.options, 407 this._getCreateOptions(), 408 options ); 409 410 this._create(); 411 412 if ( this.options.disabled ) { 413 this._setOptionDisabled( this.options.disabled ); 414 } 415 416 this._trigger( "create", null, this._getCreateEventData() ); 417 this._init(); 418 }, 419 420 _getCreateOptions: function() { 421 return {}; 422 }, 423 424 _getCreateEventData: $.noop, 425 426 _create: $.noop, 427 428 _init: $.noop, 429 430 destroy: function() { 431 var that = this; 432 433 this._destroy(); 434 $.each( this.classesElementLookup, function( key, value ) { 435 that._removeClass( value, key ); 436 } ); 437 438 439 this.element 440 .off( this.eventNamespace ) 441 .removeData( this.widgetFullName ); 442 this.widget() 443 .off( this.eventNamespace ) 444 .removeAttr( "aria-disabled" ); 445 446 447 this.bindings.off( this.eventNamespace ); 448 }, 449 450 _destroy: $.noop, 451 452 widget: function() { 453 return this.element; 454 }, 455 456 option: function( key, value ) { 457 var options = key; 458 var parts; 459 var curOption; 460 var i; 461 462 if ( arguments.length === 0 ) { 463 464 465 return $.widget.extend( {}, this.options ); 466 } 467 468 if ( typeof key === "string" ) { 469 470 471 options = {}; 472 parts = key.split( "." ); 473 key = parts.shift(); 474 if ( parts.length ) { 475 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 476 for ( i = 0; i < parts.length - 1; i++ ) { 477 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 478 curOption = curOption[ parts[ i ] ]; 479 } 480 key = parts.pop(); 481 if ( arguments.length === 1 ) { 482 return curOption[ key ] === undefined ? null : curOption[ key ]; 483 } 484 curOption[ key ] = value; 485 } else { 486 if ( arguments.length === 1 ) { 487 return this.options[ key ] === undefined ? null : this.options[ key ]; 488 } 489 options[ key ] = value; 490 } 491 } 492 493 this._setOptions( options ); 494 495 return this; 496 }, 497 498 _setOptions: function( options ) { 499 var key; 500 501 for ( key in options ) { 502 this._setOption( key, options[ key ] ); 503 } 504 505 return this; 506 }, 507 508 _setOption: function( key, value ) { 509 if ( key === "classes" ) { 510 this._setOptionClasses( value ); 511 } 512 513 this.options[ key ] = value; 514 515 if ( key === "disabled" ) { 516 this._setOptionDisabled( value ); 517 } 518 519 return this; 520 }, 521 522 _setOptionClasses: function( value ) { 523 var classKey, elements, currentElements; 524 525 for ( classKey in value ) { 526 currentElements = this.classesElementLookup[ classKey ]; 527 if ( value[ classKey ] === this.options.classes[ classKey ] || 528 !currentElements || 529 !currentElements.length ) { 530 continue; 531 } 532 533 534 elements = $( currentElements.get() ); 535 this._removeClass( currentElements, classKey ); 536 537 elements.addClass( this._classes( { 538 element: elements, 539 keys: classKey, 540 classes: value, 541 add: true 542 } ) ); 543 } 544 }, 545 546 _setOptionDisabled: function( value ) { 547 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); 548 549 550 if ( value ) { 551 this._removeClass( this.hoverable, null, "ui-state-hover" ); 552 this._removeClass( this.focusable, null, "ui-state-focus" ); 553 } 554 }, 555 556 enable: function() { 557 return this._setOptions( { disabled: false } ); 558 }, 559 560 disable: function() { 561 return this._setOptions( { disabled: true } ); 562 }, 563 564 _classes: function( options ) { 565 var full = []; 566 var that = this; 567 568 options = $.extend( { 569 element: this.element, 570 classes: this.options.classes || {} 571 }, options ); 572 573 function processClassString( classes, checkOption ) { 574 var current, i; 575 for ( i = 0; i < classes.length; i++ ) { 576 current = that.classesElementLookup[ classes[ i ] ] || $(); 577 if ( options.add ) { 578 current = $( $.unique( current.get().concat( options.element.get() ) ) ); 579 } else { 580 current = $( current.not( options.element ).get() ); 581 } 582 that.classesElementLookup[ classes[ i ] ] = current; 583 full.push( classes[ i ] ); 584 if ( checkOption && options.classes[ classes[ i ] ] ) { 585 full.push( options.classes[ classes[ i ] ] ); 586 } 587 } 588 } 589 590 this._on( options.element, { 591 "remove": "_untrackClassesElement" 592 } ); 593 594 if ( options.keys ) { 595 processClassString( options.keys.match( /\S+/g ) || [], true ); 596 } 597 if ( options.extra ) { 598 processClassString( options.extra.match( /\S+/g ) || [] ); 599 } 600 601 return full.join( " " ); 602 }, 603 604 _untrackClassesElement: function( event ) { 605 var that = this; 606 $.each( that.classesElementLookup, function( key, value ) { 607 if ( $.inArray( event.target, value ) !== -1 ) { 608 that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); 609 } 610 } ); 611 }, 612 613 _removeClass: function( element, keys, extra ) { 614 return this._toggleClass( element, keys, extra, false ); 615 }, 616 617 _addClass: function( element, keys, extra ) { 618 return this._toggleClass( element, keys, extra, true ); 619 }, 620 621 _toggleClass: function( element, keys, extra, add ) { 622 add = ( typeof add === "boolean" ) ? add : extra; 623 var shift = ( typeof element === "string" || element === null ), 624 options = { 625 extra: shift ? keys : extra, 626 keys: shift ? element : keys, 627 element: shift ? this.element : element, 628 add: add 629 }; 630 options.element.toggleClass( this._classes( options ), add ); 631 return this; 632 }, 633 634 _on: function( suppressDisabledCheck, element, handlers ) { 635 var delegateElement; 636 var instance = this; 637 638 639 if ( typeof suppressDisabledCheck !== "boolean" ) { 640 handlers = element; 641 element = suppressDisabledCheck; 642 suppressDisabledCheck = false; 643 } 644 645 646 if ( !handlers ) { 647 handlers = element; 648 element = this.element; 649 delegateElement = this.widget(); 650 } else { 651 element = delegateElement = $( element ); 652 this.bindings = this.bindings.add( element ); 653 } 654 655 $.each( handlers, function( event, handler ) { 656 function handlerProxy() { 657 658 659 if ( !suppressDisabledCheck && 660 ( instance.options.disabled === true || 661 $( this ).hasClass( "ui-state-disabled" ) ) ) { 662 return; 663 } 664 return ( typeof handler === "string" ? instance[ handler ] : handler ) 665 .apply( instance, arguments ); 666 } 667 668 669 if ( typeof handler !== "string" ) { 670 handlerProxy.guid = handler.guid = 671 handler.guid || handlerProxy.guid || $.guid++; 672 } 673 674 var match = event.match( /^([\w:-]*)\s*(.*)$/ ); 675 var eventName = match[ 1 ] + instance.eventNamespace; 676 var selector = match[ 2 ]; 677 678 if ( selector ) { 679 delegateElement.on( eventName, selector, handlerProxy ); 680 } else { 681 element.on( eventName, handlerProxy ); 682 } 683 } ); 684 }, 685 686 _off: function( element, eventName ) { 687 eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + 688 this.eventNamespace; 689 element.off( eventName ).off( eventName ); 690 691 692 this.bindings = $( this.bindings.not( element ).get() ); 693 this.focusable = $( this.focusable.not( element ).get() ); 694 this.hoverable = $( this.hoverable.not( element ).get() ); 695 }, 696 697 _delay: function( handler, delay ) { 698 function handlerProxy() { 699 return ( typeof handler === "string" ? instance[ handler ] : handler ) 700 .apply( instance, arguments ); 701 } 702 var instance = this; 703 return setTimeout( handlerProxy, delay || 0 ); 704 }, 705 706 _hoverable: function( element ) { 707 this.hoverable = this.hoverable.add( element ); 708 this._on( element, { 709 mouseenter: function( event ) { 710 this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); 711 }, 712 mouseleave: function( event ) { 713 this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); 714 } 715 } ); 716 }, 717 718 _focusable: function( element ) { 719 this.focusable = this.focusable.add( element ); 720 this._on( element, { 721 focusin: function( event ) { 722 this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); 723 }, 724 focusout: function( event ) { 725 this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); 726 } 727 } ); 728 }, 729 730 _trigger: function( type, event, data ) { 731 var prop, orig; 732 var callback = this.options[ type ]; 733 734 data = data || {}; 735 event = $.Event( event ); 736 event.type = ( type === this.widgetEventPrefix ? 737 type : 738 this.widgetEventPrefix + type ).toLowerCase(); 739 740 741 event.target = this.element[ 0 ]; 742 743 744 orig = event.originalEvent; 745 if ( orig ) { 746 for ( prop in orig ) { 747 if ( !( prop in event ) ) { 748 event[ prop ] = orig[ prop ]; 749 } 750 } 751 } 752 753 this.element.trigger( event, data ); 754 return !( $.isFunction( callback ) && 755 callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || 756 event.isDefaultPrevented() ); 757 } 758}; 759 760$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 761 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 762 if ( typeof options === "string" ) { 763 options = { effect: options }; 764 } 765 766 var hasOptions; 767 var effectName = !options ? 768 method : 769 options === true || typeof options === "number" ? 770 defaultEffect : 771 options.effect || defaultEffect; 772 773 options = options || {}; 774 if ( typeof options === "number" ) { 775 options = { duration: options }; 776 } 777 778 hasOptions = !$.isEmptyObject( options ); 779 options.complete = callback; 780 781 if ( options.delay ) { 782 element.delay( options.delay ); 783 } 784 785 if ( hasOptions && $.effe
vendor: 4,618 bytes, lines 785-951
785cts && $.effects.effect[ effectName ] ) { 786 element[ method ]( options ); 787 } else if ( effectName !== method && element[ effectName ] ) { 788 element[ effectName ]( options.duration, options.easing, callback ); 789 } else { 790 element.queue( function( next ) { 791 $( this )[ method ](); 792 if ( callback ) { 793 callback.call( element[ 0 ] ); 794 } 795 next(); 796 } ); 797 } 798 }; 799} ); 800 801var widget = $.widget; 802 803 804 805 806( function() { 807var cachedScrollbarWidth, 808 max = Math.max, 809 abs = Math.abs, 810 rhorizontal = /left|center|right/, 811 rvertical = /top|center|bottom/, 812 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 813 rposition = /^\w+/, 814 rpercent = /%$/, 815 _position = $.fn.position; 816 817function getOffsets( offsets, width, height ) { 818 return [ 819 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 820 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 821 ]; 822} 823 824function parseCss( element, property ) { 825 return parseInt( $.css( element, property ), 10 ) || 0; 826} 827 828function getDimensions( elem ) { 829 var raw = elem[ 0 ]; 830 if ( raw.nodeType === 9 ) { 831 return { 832 width: elem.width(), 833 height: elem.height(), 834 offset: { top: 0, left: 0 } 835 }; 836 } 837 if ( $.isWindow( raw ) ) { 838 return { 839 width: elem.width(), 840 height: elem.height(), 841 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 842 }; 843 } 844 if ( raw.preventDefault ) { 845 return { 846 width: 0, 847 height: 0, 848 offset: { top: raw.pageY, left: raw.pageX } 849 }; 850 } 851 return { 852 width: elem.outerWidth(), 853 height: elem.outerHeight(), 854 offset: elem.offset() 855 }; 856} 857 858$.position = { 859 scrollbarWidth: function() { 860 if ( cachedScrollbarWidth !== undefined ) { 861 return cachedScrollbarWidth; 862 } 863 var w1, w2, 864 div = $( "<div " + 865 "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + 866 "<div style='height:100px;width:auto;'></div></div>" ), 867 innerDiv = div.children()[ 0 ]; 868 869 $( "body" ).append( div ); 870 w1 = innerDiv.offsetWidth; 871 div.css( "overflow", "scroll" ); 872 873 w2 = innerDiv.offsetWidth; 874 875 if ( w1 === w2 ) { 876 w2 = div[ 0 ].clientWidth; 877 } 878 879 div.remove(); 880 881 return ( cachedScrollbarWidth = w1 - w2 ); 882 }, 883 getScrollInfo: function( within ) { 884 var overflowX = within.isWindow || within.isDocument ? "" : 885 within.element.css( "overflow-x" ), 886 overflowY = within.isWindow || within.isDocument ? "" : 887 within.element.css( "overflow-y" ), 888 hasOverflowX = overflowX === "scroll" || 889 ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), 890 hasOverflowY = overflowY === "scroll" || 891 ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); 892 return { 893 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 894 height: hasOverflowX ? $.position.scrollbarWidth() : 0 895 }; 896 }, 897 getWithinInfo: function( element ) { 898 var withinElement = $( element || window ), 899 isWindow = $.isWindow( withinElement[ 0 ] ), 900 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, 901 hasOffset = !isWindow && !isDocument; 902 return { 903 element: withinElement, 904 isWindow: isWindow, 905 isDocument: isDocument, 906 offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, 907 scrollLeft: withinElement.scrollLeft(), 908 scrollTop: withinElement.scrollTop(), 909 width: withinElement.outerWidth(), 910 height: withinElement.outerHeight() 911 }; 912 } 913}; 914 915$.fn.position = function( options ) { 916 if ( !options || !options.of ) { 917 return _position.apply( this, arguments ); 918 } 919 920 921 options = $.extend( {}, options ); 922 923 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 924 target = $( options.of ), 925 within = $.position.getWithinInfo( options.within ), 926 scrollInfo = $.position.getScrollInfo( within ), 927 collision = ( options.collision || "flip" ).split( " " ), 928 offsets = {}; 929 930 dimensions = getDimensions( target ); 931 if ( target[ 0 ].preventDefault ) { 932 933 934 options.at = "left top"; 935 } 936 targetWidth = dimensions.width; 937 targetHeight = dimensions.height; 938 targetOffset = dimensions.offset; 939 940 // Clone to reuse original targetOffset later 941 basePosition = $.extend( {}, targetOffset ); 942 943 // Force my and at to have valid horizontal and vertical positions 944 // if a value is missing or invalid, it will be converted to center 945 $.each( [ "my", "at" ], function() { 946 var pos = ( options[ this ] || "" ).split( " " ), 947 horizontalOffset, 948 verticalOffset; 949 950 if ( pos.length === 1 ) { 951 pos = rhorizontal.test( pos[ 0 ] ) ?
vendor: 10,483 bytes, lines 952-1278
952 pos.concat( [ "center" ] ) : 953 rvertical.test( pos[ 0 ] ) ? 954 [ "center" ].concat( pos ) : 955 [ "center", "center" ]; 956 } 957 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 958 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 959 960 // Calculate offsets 961 horizontalOffset = roffset.exec( pos[ 0 ] ); 962 verticalOffset = roffset.exec( pos[ 1 ] ); 963 offsets[ this ] = [ 964 horizontalOffset ? horizontalOffset[ 0 ] : 0, 965 verticalOffset ? verticalOffset[ 0 ] : 0 966 ]; 967 968 // Reduce to just the positions without the offsets 969 options[ this ] = [ 970 rposition.exec( pos[ 0 ] )[ 0 ], 971 rposition.exec( pos[ 1 ] )[ 0 ] 972 ]; 973 } ); 974 975 // Normalize collision option 976 if ( collision.length === 1 ) { 977 collision[ 1 ] = collision[ 0 ]; 978 } 979 980 if ( options.at[ 0 ] === "right" ) { 981 basePosition.left += targetWidth; 982 } else if ( options.at[ 0 ] === "center" ) { 983 basePosition.left += targetWidth / 2; 984 } 985 986 if ( options.at[ 1 ] === "bottom" ) { 987 basePosition.top += targetHeight; 988 } else if ( options.at[ 1 ] === "center" ) { 989 basePosition.top += targetHeight / 2; 990 } 991 992 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 993 basePosition.left += atOffset[ 0 ]; 994 basePosition.top += atOffset[ 1 ]; 995 996 return this.each( function() { 997 var collisionPosition, using, 998 elem = $( this ), 999 elemWidth = elem.outerWidth(), 1000 elemHeight = elem.outerHeight(), 1001 marginLeft = parseCss( this, "marginLeft" ), 1002 marginTop = parseCss( this, "marginTop" ), 1003 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + 1004 scrollInfo.width, 1005 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + 1006 scrollInfo.height, 1007 position = $.extend( {}, basePosition ), 1008 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 1009 1010 if ( options.my[ 0 ] === "right" ) { 1011 position.left -= elemWidth; 1012 } else if ( options.my[ 0 ] === "center" ) { 1013 position.left -= elemWidth / 2; 1014 } 1015 1016 if ( options.my[ 1 ] === "bottom" ) { 1017 position.top -= elemHeight; 1018 } else if ( options.my[ 1 ] === "center" ) { 1019 position.top -= elemHeight / 2; 1020 } 1021 1022 position.left += myOffset[ 0 ]; 1023 position.top += myOffset[ 1 ]; 1024 1025 collisionPosition = { 1026 marginLeft: marginLeft, 1027 marginTop: marginTop 1028 }; 1029 1030 $.each( [ "left", "top" ], function( i, dir ) { 1031 if ( $.ui.position[ collision[ i ] ] ) { 1032 $.ui.position[ collision[ i ] ][ dir ]( position, { 1033 targetWidth: targetWidth, 1034 targetHeight: targetHeight, 1035 elemWidth: elemWidth, 1036 elemHeight: elemHeight, 1037 collisionPosition: collisionPosition, 1038 collisionWidth: collisionWidth, 1039 collisionHeight: collisionHeight, 1040 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 1041 my: options.my, 1042 at: options.at, 1043 within: within, 1044 elem: elem 1045 } ); 1046 } 1047 } ); 1048 1049 if ( options.using ) { 1050 1051 // Adds feedback as second argument to using callback, if present 1052 using = function( props ) { 1053 var left = targetOffset.left - position.left, 1054 right = left + targetWidth - elemWidth, 1055 top = targetOffset.top - position.top, 1056 bottom = top + targetHeight - elemHeight, 1057 feedback = { 1058 target: { 1059 element: target, 1060 left: targetOffset.left, 1061 top: targetOffset.top, 1062 width: targetWidth, 1063 height: targetHeight 1064 }, 1065 element: { 1066 element: elem, 1067 left: position.left, 1068 top: position.top, 1069 width: elemWidth, 1070 height: elemHeight 1071 }, 1072 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 1073 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 1074 }; 1075 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 1076 feedback.horizontal = "center"; 1077 } 1078 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 1079 feedback.vertical = "middle"; 1080 } 1081 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 1082 feedback.important = "horizontal"; 1083 } else { 1084 feedback.important = "vertical"; 1085 } 1086 options.using.call( this, props, feedback ); 1087 }; 1088 } 1089 1090 elem.offset( $.extend( position, { using: using } ) ); 1091 } ); 1092}; 1093 1094$.ui.position = { 1095 fit: { 1096 left: function( position, data ) { 1097 var within = data.within, 1098 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 1099 outerWidth = within.width, 1100 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1101 overLeft = withinOffset - collisionPosLeft, 1102 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 1103 newOverRight; 1104 1105 // Element is wider than within 1106 if ( data.collisionWidth > outerWidth ) { 1107 1108 // Element is initially over the left side of within 1109 if ( overLeft > 0 && overRight <= 0 ) { 1110 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - 1111 withinOffset; 1112 position.left += overLeft - newOverRight; 1113 1114 // Element is initially over right side of within 1115 } else if ( overRight > 0 && overLeft <= 0 ) { 1116 position.left = withinOffset; 1117 1118 // Element is initially over both left and right sides of within 1119 } else { 1120 if ( overLeft > overRight ) { 1121 position.left = withinOffset + outerWidth - data.collisionWidth; 1122 } else { 1123 position.left = withinOffset; 1124 } 1125 } 1126 1127 // Too far left -> align with left edge 1128 } else if ( overLeft > 0 ) { 1129 position.left += overLeft; 1130 1131 // Too far right -> align with right edge 1132 } else if ( overRight > 0 ) { 1133 position.left -= overRight; 1134 1135 // Adjust based on position and margin 1136 } else { 1137 position.left = max( position.left - collisionPosLeft, position.left ); 1138 } 1139 }, 1140 top: function( position, data ) { 1141 var within = data.within, 1142 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 1143 outerHeight = data.within.height, 1144 collisionPosTop = position.top - data.collisionPosition.marginTop, 1145 overTop = withinOffset - collisionPosTop, 1146 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 1147 newOverBottom; 1148 1149 // Element is taller than within 1150 if ( data.collisionHeight > outerHeight ) { 1151 1152 // Element is initially over the top of within 1153 if ( overTop > 0 && overBottom <= 0 ) { 1154 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - 1155 withinOffset; 1156 position.top += overTop - newOverBottom; 1157 1158 // Element is initially over bottom of within 1159 } else if ( overBottom > 0 && overTop <= 0 ) { 1160 position.top = withinOffset; 1161 1162 // Element is initially over both top and bottom of within 1163 } else { 1164 if ( overTop > overBottom ) { 1165 position.top = withinOffset + outerHeight - data.collisionHeight; 1166 } else { 1167 position.top = withinOffset; 1168 } 1169 } 1170 1171 // Too far up -> align with top 1172 } else if ( overTop > 0 ) { 1173 position.top += overTop; 1174 1175 // Too far down -> align with bottom edge 1176 } else if ( overBottom > 0 ) { 1177 position.top -= overBottom; 1178 1179 // Adjust based on position and margin 1180 } else { 1181 position.top = max( position.top - collisionPosTop, position.top ); 1182 } 1183 } 1184 }, 1185 flip: { 1186 left: function( position, data ) { 1187 var within = data.within, 1188 withinOffset = within.offset.left + within.scrollLeft, 1189 outerWidth = within.width, 1190 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 1191 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1192 overLeft = collisionPosLeft - offsetLeft, 1193 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 1194 myOffset = data.my[ 0 ] === "left" ? 1195 -data.elemWidth : 1196 data.my[ 0 ] === "right" ? 1197 data.elemWidth : 1198 0, 1199 atOffset = data.at[ 0 ] === "left" ? 1200 data.targetWidth : 1201 data.at[ 0 ] === "right" ? 1202 -data.targetWidth : 1203 0, 1204 offset = -2 * data.offset[ 0 ], 1205 newOverRight, 1206 newOverLeft; 1207 1208 if ( overLeft < 0 ) { 1209 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - 1210 outerWidth - withinOffset; 1211 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 1212 position.left += myOffset + atOffset + offset; 1213 } 1214 } else if ( overRight > 0 ) { 1215 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + 1216 atOffset + offset - offsetLeft; 1217 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 1218 position.left += myOffset + atOffset + offset; 1219 } 1220 } 1221 }, 1222 top: function( position, data ) { 1223 var within = data.within, 1224 withinOffset = within.offset.top + within.scrollTop, 1225 outerHeight = within.height, 1226 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 1227 collisionPosTop = position.top - data.collisionPosition.marginTop, 1228 overTop = collisionPosTop - offsetTop, 1229 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 1230 top = data.my[ 1 ] === "top", 1231 myOffset = top ? 1232 -data.elemHeight : 1233 data.my[ 1 ] === "bottom" ? 1234 data.elemHeight : 1235 0, 1236 atOffset = data.at[ 1 ] === "top" ? 1237 data.targetHeight : 1238 data.at[ 1 ] === "bottom" ? 1239 -data.targetHeight : 1240 0, 1241 offset = -2 * data.offset[ 1 ], 1242 newOverTop, 1243 newOverBottom; 1244 if ( overTop < 0 ) { 1245 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - 1246 outerHeight - withinOffset; 1247 if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 1248 position.top += myOffset + atOffset + offset; 1249 } 1250 } else if ( overBottom > 0 ) { 1251 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + 1252 offset - offsetTop; 1253 if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 1254 position.top += myOffset + atOffset + offset; 1255 } 1256 } 1257 } 1258 }, 1259 flipfit: { 1260 left: function() { 1261 $.ui.position.flip.left.apply( this, arguments ); 1262 $.ui.position.fit.left.apply( this, arguments ); 1263 }, 1264 top: function() { 1265 $.ui.position.flip.top.apply( this, arguments ); 1266 $.ui.position.fit.top.apply( this, arguments ); 1267 } 1268 } 1269}; 1270 1271} )(); 1272 1273var position = $.ui.position; 1274 1275 1276/*! 1277 * jQuery UI :data 1.12.1 1278 * http://jqueryui.com
vendor: 5,137 bytes, lines 1279-1484
1279 * 1280 * Copyright jQuery Foundation and other contributors 1281 * Released under the MIT license. 1282 * http://jquery.org/license 1283 */ 1284 1285//>>label: :data Selector 1286//>>group: Core 1287//>>description: Selects elements which have data stored under the specified key. 1288//>>docs: http://api.jqueryui.com/data-selector/ 1289 1290 1291var data = $.extend( $.expr[ ":" ], { 1292 data: $.expr.createPseudo ? 1293 $.expr.createPseudo( function( dataName ) { 1294 return function( elem ) { 1295 return !!$.data( elem, dataName ); 1296 }; 1297 } ) : 1298 1299 // Support: jQuery <1.8 1300 function( elem, i, match ) { 1301 return !!$.data( elem, match[ 3 ] ); 1302 } 1303} ); 1304 1305/*! 1306 * jQuery UI Disable Selection 1.12.1 1307 * http://jqueryui.com 1308 * 1309 * Copyright jQuery Foundation and other contributors 1310 * Released under the MIT license. 1311 * http://jquery.org/license 1312 */ 1313 1314//>>label: disableSelection 1315//>>group: Core 1316//>>description: Disable selection of text content within the set of matched elements. 1317//>>docs: http://api.jqueryui.com/disableSelection/ 1318 1319// This file is deprecated 1320 1321 1322var disableSelection = $.fn.extend( { 1323 disableSelection: ( function() { 1324 var eventType = "onselectstart" in document.createElement( "div" ) ? 1325 "selectstart" : 1326 "mousedown"; 1327 1328 return function() { 1329 return this.on( eventType + ".ui-disableSelection", function( event ) { 1330 event.preventDefault(); 1331 } ); 1332 }; 1333 } )(), 1334 1335 enableSelection: function() { 1336 return this.off( ".ui-disableSelection" ); 1337 } 1338} ); 1339 1340 1341/*! 1342 * jQuery UI Effects 1.12.1 1343 * http://jqueryui.com 1344 * 1345 * Copyright jQuery Foundation and other contributors 1346 * Released under the MIT license. 1347 * http://jquery.org/license 1348 */ 1349 1350//>>label: Effects Core 1351//>>group: Effects 1352// jscs:disable maximumLineLength 1353//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. 1354// jscs:enable maximumLineLength 1355//>>docs: http://api.jqueryui.com/category/effects-core/ 1356//>>demos: http://jqueryui.com/effect/ 1357 1358 1359 1360var dataSpace = "ui-effects-", 1361 dataSpaceStyle = "ui-effects-style", 1362 dataSpaceAnimated = "ui-effects-animated", 1363 1364 // Create a local jQuery because jQuery Color relies on it and the 1365 // global may not exist with AMD and a custom build (#10199) 1366 jQuery = $; 1367 1368$.effects = { 1369 effect: {} 1370}; 1371 1372/*! 1373 * jQuery Color Animations v2.1.2 1374 * https://github.com/jquery/jquery-color 1375 * 1376 * Copyright 2014 jQuery Foundation and other contributors 1377 * Released under the MIT license. 1378 * http://jquery.org/license 1379 * 1380 * Date: Wed Jan 16 08:47:09 2013 -0600 1381 */ 1382( function( jQuery, undefined ) { 1383 1384 var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + 1385 "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 1386 1387 // Plusequals test for += 100 -= 100 1388 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 1389 1390 // A set of RE's that can match strings and generate color tuples. 1391 stringParsers = [ { 1392 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1393 parse: function( execResult ) { 1394 return [ 1395 execResult[ 1 ], 1396 execResult[ 2 ], 1397 execResult[ 3 ], 1398 execResult[ 4 ] 1399 ]; 1400 } 1401 }, { 1402 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1403 parse: function( execResult ) { 1404 return [ 1405 execResult[ 1 ] * 2.55, 1406 execResult[ 2 ] * 2.55, 1407 execResult[ 3 ] * 2.55, 1408 execResult[ 4 ] 1409 ]; 1410 } 1411 }, { 1412 1413 // This regex ignores A-F because it's compared against an already lowercased string 1414 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 1415 parse: function( execResult ) { 1416 return [ 1417 parseInt( execResult[ 1 ], 16 ), 1418 parseInt( execResult[ 2 ], 16 ), 1419 parseInt( execResult[ 3 ], 16 ) 1420 ]; 1421 } 1422 }, { 1423 1424 // This regex ignores A-F because it's compared against an already lowercased string 1425 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 1426 parse: function( execResult ) { 1427 return [ 1428 parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 1429 parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 1430 parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) 1431 ]; 1432 } 1433 }, { 1434 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1435 space: "hsla", 1436 parse: function( execResult ) { 1437 return [ 1438 execResult[ 1 ], 1439 execResult[ 2 ] / 100, 1440 execResult[ 3 ] / 100, 1441 execResult[ 4 ] 1442 ]; 1443 } 1444 } ], 1445 1446 // JQuery.Color( ) 1447 color = jQuery.Color = function( color, green, blue, alpha ) { 1448 return new jQuery.Color.fn.parse( color, green, blue, alpha ); 1449 }, 1450 spaces = { 1451 rgba: { 1452 props: { 1453 red: { 1454 idx: 0, 1455 type: "byte" 1456 }, 1457 green: { 1458 idx: 1, 1459 type: "byte" 1460 }, 1461 blue: { 1462 idx: 2, 1463 type: "byte" 1464 } 1465 } 1466 }, 1467 1468 hsla: { 1469 props: { 1470 hue: { 1471 idx: 0, 1472 type: "degrees" 1473 }, 1474 saturation: { 1475 idx: 1, 1476 type: "percent" 1477 }, 1478 lightness: { 1479 idx: 2, 1480 type: "percent" 1481 } 1482 } 1483 } 1484 },
vendor: 18,301 bytes, lines 1485-2207
1485 propTypes = { 1486 "byte": { 1487 floor: true, 1488 max: 255 1489 }, 1490 "percent": { 1491 max: 1 1492 }, 1493 "degrees": { 1494 mod: 360, 1495 floor: true 1496 } 1497 }, 1498 support = color.support = {}, 1499 1500 // Element for support tests 1501 supportElem = jQuery( "<p>" )[ 0 ], 1502 1503 // Colors = jQuery.Color.names 1504 colors, 1505 1506 // Local aliases of functions called often 1507 each = jQuery.each; 1508 1509// Determine rgba support immediately 1510supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 1511support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 1512 1513// Define cache name and alpha properties 1514// for rgba and hsla spaces 1515each( spaces, function( spaceName, space ) { 1516 space.cache = "_" + spaceName; 1517 space.props.alpha = { 1518 idx: 3, 1519 type: "percent", 1520 def: 1 1521 }; 1522} ); 1523 1524function clamp( value, prop, allowEmpty ) { 1525 var type = propTypes[ prop.type ] || {}; 1526 1527 if ( value == null ) { 1528 return ( allowEmpty || !prop.def ) ? null : prop.def; 1529 } 1530 1531 // ~~ is an short way of doing floor for positive numbers 1532 value = type.floor ? ~~value : parseFloat( value ); 1533 1534 // IE will pass in empty strings as value for alpha, 1535 // which will hit this case 1536 if ( isNaN( value ) ) { 1537 return prop.def; 1538 } 1539 1540 if ( type.mod ) { 1541 1542 // We add mod before modding to make sure that negatives values 1543 // get converted properly: -10 -> 350 1544 return ( value + type.mod ) % type.mod; 1545 } 1546 1547 // For now all property types without mod have min and max 1548 return 0 > value ? 0 : type.max < value ? type.max : value; 1549} 1550 1551function stringParse( string ) { 1552 var inst = color(), 1553 rgba = inst._rgba = []; 1554 1555 string = string.toLowerCase(); 1556 1557 each( stringParsers, function( i, parser ) { 1558 var parsed, 1559 match = parser.re.exec( string ), 1560 values = match && parser.parse( match ), 1561 spaceName = parser.space || "rgba"; 1562 1563 if ( values ) { 1564 parsed = inst[ spaceName ]( values ); 1565 1566 // If this was an rgba parse the assignment might happen twice 1567 // oh well.... 1568 inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 1569 rgba = inst._rgba = parsed._rgba; 1570 1571 // Exit each( stringParsers ) here because we matched 1572 return false; 1573 } 1574 } ); 1575 1576 // Found a stringParser that handled it 1577 if ( rgba.length ) { 1578 1579 // If this came from a parsed string, force "transparent" when alpha is 0 1580 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) 1581 if ( rgba.join() === "0,0,0,0" ) { 1582 jQuery.extend( rgba, colors.transparent ); 1583 } 1584 return inst; 1585 } 1586 1587 // Named colors 1588 return colors[ string ]; 1589} 1590 1591color.fn = jQuery.extend( color.prototype, { 1592 parse: function( red, green, blue, alpha ) { 1593 if ( red === undefined ) { 1594 this._rgba = [ null, null, null, null ]; 1595 return this; 1596 } 1597 if ( red.jquery || red.nodeType ) { 1598 red = jQuery( red ).css( green ); 1599 green = undefined; 1600 } 1601 1602 var inst = this, 1603 type = jQuery.type( red ), 1604 rgba = this._rgba = []; 1605 1606 // More than 1 argument specified - assume ( red, green, blue, alpha ) 1607 if ( green !== undefined ) { 1608 red = [ red, green, blue, alpha ]; 1609 type = "array"; 1610 } 1611 1612 if ( type === "string" ) { 1613 return this.parse( stringParse( red ) || colors._default ); 1614 } 1615 1616 if ( type === "array" ) { 1617 each( spaces.rgba.props, function( key, prop ) { 1618 rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 1619 } ); 1620 return this; 1621 } 1622 1623 if ( type === "object" ) { 1624 if ( red instanceof color ) { 1625 each( spaces, function( spaceName, space ) { 1626 if ( red[ space.cache ] ) { 1627 inst[ space.cache ] = red[ space.cache ].slice(); 1628 } 1629 } ); 1630 } else { 1631 each( spaces, function( spaceName, space ) { 1632 var cache = space.cache; 1633 each( space.props, function( key, prop ) { 1634 1635 // If the cache doesn't exist, and we know how to convert 1636 if ( !inst[ cache ] && space.to ) { 1637 1638 // If the value was null, we don't need to copy it 1639 // if the key was alpha, we don't need to copy it either 1640 if ( key === "alpha" || red[ key ] == null ) { 1641 return; 1642 } 1643 inst[ cache ] = space.to( inst._rgba ); 1644 } 1645 1646 // This is the only case where we allow nulls for ALL properties. 1647 // call clamp with alwaysAllowEmpty 1648 inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 1649 } ); 1650 1651 // Everything defined but alpha? 1652 if ( inst[ cache ] && 1653 jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 1654 1655 // Use the default of 1 1656 inst[ cache ][ 3 ] = 1; 1657 if ( space.from ) { 1658 inst._rgba = space.from( inst[ cache ] ); 1659 } 1660 } 1661 } ); 1662 } 1663 return this; 1664 } 1665 }, 1666 is: function( compare ) { 1667 var is = color( compare ), 1668 same = true, 1669 inst = this; 1670 1671 each( spaces, function( _, space ) { 1672 var localCache, 1673 isCache = is[ space.cache ]; 1674 if ( isCache ) { 1675 localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 1676 each( space.props, function( _, prop ) { 1677 if ( isCache[ prop.idx ] != null ) { 1678 same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 1679 return same; 1680 } 1681 } ); 1682 } 1683 return same; 1684 } ); 1685 return same; 1686 }, 1687 _space: function() { 1688 var used = [], 1689 inst = this; 1690 each( spaces, function( spaceName, space ) { 1691 if ( inst[ space.cache ] ) { 1692 used.push( spaceName ); 1693 } 1694 } ); 1695 return used.pop(); 1696 }, 1697 transition: function( other, distance ) { 1698 var end = color( other ), 1699 spaceName = end._space(), 1700 space = spaces[ spaceName ], 1701 startColor = this.alpha() === 0 ? color( "transparent" ) : this, 1702 start = startColor[ space.cache ] || space.to( startColor._rgba ), 1703 result = start.slice(); 1704 1705 end = end[ space.cache ]; 1706 each( space.props, function( key, prop ) { 1707 var index = prop.idx, 1708 startValue = start[ index ], 1709 endValue = end[ index ], 1710 type = propTypes[ prop.type ] || {}; 1711 1712 // If null, don't override start value 1713 if ( endValue === null ) { 1714 return; 1715 } 1716 1717 // If null - use end 1718 if ( startValue === null ) { 1719 result[ index ] = endValue; 1720 } else { 1721 if ( type.mod ) { 1722 if ( endValue - startValue > type.mod / 2 ) { 1723 startValue += type.mod; 1724 } else if ( startValue - endValue > type.mod / 2 ) { 1725 startValue -= type.mod; 1726 } 1727 } 1728 result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 1729 } 1730 } ); 1731 return this[ spaceName ]( result ); 1732 }, 1733 blend: function( opaque ) { 1734 1735 // If we are already opaque - return ourself 1736 if ( this._rgba[ 3 ] === 1 ) { 1737 return this; 1738 } 1739 1740 var rgb = this._rgba.slice(), 1741 a = rgb.pop(), 1742 blend = color( opaque )._rgba; 1743 1744 return color( jQuery.map( rgb, function( v, i ) { 1745 return ( 1 - a ) * blend[ i ] + a * v; 1746 } ) ); 1747 }, 1748 toRgbaString: function() { 1749 var prefix = "rgba(", 1750 rgba = jQuery.map( this._rgba, function( v, i ) { 1751 return v == null ? ( i > 2 ? 1 : 0 ) : v; 1752 } ); 1753 1754 if ( rgba[ 3 ] === 1 ) { 1755 rgba.pop(); 1756 prefix = "rgb("; 1757 } 1758 1759 return prefix + rgba.join() + ")"; 1760 }, 1761 toHslaString: function() { 1762 var prefix = "hsla(", 1763 hsla = jQuery.map( this.hsla(), function( v, i ) { 1764 if ( v == null ) { 1765 v = i > 2 ? 1 : 0; 1766 } 1767 1768 // Catch 1 and 2 1769 if ( i && i < 3 ) { 1770 v = Math.round( v * 100 ) + "%"; 1771 } 1772 return v; 1773 } ); 1774 1775 if ( hsla[ 3 ] === 1 ) { 1776 hsla.pop(); 1777 prefix = "hsl("; 1778 } 1779 return prefix + hsla.join() + ")"; 1780 }, 1781 toHexString: function( includeAlpha ) { 1782 var rgba = this._rgba.slice(), 1783 alpha = rgba.pop(); 1784 1785 if ( includeAlpha ) { 1786 rgba.push( ~~( alpha * 255 ) ); 1787 } 1788 1789 return "#" + jQuery.map( rgba, function( v ) { 1790 1791 // Default to 0 when nulls exist 1792 v = ( v || 0 ).toString( 16 ); 1793 return v.length === 1 ? "0" + v : v; 1794 } ).join( "" ); 1795 }, 1796 toString: function() { 1797 return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 1798 } 1799} ); 1800color.fn.parse.prototype = color.fn; 1801 1802// Hsla conversions adapted from: 1803// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 1804 1805function hue2rgb( p, q, h ) { 1806 h = ( h + 1 ) % 1; 1807 if ( h * 6 < 1 ) { 1808 return p + ( q - p ) * h * 6; 1809 } 1810 if ( h * 2 < 1 ) { 1811 return q; 1812 } 1813 if ( h * 3 < 2 ) { 1814 return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 1815 } 1816 return p; 1817} 1818 1819spaces.hsla.to = function( rgba ) { 1820 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 1821 return [ null, null, null, rgba[ 3 ] ]; 1822 } 1823 var r = rgba[ 0 ] / 255, 1824 g = rgba[ 1 ] / 255, 1825 b = rgba[ 2 ] / 255, 1826 a = rgba[ 3 ], 1827 max = Math.max( r, g, b ), 1828 min = Math.min( r, g, b ), 1829 diff = max - min, 1830 add = max + min, 1831 l = add * 0.5, 1832 h, s; 1833 1834 if ( min === max ) { 1835 h = 0; 1836 } else if ( r === max ) { 1837 h = ( 60 * ( g - b ) / diff ) + 360; 1838 } else if ( g === max ) { 1839 h = ( 60 * ( b - r ) / diff ) + 120; 1840 } else { 1841 h = ( 60 * ( r - g ) / diff ) + 240; 1842 } 1843 1844 // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% 1845 // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) 1846 if ( diff === 0 ) { 1847 s = 0; 1848 } else if ( l <= 0.5 ) { 1849 s = diff / add; 1850 } else { 1851 s = diff / ( 2 - add ); 1852 } 1853 return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; 1854}; 1855 1856spaces.hsla.from = function( hsla ) { 1857 if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 1858 return [ null, null, null, hsla[ 3 ] ]; 1859 } 1860 var h = hsla[ 0 ] / 360, 1861 s = hsla[ 1 ], 1862 l = hsla[ 2 ], 1863 a = hsla[ 3 ], 1864 q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 1865 p = 2 * l - q; 1866 1867 return [ 1868 Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 1869 Math.round( hue2rgb( p, q, h ) * 255 ), 1870 Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 1871 a 1872 ]; 1873}; 1874 1875each( spaces, function( spaceName, space ) { 1876 var props = space.props, 1877 cache = space.cache, 1878 to = space.to, 1879 from = space.from; 1880 1881 // Makes rgba() and hsla() 1882 color.fn[ spaceName ] = function( value ) { 1883 1884 // Generate a cache for this space if it doesn't exist 1885 if ( to && !this[ cache ] ) { 1886 this[ cache ] = to( this._rgba ); 1887 } 1888 if ( value === undefined ) { 1889 return this[ cache ].slice(); 1890 } 1891 1892 var ret, 1893 type = jQuery.type( value ), 1894 arr = ( type === "array" || type === "object" ) ? value : arguments, 1895 local = this[ cache ].slice(); 1896 1897 each( props, function( key, prop ) { 1898 var val = arr[ type === "object" ? key : prop.idx ]; 1899 if ( val == null ) { 1900 val = local[ prop.idx ]; 1901 } 1902 local[ prop.idx ] = clamp( val, prop ); 1903 } ); 1904 1905 if ( from ) { 1906 ret = color( from( local ) ); 1907 ret[ cache ] = local; 1908 return ret; 1909 } else { 1910 return color( local ); 1911 } 1912 }; 1913 1914 // Makes red() green() blue() alpha() hue() saturation() lightness() 1915 each( props, function( key, prop ) { 1916 1917 // Alpha is included in more than one space 1918 if ( color.fn[ key ] ) { 1919 return; 1920 } 1921 color.fn[ key ] = function( value ) { 1922 var vtype = jQuery.type( value ), 1923 fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), 1924 local = this[ fn ](), 1925 cur = local[ prop.idx ], 1926 match; 1927 1928 if ( vtype === "undefined" ) { 1929 return cur; 1930 } 1931 1932 if ( vtype === "function" ) { 1933 value = value.call( this, cur ); 1934 vtype = jQuery.type( value ); 1935 } 1936 if ( value == null && prop.empty ) { 1937 return this; 1938 } 1939 if ( vtype === "string" ) { 1940 match = rplusequals.exec( value ); 1941 if ( match ) { 1942 value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 1943 } 1944 } 1945 local[ prop.idx ] = value; 1946 return this[ fn ]( local ); 1947 }; 1948 } ); 1949} ); 1950 1951// Add cssHook and .fx.step function for each named hook. 1952// accept a space separated string of properties 1953color.hook = function( hook ) { 1954 var hooks = hook.split( " " ); 1955 each( hooks, function( i, hook ) { 1956 jQuery.cssHooks[ hook ] = { 1957 set: function( elem, value ) { 1958 var parsed, curElem, 1959 backgroundColor = ""; 1960 1961 if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || 1962 ( parsed = stringParse( value ) ) ) ) { 1963 value = color( parsed || value ); 1964 if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 1965 curElem = hook === "backgroundColor" ? elem.parentNode : elem; 1966 while ( 1967 ( backgroundColor === "" || backgroundColor === "transparent" ) && 1968 curElem && curElem.style 1969 ) { 1970 try { 1971 backgroundColor = jQuery.css( curElem, "backgroundColor" ); 1972 curElem = curElem.parentNode; 1973 } catch ( e ) { 1974 } 1975 } 1976 1977 value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 1978 backgroundColor : 1979 "_default" ); 1980 } 1981 1982 value = value.toRgbaString(); 1983 } 1984 try { 1985 elem.style[ hook ] = value; 1986 } catch ( e ) { 1987 1988 // Wrapped to prevent IE from throwing errors on "invalid" values like 1989 // 'auto' or 'inherit' 1990 } 1991 } 1992 }; 1993 jQuery.fx.step[ hook ] = function( fx ) { 1994 if ( !fx.colorInit ) { 1995 fx.start = color( fx.elem, hook ); 1996 fx.end = color( fx.end ); 1997 fx.colorInit = true; 1998 } 1999 jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 2000 }; 2001 } ); 2002 2003}; 2004 2005color.hook( stepHooks ); 2006 2007jQuery.cssHooks.borderColor = { 2008 expand: function( value ) { 2009 var expanded = {}; 2010 2011 each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { 2012 expanded[ "border" + part + "Color" ] = value; 2013 } ); 2014 return expanded; 2015 } 2016}; 2017 2018// Basic color names only. 2019// Usage of any of the other color names requires adding yourself or including 2020// jquery.color.svg-names.js. 2021colors = jQuery.Color.names = { 2022 2023 // 4.1. Basic color keywords 2024 aqua: "#00ffff", 2025 black: "#000000", 2026 blue: "#0000ff", 2027 fuchsia: "#ff00ff", 2028 gray: "#808080", 2029 green: "#008000", 2030 lime: "#00ff00", 2031 maroon: "#800000", 2032 navy: "#000080", 2033 olive: "#808000", 2034 purple: "#800080", 2035 red: "#ff0000", 2036 silver: "#c0c0c0", 2037 teal: "#008080", 2038 white: "#ffffff", 2039 yellow: "#ffff00", 2040 2041 // 4.2.3. "transparent" color keyword 2042 transparent: [ null, null, null, 0 ], 2043 2044 _default: "#ffffff" 2045}; 2046 2047} )( jQuery ); 2048 2049/******************************************************************************/ 2050/****************************** CLASS ANIMATIONS ******************************/ 2051/******************************************************************************/ 2052( function() { 2053 2054var classAnimationActions = [ "add", "remove", "toggle" ], 2055 shorthandStyles = { 2056 border: 1, 2057 borderBottom: 1, 2058 borderColor: 1, 2059 borderLeft: 1, 2060 borderRight: 1, 2061 borderTop: 1, 2062 borderWidth: 1, 2063 margin: 1, 2064 padding: 1 2065 }; 2066 2067$.each( 2068 [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], 2069 function( _, prop ) { 2070 $.fx.step[ prop ] = function( fx ) { 2071 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 2072 jQuery.style( fx.elem, prop, fx.end ); 2073 fx.setAttr = true; 2074 } 2075 }; 2076 } 2077); 2078 2079function getElementStyles( elem ) { 2080 var key, len, 2081 style = elem.ownerDocument.defaultView ? 2082 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 2083 elem.currentStyle, 2084 styles = {}; 2085 2086 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 2087 len = style.length; 2088 while ( len-- ) { 2089 key = style[ len ]; 2090 if ( typeof style[ key ] === "string" ) { 2091 styles[ $.camelCase( key ) ] = style[ key ]; 2092 } 2093 } 2094 2095 // Support: Opera, IE <9 2096 } else { 2097 for ( key in style ) { 2098 if ( typeof style[ key ] === "string" ) { 2099 styles[ key ] = style[ key ]; 2100 } 2101 } 2102 } 2103 2104 return styles; 2105} 2106 2107function styleDifference( oldStyle, newStyle ) { 2108 var diff = {}, 2109 name, value; 2110 2111 for ( name in newStyle ) { 2112 value = newStyle[ name ]; 2113 if ( oldStyle[ name ] !== value ) { 2114 if ( !shorthandStyles[ name ] ) { 2115 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 2116 diff[ name ] = value; 2117 } 2118 } 2119 } 2120 } 2121 2122 return diff; 2123} 2124 2125// Support: jQuery <1.8 2126if ( !$.fn.addBack ) { 2127 $.fn.addBack = function( selector ) { 2128 return this.add( selector == null ? 2129 this.prevObject : this.prevObject.filter( selector ) 2130 ); 2131 }; 2132} 2133 2134$.effects.animateClass = function( value, duration, easing, callback ) { 2135 var o = $.speed( duration, easing, callback ); 2136 2137 return this.queue( function() { 2138 var animated = $( this ), 2139 baseClass = animated.attr( "class" ) || "", 2140 applyClassChange, 2141 allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 2142 2143 // Map the animated objects to store the original styles. 2144 allAnimations = allAnimations.map( function() { 2145 var el = $( this ); 2146 return { 2147 el: el, 2148 start: getElementStyles( this ) 2149 }; 2150 } ); 2151 2152 // Apply class change 2153 applyClassChange = function() { 2154 $.each( classAnimationActions, function( i, action ) { 2155 if ( value[ action ] ) { 2156 animated[ action + "Class" ]( value[ action ] ); 2157 } 2158 } ); 2159 }; 2160 applyClassChange(); 2161 2162 // Map all animated objects again - calculate new styles and diff 2163 allAnimations = allAnimations.map( function() { 2164 this.end = getElementStyles( this.el[ 0 ] ); 2165 this.diff = styleDifference( this.start, this.end ); 2166 return this; 2167 } ); 2168 2169 // Apply original class 2170 animated.attr( "class", baseClass ); 2171 2172 // Map all animated objects again - this time collecting a promise 2173 allAnimations = allAnimations.map( function() { 2174 var styleInfo = this, 2175 dfd = $.Deferred(), 2176 opts = $.extend( {}, o, { 2177 queue: false, 2178 complete: function() { 2179 dfd.resolve( styleInfo ); 2180 } 2181 } ); 2182 2183 this.el.animate( this.diff, opts ); 2184 return dfd.promise(); 2185 } ); 2186 2187 // Once all animations have completed: 2188 $.when.apply( $, allAnimations.get() ).done( function() { 2189 2190 // Set the final class 2191 applyClassChange(); 2192 2193 // For each animated element, 2194 // clear all css properties that were animated 2195 $.each( arguments, function() { 2196 var el = this.el; 2197 $.each( this.diff, function( key ) { 2198 el.css( key, "" ); 2199 } ); 2200 } ); 2201 2202 // This is guarnteed to be there if you use jQuery.speed() 2203 // it also handles dequeuing the next anim... 2204 o.complete.call( animated[ 0 ] ); 2205 } ); 2206 } ); 2207};
vendor: 5,123 bytes, lines 2208-2388
2208 2209$.fn.extend( { 2210 addClass: ( function( orig ) { 2211 return function( classNames, speed, easing, callback ) { 2212 return speed ? 2213 $.effects.animateClass.call( this, 2214 { add: classNames }, speed, easing, callback ) : 2215 orig.apply( this, arguments ); 2216 }; 2217 } )( $.fn.addClass ), 2218 2219 removeClass: ( function( orig ) { 2220 return function( classNames, speed, easing, callback ) { 2221 return arguments.length > 1 ? 2222 $.effects.animateClass.call( this, 2223 { remove: classNames }, speed, easing, callback ) : 2224 orig.apply( this, arguments ); 2225 }; 2226 } )( $.fn.removeClass ), 2227 2228 toggleClass: ( function( orig ) { 2229 return function( classNames, force, speed, easing, callback ) { 2230 if ( typeof force === "boolean" || force === undefined ) { 2231 if ( !speed ) { 2232 2233 // Without speed parameter 2234 return orig.apply( this, arguments ); 2235 } else { 2236 return $.effects.animateClass.call( this, 2237 ( force ? { add: classNames } : { remove: classNames } ), 2238 speed, easing, callback ); 2239 } 2240 } else { 2241 2242 // Without force parameter 2243 return $.effects.animateClass.call( this, 2244 { toggle: classNames }, force, speed, easing ); 2245 } 2246 }; 2247 } )( $.fn.toggleClass ), 2248 2249 switchClass: function( remove, add, speed, easing, callback ) { 2250 return $.effects.animateClass.call( this, { 2251 add: add, 2252 remove: remove 2253 }, speed, easing, callback ); 2254 } 2255} ); 2256 2257} )(); 2258 2259/******************************************************************************/ 2260/*********************************** EFFECTS **********************************/ 2261/******************************************************************************/ 2262 2263( function() { 2264 2265if ( $.expr && $.expr.filters && $.expr.filters.animated ) { 2266 $.expr.filters.animated = ( function( orig ) { 2267 return function( elem ) { 2268 return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); 2269 }; 2270 } )( $.expr.filters.animated ); 2271} 2272 2273if ( $.uiBackCompat !== false ) { 2274 $.extend( $.effects, { 2275 2276 // Saves a set of properties in a data storage 2277 save: function( element, set ) { 2278 var i = 0, length = set.length; 2279 for ( ; i < length; i++ ) { 2280 if ( set[ i ] !== null ) { 2281 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 2282 } 2283 } 2284 }, 2285 2286 // Restores a set of previously saved properties from a data storage 2287 restore: function( element, set ) { 2288 var val, i = 0, length = set.length; 2289 for ( ; i < length; i++ ) { 2290 if ( set[ i ] !== null ) { 2291 val = element.data( dataSpace + set[ i ] ); 2292 element.css( set[ i ], val ); 2293 } 2294 } 2295 }, 2296 2297 setMode: function( el, mode ) { 2298 if ( mode === "toggle" ) { 2299 mode = el.is( ":hidden" ) ? "show" : "hide"; 2300 } 2301 return mode; 2302 }, 2303 2304 // Wraps the element around a wrapper that copies position properties 2305 createWrapper: function( element ) { 2306 2307 // If the element is already wrapped, return it 2308 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 2309 return element.parent(); 2310 } 2311 2312 // Wrap the element 2313 var props = { 2314 width: element.outerWidth( true ), 2315 height: element.outerHeight( true ), 2316 "float": element.css( "float" ) 2317 }, 2318 wrapper = $( "<div></div>" ) 2319 .addClass( "ui-effects-wrapper" ) 2320 .css( { 2321 fontSize: "100%", 2322 background: "transparent", 2323 border: "none", 2324 margin: 0, 2325 padding: 0 2326 } ), 2327 2328 // Store the size in case width/height are defined in % - Fixes #5245 2329 size = { 2330 width: element.width(), 2331 height: element.height() 2332 }, 2333 active = document.activeElement; 2334 2335 // Support: Firefox 2336 // Firefox incorrectly exposes anonymous content 2337 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 2338 try { 2339 active.id; 2340 } catch ( e ) { 2341 active = document.body; 2342 } 2343 2344 element.wrap( wrapper ); 2345 2346 // Fixes #7595 - Elements lose focus when wrapped. 2347 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 2348 $( active ).trigger( "focus" ); 2349 } 2350 2351 // Hotfix for jQuery 1.4 since some change in wrap() seems to actually 2352 // lose the reference to the wrapped element 2353 wrapper = element.parent(); 2354 2355 // Transfer positioning properties to the wrapper 2356 if ( element.css( "position" ) === "static" ) { 2357 wrapper.css( { position: "relative" } ); 2358 element.css( { position: "relative" } ); 2359 } else { 2360 $.extend( props, { 2361 position: element.css( "position" ), 2362 zIndex: element.css( "z-index" ) 2363 } ); 2364 $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { 2365 props[ pos ] = element.css( pos ); 2366 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 2367 props[ pos ] = "auto"; 2368 } 2369 } ); 2370 element.css( { 2371 position: "relative", 2372 top: 0, 2373 left: 0, 2374 right: "auto", 2375 bottom: "auto" 2376 } ); 2377 } 2378 element.css( size ); 2379 2380 return wrapper.css( props ).show(); 2381 }, 2382 2383 removeWrapper: function( element ) { 2384 var active = document.activeElement; 2385 2386 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 2387 element.parent().replaceWith( element ); 2388
vendor: 16,570 bytes, lines 2389-3024
2389 // Fixes #7595 - Elements lose focus when wrapped. 2390 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 2391 $( active ).trigger( "focus" ); 2392 } 2393 } 2394 2395 return element; 2396 } 2397 } ); 2398} 2399 2400$.extend( $.effects, { 2401 version: "1.12.1", 2402 2403 define: function( name, mode, effect ) { 2404 if ( !effect ) { 2405 effect = mode; 2406 mode = "effect"; 2407 } 2408 2409 $.effects.effect[ name ] = effect; 2410 $.effects.effect[ name ].mode = mode; 2411 2412 return effect; 2413 }, 2414 2415 scaledDimensions: function( element, percent, direction ) { 2416 if ( percent === 0 ) { 2417 return { 2418 height: 0, 2419 width: 0, 2420 outerHeight: 0, 2421 outerWidth: 0 2422 }; 2423 } 2424 2425 var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, 2426 y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; 2427 2428 return { 2429 height: element.height() * y, 2430 width: element.width() * x, 2431 outerHeight: element.outerHeight() * y, 2432 outerWidth: element.outerWidth() * x 2433 }; 2434 2435 }, 2436 2437 clipToBox: function( animation ) { 2438 return { 2439 width: animation.clip.right - animation.clip.left, 2440 height: animation.clip.bottom - animation.clip.top, 2441 left: animation.clip.left, 2442 top: animation.clip.top 2443 }; 2444 }, 2445 2446 // Injects recently queued functions to be first in line (after "inprogress") 2447 unshift: function( element, queueLength, count ) { 2448 var queue = element.queue(); 2449 2450 if ( queueLength > 1 ) { 2451 queue.splice.apply( queue, 2452 [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); 2453 } 2454 element.dequeue(); 2455 }, 2456 2457 saveStyle: function( element ) { 2458 element.data( dataSpaceStyle, element[ 0 ].style.cssText ); 2459 }, 2460 2461 restoreStyle: function( element ) { 2462 element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; 2463 element.removeData( dataSpaceStyle ); 2464 }, 2465 2466 mode: function( element, mode ) { 2467 var hidden = element.is( ":hidden" ); 2468 2469 if ( mode === "toggle" ) { 2470 mode = hidden ? "show" : "hide"; 2471 } 2472 if ( hidden ? mode === "hide" : mode === "show" ) { 2473 mode = "none"; 2474 } 2475 return mode; 2476 }, 2477 2478 // Translates a [top,left] array into a baseline value 2479 getBaseline: function( origin, original ) { 2480 var y, x; 2481 2482 switch ( origin[ 0 ] ) { 2483 case "top": 2484 y = 0; 2485 break; 2486 case "middle": 2487 y = 0.5; 2488 break; 2489 case "bottom": 2490 y = 1; 2491 break; 2492 default: 2493 y = origin[ 0 ] / original.height; 2494 } 2495 2496 switch ( origin[ 1 ] ) { 2497 case "left": 2498 x = 0; 2499 break; 2500 case "center": 2501 x = 0.5; 2502 break; 2503 case "right": 2504 x = 1; 2505 break; 2506 default: 2507 x = origin[ 1 ] / original.width; 2508 } 2509 2510 return { 2511 x: x, 2512 y: y 2513 }; 2514 }, 2515 2516 // Creates a placeholder element so that the original element can be made absolute 2517 createPlaceholder: function( element ) { 2518 var placeholder, 2519 cssPosition = element.css( "position" ), 2520 position = element.position(); 2521 2522 // Lock in margins first to account for form elements, which 2523 // will change margin if you explicitly set height 2524 // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 2525 // Support: Safari 2526 element.css( { 2527 marginTop: element.css( "marginTop" ), 2528 marginBottom: element.css( "marginBottom" ), 2529 marginLeft: element.css( "marginLeft" ), 2530 marginRight: element.css( "marginRight" ) 2531 } ) 2532 .outerWidth( element.outerWidth() ) 2533 .outerHeight( element.outerHeight() ); 2534 2535 if ( /^(static|relative)/.test( cssPosition ) ) { 2536 cssPosition = "absolute"; 2537 2538 placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { 2539 2540 // Convert inline to inline block to account for inline elements 2541 // that turn to inline block based on content (like img) 2542 display: /^(inline|ruby)/.test( element.css( "display" ) ) ? 2543 "inline-block" : 2544 "block", 2545 visibility: "hidden", 2546 2547 // Margins need to be set to account for margin collapse 2548 marginTop: element.css( "marginTop" ), 2549 marginBottom: element.css( "marginBottom" ), 2550 marginLeft: element.css( "marginLeft" ), 2551 marginRight: element.css( "marginRight" ), 2552 "float": element.css( "float" ) 2553 } ) 2554 .outerWidth( element.outerWidth() ) 2555 .outerHeight( element.outerHeight() ) 2556 .addClass( "ui-effects-placeholder" ); 2557 2558 element.data( dataSpace + "placeholder", placeholder ); 2559 } 2560 2561 element.css( { 2562 position: cssPosition, 2563 left: position.left, 2564 top: position.top 2565 } ); 2566 2567 return placeholder; 2568 }, 2569 2570 removePlaceholder: function( element ) { 2571 var dataKey = dataSpace + "placeholder", 2572 placeholder = element.data( dataKey ); 2573 2574 if ( placeholder ) { 2575 placeholder.remove(); 2576 element.removeData( dataKey ); 2577 } 2578 }, 2579 2580 // Removes a placeholder if it exists and restores 2581 // properties that were modified during placeholder creation 2582 cleanUp: function( element ) { 2583 $.effects.restoreStyle( element ); 2584 $.effects.removePlaceholder( element ); 2585 }, 2586 2587 setTransition: function( element, list, factor, value ) { 2588 value = value || {}; 2589 $.each( list, function( i, x ) { 2590 var unit = element.cssUnit( x ); 2591 if ( unit[ 0 ] > 0 ) { 2592 value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 2593 } 2594 } ); 2595 return value; 2596 } 2597} ); 2598 2599// Return an effect options object for the given parameters: 2600function _normalizeArguments( effect, options, speed, callback ) { 2601 2602 // Allow passing all options as the first parameter 2603 if ( $.isPlainObject( effect ) ) { 2604 options = effect; 2605 effect = effect.effect; 2606 } 2607 2608 // Convert to an object 2609 effect = { effect: effect }; 2610 2611 // Catch (effect, null, ...) 2612 if ( options == null ) { 2613 options = {}; 2614 } 2615 2616 // Catch (effect, callback) 2617 if ( $.isFunction( options ) ) { 2618 callback = options; 2619 speed = null; 2620 options = {}; 2621 } 2622 2623 // Catch (effect, speed, ?) 2624 if ( typeof options === "number" || $.fx.speeds[ options ] ) { 2625 callback = speed; 2626 speed = options; 2627 options = {}; 2628 } 2629 2630 // Catch (effect, options, callback) 2631 if ( $.isFunction( speed ) ) { 2632 callback = speed; 2633 speed = null; 2634 } 2635 2636 // Add options to effect 2637 if ( options ) { 2638 $.extend( effect, options ); 2639 } 2640 2641 speed = speed || options.duration; 2642 effect.duration = $.fx.off ? 0 : 2643 typeof speed === "number" ? speed : 2644 speed in $.fx.speeds ? $.fx.speeds[ speed ] : 2645 $.fx.speeds._default; 2646 2647 effect.complete = callback || options.complete; 2648 2649 return effect; 2650} 2651 2652function standardAnimationOption( option ) { 2653 2654 // Valid standard speeds (nothing, number, named speed) 2655 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 2656 return true; 2657 } 2658 2659 // Invalid strings - treat as "normal" speed 2660 if ( typeof option === "string" && !$.effects.effect[ option ] ) { 2661 return true; 2662 } 2663 2664 // Complete callback 2665 if ( $.isFunction( option ) ) { 2666 return true; 2667 } 2668 2669 // Options hash (but not naming an effect) 2670 if ( typeof option === "object" && !option.effect ) { 2671 return true; 2672 } 2673 2674 // Didn't match any standard API 2675 return false; 2676} 2677 2678$.fn.extend( { 2679 effect: function( /* effect, options, speed, callback */ ) { 2680 var args = _normalizeArguments.apply( this, arguments ), 2681 effectMethod = $.effects.effect[ args.effect ], 2682 defaultMode = effectMethod.mode, 2683 queue = args.queue, 2684 queueName = queue || "fx", 2685 complete = args.complete, 2686 mode = args.mode, 2687 modes = [], 2688 prefilter = function( next ) { 2689 var el = $( this ), 2690 normalizedMode = $.effects.mode( el, mode ) || defaultMode; 2691 2692 // Sentinel for duck-punching the :animated psuedo-selector 2693 el.data( dataSpaceAnimated, true ); 2694 2695 // Save effect mode for later use, 2696 // we can't just call $.effects.mode again later, 2697 // as the .show() below destroys the initial state 2698 modes.push( normalizedMode ); 2699 2700 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 2701 if ( defaultMode && ( normalizedMode === "show" || 2702 ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { 2703 el.show(); 2704 } 2705 2706 if ( !defaultMode || normalizedMode !== "none" ) { 2707 $.effects.saveStyle( el ); 2708 } 2709 2710 if ( $.isFunction( next ) ) { 2711 next(); 2712 } 2713 }; 2714 2715 if ( $.fx.off || !effectMethod ) { 2716 2717 // Delegate to the original method (e.g., .show()) if possible 2718 if ( mode ) { 2719 return this[ mode ]( args.duration, complete ); 2720 } else { 2721 return this.each( function() { 2722 if ( complete ) { 2723 complete.call( this ); 2724 } 2725 } ); 2726 } 2727 } 2728 2729 function run( next ) { 2730 var elem = $( this ); 2731 2732 function cleanup() { 2733 elem.removeData( dataSpaceAnimated ); 2734 2735 $.effects.cleanUp( elem ); 2736 2737 if ( args.mode === "hide" ) { 2738 elem.hide(); 2739 } 2740 2741 done(); 2742 } 2743 2744 function done() { 2745 if ( $.isFunction( complete ) ) { 2746 complete.call( elem[ 0 ] ); 2747 } 2748 2749 if ( $.isFunction( next ) ) { 2750 next(); 2751 } 2752 } 2753 2754 // Override mode option on a per element basis, 2755 // as toggle can be either show or hide depending on element state 2756 args.mode = modes.shift(); 2757 2758 if ( $.uiBackCompat !== false && !defaultMode ) { 2759 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 2760 2761 // Call the core method to track "olddisplay" properly 2762 elem[ mode ](); 2763 done(); 2764 } else { 2765 effectMethod.call( elem[ 0 ], args, done ); 2766 } 2767 } else { 2768 if ( args.mode === "none" ) { 2769 2770 // Call the core method to track "olddisplay" properly 2771 elem[ mode ](); 2772 done(); 2773 } else { 2774 effectMethod.call( elem[ 0 ], args, cleanup ); 2775 } 2776 } 2777 } 2778 2779 // Run prefilter on all elements first to ensure that 2780 // any showing or hiding happens before placeholder creation, 2781 // which ensures that any layout changes are correctly captured. 2782 return queue === false ? 2783 this.each( prefilter ).each( run ) : 2784 this.queue( queueName, prefilter ).queue( queueName, run ); 2785 }, 2786 2787 show: ( function( orig ) { 2788 return function( option ) { 2789 if ( standardAnimationOption( option ) ) { 2790 return orig.apply( this, arguments ); 2791 } else { 2792 var args = _normalizeArguments.apply( this, arguments ); 2793 args.mode = "show"; 2794 return this.effect.call( this, args ); 2795 } 2796 }; 2797 } )( $.fn.show ), 2798 2799 hide: ( function( orig ) { 2800 return function( option ) { 2801 if ( standardAnimationOption( option ) ) { 2802 return orig.apply( this, arguments ); 2803 } else { 2804 var args = _normalizeArguments.apply( this, arguments ); 2805 args.mode = "hide"; 2806 return this.effect.call( this, args ); 2807 } 2808 }; 2809 } )( $.fn.hide ), 2810 2811 toggle: ( function( orig ) { 2812 return function( option ) { 2813 if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 2814 return orig.apply( this, arguments ); 2815 } else { 2816 var args = _normalizeArguments.apply( this, arguments ); 2817 args.mode = "toggle"; 2818 return this.effect.call( this, args ); 2819 } 2820 }; 2821 } )( $.fn.toggle ), 2822 2823 cssUnit: function( key ) { 2824 var style = this.css( key ), 2825 val = []; 2826 2827 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 2828 if ( style.indexOf( unit ) > 0 ) { 2829 val = [ parseFloat( style ), unit ]; 2830 } 2831 } ); 2832 return val; 2833 }, 2834 2835 cssClip: function( clipObj ) { 2836 if ( clipObj ) { 2837 return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + 2838 clipObj.bottom + "px " + clipObj.left + "px)" ); 2839 } 2840 return parseClip( this.css( "clip" ), this ); 2841 }, 2842 2843 transfer: function( options, done ) { 2844 var element = $( this ), 2845 target = $( options.to ), 2846 targetFixed = target.css( "position" ) === "fixed", 2847 body = $( "body" ), 2848 fixTop = targetFixed ? body.scrollTop() : 0, 2849 fixLeft = targetFixed ? body.scrollLeft() : 0, 2850 endPosition = target.offset(), 2851 animation = { 2852 top: endPosition.top - fixTop, 2853 left: endPosition.left - fixLeft, 2854 height: target.innerHeight(), 2855 width: target.innerWidth() 2856 }, 2857 startPosition = element.offset(), 2858 transfer = $( "<div class='ui-effects-transfer'></div>" ) 2859 .appendTo( "body" ) 2860 .addClass( options.className ) 2861 .css( { 2862 top: startPosition.top - fixTop, 2863 left: startPosition.left - fixLeft, 2864 height: element.innerHeight(), 2865 width: element.innerWidth(), 2866 position: targetFixed ? "fixed" : "absolute" 2867 } ) 2868 .animate( animation, options.duration, options.easing, function() { 2869 transfer.remove(); 2870 if ( $.isFunction( done ) ) { 2871 done(); 2872 } 2873 } ); 2874 } 2875} ); 2876 2877function parseClip( str, element ) { 2878 var outerWidth = element.outerWidth(), 2879 outerHeight = element.outerHeight(), 2880 clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, 2881 values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; 2882 2883 return { 2884 top: parseFloat( values[ 1 ] ) || 0, 2885 right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), 2886 bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), 2887 left: parseFloat( values[ 4 ] ) || 0 2888 }; 2889} 2890 2891$.fx.step.clip = function( fx ) { 2892 if ( !fx.clipInit ) { 2893 fx.start = $( fx.elem ).cssClip(); 2894 if ( typeof fx.end === "string" ) { 2895 fx.end = parseClip( fx.end, fx.elem ); 2896 } 2897 fx.clipInit = true; 2898 } 2899 2900 $( fx.elem ).cssClip( { 2901 top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, 2902 right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, 2903 bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, 2904 left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left 2905 } ); 2906}; 2907 2908} )(); 2909 2910/******************************************************************************/ 2911/*********************************** EASING ***********************************/ 2912/******************************************************************************/ 2913 2914( function() { 2915 2916// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) 2917 2918var baseEasings = {}; 2919 2920$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 2921 baseEasings[ name ] = function( p ) { 2922 return Math.pow( p, i + 2 ); 2923 }; 2924} ); 2925 2926$.extend( baseEasings, { 2927 Sine: function( p ) { 2928 return 1 - Math.cos( p * Math.PI / 2 ); 2929 }, 2930 Circ: function( p ) { 2931 return 1 - Math.sqrt( 1 - p * p ); 2932 }, 2933 Elastic: function( p ) { 2934 return p === 0 || p === 1 ? p : 2935 -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); 2936 }, 2937 Back: function( p ) { 2938 return p * p * ( 3 * p - 2 ); 2939 }, 2940 Bounce: function( p ) { 2941 var pow2, 2942 bounce = 4; 2943 2944 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 2945 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 2946 } 2947} ); 2948 2949$.each( baseEasings, function( name, easeIn ) { 2950 $.easing[ "easeIn" + name ] = easeIn; 2951 $.easing[ "easeOut" + name ] = function( p ) { 2952 return 1 - easeIn( 1 - p ); 2953 }; 2954 $.easing[ "easeInOut" + name ] = function( p ) { 2955 return p < 0.5 ? 2956 easeIn( p * 2 ) / 2 : 2957 1 - easeIn( p * -2 + 2 ) / 2; 2958 }; 2959} ); 2960 2961} )(); 2962 2963var effect = $.effects; 2964 2965 2966/*! 2967 * jQuery UI Effects Blind 1.12.1 2968 * http://jqueryui.com 2969 * 2970 * Copyright jQuery Foundation and other contributors 2971 * Released under the MIT license. 2972 * http://jquery.org/license 2973 */ 2974 2975//>>label: Blind Effect 2976//>>group: Effects 2977//>>description: Blinds the element. 2978//>>docs: http://api.jqueryui.com/blind-effect/ 2979//>>demos: http://jqueryui.com/effect/ 2980 2981 2982 2983var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { 2984 var map = { 2985 up: [ "bottom", "top" ], 2986 vertical: [ "bottom", "top" ], 2987 down: [ "top", "bottom" ], 2988 left: [ "right", "left" ], 2989 horizontal: [ "right", "left" ], 2990 right: [ "left", "right" ] 2991 }, 2992 element = $( this ), 2993 direction = options.direction || "up", 2994 start = element.cssClip(), 2995 animate = { clip: $.extend( {}, start ) }, 2996 placeholder = $.effects.createPlaceholder( element ); 2997 2998 animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; 2999 3000 if ( options.mode === "show" ) { 3001 element.cssClip( animate.clip ); 3002 if ( placeholder ) { 3003 placeholder.css( $.effects.clipToBox( animate ) ); 3004 } 3005 3006 animate.clip = start; 3007 } 3008 3009 if ( placeholder ) { 3010 placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); 3011 } 3012 3013 element.animate( animate, { 3014 queue: false, 3015 duration: options.duration, 3016 easing: options.easing, 3017 complete: done 3018 } ); 3019} ); 3020 3021 3022/*! 3023 * jQuery UI Effects Bounce 1.12.1 3024 * http://jqueryui.com
vendor: 10,588 bytes, lines 3025-3431
3025 * 3026 * Copyright jQuery Foundation and other contributors 3027 * Released under the MIT license. 3028 * http://jquery.org/license 3029 */ 3030 3031//>>label: Bounce Effect 3032//>>group: Effects 3033//>>description: Bounces an element horizontally or vertically n times. 3034//>>docs: http://api.jqueryui.com/bounce-effect/ 3035//>>demos: http://jqueryui.com/effect/ 3036 3037 3038 3039var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { 3040 var upAnim, downAnim, refValue, 3041 element = $( this ), 3042 3043 // Defaults: 3044 mode = options.mode, 3045 hide = mode === "hide", 3046 show = mode === "show", 3047 direction = options.direction || "up", 3048 distance = options.distance, 3049 times = options.times || 5, 3050 3051 // Number of internal animations 3052 anims = times * 2 + ( show || hide ? 1 : 0 ), 3053 speed = options.duration / anims, 3054 easing = options.easing, 3055 3056 // Utility: 3057 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3058 motion = ( direction === "up" || direction === "left" ), 3059 i = 0, 3060 3061 queuelen = element.queue().length; 3062 3063 $.effects.createPlaceholder( element ); 3064 3065 refValue = element.css( ref ); 3066 3067 // Default distance for the BIGGEST bounce is the outer Distance / 3 3068 if ( !distance ) { 3069 distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; 3070 } 3071 3072 if ( show ) { 3073 downAnim = { opacity: 1 }; 3074 downAnim[ ref ] = refValue; 3075 3076 // If we are showing, force opacity 0 and set the initial position 3077 // then do the "first" animation 3078 element 3079 .css( "opacity", 0 ) 3080 .css( ref, motion ? -distance * 2 : distance * 2 ) 3081 .animate( downAnim, speed, easing ); 3082 } 3083 3084 // Start at the smallest distance if we are hiding 3085 if ( hide ) { 3086 distance = distance / Math.pow( 2, times - 1 ); 3087 } 3088 3089 downAnim = {}; 3090 downAnim[ ref ] = refValue; 3091 3092 // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here 3093 for ( ; i < times; i++ ) { 3094 upAnim = {}; 3095 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 3096 3097 element 3098 .animate( upAnim, speed, easing ) 3099 .animate( downAnim, speed, easing ); 3100 3101 distance = hide ? distance * 2 : distance / 2; 3102 } 3103 3104 // Last Bounce when Hiding 3105 if ( hide ) { 3106 upAnim = { opacity: 0 }; 3107 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 3108 3109 element.animate( upAnim, speed, easing ); 3110 } 3111 3112 element.queue( done ); 3113 3114 $.effects.unshift( element, queuelen, anims + 1 ); 3115} ); 3116 3117 3118/*! 3119 * jQuery UI Effects Clip 1.12.1 3120 * http://jqueryui.com 3121 * 3122 * Copyright jQuery Foundation and other contributors 3123 * Released under the MIT license. 3124 * http://jquery.org/license 3125 */ 3126 3127//>>label: Clip Effect 3128//>>group: Effects 3129//>>description: Clips the element on and off like an old TV. 3130//>>docs: http://api.jqueryui.com/clip-effect/ 3131//>>demos: http://jqueryui.com/effect/ 3132 3133 3134 3135var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { 3136 var start, 3137 animate = {}, 3138 element = $( this ), 3139 direction = options.direction || "vertical", 3140 both = direction === "both", 3141 horizontal = both || direction === "horizontal", 3142 vertical = both || direction === "vertical"; 3143 3144 start = element.cssClip(); 3145 animate.clip = { 3146 top: vertical ? ( start.bottom - start.top ) / 2 : start.top, 3147 right: horizontal ? ( start.right - start.left ) / 2 : start.right, 3148 bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, 3149 left: horizontal ? ( start.right - start.left ) / 2 : start.left 3150 }; 3151 3152 $.effects.createPlaceholder( element ); 3153 3154 if ( options.mode === "show" ) { 3155 element.cssClip( animate.clip ); 3156 animate.clip = start; 3157 } 3158 3159 element.animate( animate, { 3160 queue: false, 3161 duration: options.duration, 3162 easing: options.easing, 3163 complete: done 3164 } ); 3165 3166} ); 3167 3168 3169/*! 3170 * jQuery UI Effects Drop 1.12.1 3171 * http://jqueryui.com 3172 * 3173 * Copyright jQuery Foundation and other contributors 3174 * Released under the MIT license. 3175 * http://jquery.org/license 3176 */ 3177 3178//>>label: Drop Effect 3179//>>group: Effects 3180//>>description: Moves an element in one direction and hides it at the same time. 3181//>>docs: http://api.jqueryui.com/drop-effect/ 3182//>>demos: http://jqueryui.com/effect/ 3183 3184 3185 3186var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { 3187 3188 var distance, 3189 element = $( this ), 3190 mode = options.mode, 3191 show = mode === "show", 3192 direction = options.direction || "left", 3193 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3194 motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", 3195 oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", 3196 animation = { 3197 opacity: 0 3198 }; 3199 3200 $.effects.createPlaceholder( element ); 3201 3202 distance = options.distance || 3203 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; 3204 3205 animation[ ref ] = motion + distance; 3206 3207 if ( show ) { 3208 element.css( animation ); 3209 3210 animation[ ref ] = oppositeMotion + distance; 3211 animation.opacity = 1; 3212 } 3213 3214 // Animate 3215 element.animate( animation, { 3216 queue: false, 3217 duration: options.duration, 3218 easing: options.easing, 3219 complete: done 3220 } ); 3221} ); 3222 3223 3224/*! 3225 * jQuery UI Effects Explode 1.12.1 3226 * http://jqueryui.com 3227 * 3228 * Copyright jQuery Foundation and other contributors 3229 * Released under the MIT license. 3230 * http://jquery.org/license 3231 */ 3232 3233//>>label: Explode Effect 3234//>>group: Effects 3235// jscs:disable maximumLineLength 3236//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. 3237// jscs:enable maximumLineLength 3238//>>docs: http://api.jqueryui.com/explode-effect/ 3239//>>demos: http://jqueryui.com/effect/ 3240 3241 3242 3243var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { 3244 3245 var i, j, left, top, mx, my, 3246 rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, 3247 cells = rows, 3248 element = $( this ), 3249 mode = options.mode, 3250 show = mode === "show", 3251 3252 // Show and then visibility:hidden the element before calculating offset 3253 offset = element.show().css( "visibility", "hidden" ).offset(), 3254 3255 // Width and height of a piece 3256 width = Math.ceil( element.outerWidth() / cells ), 3257 height = Math.ceil( element.outerHeight() / rows ), 3258 pieces = []; 3259 3260 // Children animate complete: 3261 function childComplete() { 3262 pieces.push( this ); 3263 if ( pieces.length === rows * cells ) { 3264 animComplete(); 3265 } 3266 } 3267 3268 // Clone the element for each row and cell. 3269 for ( i = 0; i < rows; i++ ) { // ===> 3270 top = offset.top + i * height; 3271 my = i - ( rows - 1 ) / 2; 3272 3273 for ( j = 0; j < cells; j++ ) { // ||| 3274 left = offset.left + j * width; 3275 mx = j - ( cells - 1 ) / 2; 3276 3277 // Create a clone of the now hidden main element that will be absolute positioned 3278 // within a wrapper div off the -left and -top equal to size of our pieces 3279 element 3280 .clone() 3281 .appendTo( "body" ) 3282 .wrap( "<div></div>" ) 3283 .css( { 3284 position: "absolute", 3285 visibility: "visible", 3286 left: -j * width, 3287 top: -i * height 3288 } ) 3289 3290 // Select the wrapper - make it overflow: hidden and absolute positioned based on 3291 // where the original was located +left and +top equal to the size of pieces 3292 .parent() 3293 .addClass( "ui-effects-explode" ) 3294 .css( { 3295 position: "absolute", 3296 overflow: "hidden", 3297 width: width, 3298 height: height, 3299 left: left + ( show ? mx * width : 0 ), 3300 top: top + ( show ? my * height : 0 ), 3301 opacity: show ? 0 : 1 3302 } ) 3303 .animate( { 3304 left: left + ( show ? 0 : mx * width ), 3305 top: top + ( show ? 0 : my * height ), 3306 opacity: show ? 1 : 0 3307 }, options.duration || 500, options.easing, childComplete ); 3308 } 3309 } 3310 3311 function animComplete() { 3312 element.css( { 3313 visibility: "visible" 3314 } ); 3315 $( pieces ).remove(); 3316 done(); 3317 } 3318} ); 3319 3320 3321/*! 3322 * jQuery UI Effects Fade 1.12.1 3323 * http://jqueryui.com 3324 * 3325 * Copyright jQuery Foundation and other contributors 3326 * Released under the MIT license. 3327 * http://jquery.org/license 3328 */ 3329 3330//>>label: Fade Effect 3331//>>group: Effects 3332//>>description: Fades the element. 3333//>>docs: http://api.jqueryui.com/fade-effect/ 3334//>>demos: http://jqueryui.com/effect/ 3335 3336 3337 3338var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { 3339 var show = options.mode === "show"; 3340 3341 $( this ) 3342 .css( "opacity", show ? 0 : 1 ) 3343 .animate( { 3344 opacity: show ? 1 : 0 3345 }, { 3346 queue: false, 3347 duration: options.duration, 3348 easing: options.easing, 3349 complete: done 3350 } ); 3351} ); 3352 3353 3354/*! 3355 * jQuery UI Effects Fold 1.12.1 3356 * http://jqueryui.com 3357 * 3358 * Copyright jQuery Foundation and other contributors 3359 * Released under the MIT license. 3360 * http://jquery.org/license 3361 */ 3362 3363//>>label: Fold Effect 3364//>>group: Effects 3365//>>description: Folds an element first horizontally and then vertically. 3366//>>docs: http://api.jqueryui.com/fold-effect/ 3367//>>demos: http://jqueryui.com/effect/ 3368 3369 3370 3371var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { 3372 3373 // Create element 3374 var element = $( this ), 3375 mode = options.mode, 3376 show = mode === "show", 3377 hide = mode === "hide", 3378 size = options.size || 15, 3379 percent = /([0-9]+)%/.exec( size ), 3380 horizFirst = !!options.horizFirst, 3381 ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], 3382 duration = options.duration / 2, 3383 3384 placeholder = $.effects.createPlaceholder( element ), 3385 3386 start = element.cssClip(), 3387 animation1 = { clip: $.extend( {}, start ) }, 3388 animation2 = { clip: $.extend( {}, start ) }, 3389 3390 distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], 3391 3392 queuelen = element.queue().length; 3393 3394 if ( percent ) { 3395 size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; 3396 } 3397 animation1.clip[ ref[ 0 ] ] = size; 3398 animation2.clip[ ref[ 0 ] ] = size; 3399 animation2.clip[ ref[ 1 ] ] = 0; 3400 3401 if ( show ) { 3402 element.cssClip( animation2.clip ); 3403 if ( placeholder ) { 3404 placeholder.css( $.effects.clipToBox( animation2 ) ); 3405 } 3406 3407 animation2.clip = start; 3408 } 3409 3410 // Animate 3411 element 3412 .queue( function( next ) { 3413 if ( placeholder ) { 3414 placeholder 3415 .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) 3416 .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); 3417 } 3418 3419 next(); 3420 } ) 3421 .animate( animation1, duration, options.easing ) 3422 .animate( animation2, duration, options.easing ) 3423 .queue( done ); 3424 3425 $.effects.unshift( element, queuelen, 4 ); 3426} ); 3427 3428 3429/*! 3430 * jQuery UI Effects Highlight 1.12.1 3431 * http://jqueryui.com
vendor: 6,249 bytes, lines 3432-3651
3432 * 3433 * Copyright jQuery Foundation and other contributors 3434 * Released under the MIT license. 3435 * http://jquery.org/license 3436 */ 3437 3438//>>label: Highlight Effect 3439//>>group: Effects 3440//>>description: Highlights the background of an element in a defined color for a custom duration. 3441//>>docs: http://api.jqueryui.com/highlight-effect/ 3442//>>demos: http://jqueryui.com/effect/ 3443 3444 3445 3446var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { 3447 var element = $( this ), 3448 animation = { 3449 backgroundColor: element.css( "backgroundColor" ) 3450 }; 3451 3452 if ( options.mode === "hide" ) { 3453 animation.opacity = 0; 3454 } 3455 3456 $.effects.saveStyle( element ); 3457 3458 element 3459 .css( { 3460 backgroundImage: "none", 3461 backgroundColor: options.color || "#ffff99" 3462 } ) 3463 .animate( animation, { 3464 queue: false, 3465 duration: options.duration, 3466 easing: options.easing, 3467 complete: done 3468 } ); 3469} ); 3470 3471 3472/*! 3473 * jQuery UI Effects Size 1.12.1 3474 * http://jqueryui.com 3475 * 3476 * Copyright jQuery Foundation and other contributors 3477 * Released under the MIT license. 3478 * http://jquery.org/license 3479 */ 3480 3481//>>label: Size Effect 3482//>>group: Effects 3483//>>description: Resize an element to a specified width and height. 3484//>>docs: http://api.jqueryui.com/size-effect/ 3485//>>demos: http://jqueryui.com/effect/ 3486 3487 3488 3489var effectsEffectSize = $.effects.define( "size", function( options, done ) { 3490 3491 // Create element 3492 var baseline, factor, temp, 3493 element = $( this ), 3494 3495 // Copy for children 3496 cProps = [ "fontSize" ], 3497 vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], 3498 hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], 3499 3500 // Set options 3501 mode = options.mode, 3502 restore = mode !== "effect", 3503 scale = options.scale || "both", 3504 origin = options.origin || [ "middle", "center" ], 3505 position = element.css( "position" ), 3506 pos = element.position(), 3507 original = $.effects.scaledDimensions( element ), 3508 from = options.from || original, 3509 to = options.to || $.effects.scaledDimensions( element, 0 ); 3510 3511 $.effects.createPlaceholder( element ); 3512 3513 if ( mode === "show" ) { 3514 temp = from; 3515 from = to; 3516 to = temp; 3517 } 3518 3519 // Set scaling factor 3520 factor = { 3521 from: { 3522 y: from.height / original.height, 3523 x: from.width / original.width 3524 }, 3525 to: { 3526 y: to.height / original.height, 3527 x: to.width / original.width 3528 } 3529 }; 3530 3531 // Scale the css box 3532 if ( scale === "box" || scale === "both" ) { 3533 3534 // Vertical props scaling 3535 if ( factor.from.y !== factor.to.y ) { 3536 from = $.effects.setTransition( element, vProps, factor.from.y, from ); 3537 to = $.effects.setTransition( element, vProps, factor.to.y, to ); 3538 } 3539 3540 // Horizontal props scaling 3541 if ( factor.from.x !== factor.to.x ) { 3542 from = $.effects.setTransition( element, hProps, factor.from.x, from ); 3543 to = $.effects.setTransition( element, hProps, factor.to.x, to ); 3544 } 3545 } 3546 3547 // Scale the content 3548 if ( scale === "content" || scale === "both" ) { 3549 3550 // Vertical props scaling 3551 if ( factor.from.y !== factor.to.y ) { 3552 from = $.effects.setTransition( element, cProps, factor.from.y, from ); 3553 to = $.effects.setTransition( element, cProps, factor.to.y, to ); 3554 } 3555 } 3556 3557 // Adjust the position properties based on the provided origin points 3558 if ( origin ) { 3559 baseline = $.effects.getBaseline( origin, original ); 3560 from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; 3561 from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; 3562 to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; 3563 to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; 3564 } 3565 element.css( from ); 3566 3567 // Animate the children if desired 3568 if ( scale === "content" || scale === "both" ) { 3569 3570 vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); 3571 hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); 3572 3573 // Only animate children with width attributes specified 3574 // TODO: is this right? should we include anything with css width specified as well 3575 element.find( "*[width]" ).each( function() { 3576 var child = $( this ), 3577 childOriginal = $.effects.scaledDimensions( child ), 3578 childFrom = { 3579 height: childOriginal.height * factor.from.y, 3580 width: childOriginal.width * factor.from.x, 3581 outerHeight: childOriginal.outerHeight * factor.from.y, 3582 outerWidth: childOriginal.outerWidth * factor.from.x 3583 }, 3584 childTo = { 3585 height: childOriginal.height * factor.to.y, 3586 width: childOriginal.width * factor.to.x, 3587 outerHeight: childOriginal.height * factor.to.y, 3588 outerWidth: childOriginal.width * factor.to.x 3589 }; 3590 3591 // Vertical props scaling 3592 if ( factor.from.y !== factor.to.y ) { 3593 childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); 3594 childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); 3595 } 3596 3597 // Horizontal props scaling 3598 if ( factor.from.x !== factor.to.x ) { 3599 childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); 3600 childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); 3601 } 3602 3603 if ( restore ) { 3604 $.effects.saveStyle( child ); 3605 } 3606 3607 // Animate children 3608 child.css( childFrom ); 3609 child.animate( childTo, options.duration, options.easing, function() { 3610 3611 // Restore children 3612 if ( restore ) { 3613 $.effects.restoreStyle( child ); 3614 } 3615 } ); 3616 } ); 3617 } 3618 3619 // Animate 3620 element.animate( to, { 3621 queue: false, 3622 duration: options.duration, 3623 easing: options.easing, 3624 complete: function() { 3625 3626 var offset = element.offset(); 3627 3628 if ( to.opacity === 0 ) { 3629 element.css( "opacity", from.opacity ); 3630 } 3631 3632 if ( !restore ) { 3633 element 3634 .css( "position", position === "static" ? "relative" : position ) 3635 .offset( offset ); 3636 3637 // Need to save style here so that automatic style restoration 3638 // doesn't restore to the original styles from before the animation. 3639 $.effects.saveStyle( element ); 3640 } 3641 3642 done(); 3643 } 3644 } ); 3645 3646} ); 3647 3648 3649/*! 3650 * jQuery UI Effects Scale 1.12.1 3651 * http://jqueryui.com
vendor: 4,797 bytes, lines 3652-3829
3652 * 3653 * Copyright jQuery Foundation and other contributors 3654 * Released under the MIT license. 3655 * http://jquery.org/license 3656 */ 3657 3658//>>label: Scale Effect 3659//>>group: Effects 3660//>>description: Grows or shrinks an element and its content. 3661//>>docs: http://api.jqueryui.com/scale-effect/ 3662//>>demos: http://jqueryui.com/effect/ 3663 3664 3665 3666var effectsEffectScale = $.effects.define( "scale", function( options, done ) { 3667 3668 // Create element 3669 var el = $( this ), 3670 mode = options.mode, 3671 percent = parseInt( options.percent, 10 ) || 3672 ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), 3673 3674 newOptions = $.extend( true, { 3675 from: $.effects.scaledDimensions( el ), 3676 to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), 3677 origin: options.origin || [ "middle", "center" ] 3678 }, options ); 3679 3680 // Fade option to support puff 3681 if ( options.fade ) { 3682 newOptions.from.opacity = 1; 3683 newOptions.to.opacity = 0; 3684 } 3685 3686 $.effects.effect.size.call( this, newOptions, done ); 3687} ); 3688 3689 3690/*! 3691 * jQuery UI Effects Puff 1.12.1 3692 * http://jqueryui.com 3693 * 3694 * Copyright jQuery Foundation and other contributors 3695 * Released under the MIT license. 3696 * http://jquery.org/license 3697 */ 3698 3699//>>label: Puff Effect 3700//>>group: Effects 3701//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. 3702//>>docs: http://api.jqueryui.com/puff-effect/ 3703//>>demos: http://jqueryui.com/effect/ 3704 3705 3706 3707var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { 3708 var newOptions = $.extend( true, {}, options, { 3709 fade: true, 3710 percent: parseInt( options.percent, 10 ) || 150 3711 } ); 3712 3713 $.effects.effect.scale.call( this, newOptions, done ); 3714} ); 3715 3716 3717/*! 3718 * jQuery UI Effects Pulsate 1.12.1 3719 * http://jqueryui.com 3720 * 3721 * Copyright jQuery Foundation and other contributors 3722 * Released under the MIT license. 3723 * http://jquery.org/license 3724 */ 3725 3726//>>label: Pulsate Effect 3727//>>group: Effects 3728//>>description: Pulsates an element n times by changing the opacity to zero and back. 3729//>>docs: http://api.jqueryui.com/pulsate-effect/ 3730//>>demos: http://jqueryui.com/effect/ 3731 3732 3733 3734var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { 3735 var element = $( this ), 3736 mode = options.mode, 3737 show = mode === "show", 3738 hide = mode === "hide", 3739 showhide = show || hide, 3740 3741 // Showing or hiding leaves off the "last" animation 3742 anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), 3743 duration = options.duration / anims, 3744 animateTo = 0, 3745 i = 1, 3746 queuelen = element.queue().length; 3747 3748 if ( show || !element.is( ":visible" ) ) { 3749 element.css( "opacity", 0 ).show(); 3750 animateTo = 1; 3751 } 3752 3753 // Anims - 1 opacity "toggles" 3754 for ( ; i < anims; i++ ) { 3755 element.animate( { opacity: animateTo }, duration, options.easing ); 3756 animateTo = 1 - animateTo; 3757 } 3758 3759 element.animate( { opacity: animateTo }, duration, options.easing ); 3760 3761 element.queue( done ); 3762 3763 $.effects.unshift( element, queuelen, anims + 1 ); 3764} ); 3765 3766 3767/*! 3768 * jQuery UI Effects Shake 1.12.1 3769 * http://jqueryui.com 3770 * 3771 * Copyright jQuery Foundation and other contributors 3772 * Released under the MIT license. 3773 * http://jquery.org/license 3774 */ 3775 3776//>>label: Shake Effect 3777//>>group: Effects 3778//>>description: Shakes an element horizontally or vertically n times. 3779//>>docs: http://api.jqueryui.com/shake-effect/ 3780//>>demos: http://jqueryui.com/effect/ 3781 3782 3783 3784var effectsEffectShake = $.effects.define( "shake", function( options, done ) { 3785 3786 var i = 1, 3787 element = $( this ), 3788 direction = options.direction || "left", 3789 distance = options.distance || 20, 3790 times = options.times || 3, 3791 anims = times * 2 + 1, 3792 speed = Math.round( options.duration / anims ), 3793 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3794 positiveMotion = ( direction === "up" || direction === "left" ), 3795 animation = {}, 3796 animation1 = {}, 3797 animation2 = {}, 3798 3799 queuelen = element.queue().length; 3800 3801 $.effects.createPlaceholder( element ); 3802 3803 // Animation 3804 animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; 3805 animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; 3806 animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; 3807 3808 // Animate 3809 element.animate( animation, speed, options.easing ); 3810 3811 // Shakes 3812 for ( ; i < times; i++ ) { 3813 element 3814 .animate( animation1, speed, options.easing ) 3815 .animate( animation2, speed, options.easing ); 3816 } 3817 3818 element 3819 .animate( animation1, speed, options.easing ) 3820 .animate( animation, speed / 2, options.easing ) 3821 .queue( done ); 3822 3823 $.effects.unshift( element, queuelen, anims + 1 ); 3824} ); 3825 3826 3827/*! 3828 * jQuery UI Effects Slide 1.12.1 3829 * http://jqueryui.com
vendor: 4,781 bytes, lines 3830-4001
3830 * 3831 * Copyright jQuery Foundation and other contributors 3832 * Released under the MIT license. 3833 * http://jquery.org/license 3834 */ 3835 3836//>>label: Slide Effect 3837//>>group: Effects 3838//>>description: Slides an element in and out of the viewport. 3839//>>docs: http://api.jqueryui.com/slide-effect/ 3840//>>demos: http://jqueryui.com/effect/ 3841 3842 3843 3844var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { 3845 var startClip, startRef, 3846 element = $( this ), 3847 map = { 3848 up: [ "bottom", "top" ], 3849 down: [ "top", "bottom" ], 3850 left: [ "right", "left" ], 3851 right: [ "left", "right" ] 3852 }, 3853 mode = options.mode, 3854 direction = options.direction || "left", 3855 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3856 positiveMotion = ( direction === "up" || direction === "left" ), 3857 distance = options.distance || 3858 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), 3859 animation = {}; 3860 3861 $.effects.createPlaceholder( element ); 3862 3863 startClip = element.cssClip(); 3864 startRef = element.position()[ ref ]; 3865 3866 // Define hide animation 3867 animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; 3868 animation.clip = element.cssClip(); 3869 animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; 3870 3871 // Reverse the animation if we're showing 3872 if ( mode === "show" ) { 3873 element.cssClip( animation.clip ); 3874 element.css( ref, animation[ ref ] ); 3875 animation.clip = startClip; 3876 animation[ ref ] = startRef; 3877 } 3878 3879 // Actually animate 3880 element.animate( animation, { 3881 queue: false, 3882 duration: options.duration, 3883 easing: options.easing, 3884 complete: done 3885 } ); 3886} ); 3887 3888 3889/*! 3890 * jQuery UI Effects Transfer 1.12.1 3891 * http://jqueryui.com 3892 * 3893 * Copyright jQuery Foundation and other contributors 3894 * Released under the MIT license. 3895 * http://jquery.org/license 3896 */ 3897 3898//>>label: Transfer Effect 3899//>>group: Effects 3900//>>description: Displays a transfer effect from one element to another. 3901//>>docs: http://api.jqueryui.com/transfer-effect/ 3902//>>demos: http://jqueryui.com/effect/ 3903 3904 3905 3906var effect; 3907if ( $.uiBackCompat !== false ) { 3908 effect = $.effects.define( "transfer", function( options, done ) { 3909 $( this ).transfer( options, done ); 3910 } ); 3911} 3912var effectsEffectTransfer = effect; 3913 3914 3915/*! 3916 * jQuery UI Focusable 1.12.1 3917 * http://jqueryui.com 3918 * 3919 * Copyright jQuery Foundation and other contributors 3920 * Released under the MIT license. 3921 * http://jquery.org/license 3922 */ 3923 3924//>>label: :focusable Selector 3925//>>group: Core 3926//>>description: Selects elements which can be focused. 3927//>>docs: http://api.jqueryui.com/focusable-selector/ 3928 3929 3930 3931// Selectors 3932$.ui.focusable = function( element, hasTabindex ) { 3933 var map, mapName, img, focusableIfVisible, fieldset, 3934 nodeName = element.nodeName.toLowerCase(); 3935 3936 if ( "area" === nodeName ) { 3937 map = element.parentNode; 3938 mapName = map.name; 3939 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 3940 return false; 3941 } 3942 img = $( "img[usemap='#" + mapName + "']" ); 3943 return img.length > 0 && img.is( ":visible" ); 3944 } 3945 3946 if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { 3947 focusableIfVisible = !element.disabled; 3948 3949 if ( focusableIfVisible ) { 3950 3951 // Form controls within a disabled fieldset are disabled. 3952 // However, controls within the fieldset's legend do not get disabled. 3953 // Since controls generally aren't placed inside legends, we skip 3954 // this portion of the check. 3955 fieldset = $( element ).closest( "fieldset" )[ 0 ]; 3956 if ( fieldset ) { 3957 focusableIfVisible = !fieldset.disabled; 3958 } 3959 } 3960 } else if ( "a" === nodeName ) { 3961 focusableIfVisible = element.href || hasTabindex; 3962 } else { 3963 focusableIfVisible = hasTabindex; 3964 } 3965 3966 return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); 3967}; 3968 3969// Support: IE 8 only 3970// IE 8 doesn't resolve inherit to visible/hidden for computed values 3971function visible( element ) { 3972 var visibility = element.css( "visibility" ); 3973 while ( visibility === "inherit" ) { 3974 element = element.parent(); 3975 visibility = element.css( "visibility" ); 3976 } 3977 return visibility !== "hidden"; 3978} 3979 3980$.extend( $.expr[ ":" ], { 3981 focusable: function( element ) { 3982 return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); 3983 } 3984} ); 3985 3986var focusable = $.ui.focusable; 3987 3988 3989 3990 3991// Support: IE8 Only 3992// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop 3993// with a string, so we need to find the proper form. 3994var form = $.fn.form = function() { 3995 return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); 3996}; 3997 3998 3999/*! 4000 * jQuery UI Form Reset Mixin 1.12.1 4001 * http://jqueryui.com
vendor: 4,779 bytes, lines 4002-4189
4002 * 4003 * Copyright jQuery Foundation and other contributors 4004 * Released under the MIT license. 4005 * http://jquery.org/license 4006 */ 4007 4008//>>label: Form Reset Mixin 4009//>>group: Core 4010//>>description: Refresh input widgets when their form is reset 4011//>>docs: http://api.jqueryui.com/form-reset-mixin/ 4012 4013 4014 4015var formResetMixin = $.ui.formResetMixin = { 4016 _formResetHandler: function() { 4017 var form = $( this ); 4018 4019 // Wait for the form reset to actually happen before refreshing 4020 setTimeout( function() { 4021 var instances = form.data( "ui-form-reset-instances" ); 4022 $.each( instances, function() { 4023 this.refresh(); 4024 } ); 4025 } ); 4026 }, 4027 4028 _bindFormResetHandler: function() { 4029 this.form = this.element.form(); 4030 if ( !this.form.length ) { 4031 return; 4032 } 4033 4034 var instances = this.form.data( "ui-form-reset-instances" ) || []; 4035 if ( !instances.length ) { 4036 4037 // We don't use _on() here because we use a single event handler per form 4038 this.form.on( "reset.ui-form-reset", this._formResetHandler ); 4039 } 4040 instances.push( this ); 4041 this.form.data( "ui-form-reset-instances", instances ); 4042 }, 4043 4044 _unbindFormResetHandler: function() { 4045 if ( !this.form.length ) { 4046 return; 4047 } 4048 4049 var instances = this.form.data( "ui-form-reset-instances" ); 4050 instances.splice( $.inArray( this, instances ), 1 ); 4051 if ( instances.length ) { 4052 this.form.data( "ui-form-reset-instances", instances ); 4053 } else { 4054 this.form 4055 .removeData( "ui-form-reset-instances" ) 4056 .off( "reset.ui-form-reset" ); 4057 } 4058 } 4059}; 4060 4061 4062/*! 4063 * jQuery UI Support for jQuery core 1.7.x 1.12.1 4064 * http://jqueryui.com 4065 * 4066 * Copyright jQuery Foundation and other contributors 4067 * Released under the MIT license. 4068 * http://jquery.org/license 4069 * 4070 */ 4071 4072//>>label: jQuery 1.7 Support 4073//>>group: Core 4074//>>description: Support version 1.7.x of jQuery core 4075 4076 4077 4078// Support: jQuery 1.7 only 4079// Not a great way to check versions, but since we only support 1.7+ and only 4080// need to detect <1.8, this is a simple check that should suffice. Checking 4081// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 4082// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting 4083// 1.7 anymore). See #11197 for why we're not using feature detection. 4084if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { 4085 4086 // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() 4087 // Unlike jQuery Core 1.8+, these only support numeric values to set the 4088 // dimensions in pixels 4089 $.each( [ "Width", "Height" ], function( i, name ) { 4090 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 4091 type = name.toLowerCase(), 4092 orig = { 4093 innerWidth: $.fn.innerWidth, 4094 innerHeight: $.fn.innerHeight, 4095 outerWidth: $.fn.outerWidth, 4096 outerHeight: $.fn.outerHeight 4097 }; 4098 4099 function reduce( elem, size, border, margin ) { 4100 $.each( side, function() { 4101 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 4102 if ( border ) { 4103 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 4104 } 4105 if ( margin ) { 4106 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 4107 } 4108 } ); 4109 return size; 4110 } 4111 4112 $.fn[ "inner" + name ] = function( size ) { 4113 if ( size === undefined ) { 4114 return orig[ "inner" + name ].call( this ); 4115 } 4116 4117 return this.each( function() { 4118 $( this ).css( type, reduce( this, size ) + "px" ); 4119 } ); 4120 }; 4121 4122 $.fn[ "outer" + name ] = function( size, margin ) { 4123 if ( typeof size !== "number" ) { 4124 return orig[ "outer" + name ].call( this, size ); 4125 } 4126 4127 return this.each( function() { 4128 $( this ).css( type, reduce( this, size, true, margin ) + "px" ); 4129 } ); 4130 }; 4131 } ); 4132 4133 $.fn.addBack = function( selector ) { 4134 return this.add( selector == null ? 4135 this.prevObject : this.prevObject.filter( selector ) 4136 ); 4137 }; 4138} 4139 4140; 4141/*! 4142 * jQuery UI Keycode 1.12.1 4143 * http://jqueryui.com 4144 * 4145 * Copyright jQuery Foundation and other contributors 4146 * Released under the MIT license. 4147 * http://jquery.org/license 4148 */ 4149 4150//>>label: Keycode 4151//>>group: Core 4152//>>description: Provide keycodes as keynames 4153//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 4154 4155 4156var keycode = $.ui.keyCode = { 4157 BACKSPACE: 8, 4158 COMMA: 188, 4159 DELETE: 46, 4160 DOWN: 40, 4161 END: 35, 4162 ENTER: 13, 4163 ESCAPE: 27, 4164 HOME: 36, 4165 LEFT: 37, 4166 PAGE_DOWN: 34, 4167 PAGE_UP: 33, 4168 PERIOD: 190, 4169 RIGHT: 39, 4170 SPACE: 32, 4171 TAB: 9, 4172 UP: 38 4173}; 4174 4175 4176 4177 4178// Internal use only 4179var escapeSelector = $.ui.escapeSelector = ( function() { 4180 var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; 4181 return function( selector ) { 4182 return selector.replace( selectorEscape, "\\$1" ); 4183 }; 4184} )(); 4185 4186 4187/*! 4188 * jQuery UI Labels 1.12.1 4189 * http://jqueryui.com
vendor: 5,256 bytes, lines 4190-4393
4190 * 4191 * Copyright jQuery Foundation and other contributors 4192 * Released under the MIT license. 4193 * http://jquery.org/license 4194 */ 4195 4196//>>label: labels 4197//>>group: Core 4198//>>description: Find all the labels associated with a given input 4199//>>docs: http://api.jqueryui.com/labels/ 4200 4201 4202 4203var labels = $.fn.labels = function() { 4204 var ancestor, selector, id, labels, ancestors; 4205 4206 // Check control.labels first 4207 if ( this[ 0 ].labels && this[ 0 ].labels.length ) { 4208 return this.pushStack( this[ 0 ].labels ); 4209 } 4210 4211 // Support: IE <= 11, FF <= 37, Android <= 2.3 only 4212 // Above browsers do not support control.labels. Everything below is to support them 4213 // as well as document fragments. control.labels does not work on document fragments 4214 labels = this.eq( 0 ).parents( "label" ); 4215 4216 // Look for the label based on the id 4217 id = this.attr( "id" ); 4218 if ( id ) { 4219 4220 // We don't search against the document in case the element 4221 // is disconnected from the DOM 4222 ancestor = this.eq( 0 ).parents().last(); 4223 4224 // Get a full set of top level ancestors 4225 ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); 4226 4227 // Create a selector for the label based on the id 4228 selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; 4229 4230 labels = labels.add( ancestors.find( selector ).addBack( selector ) ); 4231 4232 } 4233 4234 // Return whatever we have found for labels 4235 return this.pushStack( labels ); 4236}; 4237 4238 4239/*! 4240 * jQuery UI Scroll Parent 1.12.1 4241 * http://jqueryui.com 4242 * 4243 * Copyright jQuery Foundation and other contributors 4244 * Released under the MIT license. 4245 * http://jquery.org/license 4246 */ 4247 4248//>>label: scrollParent 4249//>>group: Core 4250//>>description: Get the closest ancestor element that is scrollable. 4251//>>docs: http://api.jqueryui.com/scrollParent/ 4252 4253 4254 4255var scrollParent = $.fn.scrollParent = function( includeHidden ) { 4256 var position = this.css( "position" ), 4257 excludeStaticParent = position === "absolute", 4258 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 4259 scrollParent = this.parents().filter( function() { 4260 var parent = $( this ); 4261 if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 4262 return false; 4263 } 4264 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + 4265 parent.css( "overflow-x" ) ); 4266 } ).eq( 0 ); 4267 4268 return position === "fixed" || !scrollParent.length ? 4269 $( this[ 0 ].ownerDocument || document ) : 4270 scrollParent; 4271}; 4272 4273 4274/*! 4275 * jQuery UI Tabbable 1.12.1 4276 * http://jqueryui.com 4277 * 4278 * Copyright jQuery Foundation and other contributors 4279 * Released under the MIT license. 4280 * http://jquery.org/license 4281 */ 4282 4283//>>label: :tabbable Selector 4284//>>group: Core 4285//>>description: Selects elements which can be tabbed to. 4286//>>docs: http://api.jqueryui.com/tabbable-selector/ 4287 4288 4289 4290var tabbable = $.extend( $.expr[ ":" ], { 4291 tabbable: function( element ) { 4292 var tabIndex = $.attr( element, "tabindex" ), 4293 hasTabindex = tabIndex != null; 4294 return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); 4295 } 4296} ); 4297 4298 4299/*! 4300 * jQuery UI Unique ID 1.12.1 4301 * http://jqueryui.com 4302 * 4303 * Copyright jQuery Foundation and other contributors 4304 * Released under the MIT license. 4305 * http://jquery.org/license 4306 */ 4307 4308//>>label: uniqueId 4309//>>group: Core 4310//>>description: Functions to generate and remove uniqueId's 4311//>>docs: http://api.jqueryui.com/uniqueId/ 4312 4313 4314 4315var uniqueId = $.fn.extend( { 4316 uniqueId: ( function() { 4317 var uuid = 0; 4318 4319 return function() { 4320 return this.each( function() { 4321 if ( !this.id ) { 4322 this.id = "ui-id-" + ( ++uuid ); 4323 } 4324 } ); 4325 }; 4326 } )(), 4327 4328 removeUniqueId: function() { 4329 return this.each( function() { 4330 if ( /^ui-id-\d+$/.test( this.id ) ) { 4331 $( this ).removeAttr( "id" ); 4332 } 4333 } ); 4334 } 4335} ); 4336 4337 4338/*! 4339 * jQuery UI Accordion 1.12.1 4340 * http://jqueryui.com 4341 * 4342 * Copyright jQuery Foundation and other contributors 4343 * Released under the MIT license. 4344 * http://jquery.org/license 4345 */ 4346 4347//>>label: Accordion 4348//>>group: Widgets 4349// jscs:disable maximumLineLength 4350//>>description: Displays collapsible content panels for presenting information in a limited amount of space. 4351// jscs:enable maximumLineLength 4352//>>docs: http://api.jqueryui.com/accordion/ 4353//>>demos: http://jqueryui.com/accordion/ 4354//>>css.structure: ../../themes/base/core.css 4355//>>css.structure: ../../themes/base/accordion.css 4356//>>css.theme: ../../themes/base/theme.css 4357 4358 4359 4360var widgetsAccordion = $.widget( "ui.accordion", { 4361 version: "1.12.1", 4362 options: { 4363 active: 0, 4364 animate: {}, 4365 classes: { 4366 "ui-accordion-header": "ui-corner-top", 4367 "ui-accordion-header-collapsed": "ui-corner-all", 4368 "ui-accordion-content": "ui-corner-bottom" 4369 }, 4370 collapsible: false, 4371 event: "click", 4372 header: "> li > :first-child, > :not(li):even", 4373 heightStyle: "auto", 4374 icons: { 4375 activeHeader: "ui-icon-triangle-1-s", 4376 header: "ui-icon-triangle-1-e" 4377 }, 4378 4379 // Callbacks 4380 activate: null, 4381 beforeActivate: null 4382 }, 4383 4384 hideProps: { 4385 borderTopWidth: "hide", 4386 borderBottomWidth: "hide", 4387 paddingTop: "hide", 4388 paddingBottom: "hide", 4389 height: "hide" 4390 }, 4391 4392 showProps: { 4393 borderTopWidth: "show",
vendor: 5,248 bytes, lines 4394-4596
4394 borderBottomWidth: "show", 4395 paddingTop: "show", 4396 paddingBottom: "show", 4397 height: "show" 4398 }, 4399 4400 _create: function() { 4401 var options = this.options; 4402 4403 this.prevShow = this.prevHide = $(); 4404 this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); 4405 this.element.attr( "role", "tablist" ); 4406 4407 // Don't allow collapsible: false and active: false / null 4408 if ( !options.collapsible && ( options.active === false || options.active == null ) ) { 4409 options.active = 0; 4410 } 4411 4412 this._processPanels(); 4413 4414 // handle negative values 4415 if ( options.active < 0 ) { 4416 options.active += this.headers.length; 4417 } 4418 this._refresh(); 4419 }, 4420 4421 _getCreateEventData: function() { 4422 return { 4423 header: this.active, 4424 panel: !this.active.length ? $() : this.active.next() 4425 }; 4426 }, 4427 4428 _createIcons: function() { 4429 var icon, children, 4430 icons = this.options.icons; 4431 4432 if ( icons ) { 4433 icon = $( "<span>" ); 4434 this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); 4435 icon.prependTo( this.headers ); 4436 children = this.active.children( ".ui-accordion-header-icon" ); 4437 this._removeClass( children, icons.header ) 4438 ._addClass( children, null, icons.activeHeader ) 4439 ._addClass( this.headers, "ui-accordion-icons" ); 4440 } 4441 }, 4442 4443 _destroyIcons: function() { 4444 this._removeClass( this.headers, "ui-accordion-icons" ); 4445 this.headers.children( ".ui-accordion-header-icon" ).remove(); 4446 }, 4447 4448 _destroy: function() { 4449 var contents; 4450 4451 // Clean up main element 4452 this.element.removeAttr( "role" ); 4453 4454 // Clean up headers 4455 this.headers 4456 .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) 4457 .removeUniqueId(); 4458 4459 this._destroyIcons(); 4460 4461 // Clean up content panels 4462 contents = this.headers.next() 4463 .css( "display", "" ) 4464 .removeAttr( "role aria-hidden aria-labelledby" ) 4465 .removeUniqueId(); 4466 4467 if ( this.options.heightStyle !== "content" ) { 4468 contents.css( "height", "" ); 4469 } 4470 }, 4471 4472 _setOption: function( key, value ) { 4473 if ( key === "active" ) { 4474 4475 // _activate() will handle invalid values and update this.options 4476 this._activate( value ); 4477 return; 4478 } 4479 4480 if ( key === "event" ) { 4481 if ( this.options.event ) { 4482 this._off( this.headers, this.options.event ); 4483 } 4484 this._setupEvents( value ); 4485 } 4486 4487 this._super( key, value ); 4488 4489 // Setting collapsible: false while collapsed; open first panel 4490 if ( key === "collapsible" && !value && this.options.active === false ) { 4491 this._activate( 0 ); 4492 } 4493 4494 if ( key === "icons" ) { 4495 this._destroyIcons(); 4496 if ( value ) { 4497 this._createIcons(); 4498 } 4499 } 4500 }, 4501 4502 _setOptionDisabled: function( value ) { 4503 this._super( value ); 4504 4505 this.element.attr( "aria-disabled", value ); 4506 4507 // Support: IE8 Only 4508 // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE 4509 // so we need to add the disabled class to the headers and panels 4510 this._toggleClass( null, "ui-state-disabled", !!value ); 4511 this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", 4512 !!value ); 4513 }, 4514 4515 _keydown: function( event ) { 4516 if ( event.altKey || event.ctrlKey ) { 4517 return; 4518 } 4519 4520 var keyCode = $.ui.keyCode, 4521 length = this.headers.length, 4522 currentIndex = this.headers.index( event.target ), 4523 toFocus = false; 4524 4525 switch ( event.keyCode ) { 4526 case keyCode.RIGHT: 4527 case keyCode.DOWN: 4528 toFocus = this.headers[ ( currentIndex + 1 ) % length ]; 4529 break; 4530 case keyCode.LEFT: 4531 case keyCode.UP: 4532 toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; 4533 break; 4534 case keyCode.SPACE: 4535 case keyCode.ENTER: 4536 this._eventHandler( event ); 4537 break; 4538 case keyCode.HOME: 4539 toFocus = this.headers[ 0 ]; 4540 break; 4541 case keyCode.END: 4542 toFocus = this.headers[ length - 1 ]; 4543 break; 4544 } 4545 4546 if ( toFocus ) { 4547 $( event.target ).attr( "tabIndex", -1 ); 4548 $( toFocus ).attr( "tabIndex", 0 ); 4549 $( toFocus ).trigger( "focus" ); 4550 event.preventDefault(); 4551 } 4552 }, 4553 4554 _panelKeyDown: function( event ) { 4555 if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { 4556 $( event.currentTarget ).prev().trigger( "focus" ); 4557 } 4558 }, 4559 4560 refresh: function() { 4561 var options = this.options; 4562 this._processPanels(); 4563 4564 // Was collapsed or no panel 4565 if ( ( options.active === false && options.collapsible === true ) || 4566 !this.headers.length ) { 4567 options.active = false; 4568 this.active = $(); 4569 4570 // active false only when collapsible is true 4571 } else if ( options.active === false ) { 4572 this._activate( 0 ); 4573 4574 // was active, but active panel is gone 4575 } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 4576 4577 // all remaining panel are disabled 4578 if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { 4579 options.active = false; 4580 this.active = $(); 4581 4582 // activate previous panel 4583 } else { 4584 this._activate( Math.max( 0, options.active - 1 ) ); 4585 } 4586 4587 // was active, active panel still exists 4588 } else { 4589 4590 // make sure active index is correct 4591 options.active = this.headers.index( this.active ); 4592 } 4593 4594 this._destroyIcons(); 4595 4596 this._refresh();
vendor: 6,800 bytes, lines 4597-4834
4597 }, 4598 4599 _processPanels: function() { 4600 var prevHeaders = this.headers, 4601 prevPanels = this.panels; 4602 4603 this.headers = this.element.find( this.options.header ); 4604 this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", 4605 "ui-state-default" ); 4606 4607 this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); 4608 this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); 4609 4610 // Avoid memory leaks (#10056) 4611 if ( prevPanels ) { 4612 this._off( prevHeaders.not( this.headers ) ); 4613 this._off( prevPanels.not( this.panels ) ); 4614 } 4615 }, 4616 4617 _refresh: function() { 4618 var maxHeight, 4619 options = this.options, 4620 heightStyle = options.heightStyle, 4621 parent = this.element.parent(); 4622 4623 this.active = this._findActive( options.active ); 4624 this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) 4625 ._removeClass( this.active, "ui-accordion-header-collapsed" ); 4626 this._addClass( this.active.next(), "ui-accordion-content-active" ); 4627 this.active.next().show(); 4628 4629 this.headers 4630 .attr( "role", "tab" ) 4631 .each( function() { 4632 var header = $( this ), 4633 headerId = header.uniqueId().attr( "id" ), 4634 panel = header.next(), 4635 panelId = panel.uniqueId().attr( "id" ); 4636 header.attr( "aria-controls", panelId ); 4637 panel.attr( "aria-labelledby", headerId ); 4638 } ) 4639 .next() 4640 .attr( "role", "tabpanel" ); 4641 4642 this.headers 4643 .not( this.active ) 4644 .attr( { 4645 "aria-selected": "false", 4646 "aria-expanded": "false", 4647 tabIndex: -1 4648 } ) 4649 .next() 4650 .attr( { 4651 "aria-hidden": "true" 4652 } ) 4653 .hide(); 4654 4655 // Make sure at least one header is in the tab order 4656 if ( !this.active.length ) { 4657 this.headers.eq( 0 ).attr( "tabIndex", 0 ); 4658 } else { 4659 this.active.attr( { 4660 "aria-selected": "true", 4661 "aria-expanded": "true", 4662 tabIndex: 0 4663 } ) 4664 .next() 4665 .attr( { 4666 "aria-hidden": "false" 4667 } ); 4668 } 4669 4670 this._createIcons(); 4671 4672 this._setupEvents( options.event ); 4673 4674 if ( heightStyle === "fill" ) { 4675 maxHeight = parent.height(); 4676 this.element.siblings( ":visible" ).each( function() { 4677 var elem = $( this ), 4678 position = elem.css( "position" ); 4679 4680 if ( position === "absolute" || position === "fixed" ) { 4681 return; 4682 } 4683 maxHeight -= elem.outerHeight( true ); 4684 } ); 4685 4686 this.headers.each( function() { 4687 maxHeight -= $( this ).outerHeight( true ); 4688 } ); 4689 4690 this.headers.next() 4691 .each( function() { 4692 $( this ).height( Math.max( 0, maxHeight - 4693 $( this ).innerHeight() + $( this ).height() ) ); 4694 } ) 4695 .css( "overflow", "auto" ); 4696 } else if ( heightStyle === "auto" ) { 4697 maxHeight = 0; 4698 this.headers.next() 4699 .each( function() { 4700 var isVisible = $( this ).is( ":visible" ); 4701 if ( !isVisible ) { 4702 $( this ).show(); 4703 } 4704 maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 4705 if ( !isVisible ) { 4706 $( this ).hide(); 4707 } 4708 } ) 4709 .height( maxHeight ); 4710 } 4711 }, 4712 4713 _activate: function( index ) { 4714 var active = this._findActive( index )[ 0 ]; 4715 4716 // Trying to activate the already active panel 4717 if ( active === this.active[ 0 ] ) { 4718 return; 4719 } 4720 4721 // Trying to collapse, simulate a click on the currently active header 4722 active = active || this.active[ 0 ]; 4723 4724 this._eventHandler( { 4725 target: active, 4726 currentTarget: active, 4727 preventDefault: $.noop 4728 } ); 4729 }, 4730 4731 _findActive: function( selector ) { 4732 return typeof selector === "number" ? this.headers.eq( selector ) : $(); 4733 }, 4734 4735 _setupEvents: function( event ) { 4736 var events = { 4737 keydown: "_keydown" 4738 }; 4739 if ( event ) { 4740 $.each( event.split( " " ), function( index, eventName ) { 4741 events[ eventName ] = "_eventHandler"; 4742 } ); 4743 } 4744 4745 this._off( this.headers.add( this.headers.next() ) ); 4746 this._on( this.headers, events ); 4747 this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); 4748 this._hoverable( this.headers ); 4749 this._focusable( this.headers ); 4750 }, 4751 4752 _eventHandler: function( event ) { 4753 var activeChildren, clickedChildren, 4754 options = this.options, 4755 active = this.active, 4756 clicked = $( event.currentTarget ), 4757 clickedIsActive = clicked[ 0 ] === active[ 0 ], 4758 collapsing = clickedIsActive && options.collapsible, 4759 toShow = collapsing ? $() : clicked.next(), 4760 toHide = active.next(), 4761 eventData = { 4762 oldHeader: active, 4763 oldPanel: toHide, 4764 newHeader: collapsing ? $() : clicked, 4765 newPanel: toShow 4766 }; 4767 4768 event.preventDefault(); 4769 4770 if ( 4771 4772 // click on active header, but not collapsible 4773 ( clickedIsActive && !options.collapsible ) || 4774 4775 // allow canceling activation 4776 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 4777 return; 4778 } 4779 4780 options.active = collapsing ? false : this.headers.index( clicked ); 4781 4782 // When the call to ._toggle() comes after the class changes 4783 // it causes a very odd bug in IE 8 (see #6720) 4784 this.active = clickedIsActive ? $() : clicked; 4785 this._toggle( eventData ); 4786 4787 // Switch classes 4788 // corner classes on the previously active header stay after the animation 4789 this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); 4790 if ( options.icons ) { 4791 activeChildren = active.children( ".ui-accordion-header-icon" ); 4792 this._removeClass( activeChildren, null, options.icons.activeHeader ) 4793 ._addClass( activeChildren, null, options.icons.header ); 4794 } 4795 4796 if ( !clickedIsActive ) { 4797 this._removeClass( clicked, "ui-accordion-header-collapsed" ) 4798 ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); 4799 if ( options.icons ) { 4800 clickedChildren = clicked.children( ".ui-accordion-header-icon" ); 4801 this._removeClass( clickedChildren, null, options.icons.header ) 4802 ._addClass( clickedChildren, null, options.icons.activeHeader ); 4803 } 4804 4805 this._addClass( clicked.next(), "ui-accordion-content-active" ); 4806 } 4807 }, 4808 4809 _toggle: function( data ) { 4810 var toShow = data.newPanel, 4811 toHide = this.prevShow.length ? this.prevShow : data.oldPanel; 4812 4813 // Handle activating a panel during the animation for another activation 4814 this.prevShow.add( this.prevHide ).stop( true, true ); 4815 this.prevShow = toShow; 4816 this.prevHide = toHide; 4817 4818 if ( this.options.animate ) { 4819 this._animate( toShow, toHide, data ); 4820 } else { 4821 toHide.hide(); 4822 toShow.show(); 4823 this._toggleComplete( data ); 4824 } 4825 4826 toHide.attr( { 4827 "aria-hidden": "true" 4828 } ); 4829 toHide.prev().attr( { 4830 "aria-selected": "false", 4831 "aria-expanded": "false" 4832 } ); 4833 4834 // if we're switching panels, remove the old header from the tab order
vendor: 7,571 bytes, lines 4835-5105
4835 // if we're opening from collapsed state, remove the previous header from the tab order 4836 // if we're collapsing, then keep the collapsing header in the tab order 4837 if ( toShow.length && toHide.length ) { 4838 toHide.prev().attr( { 4839 "tabIndex": -1, 4840 "aria-expanded": "false" 4841 } ); 4842 } else if ( toShow.length ) { 4843 this.headers.filter( function() { 4844 return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; 4845 } ) 4846 .attr( "tabIndex", -1 ); 4847 } 4848 4849 toShow 4850 .attr( "aria-hidden", "false" ) 4851 .prev() 4852 .attr( { 4853 "aria-selected": "true", 4854 "aria-expanded": "true", 4855 tabIndex: 0 4856 } ); 4857 }, 4858 4859 _animate: function( toShow, toHide, data ) { 4860 var total, easing, duration, 4861 that = this, 4862 adjust = 0, 4863 boxSizing = toShow.css( "box-sizing" ), 4864 down = toShow.length && 4865 ( !toHide.length || ( toShow.index() < toHide.index() ) ), 4866 animate = this.options.animate || {}, 4867 options = down && animate.down || animate, 4868 complete = function() { 4869 that._toggleComplete( data ); 4870 }; 4871 4872 if ( typeof options === "number" ) { 4873 duration = options; 4874 } 4875 if ( typeof options === "string" ) { 4876 easing = options; 4877 } 4878 4879 // fall back from options to animation in case of partial down settings 4880 easing = easing || options.easing || animate.easing; 4881 duration = duration || options.duration || animate.duration; 4882 4883 if ( !toHide.length ) { 4884 return toShow.animate( this.showProps, duration, easing, complete ); 4885 } 4886 if ( !toShow.length ) { 4887 return toHide.animate( this.hideProps, duration, easing, complete ); 4888 } 4889 4890 total = toShow.show().outerHeight(); 4891 toHide.animate( this.hideProps, { 4892 duration: duration, 4893 easing: easing, 4894 step: function( now, fx ) { 4895 fx.now = Math.round( now ); 4896 } 4897 } ); 4898 toShow 4899 .hide() 4900 .animate( this.showProps, { 4901 duration: duration, 4902 easing: easing, 4903 complete: complete, 4904 step: function( now, fx ) { 4905 fx.now = Math.round( now ); 4906 if ( fx.prop !== "height" ) { 4907 if ( boxSizing === "content-box" ) { 4908 adjust += fx.now; 4909 } 4910 } else if ( that.options.heightStyle !== "content" ) { 4911 fx.now = Math.round( total - toHide.outerHeight() - adjust ); 4912 adjust = 0; 4913 } 4914 } 4915 } ); 4916 }, 4917 4918 _toggleComplete: function( data ) { 4919 var toHide = data.oldPanel, 4920 prev = toHide.prev(); 4921 4922 this._removeClass( toHide, "ui-accordion-content-active" ); 4923 this._removeClass( prev, "ui-accordion-header-active" ) 4924 ._addClass( prev, "ui-accordion-header-collapsed" ); 4925 4926 // Work around for rendering bug in IE (#5421) 4927 if ( toHide.length ) { 4928 toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; 4929 } 4930 this._trigger( "activate", null, data ); 4931 } 4932} ); 4933 4934 4935 4936var safeActiveElement = $.ui.safeActiveElement = function( document ) { 4937 var activeElement; 4938 4939 // Support: IE 9 only 4940 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 4941 try { 4942 activeElement = document.activeElement; 4943 } catch ( error ) { 4944 activeElement = document.body; 4945 } 4946 4947 // Support: IE 9 - 11 only 4948 // IE may return null instead of an element 4949 // Interestingly, this only seems to occur when NOT in an iframe 4950 if ( !activeElement ) { 4951 activeElement = document.body; 4952 } 4953 4954 // Support: IE 11 only 4955 // IE11 returns a seemingly empty object in some cases when accessing 4956 // document.activeElement from an <iframe> 4957 if ( !activeElement.nodeName ) { 4958 activeElement = document.body; 4959 } 4960 4961 return activeElement; 4962}; 4963 4964 4965/*! 4966 * jQuery UI Menu 1.12.1 4967 * http://jqueryui.com 4968 * 4969 * Copyright jQuery Foundation and other contributors 4970 * Released under the MIT license. 4971 * http://jquery.org/license 4972 */ 4973 4974//>>label: Menu 4975//>>group: Widgets 4976//>>description: Creates nestable menus. 4977//>>docs: http://api.jqueryui.com/menu/ 4978//>>demos: http://jqueryui.com/menu/ 4979//>>css.structure: ../../themes/base/core.css 4980//>>css.structure: ../../themes/base/menu.css 4981//>>css.theme: ../../themes/base/theme.css 4982 4983 4984 4985var widgetsMenu = $.widget( "ui.menu", { 4986 version: "1.12.1", 4987 defaultElement: "<ul>", 4988 delay: 300, 4989 options: { 4990 icons: { 4991 submenu: "ui-icon-caret-1-e" 4992 }, 4993 items: "> *", 4994 menus: "ul", 4995 position: { 4996 my: "left top", 4997 at: "right top" 4998 }, 4999 role: "menu", 5000 5001 // Callbacks 5002 blur: null, 5003 focus: null, 5004 select: null 5005 }, 5006 5007 _create: function() { 5008 this.activeMenu = this.element; 5009 5010 // Flag used to prevent firing of the click handler 5011 // as the event bubbles up through nested menus 5012 this.mouseHandled = false; 5013 this.element 5014 .uniqueId() 5015 .attr( { 5016 role: this.options.role, 5017 tabIndex: 0 5018 } ); 5019 5020 this._addClass( "ui-menu", "ui-widget ui-widget-content" ); 5021 this._on( { 5022 5023 // Prevent focus from sticking to links inside menu after clicking 5024 // them (focus should always stay on UL during navigation). 5025 "mousedown .ui-menu-item": function( event ) { 5026 event.preventDefault(); 5027 }, 5028 "click .ui-menu-item": function( event ) { 5029 var target = $( event.target ); 5030 var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 5031 if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { 5032 this.select( event ); 5033 5034 // Only set the mouseHandled flag if the event will bubble, see #9469. 5035 if ( !event.isPropagationStopped() ) { 5036 this.mouseHandled = true; 5037 } 5038 5039 // Open submenu on click 5040 if ( target.has( ".ui-menu" ).length ) { 5041 this.expand( event ); 5042 } else if ( !this.element.is( ":focus" ) && 5043 active.closest( ".ui-menu" ).length ) { 5044 5045 // Redirect focus to the menu 5046 this.element.trigger( "focus", [ true ] ); 5047 5048 // If the active item is on the top level, let it stay active. 5049 // Otherwise, blur the active item since it is no longer visible. 5050 if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { 5051 clearTimeout( this.timer ); 5052 } 5053 } 5054 } 5055 }, 5056 "mouseenter .ui-menu-item": function( event ) { 5057 5058 // Ignore mouse events while typeahead is active, see #10458. 5059 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 5060 // is over an item in the menu 5061 if ( this.previousFilter ) { 5062 return; 5063 } 5064 5065 var actualTarget = $( event.target ).closest( ".ui-menu-item" ), 5066 target = $( event.currentTarget ); 5067 5068 // Ignore bubbled events on parent items, see #11641 5069 if ( actualTarget[ 0 ] !== target[ 0 ] ) { 5070 return; 5071 } 5072 5073 // Remove ui-state-active class from siblings of the newly focused menu item 5074 // to avoid a jump caused by adjacent elements both having a class with a border 5075 this._removeClass( target.siblings().children( ".ui-state-active" ), 5076 null, "ui-state-active" ); 5077 this.focus( event, target ); 5078 }, 5079 mouseleave: "collapseAll", 5080 "mouseleave .ui-menu": "collapseAll", 5081 focus: function( event, keepActiveItem ) { 5082 5083 // If there's already an active item, keep it active 5084 // If not, activate the first item 5085 var item = this.active || this.element.find( this.options.items ).eq( 0 ); 5086 5087 if ( !keepActiveItem ) { 5088 this.focus( event, item ); 5089 } 5090 }, 5091 blur: function( event ) { 5092 this._delay( function() { 5093 var notContained = !$.contains( 5094 this.element[ 0 ], 5095 $.ui.safeActiveElement( this.document[ 0 ] ) 5096 ); 5097 if ( notContained ) { 5098 this.collapseAll( event ); 5099 } 5100 } ); 5101 }, 5102 keydown: "_keydown" 5103 } ); 5104 5105 this.refresh();
vendor: 4,401 bytes, lines 5106-5269
5106 5107 // Clicks outside of a menu collapse any open menus 5108 this._on( this.document, { 5109 click: function( event ) { 5110 if ( this._closeOnDocumentClick( event ) ) { 5111 this.collapseAll( event ); 5112 } 5113 5114 // Reset the mouseHandled flag 5115 this.mouseHandled = false; 5116 } 5117 } ); 5118 }, 5119 5120 _destroy: function() { 5121 var items = this.element.find( ".ui-menu-item" ) 5122 .removeAttr( "role aria-disabled" ), 5123 submenus = items.children( ".ui-menu-item-wrapper" ) 5124 .removeUniqueId() 5125 .removeAttr( "tabIndex role aria-haspopup" ); 5126 5127 // Destroy (sub)menus 5128 this.element 5129 .removeAttr( "aria-activedescendant" ) 5130 .find( ".ui-menu" ).addBack() 5131 .removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " + 5132 "tabIndex" ) 5133 .removeUniqueId() 5134 .show(); 5135 5136 submenus.children().each( function() { 5137 var elem = $( this ); 5138 if ( elem.data( "ui-menu-submenu-caret" ) ) { 5139 elem.remove(); 5140 } 5141 } ); 5142 }, 5143 5144 _keydown: function( event ) { 5145 var match, prev, character, skip, 5146 preventDefault = true; 5147 5148 switch ( event.keyCode ) { 5149 case $.ui.keyCode.PAGE_UP: 5150 this.previousPage( event ); 5151 break; 5152 case $.ui.keyCode.PAGE_DOWN: 5153 this.nextPage( event ); 5154 break; 5155 case $.ui.keyCode.HOME: 5156 this._move( "first", "first", event ); 5157 break; 5158 case $.ui.keyCode.END: 5159 this._move( "last", "last", event ); 5160 break; 5161 case $.ui.keyCode.UP: 5162 this.previous( event ); 5163 break; 5164 case $.ui.keyCode.DOWN: 5165 this.next( event ); 5166 break; 5167 case $.ui.keyCode.LEFT: 5168 this.collapse( event ); 5169 break; 5170 case $.ui.keyCode.RIGHT: 5171 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 5172 this.expand( event ); 5173 } 5174 break; 5175 case $.ui.keyCode.ENTER: 5176 case $.ui.keyCode.SPACE: 5177 this._activate( event ); 5178 break; 5179 case $.ui.keyCode.ESCAPE: 5180 this.collapse( event ); 5181 break; 5182 default: 5183 preventDefault = false; 5184 prev = this.previousFilter || ""; 5185 skip = false; 5186 5187 // Support number pad values 5188 character = event.keyCode >= 96 && event.keyCode <= 105 ? 5189 ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode ); 5190 5191 clearTimeout( this.filterTimer ); 5192 5193 if ( character === prev ) { 5194 skip = true; 5195 } else { 5196 character = prev + character; 5197 } 5198 5199 match = this._filterMenuItems( character ); 5200 match = skip && match.index( this.active.next() ) !== -1 ? 5201 this.active.nextAll( ".ui-menu-item" ) : 5202 match; 5203 5204 // If no matches on the current filter, reset to the last character pressed 5205 // to move down the menu to the first item that starts with that character 5206 if ( !match.length ) { 5207 character = String.fromCharCode( event.keyCode ); 5208 match = this._filterMenuItems( character ); 5209 } 5210 5211 if ( match.length ) { 5212 this.focus( event, match ); 5213 this.previousFilter = character; 5214 this.filterTimer = this._delay( function() { 5215 delete this.previousFilter; 5216 }, 1000 ); 5217 } else { 5218 delete this.previousFilter; 5219 } 5220 } 5221 5222 if ( preventDefault ) { 5223 event.preventDefault(); 5224 } 5225 }, 5226 5227 _activate: function( event ) { 5228 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 5229 if ( this.active.children( "[aria-haspopup='true']" ).length ) { 5230 this.expand( event ); 5231 } else { 5232 this.select( event ); 5233 } 5234 } 5235 }, 5236 5237 refresh: function() { 5238 var menus, items, newSubmenus, newItems, newWrappers, 5239 that = this, 5240 icon = this.options.icons.submenu, 5241 submenus = this.element.find( this.options.menus ); 5242 5243 this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length ); 5244 5245 // Initialize nested menus 5246 newSubmenus = submenus.filter( ":not(.ui-menu)" ) 5247 .hide() 5248 .attr( { 5249 role: this.options.role, 5250 "aria-hidden": "true", 5251 "aria-expanded": "false" 5252 } ) 5253 .each( function() { 5254 var menu = $( this ), 5255 item = menu.prev(), 5256 submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true ); 5257 5258 that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon ); 5259 item 5260 .attr( "aria-haspopup", "true" ) 5261 .prepend( submenuCaret ); 5262 menu.attr( "aria-labelledby", item.attr( "id" ) ); 5263 } ); 5264 5265 this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" ); 5266 5267 menus = submenus.add( this.element ); 5268 items = menus.find( this.options.items ); 5269
vendor: 4,715 bytes, lines 5270-5432
5270 // Initialize menu-items containing spaces and/or dashes only as dividers 5271 items.not( ".ui-menu-item" ).each( function() { 5272 var item = $( this ); 5273 if ( that._isDivider( item ) ) { 5274 that._addClass( item, "ui-menu-divider", "ui-widget-content" ); 5275 } 5276 } ); 5277 5278 // Don't refresh list items that are already adapted 5279 newItems = items.not( ".ui-menu-item, .ui-menu-divider" ); 5280 newWrappers = newItems.children() 5281 .not( ".ui-menu" ) 5282 .uniqueId() 5283 .attr( { 5284 tabIndex: -1, 5285 role: this._itemRole() 5286 } ); 5287 this._addClass( newItems, "ui-menu-item" ) 5288 ._addClass( newWrappers, "ui-menu-item-wrapper" ); 5289 5290 // Add aria-disabled attribute to any disabled menu item 5291 items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); 5292 5293 // If the active item has been removed, blur the menu 5294 if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 5295 this.blur(); 5296 } 5297 }, 5298 5299 _itemRole: function() { 5300 return { 5301 menu: "menuitem", 5302 listbox: "option" 5303 }[ this.options.role ]; 5304 }, 5305 5306 _setOption: function( key, value ) { 5307 if ( key === "icons" ) { 5308 var icons = this.element.find( ".ui-menu-icon" ); 5309 this._removeClass( icons, null, this.options.icons.submenu ) 5310 ._addClass( icons, null, value.submenu ); 5311 } 5312 this._super( key, value ); 5313 }, 5314 5315 _setOptionDisabled: function( value ) { 5316 this._super( value ); 5317 5318 this.element.attr( "aria-disabled", String( value ) ); 5319 this._toggleClass( null, "ui-state-disabled", !!value ); 5320 }, 5321 5322 focus: function( event, item ) { 5323 var nested, focused, activeParent; 5324 this.blur( event, event && event.type === "focus" ); 5325 5326 this._scrollIntoView( item ); 5327 5328 this.active = item.first(); 5329 5330 focused = this.active.children( ".ui-menu-item-wrapper" ); 5331 this._addClass( focused, null, "ui-state-active" ); 5332 5333 // Only update aria-activedescendant if there's a role 5334 // otherwise we assume focus is managed elsewhere 5335 if ( this.options.role ) { 5336 this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); 5337 } 5338 5339 // Highlight active parent menu item, if any 5340 activeParent = this.active 5341 .parent() 5342 .closest( ".ui-menu-item" ) 5343 .children( ".ui-menu-item-wrapper" ); 5344 this._addClass( activeParent, null, "ui-state-active" ); 5345 5346 if ( event && event.type === "keydown" ) { 5347 this._close(); 5348 } else { 5349 this.timer = this._delay( function() { 5350 this._close(); 5351 }, this.delay ); 5352 } 5353 5354 nested = item.children( ".ui-menu" ); 5355 if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { 5356 this._startOpening( nested ); 5357 } 5358 this.activeMenu = item.parent(); 5359 5360 this._trigger( "focus", event, { item: item } ); 5361 }, 5362 5363 _scrollIntoView: function( item ) { 5364 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 5365 if ( this._hasScroll() ) { 5366 borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; 5367 paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; 5368 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 5369 scroll = this.activeMenu.scrollTop(); 5370 elementHeight = this.activeMenu.height(); 5371 itemHeight = item.outerHeight(); 5372 5373 if ( offset < 0 ) { 5374 this.activeMenu.scrollTop( scroll + offset ); 5375 } else if ( offset + itemHeight > elementHeight ) { 5376 this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); 5377 } 5378 } 5379 }, 5380 5381 blur: function( event, fromFocus ) { 5382 if ( !fromFocus ) { 5383 clearTimeout( this.timer ); 5384 } 5385 5386 if ( !this.active ) { 5387 return; 5388 } 5389 5390 this._removeClass( this.active.children( ".ui-menu-item-wrapper" ), 5391 null, "ui-state-active" ); 5392 5393 this._trigger( "blur", event, { item: this.active } ); 5394 this.active = null; 5395 }, 5396 5397 _startOpening: function( submenu ) { 5398 clearTimeout( this.timer ); 5399 5400 // Don't open if already open fixes a Firefox bug that caused a .5 pixel 5401 // shift in the submenu position when mousing over the caret icon 5402 if ( submenu.attr( "aria-hidden" ) !== "true" ) { 5403 return; 5404 } 5405 5406 this.timer = this._delay( function() { 5407 this._close(); 5408 this._open( submenu ); 5409 }, this.delay ); 5410 }, 5411 5412 _open: function( submenu ) { 5413 var position = $.extend( { 5414 of: this.active 5415 }, this.options.position ); 5416 5417 clearTimeout( this.timer ); 5418 this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) 5419 .hide() 5420 .attr( "aria-hidden", "true" ); 5421 5422 submenu 5423 .show() 5424 .removeAttr( "aria-hidden" ) 5425 .attr( "aria-expanded", "true" ) 5426 .position( position ); 5427 }, 5428 5429 collapseAll: function( event, all ) { 5430 clearTimeout( this.timer ); 5431 this.timer = this._delay( function() { 5432
vendor: 37,529 bytes, lines 5433-6786
5433 // If we were passed an event, look for the submenu that contains the event 5434 var currentMenu = all ? this.element : 5435 $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); 5436 5437 // If we found no valid submenu ancestor, use the main menu to close all 5438 // sub menus anyway 5439 if ( !currentMenu.length ) { 5440 currentMenu = this.element; 5441 } 5442 5443 this._close( currentMenu ); 5444 5445 this.blur( event ); 5446 5447 // Work around active item staying active after menu is blurred 5448 this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" ); 5449 5450 this.activeMenu = currentMenu; 5451 }, this.delay ); 5452 }, 5453 5454 // With no arguments, closes the currently active menu - if nothing is active 5455 // it closes all menus. If passed an argument, it will search for menus BELOW 5456 _close: function( startMenu ) { 5457 if ( !startMenu ) { 5458 startMenu = this.active ? this.active.parent() : this.element; 5459 } 5460 5461 startMenu.find( ".ui-menu" ) 5462 .hide() 5463 .attr( "aria-hidden", "true" ) 5464 .attr( "aria-expanded", "false" ); 5465 }, 5466 5467 _closeOnDocumentClick: function( event ) { 5468 return !$( event.target ).closest( ".ui-menu" ).length; 5469 }, 5470 5471 _isDivider: function( item ) { 5472 5473 // Match hyphen, em dash, en dash 5474 return !/[^\-\u2014\u2013\s]/.test( item.text() ); 5475 }, 5476 5477 collapse: function( event ) { 5478 var newItem = this.active && 5479 this.active.parent().closest( ".ui-menu-item", this.element ); 5480 if ( newItem && newItem.length ) { 5481 this._close(); 5482 this.focus( event, newItem ); 5483 } 5484 }, 5485 5486 expand: function( event ) { 5487 var newItem = this.active && 5488 this.active 5489 .children( ".ui-menu " ) 5490 .find( this.options.items ) 5491 .first(); 5492 5493 if ( newItem && newItem.length ) { 5494 this._open( newItem.parent() ); 5495 5496 // Delay so Firefox will not hide activedescendant change in expanding submenu from AT 5497 this._delay( function() { 5498 this.focus( event, newItem ); 5499 } ); 5500 } 5501 }, 5502 5503 next: function( event ) { 5504 this._move( "next", "first", event ); 5505 }, 5506 5507 previous: function( event ) { 5508 this._move( "prev", "last", event ); 5509 }, 5510 5511 isFirstItem: function() { 5512 return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 5513 }, 5514 5515 isLastItem: function() { 5516 return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 5517 }, 5518 5519 _move: function( direction, filter, event ) { 5520 var next; 5521 if ( this.active ) { 5522 if ( direction === "first" || direction === "last" ) { 5523 next = this.active 5524 [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) 5525 .eq( -1 ); 5526 } else { 5527 next = this.active 5528 [ direction + "All" ]( ".ui-menu-item" ) 5529 .eq( 0 ); 5530 } 5531 } 5532 if ( !next || !next.length || !this.active ) { 5533 next = this.activeMenu.find( this.options.items )[ filter ](); 5534 } 5535 5536 this.focus( event, next ); 5537 }, 5538 5539 nextPage: function( event ) { 5540 var item, base, height; 5541 5542 if ( !this.active ) { 5543 this.next( event ); 5544 return; 5545 } 5546 if ( this.isLastItem() ) { 5547 return; 5548 } 5549 if ( this._hasScroll() ) { 5550 base = this.active.offset().top; 5551 height = this.element.height(); 5552 this.active.nextAll( ".ui-menu-item" ).each( function() { 5553 item = $( this ); 5554 return item.offset().top - base - height < 0; 5555 } ); 5556 5557 this.focus( event, item ); 5558 } else { 5559 this.focus( event, this.activeMenu.find( this.options.items ) 5560 [ !this.active ? "first" : "last" ]() ); 5561 } 5562 }, 5563 5564 previousPage: function( event ) { 5565 var item, base, height; 5566 if ( !this.active ) { 5567 this.next( event ); 5568 return; 5569 } 5570 if ( this.isFirstItem() ) { 5571 return; 5572 } 5573 if ( this._hasScroll() ) { 5574 base = this.active.offset().top; 5575 height = this.element.height(); 5576 this.active.prevAll( ".ui-menu-item" ).each( function() { 5577 item = $( this ); 5578 return item.offset().top - base + height > 0; 5579 } ); 5580 5581 this.focus( event, item ); 5582 } else { 5583 this.focus( event, this.activeMenu.find( this.options.items ).first() ); 5584 } 5585 }, 5586 5587 _hasScroll: function() { 5588 return this.element.outerHeight() < this.element.prop( "scrollHeight" ); 5589 }, 5590 5591 select: function( event ) { 5592 5593 // TODO: It should never be possible to not have an active item at this 5594 // point, but the tests don't trigger mouseenter before click. 5595 this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); 5596 var ui = { item: this.active }; 5597 if ( !this.active.has( ".ui-menu" ).length ) { 5598 this.collapseAll( event, true ); 5599 } 5600 this._trigger( "select", event, ui ); 5601 }, 5602 5603 _filterMenuItems: function( character ) { 5604 var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 5605 regex = new RegExp( "^" + escapedCharacter, "i" ); 5606 5607 return this.activeMenu 5608 .find( this.options.items ) 5609 5610 // Only match on items, not dividers or other content (#10571) 5611 .filter( ".ui-menu-item" ) 5612 .filter( function() { 5613 return regex.test( 5614 $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); 5615 } ); 5616 } 5617} ); 5618 5619 5620/*! 5621 * jQuery UI Autocomplete 1.12.1 5622 * http://jqueryui.com 5623 * 5624 * Copyright jQuery Foundation and other contributors 5625 * Released under the MIT license. 5626 * http://jquery.org/license 5627 */ 5628 5629//>>label: Autocomplete 5630//>>group: Widgets 5631//>>description: Lists suggested words as the user is typing. 5632//>>docs: http://api.jqueryui.com/autocomplete/ 5633//>>demos: http://jqueryui.com/autocomplete/ 5634//>>css.structure: ../../themes/base/core.css 5635//>>css.structure: ../../themes/base/autocomplete.css 5636//>>css.theme: ../../themes/base/theme.css 5637 5638 5639 5640$.widget( "ui.autocomplete", { 5641 version: "1.12.1", 5642 defaultElement: "<input>", 5643 options: { 5644 appendTo: null, 5645 autoFocus: false, 5646 delay: 300, 5647 minLength: 1, 5648 position: { 5649 my: "left top", 5650 at: "left bottom", 5651 collision: "none" 5652 }, 5653 source: null, 5654 5655 // Callbacks 5656 change: null, 5657 close: null, 5658 focus: null, 5659 open: null, 5660 response: null, 5661 search: null, 5662 select: null 5663 }, 5664 cache: [], 5665 5666 requestIndex: 0, 5667 pending: 0, 5668 5669 _create: function() { 5670 5671 // Some browsers only repeat keydown events, not keypress events, 5672 // so we use the suppressKeyPress flag to determine if we've already 5673 // handled the keydown event. #7269 5674 // Unfortunately the code for & in keypress is the same as the up arrow, 5675 // so we use the suppressKeyPressRepeat flag to avoid handling keypress 5676 // events when we know the keydown event was used to modify the 5677 // search term. #7799 5678 var suppressKeyPress, suppressKeyPressRepeat, suppressInput, 5679 nodeName = this.element[ 0 ].nodeName.toLowerCase(), 5680 isTextarea = nodeName === "textarea", 5681 isInput = nodeName === "input"; 5682 5683 // Textareas are always multi-line 5684 // Inputs are always single-line, even if inside a contentEditable element 5685 // IE also treats inputs as contentEditable 5686 // All other element types are determined by whether or not they're contentEditable 5687 this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element ); 5688 5689 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; 5690 this.isNewMenu = true; 5691 5692 this._addClass( "ui-autocomplete-input" ); 5693 this.element.attr( "autocomplete", "off" ); 5694 5695 this._on( this.element, { 5696 keydown: function( event ) { 5697 if ( this.element.prop( "readOnly" ) ) { 5698 suppressKeyPress = true; 5699 suppressInput = true; 5700 suppressKeyPressRepeat = true; 5701 return; 5702 } 5703 5704 suppressKeyPress = false; 5705 suppressInput = false; 5706 suppressKeyPressRepeat = false; 5707 var keyCode = $.ui.keyCode; 5708 switch ( event.keyCode ) { 5709 case keyCode.PAGE_UP: 5710 suppressKeyPress = true; 5711 this._move( "previousPage", event ); 5712 break; 5713 case keyCode.PAGE_DOWN: 5714 suppressKeyPress = true; 5715 this._move( "nextPage", event ); 5716 break; 5717 case keyCode.UP: 5718 suppressKeyPress = true; 5719 this._keyEvent( "previous", event ); 5720 break; 5721 case keyCode.DOWN: 5722 suppressKeyPress = true; 5723 this._keyEvent( "next", event ); 5724 break; 5725 case keyCode.ENTER: 5726 5727 // when menu is open and has focus 5728 if ( this.menu.active ) { 5729 5730 // #6055 - Opera still allows the keypress to occur 5731 // which causes forms to submit 5732 suppressKeyPress = true; 5733 event.preventDefault(); 5734 this.menu.select( event ); 5735 } 5736 break; 5737 case keyCode.TAB: 5738 if ( this.menu.active ) { 5739 this.menu.select( event ); 5740 } 5741 break; 5742 case keyCode.ESCAPE: 5743 if ( this.menu.element.is( ":visible" ) ) { 5744 if ( !this.isMultiLine ) { 5745 this._value( this.term ); 5746 } 5747 this.close( event ); 5748 5749 // Different browsers have different default behavior for escape 5750 // Single press can mean undo or clear 5751 // Double press in IE means clear the whole form 5752 event.preventDefault(); 5753 } 5754 break; 5755 default: 5756 suppressKeyPressRepeat = true; 5757 5758 // search timeout should be triggered before the input value is changed 5759 this._searchTimeout( event ); 5760 break; 5761 } 5762 }, 5763 keypress: function( event ) { 5764 if ( suppressKeyPress ) { 5765 suppressKeyPress = false; 5766 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 5767 event.preventDefault(); 5768 } 5769 return; 5770 } 5771 if ( suppressKeyPressRepeat ) { 5772 return; 5773 } 5774 5775 // Replicate some key handlers to allow them to repeat in Firefox and Opera 5776 var keyCode = $.ui.keyCode; 5777 switch ( event.keyCode ) { 5778 case keyCode.PAGE_UP: 5779 this._move( "previousPage", event ); 5780 break; 5781 case keyCode.PAGE_DOWN: 5782 this._move( "nextPage", event ); 5783 break; 5784 case keyCode.UP: 5785 this._keyEvent( "previous", event ); 5786 break; 5787 case keyCode.DOWN: 5788 this._keyEvent( "next", event ); 5789 break; 5790 } 5791 }, 5792 input: function( event ) { 5793 if ( suppressInput ) { 5794 suppressInput = false; 5795 event.preventDefault(); 5796 return; 5797 } 5798 this._searchTimeout( event ); 5799 }, 5800 focus: function() { 5801 this.selectedItem = null; 5802 this.previous = this._value(); 5803 }, 5804 blur: function( event ) { 5805 if ( this.cancelBlur ) { 5806 delete this.cancelBlur; 5807 return; 5808 } 5809 5810 clearTimeout( this.searching ); 5811 this.close( event ); 5812 this._change( event ); 5813 } 5814 } ); 5815 5816 this._initSource(); 5817 this.menu = $( "<ul>" ) 5818 .appendTo( this._appendTo() ) 5819 .menu( { 5820 5821 // disable ARIA support, the live region takes care of that 5822 role: null 5823 } ) 5824 .hide() 5825 .menu( "instance" ); 5826 5827 this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); 5828 this._on( this.menu.element, { 5829 mousedown: function( event ) { 5830 5831 // prevent moving focus out of the text field 5832 event.preventDefault(); 5833 5834 // IE doesn't prevent moving focus even with event.preventDefault() 5835 // so we set a flag to know when we should ignore the blur event 5836 this.cancelBlur = true; 5837 this._delay( function() { 5838 delete this.cancelBlur; 5839 5840 // Support: IE 8 only 5841 // Right clicking a menu item or selecting text from the menu items will 5842 // result in focus moving out of the input. However, we've already received 5843 // and ignored the blur event because of the cancelBlur flag set above. So 5844 // we restore focus to ensure that the menu closes properly based on the user's 5845 // next actions. 5846 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 5847 this.element.trigger( "focus" ); 5848 } 5849 } ); 5850 }, 5851 menufocus: function( event, ui ) { 5852 var label, item; 5853 5854 // support: Firefox 5855 // Prevent accidental activation of menu items in Firefox (#7024 #9118) 5856 if ( this.isNewMenu ) { 5857 this.isNewMenu = false; 5858 if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { 5859 this.menu.blur(); 5860 5861 this.document.one( "mousemove", function() { 5862 $( event.target ).trigger( event.originalEvent ); 5863 } ); 5864 5865 return; 5866 } 5867 } 5868 5869 item = ui.item.data( "ui-autocomplete-item" ); 5870 if ( false !== this._trigger( "focus", event, { item: item } ) ) { 5871 5872 // use value to match what will end up in the input, if it was a key event 5873 if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { 5874 this._value( item.value ); 5875 } 5876 } 5877 5878 // Announce the value in the liveRegion 5879 label = ui.item.attr( "aria-label" ) || item.value; 5880 if ( label && $.trim( label ).length ) { 5881 this.liveRegion.children().hide(); 5882 $( "<div>" ).text( label ).appendTo( this.liveRegion ); 5883 } 5884 }, 5885 menuselect: function( event, ui ) { 5886 var item = ui.item.data( "ui-autocomplete-item" ), 5887 previous = this.previous; 5888 5889 // Only trigger when focus was lost (click on menu) 5890 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 5891 this.element.trigger( "focus" ); 5892 this.previous = previous; 5893 5894 // #6109 - IE triggers two focus events and the second 5895 // is asynchronous, so we need to reset the previous 5896 // term synchronously and asynchronously :-( 5897 this._delay( function() { 5898 this.previous = previous; 5899 this.selectedItem = item; 5900 } ); 5901 } 5902 5903 if ( false !== this._trigger( "select", event, { item: item } ) ) { 5904 this._value( item.value ); 5905 } 5906 5907 // reset the term after the select event 5908 // this allows custom select handling to work properly 5909 this.term = this._value(); 5910 5911 this.close( event ); 5912 this.selectedItem = item; 5913 } 5914 } ); 5915 5916 this.liveRegion = $( "<div>", { 5917 role: "status", 5918 "aria-live": "assertive", 5919 "aria-relevant": "additions" 5920 } ) 5921 .appendTo( this.document[ 0 ].body ); 5922 5923 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 5924 5925 // Turning off autocomplete prevents the browser from remembering the 5926 // value when navigating through history, so we re-enable autocomplete 5927 // if the page is unloaded before the widget is destroyed. #7790 5928 this._on( this.window, { 5929 beforeunload: function() { 5930 this.element.removeAttr( "autocomplete" ); 5931 } 5932 } ); 5933 }, 5934 5935 _destroy: function() { 5936 clearTimeout( this.searching ); 5937 this.element.removeAttr( "autocomplete" ); 5938 this.menu.element.remove(); 5939 this.liveRegion.remove(); 5940 }, 5941 5942 _setOption: function( key, value ) { 5943 this._super( key, value ); 5944 if ( key === "source" ) { 5945 this._initSource(); 5946 } 5947 if ( key === "appendTo" ) { 5948 this.menu.element.appendTo( this._appendTo() ); 5949 } 5950 if ( key === "disabled" && value && this.xhr ) { 5951 this.xhr.abort(); 5952 } 5953 }, 5954 5955 _isEventTargetInWidget: function( event ) { 5956 var menuElement = this.menu.element[ 0 ]; 5957 5958 return event.target === this.element[ 0 ] || 5959 event.target === menuElement || 5960 $.contains( menuElement, event.target ); 5961 }, 5962 5963 _closeOnClickOutside: function( event ) { 5964 if ( !this._isEventTargetInWidget( event ) ) { 5965 this.close(); 5966 } 5967 }, 5968 5969 _appendTo: function() { 5970 var element = this.options.appendTo; 5971 5972 if ( element ) { 5973 element = element.jquery || element.nodeType ? 5974 $( element ) : 5975 this.document.find( element ).eq( 0 ); 5976 } 5977 5978 if ( !element || !element[ 0 ] ) { 5979 element = this.element.closest( ".ui-front, dialog" ); 5980 } 5981 5982 if ( !element.length ) { 5983 element = this.document[ 0 ].body; 5984 } 5985 5986 return element; 5987 }, 5988 5989 _initSource: function() { 5990 var array, url, 5991 that = this, 5992 selector = this.element[0].classList[0]; 5993 5994 if ( $.isArray( this.options.source ) ) { 5995 array = this.options.source; 5996 this.source = function( request, response ) { 5997 response( $.ui.autocomplete.filter( array, request.term ) ); 5998 }; 5999 } else if ( typeof this.options.source === "string" ) { 6000 url = this.options.source; 6001 6002 this.source = function( request, response ) { 6003 6004 var keyCache = selector+request.term; 6005 6006 if(that.cache[keyCache]) 6007 { 6008 response( that.cache[keyCache] ); 6009 return true; 6010 } 6011 6012 if ( that.xhr ) { 6013 that.xhr.abort(); 6014 } 6015 that.xhr = $.ajax( { 6016 url: url, 6017 data: request, 6018 dataType: "json", 6019 success: function( data ) { 6020 that.cache[keyCache]=data; 6021 response( data ); 6022 }, 6023 error: function() { 6024 response( [] ); 6025 } 6026 } ); 6027 }; 6028 6029 6030 } else { 6031 this.source = this.options.source; 6032 } 6033 }, 6034 6035 _searchTimeout: function( event ) { 6036 clearTimeout( this.searching ); 6037 this.searching = this._delay( function() { 6038 6039 // Search if the value has changed, or if the user retypes the same value (see #7434) 6040 var equalValues = this.term === this._value(), 6041 menuVisible = this.menu.element.is( ":visible" ), 6042 modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; 6043 6044 if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { 6045 this.selectedItem = null; 6046 this.search( null, event ); 6047 } 6048 }, this.options.delay ); 6049 }, 6050 6051 search: function( value, event ) { 6052 value = value != null ? value : this._value(); 6053 6054 // Always save the actual value, not the one passed as an argument 6055 this.term = this._value(); 6056 6057 if ( value.length < this.options.minLength ) { 6058 return this.close( event ); 6059 } 6060 6061 if ( this._trigger( "search", event ) === false ) { 6062 return; 6063 } 6064 6065 return this._search( value ); 6066 }, 6067 6068 _search: function( value ) { 6069 6070 var that = this; 6071 clearTimeout($.data(this, 'timer-response')); 6072 6073 $.data(this, 'timer-response', setTimeout($.proxy(function() { 6074 6075 that.pending++; 6076 that._addClass( "ui-autocomplete-loading" ); 6077 that.cancelSearch = false; 6078 that.source( { 6079 term: value, 6080 site_id: $("input.site_id").val() 6081 }, that._response() ); 6082 6083 }, this), 1000)); 6084 6085 6086 }, 6087 6088 _response: function() { 6089 var index = ++this.requestIndex; 6090 6091 return $.proxy( function( content ) { 6092 var th = this; 6093 setTimeout(function() { 6094 if ( index === th.requestIndex ) { 6095 th.__response( content ); 6096 } 6097 th.pending--; 6098 6099 6100 if ( !th.pending ) { 6101 th._removeClass( "ui-autocomplete-loading" ); 6102 } 6103 6104 }, 600); 6105 6106 }, this ); 6107 }, 6108 6109 __response: function( content ) { 6110 if ( content ) { 6111 content = this._normalize( content ); 6112 } 6113 this._trigger( "response", null, { content: content } ); 6114 if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { 6115 this._suggest( content ); 6116 this._trigger( "open" ); 6117 } else { 6118 6119 // use ._close() instead of .close() so we don't cancel future searches 6120 this._close(); 6121 } 6122 }, 6123 6124 close: function( event ) { 6125 this.cancelSearch = true; 6126 this._close( event ); 6127 }, 6128 6129 _close: function( event ) { 6130 6131 // Remove the handler that closes the menu on outside clicks 6132 this._off( this.document, "mousedown" ); 6133 6134 if ( this.menu.element.is( ":visible" ) ) { 6135 this.menu.element.hide(); 6136 this.menu.blur(); 6137 this.isNewMenu = true; 6138 this._trigger( "close", event ); 6139 } 6140 }, 6141 6142 _change: function( event ) { 6143 if ( this.previous !== this._value() ) { 6144 this._trigger( "change", event, { item: this.selectedItem } ); 6145 } 6146 }, 6147 6148 _normalize: function( items ) { 6149 6150 // assume all items have the right format when the first item is complete 6151 if ( items.length && items[ 0 ].label && items[ 0 ].value ) { 6152 return items; 6153 } 6154 return $.map( items, function( item ) { 6155 if ( typeof item === "string" ) { 6156 return { 6157 label: item, 6158 value: item 6159 }; 6160 } 6161 return $.extend( {}, item, { 6162 label: item.label || item.value, 6163 value: item.value || item.label 6164 } ); 6165 } ); 6166 }, 6167 6168 _suggest: function( items ) { 6169 var ul = this.menu.element.empty(); 6170 this._renderMenu( ul, items ); 6171 this.isNewMenu = true; 6172 this.menu.refresh(); 6173 6174 // Size and position menu 6175 ul.show(); 6176 this._resizeMenu(); 6177 ul.position( $.extend( { 6178 of: this.element 6179 }, this.options.position ) ); 6180 6181 if ( this.options.autoFocus ) { 6182 this.menu.next(); 6183 } 6184 6185 // Listen for interactions outside of the widget (#6642) 6186 this._on( this.document, { 6187 mousedown: "_closeOnClickOutside" 6188 } ); 6189 }, 6190 6191 _resizeMenu: function() { 6192 var ul = this.menu.element; 6193 ul.outerWidth( Math.max( 6194 6195 // Firefox wraps long text (possibly a rounding bug) 6196 // so we add 1px to avoid the wrapping (#7513) 6197 ul.width( "" ).outerWidth() + 1, 6198 this.element.outerWidth() 6199 ) ); 6200 }, 6201 6202 _renderMenu: function( ul, items ) { 6203 var that = this; 6204 $.each( items, function( index, item ) { 6205 that._renderItemData( ul, item ); 6206 } ); 6207 }, 6208 6209 _renderItemData: function( ul, item ) { 6210 return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); 6211 }, 6212 6213 _renderItem: function( ul, item ) { 6214 return $( "<li>" ) 6215 .append( $( "<div>" ).text( item.label ) ) 6216 .appendTo( ul ); 6217 }, 6218 6219 _move: function( direction, event ) { 6220 if ( !this.menu.element.is( ":visible" ) ) { 6221 this.search( null, event ); 6222 return; 6223 } 6224 if ( this.menu.isFirstItem() && /^previous/.test( direction ) || 6225 this.menu.isLastItem() && /^next/.test( direction ) ) { 6226 6227 if ( !this.isMultiLine ) { 6228 this._value( this.term ); 6229 } 6230 6231 this.menu.blur(); 6232 return; 6233 } 6234 this.menu[ direction ]( event ); 6235 }, 6236 6237 widget: function() { 6238 return this.menu.element; 6239 }, 6240 6241 _value: function() { 6242 return this.valueMethod.apply( this.element, arguments ); 6243 }, 6244 6245 _keyEvent: function( keyEvent, event ) { 6246 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 6247 this._move( keyEvent, event ); 6248 6249 // Prevents moving cursor to beginning/end of the text field in some browsers 6250 event.preventDefault(); 6251 } 6252 }, 6253 6254 // Support: Chrome <=50 6255 // We should be able to just use this.element.prop( "isContentEditable" ) 6256 // but hidden elements always report false in Chrome. 6257 // https://code.google.com/p/chromium/issues/detail?id=313082 6258 _isContentEditable: function( element ) { 6259 if ( !element.length ) { 6260 return false; 6261 } 6262 6263 var editable = element.prop( "contentEditable" ); 6264 6265 if ( editable === "inherit" ) { 6266 return this._isContentEditable( element.parent() ); 6267 } 6268 6269 return editable === "true"; 6270 } 6271} ); 6272 6273$.extend( $.ui.autocomplete, { 6274 escapeRegex: function( value ) { 6275 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); 6276 }, 6277 filter: function( array, term ) { 6278 var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); 6279 return $.grep( array, function( value ) { 6280 return matcher.test( value.label || value.value || value ); 6281 } ); 6282 } 6283} ); 6284 6285// Live region extension, adding a `messages` option 6286// NOTE: This is an experimental API. We are still investigating 6287// a full solution for string manipulation and internationalization. 6288$.widget( "ui.autocomplete", $.ui.autocomplete, { 6289 options: { 6290 messages: { 6291 noResults: "No search results.", 6292 results: function( amount ) { 6293 return amount + ( amount > 1 ? " results are" : " result is" ) + 6294 " available, use up and down arrow keys to navigate."; 6295 } 6296 } 6297 }, 6298 6299 __response: function( content ) { 6300 var message; 6301 this._superApply( arguments ); 6302 if ( this.options.disabled || this.cancelSearch ) { 6303 return; 6304 } 6305 if ( content && content.length ) { 6306 message = this.options.messages.results( content.length ); 6307 } else { 6308 message = this.options.messages.noResults; 6309 } 6310 this.liveRegion.children().hide(); 6311 $( "<div>" ).text( message ).appendTo( this.liveRegion ); 6312 } 6313} ); 6314 6315var widgetsAutocomplete = $.ui.autocomplete; 6316 6317 6318/*! 6319 * jQuery UI Controlgroup 1.12.1 6320 * http://jqueryui.com 6321 * 6322 * Copyright jQuery Foundation and other contributors 6323 * Released under the MIT license. 6324 * http://jquery.org/license 6325 */ 6326 6327//>>label: Controlgroup 6328//>>group: Widgets 6329//>>description: Visually groups form control widgets 6330//>>docs: http://api.jqueryui.com/controlgroup/ 6331//>>demos: http://jqueryui.com/controlgroup/ 6332//>>css.structure: ../../themes/base/core.css 6333//>>css.structure: ../../themes/base/controlgroup.css 6334//>>css.theme: ../../themes/base/theme.css 6335 6336 6337var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g; 6338 6339var widgetsControlgroup = $.widget( "ui.controlgroup", { 6340 version: "1.12.1", 6341 defaultElement: "<div>", 6342 options: { 6343 direction: "horizontal", 6344 disabled: null, 6345 onlyVisible: true, 6346 items: { 6347 "button": "input[type=button], input[type=submit], input[type=reset], button, a", 6348 "controlgroupLabel": ".ui-controlgroup-label", 6349 "checkboxradio": "input[type='checkbox'], input[type='radio']", 6350 "selectmenu": "select", 6351 "spinner": ".ui-spinner-input" 6352 } 6353 }, 6354 6355 _create: function() { 6356 this._enhance(); 6357 }, 6358 6359 // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation 6360 _enhance: function() { 6361 this.element.attr( "role", "toolbar" ); 6362 this.refresh(); 6363 }, 6364 6365 _destroy: function() { 6366 this._callChildMethod( "destroy" ); 6367 this.childWidgets.removeData( "ui-controlgroup-data" ); 6368 this.element.removeAttr( "role" ); 6369 if ( this.options.items.controlgroupLabel ) { 6370 this.element 6371 .find( this.options.items.controlgroupLabel ) 6372 .find( ".ui-controlgroup-label-contents" ) 6373 .contents().unwrap(); 6374 } 6375 }, 6376 6377 _initWidgets: function() { 6378 var that = this, 6379 childWidgets = []; 6380 6381 // First we iterate over each of the items options 6382 $.each( this.options.items, function( widget, selector ) { 6383 var labels; 6384 var options = {}; 6385 6386 // Make sure the widget has a selector set 6387 if ( !selector ) { 6388 return; 6389 } 6390 6391 if ( widget === "controlgroupLabel" ) { 6392 labels = that.element.find( selector ); 6393 labels.each( function() { 6394 var element = $( this ); 6395 6396 if ( element.children( ".ui-controlgroup-label-contents" ).length ) { 6397 return; 6398 } 6399 element.contents() 6400 .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" ); 6401 } ); 6402 that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" ); 6403 childWidgets = childWidgets.concat( labels.get() ); 6404 return; 6405 } 6406 6407 // Make sure the widget actually exists 6408 if ( !$.fn[ widget ] ) { 6409 return; 6410 } 6411 6412 // We assume everything is in the middle to start because we can't determine 6413 // first / last elements until all enhancments are done. 6414 if ( that[ "_" + widget + "Options" ] ) { 6415 options = that[ "_" + widget + "Options" ]( "middle" ); 6416 } else { 6417 options = { classes: {} }; 6418 } 6419 6420 // Find instances of this widget inside controlgroup and init them 6421 that.element 6422 .find( selector ) 6423 .each( function() { 6424 var element = $( this ); 6425 var instance = element[ widget ]( "instance" ); 6426 6427 // We need to clone the default options for this type of widget to avoid 6428 // polluting the variable options which has a wider scope than a single widget. 6429 var instanceOptions = $.widget.extend( {}, options ); 6430 6431 // If the button is the child of a spinner ignore it 6432 // TODO: Find a more generic solution 6433 if ( widget === "button" && element.parent( ".ui-spinner" ).length ) { 6434 return; 6435 } 6436 6437 // Create the widget if it doesn't exist 6438 if ( !instance ) { 6439 instance = element[ widget ]()[ widget ]( "instance" ); 6440 } 6441 if ( instance ) { 6442 instanceOptions.classes = 6443 that._resolveClassesValues( instanceOptions.classes, instance ); 6444 } 6445 element[ widget ]( instanceOptions ); 6446 6447 // Store an instance of the controlgroup to be able to reference 6448 // from the outermost element for changing options and refresh 6449 var widgetElement = element[ widget ]( "widget" ); 6450 $.data( widgetElement[ 0 ], "ui-controlgroup-data", 6451 instance ? instance : element[ widget ]( "instance" ) ); 6452 6453 childWidgets.push( widgetElement[ 0 ] ); 6454 } ); 6455 } ); 6456 6457 this.childWidgets = $( $.unique( childWidgets ) ); 6458 this._addClass( this.childWidgets, "ui-controlgroup-item" ); 6459 }, 6460 6461 _callChildMethod: function( method ) { 6462 this.childWidgets.each( function() { 6463 var element = $( this ), 6464 data = element.data( "ui-controlgroup-data" ); 6465 if ( data && data[ method ] ) { 6466 data[ method ](); 6467 } 6468 } ); 6469 }, 6470 6471 _updateCornerClass: function( element, position ) { 6472 var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"; 6473 var add = this._buildSimpleOptions( position, "label" ).classes.label; 6474 6475 this._removeClass( element, null, remove ); 6476 this._addClass( element, null, add ); 6477 }, 6478 6479 _buildSimpleOptions: function( position, key ) { 6480 var direction = this.options.direction === "vertical"; 6481 var result = { 6482 classes: {} 6483 }; 6484 result.classes[ key ] = { 6485 "middle": "", 6486 "first": "ui-corner-" + ( direction ? "top" : "left" ), 6487 "last": "ui-corner-" + ( direction ? "bottom" : "right" ), 6488 "only": "ui-corner-all" 6489 }[ position ]; 6490 6491 return result; 6492 }, 6493 6494 _spinnerOptions: function( position ) { 6495 var options = this._buildSimpleOptions( position, "ui-spinner" ); 6496 6497 options.classes[ "ui-spinner-up" ] = ""; 6498 options.classes[ "ui-spinner-down" ] = ""; 6499 6500 return options; 6501 }, 6502 6503 _buttonOptions: function( position ) { 6504 return this._buildSimpleOptions( position, "ui-button" ); 6505 }, 6506 6507 _checkboxradioOptions: function( position ) { 6508 return this._buildSimpleOptions( position, "ui-checkboxradio-label" ); 6509 }, 6510 6511 _selectmenuOptions: function( position ) { 6512 var direction = this.options.direction === "vertical"; 6513 return { 6514 width: direction ? "auto" : false, 6515 classes: { 6516 middle: { 6517 "ui-selectmenu-button-open": "", 6518 "ui-selectmenu-button-closed": "" 6519 }, 6520 first: { 6521 "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ), 6522 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" ) 6523 }, 6524 last: { 6525 "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr", 6526 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" ) 6527 }, 6528 only: { 6529 "ui-selectmenu-button-open": "ui-corner-top", 6530 "ui-selectmenu-button-closed": "ui-corner-all" 6531 } 6532 6533 }[ position ] 6534 }; 6535 }, 6536 6537 _resolveClassesValues: function( classes, instance ) { 6538 var result = {}; 6539 $.each( classes, function( key ) { 6540 var current = instance.options.classes[ key ] || ""; 6541 current = $.trim( current.replace( controlgroupCornerRegex, "" ) ); 6542 result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); 6543 } ); 6544 return result; 6545 }, 6546 6547 _setOption: function( key, value ) { 6548 if ( key === "direction" ) { 6549 this._removeClass( "ui-controlgroup-" + this.options.direction ); 6550 } 6551 6552 this._super( key, value ); 6553 if ( key === "disabled" ) { 6554 this._callChildMethod( value ? "disable" : "enable" ); 6555 return; 6556 } 6557 6558 this.refresh(); 6559 }, 6560 6561 refresh: function() { 6562 var children, 6563 that = this; 6564 6565 this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction ); 6566 6567 if ( this.options.direction === "horizontal" ) { 6568 this._addClass( null, "ui-helper-clearfix" ); 6569 } 6570 this._initWidgets(); 6571 6572 children = this.childWidgets; 6573 6574 // We filter here because we need to track all childWidgets not just the visible ones 6575 if ( this.options.onlyVisible ) { 6576 children = children.filter( ":visible" ); 6577 } 6578 6579 if ( children.length ) { 6580 6581 // We do this last because we need to make sure all enhancment is done 6582 // before determining first and last 6583 $.each( [ "first", "last" ], function( index, value ) { 6584 var instance = children[ value ]().data( "ui-controlgroup-data" ); 6585 6586 if ( instance && that[ "_" + instance.widgetName + "Options" ] ) { 6587 var options = that[ "_" + instance.widgetName + "Options" ]( 6588 children.length === 1 ? "only" : value 6589 ); 6590 options.classes = that._resolveClassesValues( options.classes, instance ); 6591 instance.element[ instance.widgetName ]( options ); 6592 } else { 6593 that._updateCornerClass( children[ value ](), value ); 6594 } 6595 } ); 6596 6597 // Finally call the refresh method on each of the child widgets. 6598 this._callChildMethod( "refresh" ); 6599 } 6600 } 6601} ); 6602 6603/*! 6604 * jQuery UI Checkboxradio 1.12.1 6605 * http://jqueryui.com 6606 * 6607 * Copyright jQuery Foundation and other contributors 6608 * Released under the MIT license. 6609 * http://jquery.org/license 6610 */ 6611 6612//>>label: Checkboxradio 6613//>>group: Widgets 6614//>>description: Enhances a form with multiple themeable checkboxes or radio buttons. 6615//>>docs: http://api.jqueryui.com/checkboxradio/ 6616//>>demos: http://jqueryui.com/checkboxradio/ 6617//>>css.structure: ../../themes/base/core.css 6618//>>css.structure: ../../themes/base/button.css 6619//>>css.structure: ../../themes/base/checkboxradio.css 6620//>>css.theme: ../../themes/base/theme.css 6621 6622 6623 6624$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { 6625 version: "1.12.1", 6626 options: { 6627 disabled: null, 6628 label: null, 6629 icon: true, 6630 classes: { 6631 "ui-checkboxradio-label": "ui-corner-all", 6632 "ui-checkboxradio-icon": "ui-corner-all" 6633 } 6634 }, 6635 6636 _getCreateOptions: function() { 6637 var disabled, labels; 6638 var that = this; 6639 var options = this._super() || {}; 6640 6641 // We read the type here, because it makes more sense to throw a element type error first, 6642 // rather then the error for lack of a label. Often if its the wrong type, it 6643 // won't have a label (e.g. calling on a div, btn, etc) 6644 this._readType(); 6645 6646 labels = this.element.labels(); 6647 6648 // If there are multiple labels, use the last one 6649 this.label = $( labels[ labels.length - 1 ] ); 6650 if ( !this.label.length ) { 6651 $.error( "No label found for checkboxradio widget" ); 6652 } 6653 6654 this.originalLabel = ""; 6655 6656 // We need to get the label text but this may also need to make sure it does not contain the 6657 // input itself. 6658 this.label.contents().not( this.element[ 0 ] ).each( function() { 6659 6660 // The label contents could be text, html, or a mix. We concat each element to get a 6661 // string representation of the label, without the input as part of it. 6662 that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML; 6663 } ); 6664 6665 // Set the label option if we found label text 6666 if ( this.originalLabel ) { 6667 options.label = this.originalLabel; 6668 } 6669 6670 disabled = this.element[ 0 ].disabled; 6671 if ( disabled != null ) { 6672 options.disabled = disabled; 6673 } 6674 return options; 6675 }, 6676 6677 _create: function() { 6678 var checked = this.element[ 0 ].checked; 6679 6680 this._bindFormResetHandler(); 6681 6682 if ( this.options.disabled == null ) { 6683 this.options.disabled = this.element[ 0 ].disabled; 6684 } 6685 6686 this._setOption( "disabled", this.options.disabled ); 6687 this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" ); 6688 this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" ); 6689 6690 if ( this.type === "radio" ) { 6691 this._addClass( this.label, "ui-checkboxradio-radio-label" ); 6692 } 6693 6694 if ( this.options.label && this.options.label !== this.originalLabel ) { 6695 this._updateLabel(); 6696 } else if ( this.originalLabel ) { 6697 this.options.label = this.originalLabel; 6698 } 6699 6700 this._enhance(); 6701 6702 if ( checked ) { 6703 this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" ); 6704 if ( this.icon ) { 6705 this._addClass( this.icon, null, "ui-state-hover" ); 6706 } 6707 } 6708 6709 this._on( { 6710 change: "_toggleClasses", 6711 focus: function() { 6712 this._addClass( this.label, null, "ui-state-focus ui-visual-focus" ); 6713 }, 6714 blur: function() { 6715 this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" ); 6716 } 6717 } ); 6718 }, 6719 6720 _readType: function() { 6721 var nodeName = this.element[ 0 ].nodeName.toLowerCase(); 6722 this.type = this.element[ 0 ].type; 6723 if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) { 6724 $.error( "Can't create checkboxradio on element.nodeName=" + nodeName + 6725 " and element.type=" + this.type ); 6726 } 6727 }, 6728 6729 // Support jQuery Mobile enhanced option 6730 _enhance: function() { 6731 this._updateIcon( this.element[ 0 ].checked ); 6732 }, 6733 6734 widget: function() { 6735 return this.label; 6736 }, 6737 6738 _getRadioGroup: function() { 6739 var group; 6740 var name = this.element[ 0 ].name; 6741 var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']"; 6742 6743 if ( !name ) { 6744 return $( [] ); 6745 } 6746 6747 if ( this.form.length ) { 6748 group = $( this.form[ 0 ].elements ).filter( nameSelector ); 6749 } else { 6750 6751 // Not inside a form, check all inputs that also are not inside a form 6752 group = $( nameSelector ).filter( function() { 6753 return $( this ).form().length === 0; 6754 } ); 6755 } 6756 6757 return group.not( this.element ); 6758 }, 6759 6760 _toggleClasses: function() { 6761 var checked = this.element[ 0 ].checked; 6762 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 6763 6764 if ( this.options.icon && this.type === "checkbox" ) { 6765 this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked ) 6766 ._toggleClass( this.icon, null, "ui-icon-blank", !checked ); 6767 } 6768 6769 if ( this.type === "radio" ) { 6770 this._getRadioGroup() 6771 .each( function() { 6772 var instance = $( this ).checkboxradio( "instance" ); 6773 6774 if ( instance ) { 6775 instance._removeClass( instance.label, 6776 "ui-checkboxradio-checked", "ui-state-active" ); 6777 } 6778 } ); 6779 } 6780 }, 6781 6782 _destroy: function() { 6783 this._unbindFormResetHandler(); 6784 6785 if ( this.icon ) { 6786 this.icon.remove();
vendor: 4,659 bytes, lines 6787-6960
6787 this.iconSpace.remove(); 6788 } 6789 }, 6790 6791 _setOption: function( key, value ) { 6792 6793 // We don't allow the value to be set to nothing 6794 if ( key === "label" && !value ) { 6795 return; 6796 } 6797 6798 this._super( key, value ); 6799 6800 if ( key === "disabled" ) { 6801 this._toggleClass( this.label, null, "ui-state-disabled", value ); 6802 this.element[ 0 ].disabled = value; 6803 6804 // Don't refresh when setting disabled 6805 return; 6806 } 6807 this.refresh(); 6808 }, 6809 6810 _updateIcon: function( checked ) { 6811 var toAdd = "ui-icon ui-icon-background "; 6812 6813 if ( this.options.icon ) { 6814 if ( !this.icon ) { 6815 this.icon = $( "<span>" ); 6816 this.iconSpace = $( "<span> </span>" ); 6817 this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" ); 6818 } 6819 6820 if ( this.type === "checkbox" ) { 6821 toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank"; 6822 this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" ); 6823 } else { 6824 toAdd += "ui-icon-blank"; 6825 } 6826 this._addClass( this.icon, "ui-checkboxradio-icon", toAdd ); 6827 if ( !checked ) { 6828 this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" ); 6829 } 6830 this.icon.prependTo( this.label ).after( this.iconSpace ); 6831 } else if ( this.icon !== undefined ) { 6832 this.icon.remove(); 6833 this.iconSpace.remove(); 6834 delete this.icon; 6835 } 6836 }, 6837 6838 _updateLabel: function() { 6839 6840 // Remove the contents of the label ( minus the icon, icon space, and input ) 6841 var contents = this.label.contents().not( this.element[ 0 ] ); 6842 if ( this.icon ) { 6843 contents = contents.not( this.icon[ 0 ] ); 6844 } 6845 if ( this.iconSpace ) { 6846 contents = contents.not( this.iconSpace[ 0 ] ); 6847 } 6848 contents.remove(); 6849 6850 this.label.append( this.options.label ); 6851 }, 6852 6853 refresh: function() { 6854 var checked = this.element[ 0 ].checked, 6855 isDisabled = this.element[ 0 ].disabled; 6856 6857 this._updateIcon( checked ); 6858 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 6859 if ( this.options.label !== null ) { 6860 this._updateLabel(); 6861 } 6862 6863 if ( isDisabled !== this.options.disabled ) { 6864 this._setOptions( { "disabled": isDisabled } ); 6865 } 6866 } 6867 6868} ] ); 6869 6870var widgetsCheckboxradio = $.ui.checkboxradio; 6871 6872 6873/*! 6874 * jQuery UI Button 1.12.1 6875 * http://jqueryui.com 6876 * 6877 * Copyright jQuery Foundation and other contributors 6878 * Released under the MIT license. 6879 * http://jquery.org/license 6880 */ 6881 6882//>>label: Button 6883//>>group: Widgets 6884//>>description: Enhances a form with themeable buttons. 6885//>>docs: http://api.jqueryui.com/button/ 6886//>>demos: http://jqueryui.com/button/ 6887//>>css.structure: ../../themes/base/core.css 6888//>>css.structure: ../../themes/base/button.css 6889//>>css.theme: ../../themes/base/theme.css 6890 6891 6892 6893$.widget( "ui.button", { 6894 version: "1.12.1", 6895 defaultElement: "<button>", 6896 options: { 6897 classes: { 6898 "ui-button": "ui-corner-all" 6899 }, 6900 disabled: null, 6901 icon: null, 6902 iconPosition: "beginning", 6903 label: null, 6904 showLabel: true 6905 }, 6906 6907 _getCreateOptions: function() { 6908 var disabled, 6909 6910 // This is to support cases like in jQuery Mobile where the base widget does have 6911 // an implementation of _getCreateOptions 6912 options = this._super() || {}; 6913 6914 this.isInput = this.element.is( "input" ); 6915 6916 disabled = this.element[ 0 ].disabled; 6917 if ( disabled != null ) { 6918 options.disabled = disabled; 6919 } 6920 6921 this.originalLabel = this.isInput ? this.element.val() : this.element.html(); 6922 if ( this.originalLabel ) { 6923 options.label = this.originalLabel; 6924 } 6925 6926 return options; 6927 }, 6928 6929 _create: function() { 6930 if ( !this.option.showLabel & !this.options.icon ) { 6931 this.options.showLabel = true; 6932 } 6933 6934 // We have to check the option again here even though we did in _getCreateOptions, 6935 // because null may have been passed on init which would override what was set in 6936 // _getCreateOptions 6937 if ( this.options.disabled == null ) { 6938 this.options.disabled = this.element[ 0 ].disabled || false; 6939 } 6940 6941 this.hasTitle = !!this.element.attr( "title" ); 6942 6943 // Check to see if the label needs to be set or if its already correct 6944 if ( this.options.label && this.options.label !== this.originalLabel ) { 6945 if ( this.isInput ) { 6946 this.element.val( this.options.label ); 6947 } else { 6948 this.element.html( this.options.label ); 6949 } 6950 } 6951 this._addClass( "ui-button", "ui-widget" ); 6952 this._setOption( "disabled", this.options.disabled ); 6953 this._enhance(); 6954 6955 if ( this.element.is( "a" ) ) { 6956 this._on( { 6957 "keyup": function( event ) { 6958 if ( event.keyCode === $.ui.keyCode.SPACE ) { 6959 event.preventDefault(); 6960
vendor: 7,743 bytes, lines 6961-7243
6961 // Support: PhantomJS <= 1.9, IE 8 Only 6962 // If a native click is available use it so we actually cause navigation 6963 // otherwise just trigger a click event 6964 if ( this.element[ 0 ].click ) { 6965 this.element[ 0 ].click(); 6966 } else { 6967 this.element.trigger( "click" ); 6968 } 6969 } 6970 } 6971 } ); 6972 } 6973 }, 6974 6975 _enhance: function() { 6976 if ( !this.element.is( "button" ) ) { 6977 this.element.attr( "role", "button" ); 6978 } 6979 6980 if ( this.options.icon ) { 6981 this._updateIcon( "icon", this.options.icon ); 6982 this._updateTooltip(); 6983 } 6984 }, 6985 6986 _updateTooltip: function() { 6987 this.title = this.element.attr( "title" ); 6988 6989 if ( !this.options.showLabel && !this.title ) { 6990 this.element.attr( "title", this.options.label ); 6991 } 6992 }, 6993 6994 _updateIcon: function( option, value ) { 6995 var icon = option !== "iconPosition", 6996 position = icon ? this.options.iconPosition : value, 6997 displayBlock = position === "top" || position === "bottom"; 6998 6999 // Create icon 7000 if ( !this.icon ) { 7001 this.icon = $( "<span>" ); 7002 7003 this._addClass( this.icon, "ui-button-icon", "ui-icon" ); 7004 7005 if ( !this.options.showLabel ) { 7006 this._addClass( "ui-button-icon-only" ); 7007 } 7008 } else if ( icon ) { 7009 7010 // If we are updating the icon remove the old icon class 7011 this._removeClass( this.icon, null, this.options.icon ); 7012 } 7013 7014 // If we are updating the icon add the new icon class 7015 if ( icon ) { 7016 this._addClass( this.icon, null, value ); 7017 } 7018 7019 this._attachIcon( position ); 7020 7021 // If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove 7022 // the iconSpace if there is one. 7023 if ( displayBlock ) { 7024 this._addClass( this.icon, null, "ui-widget-icon-block" ); 7025 if ( this.iconSpace ) { 7026 this.iconSpace.remove(); 7027 } 7028 } else { 7029 7030 // Position is beginning or end so remove the ui-widget-icon-block class and add the 7031 // space if it does not exist 7032 if ( !this.iconSpace ) { 7033 this.iconSpace = $( "<span> </span>" ); 7034 this._addClass( this.iconSpace, "ui-button-icon-space" ); 7035 } 7036 this._removeClass( this.icon, null, "ui-wiget-icon-block" ); 7037 this._attachIconSpace( position ); 7038 } 7039 }, 7040 7041 _destroy: function() { 7042 this.element.removeAttr( "role" ); 7043 7044 if ( this.icon ) { 7045 this.icon.remove(); 7046 } 7047 if ( this.iconSpace ) { 7048 this.iconSpace.remove(); 7049 } 7050 if ( !this.hasTitle ) { 7051 this.element.removeAttr( "title" ); 7052 } 7053 }, 7054 7055 _attachIconSpace: function( iconPosition ) { 7056 this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace ); 7057 }, 7058 7059 _attachIcon: function( iconPosition ) { 7060 this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon ); 7061 }, 7062 7063 _setOptions: function( options ) { 7064 var newShowLabel = options.showLabel === undefined ? 7065 this.options.showLabel : 7066 options.showLabel, 7067 newIcon = options.icon === undefined ? this.options.icon : options.icon; 7068 7069 if ( !newShowLabel && !newIcon ) { 7070 options.showLabel = true; 7071 } 7072 this._super( options ); 7073 }, 7074 7075 _setOption: function( key, value ) { 7076 if ( key === "icon" ) { 7077 if ( value ) { 7078 this._updateIcon( key, value ); 7079 } else if ( this.icon ) { 7080 this.icon.remove(); 7081 if ( this.iconSpace ) { 7082 this.iconSpace.remove(); 7083 } 7084 } 7085 } 7086 7087 if ( key === "iconPosition" ) { 7088 this._updateIcon( key, value ); 7089 } 7090 7091 // Make sure we can't end up with a button that has neither text nor icon 7092 if ( key === "showLabel" ) { 7093 this._toggleClass( "ui-button-icon-only", null, !value ); 7094 this._updateTooltip(); 7095 } 7096 7097 if ( key === "label" ) { 7098 if ( this.isInput ) { 7099 this.element.val( value ); 7100 } else { 7101 7102 // If there is an icon, append it, else nothing then append the value 7103 // this avoids removal of the icon when setting label text 7104 this.element.html( value ); 7105 if ( this.icon ) { 7106 this._attachIcon( this.options.iconPosition ); 7107 this._attachIconSpace( this.options.iconPosition ); 7108 } 7109 } 7110 } 7111 7112 this._super( key, value ); 7113 7114 if ( key === "disabled" ) { 7115 this._toggleClass( null, "ui-state-disabled", value ); 7116 this.element[ 0 ].disabled = value; 7117 if ( value ) { 7118 this.element.blur(); 7119 } 7120 } 7121 }, 7122 7123 refresh: function() { 7124 7125 // Make sure to only check disabled if its an element that supports this otherwise 7126 // check for the disabled class to determine state 7127 var isDisabled = this.element.is( "input, button" ) ? 7128 this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" ); 7129 7130 if ( isDisabled !== this.options.disabled ) { 7131 this._setOptions( { disabled: isDisabled } ); 7132 } 7133 7134 this._updateTooltip(); 7135 } 7136} ); 7137 7138// DEPRECATED 7139if ( $.uiBackCompat !== false ) { 7140 7141 // Text and Icons options 7142 $.widget( "ui.button", $.ui.button, { 7143 options: { 7144 text: true, 7145 icons: { 7146 primary: null, 7147 secondary: null 7148 } 7149 }, 7150 7151 _create: function() { 7152 if ( this.options.showLabel && !this.options.text ) { 7153 this.options.showLabel = this.options.text; 7154 } 7155 if ( !this.options.showLabel && this.options.text ) { 7156 this.options.text = this.options.showLabel; 7157 } 7158 if ( !this.options.icon && ( this.options.icons.primary || 7159 this.options.icons.secondary ) ) { 7160 if ( this.options.icons.primary ) { 7161 this.options.icon = this.options.icons.primary; 7162 } else { 7163 this.options.icon = this.options.icons.secondary; 7164 this.options.iconPosition = "end"; 7165 } 7166 } else if ( this.options.icon ) { 7167 this.options.icons.primary = this.options.icon; 7168 } 7169 this._super(); 7170 }, 7171 7172 _setOption: function( key, value ) { 7173 if ( key === "text" ) { 7174 this._super( "showLabel", value ); 7175 return; 7176 } 7177 if ( key === "showLabel" ) { 7178 this.options.text = value; 7179 } 7180 if ( key === "icon" ) { 7181 this.options.icons.primary = value; 7182 } 7183 if ( key === "icons" ) { 7184 if ( value.primary ) { 7185 this._super( "icon", value.primary ); 7186 this._super( "iconPosition", "beginning" ); 7187 } else if ( value.secondary ) { 7188 this._super( "icon", value.secondary ); 7189 this._super( "iconPosition", "end" ); 7190 } 7191 } 7192 this._superApply( arguments ); 7193 } 7194 } ); 7195 7196 $.fn.button = ( function( orig ) { 7197 return function() { 7198 if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) || 7199 ( this.length && this[ 0 ].tagName === "INPUT" && ( 7200 this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio" 7201 ) ) ) { 7202 return orig.apply( this, arguments ); 7203 } 7204 if ( !$.ui.checkboxradio ) { 7205 $.error( "Checkboxradio widget missing" ); 7206 } 7207 if ( arguments.length === 0 ) { 7208 return this.checkboxradio( { 7209 "icon": false 7210 } ); 7211 } 7212 return this.checkboxradio.apply( this, arguments ); 7213 }; 7214 } )( $.fn.button ); 7215 7216 $.fn.buttonset = function() { 7217 if ( !$.ui.controlgroup ) { 7218 $.error( "Controlgroup widget missing" ); 7219 } 7220 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) { 7221 return this.controlgroup.apply( this, 7222 [ arguments[ 0 ], "items.button", arguments[ 2 ] ] ); 7223 } 7224 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) { 7225 return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] ); 7226 } 7227 if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) { 7228 arguments[ 0 ].items = { 7229 button: arguments[ 0 ].items 7230 }; 7231 } 7232 return this.controlgroup.apply( this, arguments ); 7233 }; 7234} 7235 7236var widgetsButton = $.ui.button; 7237 7238 7239// jscs:disable maximumLineLength 7240/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */ 7241/*! 7242 * jQuery UI Datepicker 1.12.1 7243 * http://jqueryui.com
vendor: 4,553 bytes, lines 7244-7330
7244 * 7245 * Copyright jQuery Foundation and other contributors 7246 * Released under the MIT license. 7247 * http://jquery.org/license 7248 */ 7249 7250//>>label: Datepicker 7251//>>group: Widgets 7252//>>description: Displays a calendar from an input or inline for selecting dates. 7253//>>docs: http://api.jqueryui.com/datepicker/ 7254//>>demos: http://jqueryui.com/datepicker/ 7255//>>css.structure: ../../themes/base/core.css 7256//>>css.structure: ../../themes/base/datepicker.css 7257//>>css.theme: ../../themes/base/theme.css 7258 7259 7260 7261$.extend( $.ui, { datepicker: { version: "1.12.1" } } ); 7262 7263var datepicker_instActive; 7264 7265function datepicker_getZindex( elem ) { 7266 var position, value; 7267 while ( elem.length && elem[ 0 ] !== document ) { 7268 7269 // Ignore z-index if position is set to a value where z-index is ignored by the browser 7270 // This makes behavior of this function consistent across browsers 7271 // WebKit always returns auto if the element is positioned 7272 position = elem.css( "position" ); 7273 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 7274 7275 // IE returns 0 when zIndex is not specified 7276 // other browsers return a string 7277 // we ignore the case of nested elements with an explicit value of 0 7278 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> 7279 value = parseInt( elem.css( "zIndex" ), 10 ); 7280 if ( !isNaN( value ) && value !== 0 ) { 7281 return value; 7282 } 7283 } 7284 elem = elem.parent(); 7285 } 7286 7287 return 0; 7288} 7289/* Date picker manager. 7290 Use the singleton instance of this class, $.datepicker, to interact with the date picker. 7291 Settings for (groups of) date pickers are maintained in an instance object, 7292 allowing multiple different settings on the same page. */ 7293 7294function Datepicker() { 7295 this._curInst = null; // The current instance in use 7296 this._keyEvent = false; // If the last event was a key event 7297 this._disabledInputs = []; // List of date picker inputs that have been disabled 7298 this._datepickerShowing = false; // True if the popup picker is showing , false if not 7299 this._inDialog = false; // True if showing within a "dialog", false if not 7300 this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division 7301 this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class 7302 this._appendClass = "ui-datepicker-append"; // The name of the append marker class 7303 this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class 7304 this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class 7305 this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class 7306 this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class 7307 this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class 7308 this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class 7309 this.regional = []; // Available regional settings, indexed by language code 7310 this.regional[ "" ] = { // Default regional settings 7311 closeText: "Done", // Display text for close link 7312 prevText: "Prev", // Display text for previous month link 7313 nextText: "Next", // Display text for next month link 7314 currentText: "Today", // Display text for current month link 7315 monthNames: [ "January","February","March","April","May","June", 7316 "July","August","September","October","November","December" ], // Names of months for drop-down and formatting 7317 monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting 7318 dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting 7319 dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting 7320 dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday 7321 weekHeader: "Wk", // Column header for week of the year 7322 dateFormat: "mm/dd/yy", // See format options on parseDate 7323 firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... 7324 isRTL: false, // True if right-to-left language, false if left-to-right 7325 showMonthAfterYear: false, // True if the year select precedes month, false for month then year 7326 yearSuffix: "" // Additional text to append to the year in the month headers 7327 }; 7328 this._defaults = { // Global defaults for all the date picker instances 7329 showOn: "focus", // "focus" for popup on focus, 7330 // "button" for trigger button, or "both" for either
vendor: 6,761 bytes, lines 7331-7463
7331 showAnim: "fadeIn", // Name of jQuery animation for popup 7332 showOptions: {}, // Options for enhanced animations 7333 defaultDate: null, // Used when field is blank: actual date, 7334 // +/-number for offset from today, null for today 7335 appendText: "", // Display text following the input box, e.g. showing the format 7336 buttonText: "...", // Text for trigger button 7337 buttonImage: "", // URL for trigger button image 7338 buttonImageOnly: false, // True if the image appears alone, false if it appears on a button 7339 hideIfNoPrevNext: false, // True to hide next/previous month links 7340 // if not applicable, false to just disable them 7341 navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links 7342 gotoCurrent: false, // True if today link goes back to current selection instead 7343 changeMonth: false, // True if month can be selected directly, false if only prev/next 7344 changeYear: false, // True if year can be selected directly, false if only prev/next 7345 yearRange: "c-10:c+10", // Range of years to display in drop-down, 7346 // either relative to today's year (-nn:+nn), relative to currently displayed year 7347 // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) 7348 showOtherMonths: false, // True to show dates in other months, false to leave blank 7349 selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable 7350 showWeek: false, // True to show week of the year, false to not show it 7351 calculateWeek: this.iso8601Week, // How to calculate the week of the year, 7352 // takes a Date and returns the number of the week for it 7353 shortYearCutoff: "+10", // Short year values < this are in the current century, 7354 // > this are in the previous century, 7355 // string value starting with "+" for current year + value 7356 minDate: null, // The earliest selectable date, or null for no limit 7357 maxDate: null, // The latest selectable date, or null for no limit 7358 duration: "fast", // Duration of display/closure 7359 beforeShowDay: null, // Function that takes a date and returns an array with 7360 // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", 7361 // [2] = cell title (optional), e.g. $.datepicker.noWeekends 7362 beforeShow: null, // Function that takes an input field and 7363 // returns a set of custom settings for the date picker 7364 onSelect: null, // Define a callback function when a date is selected 7365 onChangeMonthYear: null, // Define a callback function when the month or year is changed 7366 onClose: null, // Define a callback function when the datepicker is closed 7367 numberOfMonths: 1, // Number of months to show at a time 7368 showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) 7369 stepMonths: 1, // Number of months to step back/forward 7370 stepBigMonths: 12, // Number of months to step back/forward for the big links 7371 altField: "", // Selector for an alternate field to store selected dates into 7372 altFormat: "", // The date format to use for the alternate field 7373 constrainInput: true, // The input is constrained by the current date format 7374 showButtonPanel: false, // True to show button panel, false to not show it 7375 autoSize: false, // True to size the input for the date format, false to leave as is 7376 disabled: false // The initial disabled state 7377 }; 7378 $.extend( this._defaults, this.regional[ "" ] ); 7379 this.regional.en = $.extend( true, {}, this.regional[ "" ] ); 7380 this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); 7381 this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ); 7382} 7383 7384$.extend( Datepicker.prototype, { 7385 /* Class name added to elements to indicate already configured with a date picker. */ 7386 markerClassName: "hasDatepicker", 7387 7388 //Keep track of the maximum number of rows displayed (see #7043) 7389 maxRows: 4, 7390 7391 // TODO rename to "widget" when switching to widget factory 7392 _widgetDatepicker: function() { 7393 return this.dpDiv; 7394 }, 7395 7396 /* Override the default settings for all instances of the date picker. 7397 * @param settings object - the new settings to use as defaults (anonymous object) 7398 * @return the manager object 7399 */ 7400 setDefaults: function( settings ) { 7401 datepicker_extendRemove( this._defaults, settings || {} ); 7402 return this; 7403 }, 7404 7405 /* Attach the date picker to a jQuery selection. 7406 * @param target element - the target input field or division or span 7407 * @param settings object - the new settings to use for this date picker instance (anonymous) 7408 */ 7409 _attachDatepicker: function( target, settings ) { 7410 var nodeName, inline, inst; 7411 nodeName = target.nodeName.toLowerCase(); 7412 inline = ( nodeName === "div" || nodeName === "span" ); 7413 if ( !target.id ) { 7414 this.uuid += 1; 7415 target.id = "dp" + this.uuid; 7416 } 7417 inst = this._newInst( $( target ), inline ); 7418 inst.settings = $.extend( {}, settings || {} ); 7419 if ( nodeName === "input" ) { 7420 this._connectDatepicker( target, inst ); 7421 } else if ( inline ) { 7422 this._inlineDatepicker( target, inst ); 7423 } 7424 }, 7425 7426 /* Create a new instance object. */ 7427 _newInst: function( target, inline ) { 7428 var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars 7429 return { id: id, input: target, // associated target 7430 selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection 7431 drawMonth: 0, drawYear: 0, // month being drawn 7432 inline: inline, // is datepicker inline or not 7433 dpDiv: ( !inline ? this.dpDiv : // presentation div 7434 datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) }; 7435 }, 7436 7437 /* Attach the date picker to an input field. */ 7438 _connectDatepicker: function( target, inst ) { 7439 var input = $( target ); 7440 inst.append = $( [] ); 7441 inst.trigger = $( [] ); 7442 if ( input.hasClass( this.markerClassName ) ) { 7443 return; 7444 } 7445 this._attachments( input, inst ); 7446 input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ). 7447 on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp ); 7448 this._autoSize( inst ); 7449 $.data( target, "datepicker", inst ); 7450 7451 //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) 7452 if ( inst.settings.disabled ) { 7453 this._disableDatepicker( target ); 7454 } 7455 }, 7456 7457 /* Make attachments based on settings. */ 7458 _attachments: function( input, inst ) { 7459 var showOn, buttonText, buttonImage, 7460 appendText = this._get( inst, "appendText" ), 7461 isRTL = this._get( inst, "isRTL" ); 7462 7463 if ( inst.append ) {
vendor: 6,192 bytes, lines 7464-7621
7464 inst.append.remove(); 7465 } 7466 if ( appendText ) { 7467 inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" ); 7468 input[ isRTL ? "before" : "after" ]( inst.append ); 7469 } 7470 7471 input.off( "focus", this._showDatepicker ); 7472 7473 if ( inst.trigger ) { 7474 inst.trigger.remove(); 7475 } 7476 7477 showOn = this._get( inst, "showOn" ); 7478 if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field 7479 input.on( "focus", this._showDatepicker ); 7480 } 7481 if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked 7482 buttonText = this._get( inst, "buttonText" ); 7483 buttonImage = this._get( inst, "buttonImage" ); 7484 inst.trigger = $( this._get( inst, "buttonImageOnly" ) ? 7485 $( "<img/>" ).addClass( this._triggerClass ). 7486 attr( { src: buttonImage, alt: buttonText, title: buttonText } ) : 7487 $( "<button type='button'></button>" ).addClass( this._triggerClass ). 7488 html( !buttonImage ? buttonText : $( "<img/>" ).attr( 7489 { src:buttonImage, alt:buttonText, title:buttonText } ) ) ); 7490 input[ isRTL ? "before" : "after" ]( inst.trigger ); 7491 inst.trigger.on( "click", function() { 7492 if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) { 7493 $.datepicker._hideDatepicker(); 7494 } else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) { 7495 $.datepicker._hideDatepicker(); 7496 $.datepicker._showDatepicker( input[ 0 ] ); 7497 } else { 7498 $.datepicker._showDatepicker( input[ 0 ] ); 7499 } 7500 return false; 7501 } ); 7502 } 7503 }, 7504 7505 /* Apply the maximum length for the date format. */ 7506 _autoSize: function( inst ) { 7507 if ( this._get( inst, "autoSize" ) && !inst.inline ) { 7508 var findMax, max, maxI, i, 7509 date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits 7510 dateFormat = this._get( inst, "dateFormat" ); 7511 7512 if ( dateFormat.match( /[DM]/ ) ) { 7513 findMax = function( names ) { 7514 max = 0; 7515 maxI = 0; 7516 for ( i = 0; i < names.length; i++ ) { 7517 if ( names[ i ].length > max ) { 7518 max = names[ i ].length; 7519 maxI = i; 7520 } 7521 } 7522 return maxI; 7523 }; 7524 date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ? 7525 "monthNames" : "monthNamesShort" ) ) ) ); 7526 date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ? 7527 "dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() ); 7528 } 7529 inst.input.attr( "size", this._formatDate( inst, date ).length ); 7530 } 7531 }, 7532 7533 /* Attach an inline date picker to a div. */ 7534 _inlineDatepicker: function( target, inst ) { 7535 var divSpan = $( target ); 7536 if ( divSpan.hasClass( this.markerClassName ) ) { 7537 return; 7538 } 7539 divSpan.addClass( this.markerClassName ).append( inst.dpDiv ); 7540 $.data( target, "datepicker", inst ); 7541 this._setDate( inst, this._getDefaultDate( inst ), true ); 7542 this._updateDatepicker( inst ); 7543 this._updateAlternate( inst ); 7544 7545 //If disabled option is true, disable the datepicker before showing it (see ticket #5665) 7546 if ( inst.settings.disabled ) { 7547 this._disableDatepicker( target ); 7548 } 7549 7550 // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements 7551 // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height 7552 inst.dpDiv.css( "display", "block" ); 7553 }, 7554 7555 /* Pop-up the date picker in a "dialog" box. 7556 * @param input element - ignored 7557 * @param date string or Date - the initial date to display 7558 * @param onSelect function - the function to call when a date is selected 7559 * @param settings object - update the dialog date picker instance's settings (anonymous object) 7560 * @param pos int[2] - coordinates for the dialog's position within the screen or 7561 * event - with x/y coordinates or 7562 * leave empty for default (screen centre) 7563 * @return the manager object 7564 */ 7565 _dialogDatepicker: function( input, date, onSelect, settings, pos ) { 7566 var id, browserWidth, browserHeight, scrollX, scrollY, 7567 inst = this._dialogInst; // internal instance 7568 7569 if ( !inst ) { 7570 this.uuid += 1; 7571 id = "dp" + this.uuid; 7572 this._dialogInput = $( "<input type='text' id='" + id + 7573 "' style='position: absolute; top: -100px; width: 0px;'/>" ); 7574 this._dialogInput.on( "keydown", this._doKeyDown ); 7575 $( "body" ).append( this._dialogInput ); 7576 inst = this._dialogInst = this._newInst( this._dialogInput, false ); 7577 inst.settings = {}; 7578 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 7579 } 7580 datepicker_extendRemove( inst.settings, settings || {} ); 7581 date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date ); 7582 this._dialogInput.val( date ); 7583 7584 this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null ); 7585 if ( !this._pos ) { 7586 browserWidth = document.documentElement.clientWidth; 7587 browserHeight = document.documentElement.clientHeight; 7588 scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 7589 scrollY = document.documentElement.scrollTop || document.body.scrollTop; 7590 this._pos = // should use actual width/height below 7591 [ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ]; 7592 } 7593 7594 // Move input on screen for focus, but hidden behind dialog 7595 this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" ); 7596 inst.settings.onSelect = onSelect; 7597 this._inDialog = true; 7598 this.dpDiv.addClass( this._dialogClass ); 7599 this._showDatepicker( this._dialogInput[ 0 ] ); 7600 if ( $.blockUI ) { 7601 $.blockUI( this.dpDiv ); 7602 } 7603 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 7604 return this; 7605 }, 7606 7607 /* Detach a datepicker from its control. 7608 * @param target element - the target input field or division or span 7609 */ 7610 _destroyDatepicker: function( target ) { 7611 var nodeName, 7612 $target = $( target ), 7613 inst = $.data( target, "datepicker" ); 7614 7615 if ( !$target.hasClass( this.markerClassName ) ) { 7616 return; 7617 } 7618 7619 nodeName = target.nodeName.toLowerCase(); 7620 $.removeData( target, "datepicker" ); 7621 if ( nodeName === "input" ) {
vendor: 12,111 bytes, lines 7622-7962
7622 inst.append.remove(); 7623 inst.trigger.remove(); 7624 $target.removeClass( this.markerClassName ). 7625 off( "focus", this._showDatepicker ). 7626 off( "keydown", this._doKeyDown ). 7627 off( "keypress", this._doKeyPress ). 7628 off( "keyup", this._doKeyUp ); 7629 } else if ( nodeName === "div" || nodeName === "span" ) { 7630 $target.removeClass( this.markerClassName ).empty(); 7631 } 7632 7633 if ( datepicker_instActive === inst ) { 7634 datepicker_instActive = null; 7635 } 7636 }, 7637 7638 /* Enable the date picker to a jQuery selection. 7639 * @param target element - the target input field or division or span 7640 */ 7641 _enableDatepicker: function( target ) { 7642 var nodeName, inline, 7643 $target = $( target ), 7644 inst = $.data( target, "datepicker" ); 7645 7646 if ( !$target.hasClass( this.markerClassName ) ) { 7647 return; 7648 } 7649 7650 nodeName = target.nodeName.toLowerCase(); 7651 if ( nodeName === "input" ) { 7652 target.disabled = false; 7653 inst.trigger.filter( "button" ). 7654 each( function() { this.disabled = false; } ).end(). 7655 filter( "img" ).css( { opacity: "1.0", cursor: "" } ); 7656 } else if ( nodeName === "div" || nodeName === "span" ) { 7657 inline = $target.children( "." + this._inlineClass ); 7658 inline.children().removeClass( "ui-state-disabled" ); 7659 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 7660 prop( "disabled", false ); 7661 } 7662 this._disabledInputs = $.map( this._disabledInputs, 7663 function( value ) { return ( value === target ? null : value ); } ); // delete entry 7664 }, 7665 7666 /* Disable the date picker to a jQuery selection. 7667 * @param target element - the target input field or division or span 7668 */ 7669 _disableDatepicker: function( target ) { 7670 var nodeName, inline, 7671 $target = $( target ), 7672 inst = $.data( target, "datepicker" ); 7673 7674 if ( !$target.hasClass( this.markerClassName ) ) { 7675 return; 7676 } 7677 7678 nodeName = target.nodeName.toLowerCase(); 7679 if ( nodeName === "input" ) { 7680 target.disabled = true; 7681 inst.trigger.filter( "button" ). 7682 each( function() { this.disabled = true; } ).end(). 7683 filter( "img" ).css( { opacity: "0.5", cursor: "default" } ); 7684 } else if ( nodeName === "div" || nodeName === "span" ) { 7685 inline = $target.children( "." + this._inlineClass ); 7686 inline.children().addClass( "ui-state-disabled" ); 7687 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 7688 prop( "disabled", true ); 7689 } 7690 this._disabledInputs = $.map( this._disabledInputs, 7691 function( value ) { return ( value === target ? null : value ); } ); // delete entry 7692 this._disabledInputs[ this._disabledInputs.length ] = target; 7693 }, 7694 7695 /* Is the first field in a jQuery collection disabled as a datepicker? 7696 * @param target element - the target input field or division or span 7697 * @return boolean - true if disabled, false if enabled 7698 */ 7699 _isDisabledDatepicker: function( target ) { 7700 if ( !target ) { 7701 return false; 7702 } 7703 for ( var i = 0; i < this._disabledInputs.length; i++ ) { 7704 if ( this._disabledInputs[ i ] === target ) { 7705 return true; 7706 } 7707 } 7708 return false; 7709 }, 7710 7711 /* Retrieve the instance data for the target control. 7712 * @param target element - the target input field or division or span 7713 * @return object - the associated instance data 7714 * @throws error if a jQuery problem getting data 7715 */ 7716 _getInst: function( target ) { 7717 try { 7718 return $.data( target, "datepicker" ); 7719 } 7720 catch ( err ) { 7721 throw "Missing instance data for this datepicker"; 7722 } 7723 }, 7724 7725 /* Update or retrieve the settings for a date picker attached to an input field or division. 7726 * @param target element - the target input field or division or span 7727 * @param name object - the new settings to update or 7728 * string - the name of the setting to change or retrieve, 7729 * when retrieving also "all" for all instance settings or 7730 * "defaults" for all global defaults 7731 * @param value any - the new value for the setting 7732 * (omit if above is an object or to retrieve a value) 7733 */ 7734 _optionDatepicker: function( target, name, value ) { 7735 var settings, date, minDate, maxDate, 7736 inst = this._getInst( target ); 7737 7738 if ( arguments.length === 2 && typeof name === "string" ) { 7739 return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) : 7740 ( inst ? ( name === "all" ? $.extend( {}, inst.settings ) : 7741 this._get( inst, name ) ) : null ) ); 7742 } 7743 7744 settings = name || {}; 7745 if ( typeof name === "string" ) { 7746 settings = {}; 7747 settings[ name ] = value; 7748 } 7749 7750 if ( inst ) { 7751 if ( this._curInst === inst ) { 7752 this._hideDatepicker(); 7753 } 7754 7755 date = this._getDateDatepicker( target, true ); 7756 minDate = this._getMinMaxDate( inst, "min" ); 7757 maxDate = this._getMinMaxDate( inst, "max" ); 7758 datepicker_extendRemove( inst.settings, settings ); 7759 7760 // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided 7761 if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) { 7762 inst.settings.minDate = this._formatDate( inst, minDate ); 7763 } 7764 if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) { 7765 inst.settings.maxDate = this._formatDate( inst, maxDate ); 7766 } 7767 if ( "disabled" in settings ) { 7768 if ( settings.disabled ) { 7769 this._disableDatepicker( target ); 7770 } else { 7771 this._enableDatepicker( target ); 7772 } 7773 } 7774 this._attachments( $( target ), inst ); 7775 this._autoSize( inst ); 7776 this._setDate( inst, date ); 7777 this._updateAlternate( inst ); 7778 this._updateDatepicker( inst ); 7779 } 7780 }, 7781 7782 // Change method deprecated 7783 _changeDatepicker: function( target, name, value ) { 7784 this._optionDatepicker( target, name, value ); 7785 }, 7786 7787 /* Redraw the date picker attached to an input field or division. 7788 * @param target element - the target input field or division or span 7789 */ 7790 _refreshDatepicker: function( target ) { 7791 var inst = this._getInst( target ); 7792 if ( inst ) { 7793 this._updateDatepicker( inst ); 7794 } 7795 }, 7796 7797 /* Set the dates for a jQuery selection. 7798 * @param target element - the target input field or division or span 7799 * @param date Date - the new date 7800 */ 7801 _setDateDatepicker: function( target, date ) { 7802 var inst = this._getInst( target ); 7803 if ( inst ) { 7804 this._setDate( inst, date ); 7805 this._updateDatepicker( inst ); 7806 this._updateAlternate( inst ); 7807 } 7808 }, 7809 7810 /* Get the date(s) for the first entry in a jQuery selection. 7811 * @param target element - the target input field or division or span 7812 * @param noDefault boolean - true if no default date is to be used 7813 * @return Date - the current date 7814 */ 7815 _getDateDatepicker: function( target, noDefault ) { 7816 var inst = this._getInst( target ); 7817 if ( inst && !inst.inline ) { 7818 this._setDateFromField( inst, noDefault ); 7819 } 7820 return ( inst ? this._getDate( inst ) : null ); 7821 }, 7822 7823 /* Handle keystrokes. */ 7824 _doKeyDown: function( event ) { 7825 var onSelect, dateStr, sel, 7826 inst = $.datepicker._getInst( event.target ), 7827 handled = true, 7828 isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" ); 7829 7830 inst._keyEvent = true; 7831 if ( $.datepicker._datepickerShowing ) { 7832 switch ( event.keyCode ) { 7833 case 9: $.datepicker._hideDatepicker(); 7834 handled = false; 7835 break; // hide on tab out 7836 case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." + 7837 $.datepicker._currentClass + ")", inst.dpDiv ); 7838 if ( sel[ 0 ] ) { 7839 $.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] ); 7840 } 7841 7842 onSelect = $.datepicker._get( inst, "onSelect" ); 7843 if ( onSelect ) { 7844 dateStr = $.datepicker._formatDate( inst ); 7845 7846 // Trigger custom callback 7847 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); 7848 } else { 7849 $.datepicker._hideDatepicker(); 7850 } 7851 7852 return false; // don't submit the form 7853 case 27: $.datepicker._hideDatepicker(); 7854 break; // hide on escape 7855 case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7856 -$.datepicker._get( inst, "stepBigMonths" ) : 7857 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7858 break; // previous month/year on page up/+ ctrl 7859 case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7860 +$.datepicker._get( inst, "stepBigMonths" ) : 7861 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7862 break; // next month/year on page down/+ ctrl 7863 case 35: if ( event.ctrlKey || event.metaKey ) { 7864 $.datepicker._clearDate( event.target ); 7865 } 7866 handled = event.ctrlKey || event.metaKey; 7867 break; // clear on ctrl or command +end 7868 case 36: if ( event.ctrlKey || event.metaKey ) { 7869 $.datepicker._gotoToday( event.target ); 7870 } 7871 handled = event.ctrlKey || event.metaKey; 7872 break; // current on ctrl or command +home 7873 case 37: if ( event.ctrlKey || event.metaKey ) { 7874 $.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" ); 7875 } 7876 handled = event.ctrlKey || event.metaKey; 7877 7878 // -1 day on ctrl or command +left 7879 if ( event.originalEvent.altKey ) { 7880 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7881 -$.datepicker._get( inst, "stepBigMonths" ) : 7882 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7883 } 7884 7885 // next month/year on alt +left on Mac 7886 break; 7887 case 38: if ( event.ctrlKey || event.metaKey ) { 7888 $.datepicker._adjustDate( event.target, -7, "D" ); 7889 } 7890 handled = event.ctrlKey || event.metaKey; 7891 break; // -1 week on ctrl or command +up 7892 case 39: if ( event.ctrlKey || event.metaKey ) { 7893 $.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" ); 7894 } 7895 handled = event.ctrlKey || event.metaKey; 7896 7897 // +1 day on ctrl or command +right 7898 if ( event.originalEvent.altKey ) { 7899 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7900 +$.datepicker._get( inst, "stepBigMonths" ) : 7901 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7902 } 7903 7904 // next month/year on alt +right 7905 break; 7906 case 40: if ( event.ctrlKey || event.metaKey ) { 7907 $.datepicker._adjustDate( event.target, +7, "D" ); 7908 } 7909 handled = event.ctrlKey || event.metaKey; 7910 break; // +1 week on ctrl or command +down 7911 default: handled = false; 7912 } 7913 } else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home 7914 $.datepicker._showDatepicker( this ); 7915 } else { 7916 handled = false; 7917 } 7918 7919 if ( handled ) { 7920 event.preventDefault(); 7921 event.stopPropagation(); 7922 } 7923 }, 7924 7925 /* Filter entered characters - based on date format. */ 7926 _doKeyPress: function( event ) { 7927 var chars, chr, 7928 inst = $.datepicker._getInst( event.target ); 7929 7930 if ( $.datepicker._get( inst, "constrainInput" ) ) { 7931 chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) ); 7932 chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode ); 7933 return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 ); 7934 } 7935 }, 7936 7937 /* Synchronise manual entry and field/alternate field. */ 7938 _doKeyUp: function( event ) { 7939 var date, 7940 inst = $.datepicker._getInst( event.target ); 7941 7942 if ( inst.input.val() !== inst.lastVal ) { 7943 try { 7944 date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 7945 ( inst.input ? inst.input.val() : null ), 7946 $.datepicker._getFormatConfig( inst ) ); 7947 7948 if ( date ) { // only if valid 7949 $.datepicker._setDateFromField( inst ); 7950 $.datepicker._updateAlternate( inst ); 7951 $.datepicker._updateDatepicker( inst ); 7952 } 7953 } 7954 catch ( err ) { 7955 } 7956 } 7957 return true; 7958 }, 7959 7960 /* Pop-up the date picker for a given input field. 7961 * If false returned from beforeShow event handler do not show. 7962 * @param input element - the input field attached to the date picker or
vendor: 1,885 bytes, lines 7963-8020
7963 * event - if triggered by focus 7964 */ 7965 _showDatepicker: function( input ) { 7966 input = input.target || input; 7967 if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger 7968 input = $( "input", input.parentNode )[ 0 ]; 7969 } 7970 7971 if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here 7972 return; 7973 } 7974 7975 var inst, beforeShow, beforeShowSettings, isFixed, 7976 offset, showAnim, duration; 7977 7978 inst = $.datepicker._getInst( input ); 7979 if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) { 7980 $.datepicker._curInst.dpDiv.stop( true, true ); 7981 if ( inst && $.datepicker._datepickerShowing ) { 7982 $.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] ); 7983 } 7984 } 7985 7986 beforeShow = $.datepicker._get( inst, "beforeShow" ); 7987 beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {}; 7988 if ( beforeShowSettings === false ) { 7989 return; 7990 } 7991 datepicker_extendRemove( inst.settings, beforeShowSettings ); 7992 7993 inst.lastVal = null; 7994 $.datepicker._lastInput = input; 7995 $.datepicker._setDateFromField( inst ); 7996 7997 if ( $.datepicker._inDialog ) { // hide cursor 7998 input.value = ""; 7999 } 8000 if ( !$.datepicker._pos ) { // position below input 8001 $.datepicker._pos = $.datepicker._findPos( input ); 8002 $.datepicker._pos[ 1 ] += input.offsetHeight; // add the height 8003 } 8004 8005 isFixed = false; 8006 $( input ).parents().each( function() { 8007 isFixed |= $( this ).css( "position" ) === "fixed"; 8008 return !isFixed; 8009 } ); 8010 8011 offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] }; 8012 $.datepicker._pos = null; 8013 8014 //to avoid flashes on Firefox 8015 inst.dpDiv.empty(); 8016 8017 // determine sizing offscreen 8018 inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } ); 8019 $.datepicker._updateDatepicker( inst ); 8020
vendor: 12,837 bytes, lines 8021-8373
8021 // fix width for dynamic number of date pickers 8022 // and adjust position before showing 8023 offset = $.datepicker._checkOffset( inst, offset, isFixed ); 8024 inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ? 8025 "static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none", 8026 left: offset.left + "px", top: offset.top + "px" } ); 8027 8028 if ( !inst.inline ) { 8029 showAnim = $.datepicker._get( inst, "showAnim" ); 8030 duration = $.datepicker._get( inst, "duration" ); 8031 inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); 8032 $.datepicker._datepickerShowing = true; 8033 8034 if ( $.effects && $.effects.effect[ showAnim ] ) { 8035 inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration ); 8036 } else { 8037 inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null ); 8038 } 8039 8040 if ( $.datepicker._shouldFocusInput( inst ) ) { 8041 inst.input.trigger( "focus" ); 8042 } 8043 8044 $.datepicker._curInst = inst; 8045 } 8046 }, 8047 8048 /* Generate the date picker content. */ 8049 _updateDatepicker: function( inst ) { 8050 this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) 8051 datepicker_instActive = inst; // for delegate hover events 8052 inst.dpDiv.empty().append( this._generateHTML( inst ) ); 8053 this._attachHandlers( inst ); 8054 8055 var origyearshtml, 8056 numMonths = this._getNumberOfMonths( inst ), 8057 cols = numMonths[ 1 ], 8058 width = 17, 8059 activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); 8060 8061 if ( activeCell.length > 0 ) { 8062 datepicker_handleMouseover.apply( activeCell.get( 0 ) ); 8063 } 8064 8065 inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" ); 8066 if ( cols > 1 ) { 8067 inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" ); 8068 } 8069 inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) + 8070 "Class" ]( "ui-datepicker-multi" ); 8071 inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) + 8072 "Class" ]( "ui-datepicker-rtl" ); 8073 8074 if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 8075 inst.input.trigger( "focus" ); 8076 } 8077 8078 // Deffered render of the years select (to avoid flashes on Firefox) 8079 if ( inst.yearshtml ) { 8080 origyearshtml = inst.yearshtml; 8081 setTimeout( function() { 8082 8083 //assure that inst.yearshtml didn't change. 8084 if ( origyearshtml === inst.yearshtml && inst.yearshtml ) { 8085 inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml ); 8086 } 8087 origyearshtml = inst.yearshtml = null; 8088 }, 0 ); 8089 } 8090 }, 8091 8092 // #6694 - don't focus the input if it's already focused 8093 // this breaks the change event in IE 8094 // Support: IE and jQuery <1.9 8095 _shouldFocusInput: function( inst ) { 8096 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 8097 }, 8098 8099 /* Check positioning to remain on screen. */ 8100 _checkOffset: function( inst, offset, isFixed ) { 8101 var dpWidth = inst.dpDiv.outerWidth(), 8102 dpHeight = inst.dpDiv.outerHeight(), 8103 inputWidth = inst.input ? inst.input.outerWidth() : 0, 8104 inputHeight = inst.input ? inst.input.outerHeight() : 0, 8105 viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ), 8106 viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() ); 8107 8108 offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 ); 8109 offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0; 8110 offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0; 8111 8112 // Now check if datepicker is showing outside window viewport - move to a better place if so. 8113 offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ? 8114 Math.abs( offset.left + dpWidth - viewWidth ) : 0 ); 8115 offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ? 8116 Math.abs( dpHeight + inputHeight ) : 0 ); 8117 8118 return offset; 8119 }, 8120 8121 /* Find an object's position on the screen. */ 8122 _findPos: function( obj ) { 8123 var position, 8124 inst = this._getInst( obj ), 8125 isRTL = this._get( inst, "isRTL" ); 8126 8127 while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) { 8128 obj = obj[ isRTL ? "previousSibling" : "nextSibling" ]; 8129 } 8130 8131 position = $( obj ).offset(); 8132 return [ position.left, position.top ]; 8133 }, 8134 8135 /* Hide the date picker from view. 8136 * @param input element - the input field attached to the date picker 8137 */ 8138 _hideDatepicker: function( input ) { 8139 var showAnim, duration, postProcess, onClose, 8140 inst = this._curInst; 8141 8142 if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) { 8143 return; 8144 } 8145 8146 if ( this._datepickerShowing ) { 8147 showAnim = this._get( inst, "showAnim" ); 8148 duration = this._get( inst, "duration" ); 8149 postProcess = function() { 8150 $.datepicker._tidyDialog( inst ); 8151 }; 8152 8153 // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed 8154 if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 8155 inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess ); 8156 } else { 8157 inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" : 8158 ( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess ); 8159 } 8160 8161 if ( !showAnim ) { 8162 postProcess(); 8163 } 8164 this._datepickerShowing = false; 8165 8166 onClose = this._get( inst, "onClose" ); 8167 if ( onClose ) { 8168 onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] ); 8169 } 8170 8171 this._lastInput = null; 8172 if ( this._inDialog ) { 8173 this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } ); 8174 if ( $.blockUI ) { 8175 $.unblockUI(); 8176 $( "body" ).append( this.dpDiv ); 8177 } 8178 } 8179 this._inDialog = false; 8180 } 8181 }, 8182 8183 /* Tidy up after a dialog display. */ 8184 _tidyDialog: function( inst ) { 8185 inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" ); 8186 }, 8187 8188 /* Close date picker if clicked elsewhere. */ 8189 _checkExternalClick: function( event ) { 8190 if ( !$.datepicker._curInst ) { 8191 return; 8192 } 8193 8194 var $target = $( event.target ), 8195 inst = $.datepicker._getInst( $target[ 0 ] ); 8196 8197 if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId && 8198 $target.parents( "#" + $.datepicker._mainDivId ).length === 0 && 8199 !$target.hasClass( $.datepicker.markerClassName ) && 8200 !$target.closest( "." + $.datepicker._triggerClass ).length && 8201 $.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) || 8202 ( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) { 8203 $.datepicker._hideDatepicker(); 8204 } 8205 }, 8206 8207 /* Adjust one of the date sub-fields. */ 8208 _adjustDate: function( id, offset, period ) { 8209 var target = $( id ), 8210 inst = this._getInst( target[ 0 ] ); 8211 8212 if ( this._isDisabledDatepicker( target[ 0 ] ) ) { 8213 return; 8214 } 8215 this._adjustInstDate( inst, offset + 8216 ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning 8217 period ); 8218 this._updateDatepicker( inst ); 8219 }, 8220 8221 /* Action for current link. */ 8222 _gotoToday: function( id ) { 8223 var date, 8224 target = $( id ), 8225 inst = this._getInst( target[ 0 ] ); 8226 8227 if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) { 8228 inst.selectedDay = inst.currentDay; 8229 inst.drawMonth = inst.selectedMonth = inst.currentMonth; 8230 inst.drawYear = inst.selectedYear = inst.currentYear; 8231 } else { 8232 date = new Date(); 8233 inst.selectedDay = date.getDate(); 8234 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8235 inst.drawYear = inst.selectedYear = date.getFullYear(); 8236 } 8237 this._notifyChange( inst ); 8238 this._adjustDate( target ); 8239 }, 8240 8241 /* Action for selecting a new month/year. */ 8242 _selectMonthYear: function( id, select, period ) { 8243 var target = $( id ), 8244 inst = this._getInst( target[ 0 ] ); 8245 8246 inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] = 8247 inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] = 8248 parseInt( select.options[ select.selectedIndex ].value, 10 ); 8249 8250 this._notifyChange( inst ); 8251 this._adjustDate( target ); 8252 }, 8253 8254 /* Action for selecting a day. */ 8255 _selectDay: function( id, month, year, td ) { 8256 var inst, 8257 target = $( id ); 8258 8259 if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) { 8260 return; 8261 } 8262 8263 inst = this._getInst( target[ 0 ] ); 8264 inst.selectedDay = inst.currentDay = $( "a", td ).html(); 8265 inst.selectedMonth = inst.currentMonth = month; 8266 inst.selectedYear = inst.currentYear = year; 8267 this._selectDate( id, this._formatDate( inst, 8268 inst.currentDay, inst.currentMonth, inst.currentYear ) ); 8269 }, 8270 8271 /* Erase the input field and hide the date picker. */ 8272 _clearDate: function( id ) { 8273 var target = $( id ); 8274 this._selectDate( target, "" ); 8275 }, 8276 8277 /* Update the input field with the selected date. */ 8278 _selectDate: function( id, dateStr ) { 8279 var onSelect, 8280 target = $( id ), 8281 inst = this._getInst( target[ 0 ] ); 8282 8283 dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) ); 8284 if ( inst.input ) { 8285 inst.input.val( dateStr ); 8286 } 8287 this._updateAlternate( inst ); 8288 8289 onSelect = this._get( inst, "onSelect" ); 8290 if ( onSelect ) { 8291 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); // trigger custom callback 8292 } else if ( inst.input ) { 8293 inst.input.trigger( "change" ); // fire the change event 8294 } 8295 8296 if ( inst.inline ) { 8297 this._updateDatepicker( inst ); 8298 } else { 8299 this._hideDatepicker(); 8300 this._lastInput = inst.input[ 0 ]; 8301 if ( typeof( inst.input[ 0 ] ) !== "object" ) { 8302 inst.input.trigger( "focus" ); // restore focus 8303 } 8304 this._lastInput = null; 8305 } 8306 }, 8307 8308 /* Update any alternate field to synchronise with the main field. */ 8309 _updateAlternate: function( inst ) { 8310 var altFormat, date, dateStr, 8311 altField = this._get( inst, "altField" ); 8312 8313 if ( altField ) { // update alternate field too 8314 altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" ); 8315 date = this._getDate( inst ); 8316 dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) ); 8317 $( altField ).val( dateStr ); 8318 } 8319 }, 8320 8321 /* Set as beforeShowDay function to prevent selection of weekends. 8322 * @param date Date - the date to customise 8323 * @return [boolean, string] - is this date selectable?, what is its CSS class? 8324 */ 8325 noWeekends: function( date ) { 8326 var day = date.getDay(); 8327 return [ ( day > 0 && day < 6 ), "" ]; 8328 }, 8329 8330 /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. 8331 * @param date Date - the date to get the week for 8332 * @return number - the number of the week within the year that contains this date 8333 */ 8334 iso8601Week: function( date ) { 8335 var time, 8336 checkDate = new Date( date.getTime() ); 8337 8338 // Find Thursday of this week starting on Monday 8339 checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) ); 8340 8341 time = checkDate.getTime(); 8342 checkDate.setMonth( 0 ); // Compare with Jan 1 8343 checkDate.setDate( 1 ); 8344 return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1; 8345 }, 8346 8347 /* Parse a string value into a date object. 8348 * See formatDate below for the possible formats. 8349 * 8350 * @param format string - the expected format of the date 8351 * @param value string - the date in the above format 8352 * @param settings Object - attributes include: 8353 * shortYearCutoff number - the cutoff year for determining the century (optional) 8354 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 8355 * dayNames string[7] - names of the days from Sunday (optional) 8356 * monthNamesShort string[12] - abbreviated names of the months (optional) 8357 * monthNames string[12] - names of the months (optional) 8358 * @return Date - the extracted date value or null if value is blank 8359 */ 8360 parseDate: function( format, value, settings ) { 8361 if ( format == null || value == null ) { 8362 throw "Invalid arguments"; 8363 } 8364 8365 value = ( typeof value === "object" ? value.toString() : value + "" ); 8366 if ( value === "" ) { 8367 return null; 8368 } 8369 8370 var iFormat, dim, extra, 8371 iValue = 0, 8372 shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff, 8373 shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp
vendor: 15,177 bytes, lines 8373-8849
8373: 8374 new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ), 8375 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 8376 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 8377 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 8378 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 8379 year = -1, 8380 month = -1, 8381 day = -1, 8382 doy = -1, 8383 literal = false, 8384 date, 8385 8386 // Check whether a format character is doubled 8387 lookAhead = function( match ) { 8388 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8389 if ( matches ) { 8390 iFormat++; 8391 } 8392 return matches; 8393 }, 8394 8395 // Extract a number from the string value 8396 getNumber = function( match ) { 8397 var isDoubled = lookAhead( match ), 8398 size = ( match === "@" ? 14 : ( match === "!" ? 20 : 8399 ( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ), 8400 minSize = ( match === "y" ? size : 1 ), 8401 digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ), 8402 num = value.substring( iValue ).match( digits ); 8403 if ( !num ) { 8404 throw "Missing number at position " + iValue; 8405 } 8406 iValue += num[ 0 ].length; 8407 return parseInt( num[ 0 ], 10 ); 8408 }, 8409 8410 // Extract a name from the string value and convert to an index 8411 getName = function( match, shortNames, longNames ) { 8412 var index = -1, 8413 names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) { 8414 return [ [ k, v ] ]; 8415 } ).sort( function( a, b ) { 8416 return -( a[ 1 ].length - b[ 1 ].length ); 8417 } ); 8418 8419 $.each( names, function( i, pair ) { 8420 var name = pair[ 1 ]; 8421 if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) { 8422 index = pair[ 0 ]; 8423 iValue += name.length; 8424 return false; 8425 } 8426 } ); 8427 if ( index !== -1 ) { 8428 return index + 1; 8429 } else { 8430 throw "Unknown name at position " + iValue; 8431 } 8432 }, 8433 8434 // Confirm that a literal character matches the string value 8435 checkLiteral = function() { 8436 if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) { 8437 throw "Unexpected literal at position " + iValue; 8438 } 8439 iValue++; 8440 }; 8441 8442 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8443 if ( literal ) { 8444 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8445 literal = false; 8446 } else { 8447 checkLiteral(); 8448 } 8449 } else { 8450 switch ( format.charAt( iFormat ) ) { 8451 case "d": 8452 day = getNumber( "d" ); 8453 break; 8454 case "D": 8455 getName( "D", dayNamesShort, dayNames ); 8456 break; 8457 case "o": 8458 doy = getNumber( "o" ); 8459 break; 8460 case "m": 8461 month = getNumber( "m" ); 8462 break; 8463 case "M": 8464 month = getName( "M", monthNamesShort, monthNames ); 8465 break; 8466 case "y": 8467 year = getNumber( "y" ); 8468 break; 8469 case "@": 8470 date = new Date( getNumber( "@" ) ); 8471 year = date.getFullYear(); 8472 month = date.getMonth() + 1; 8473 day = date.getDate(); 8474 break; 8475 case "!": 8476 date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 ); 8477 year = date.getFullYear(); 8478 month = date.getMonth() + 1; 8479 day = date.getDate(); 8480 break; 8481 case "'": 8482 if ( lookAhead( "'" ) ) { 8483 checkLiteral(); 8484 } else { 8485 literal = true; 8486 } 8487 break; 8488 default: 8489 checkLiteral(); 8490 } 8491 } 8492 } 8493 8494 if ( iValue < value.length ) { 8495 extra = value.substr( iValue ); 8496 if ( !/^\s+/.test( extra ) ) { 8497 throw "Extra/unparsed characters found in date: " + extra; 8498 } 8499 } 8500 8501 if ( year === -1 ) { 8502 year = new Date().getFullYear(); 8503 } else if ( year < 100 ) { 8504 year += new Date().getFullYear() - new Date().getFullYear() % 100 + 8505 ( year <= shortYearCutoff ? 0 : -100 ); 8506 } 8507 8508 if ( doy > -1 ) { 8509 month = 1; 8510 day = doy; 8511 do { 8512 dim = this._getDaysInMonth( year, month - 1 ); 8513 if ( day <= dim ) { 8514 break; 8515 } 8516 month++; 8517 day -= dim; 8518 } while ( true ); 8519 } 8520 8521 date = this._daylightSavingAdjust( new Date( year, month - 1, day ) ); 8522 if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) { 8523 throw "Invalid date"; // E.g. 31/02/00 8524 } 8525 return date; 8526 }, 8527 8528 /* Standard date formats. */ 8529 ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) 8530 COOKIE: "D, dd M yy", 8531 ISO_8601: "yy-mm-dd", 8532 RFC_822: "D, d M y", 8533 RFC_850: "DD, dd-M-y", 8534 RFC_1036: "D, d M y", 8535 RFC_1123: "D, d M yy", 8536 RFC_2822: "D, d M yy", 8537 RSS: "D, d M y", // RFC 822 8538 TICKS: "!", 8539 TIMESTAMP: "@", 8540 W3C: "yy-mm-dd", // ISO 8601 8541 8542 _ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) + 8543 Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ), 8544 8545 /* Format a date object into a string value. 8546 * The format can be combinations of the following: 8547 * d - day of month (no leading zero) 8548 * dd - day of month (two digit) 8549 * o - day of year (no leading zeros) 8550 * oo - day of year (three digit) 8551 * D - day name short 8552 * DD - day name long 8553 * m - month of year (no leading zero) 8554 * mm - month of year (two digit) 8555 * M - month name short 8556 * MM - month name long 8557 * y - year (two digit) 8558 * yy - year (four digit) 8559 * @ - Unix timestamp (ms since 01/01/1970) 8560 * ! - Windows ticks (100ns since 01/01/0001) 8561 * "..." - literal text 8562 * '' - single quote 8563 * 8564 * @param format string - the desired format of the date 8565 * @param date Date - the date value to format 8566 * @param settings Object - attributes include: 8567 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 8568 * dayNames string[7] - names of the days from Sunday (optional) 8569 * monthNamesShort string[12] - abbreviated names of the months (optional) 8570 * monthNames string[12] - names of the months (optional) 8571 * @return string - the date in the above format 8572 */ 8573 formatDate: function( format, date, settings ) { 8574 if ( !date ) { 8575 return ""; 8576 } 8577 8578 var iFormat, 8579 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 8580 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 8581 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 8582 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 8583 8584 // Check whether a format character is doubled 8585 lookAhead = function( match ) { 8586 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8587 if ( matches ) { 8588 iFormat++; 8589 } 8590 return matches; 8591 }, 8592 8593 // Format a number, with leading zero if necessary 8594 formatNumber = function( match, value, len ) { 8595 var num = "" + value; 8596 if ( lookAhead( match ) ) { 8597 while ( num.length < len ) { 8598 num = "0" + num; 8599 } 8600 } 8601 return num; 8602 }, 8603 8604 // Format a name, short or long as requested 8605 formatName = function( match, value, shortNames, longNames ) { 8606 return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] ); 8607 }, 8608 output = "", 8609 literal = false; 8610 8611 if ( date ) { 8612 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8613 if ( literal ) { 8614 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8615 literal = false; 8616 } else { 8617 output += format.charAt( iFormat ); 8618 } 8619 } else { 8620 switch ( format.charAt( iFormat ) ) { 8621 case "d": 8622 output += formatNumber( "d", date.getDate(), 2 ); 8623 break; 8624 case "D": 8625 output += formatName( "D", date.getDay(), dayNamesShort, dayNames ); 8626 break; 8627 case "o": 8628 output += formatNumber( "o", 8629 Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 ); 8630 break; 8631 case "m": 8632 output += formatNumber( "m", date.getMonth() + 1, 2 ); 8633 break; 8634 case "M": 8635 output += formatName( "M", date.getMonth(), monthNamesShort, monthNames ); 8636 break; 8637 case "y": 8638 output += ( lookAhead( "y" ) ? date.getFullYear() : 8639 ( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 ); 8640 break; 8641 case "@": 8642 output += date.getTime(); 8643 break; 8644 case "!": 8645 output += date.getTime() * 10000 + this._ticksTo1970; 8646 break; 8647 case "'": 8648 if ( lookAhead( "'" ) ) { 8649 output += "'"; 8650 } else { 8651 literal = true; 8652 } 8653 break; 8654 default: 8655 output += format.charAt( iFormat ); 8656 } 8657 } 8658 } 8659 } 8660 return output; 8661 }, 8662 8663 /* Extract all possible characters from the date format. */ 8664 _possibleChars: function( format ) { 8665 var iFormat, 8666 chars = "", 8667 literal = false, 8668 8669 // Check whether a format character is doubled 8670 lookAhead = function( match ) { 8671 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8672 if ( matches ) { 8673 iFormat++; 8674 } 8675 return matches; 8676 }; 8677 8678 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8679 if ( literal ) { 8680 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8681 literal = false; 8682 } else { 8683 chars += format.charAt( iFormat ); 8684 } 8685 } else { 8686 switch ( format.charAt( iFormat ) ) { 8687 case "d": case "m": case "y": case "@": 8688 chars += "0123456789"; 8689 break; 8690 case "D": case "M": 8691 return null; // Accept anything 8692 case "'": 8693 if ( lookAhead( "'" ) ) { 8694 chars += "'"; 8695 } else { 8696 literal = true; 8697 } 8698 break; 8699 default: 8700 chars += format.charAt( iFormat ); 8701 } 8702 } 8703 } 8704 return chars; 8705 }, 8706 8707 /* Get a setting value, defaulting if necessary. */ 8708 _get: function( inst, name ) { 8709 return inst.settings[ name ] !== undefined ? 8710 inst.settings[ name ] : this._defaults[ name ]; 8711 }, 8712 8713 /* Parse existing date and initialise date picker. */ 8714 _setDateFromField: function( inst, noDefault ) { 8715 if ( inst.input.val() === inst.lastVal ) { 8716 return; 8717 } 8718 8719 var dateFormat = this._get( inst, "dateFormat" ), 8720 dates = inst.lastVal = inst.input ? inst.input.val() : null, 8721 defaultDate = this._getDefaultDate( inst ), 8722 date = defaultDate, 8723 settings = this._getFormatConfig( inst ); 8724 8725 try { 8726 date = this.parseDate( dateFormat, dates, settings ) || defaultDate; 8727 } catch ( event ) { 8728 dates = ( noDefault ? "" : dates ); 8729 } 8730 inst.selectedDay = date.getDate(); 8731 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8732 inst.drawYear = inst.selectedYear = date.getFullYear(); 8733 inst.currentDay = ( dates ? date.getDate() : 0 ); 8734 inst.currentMonth = ( dates ? date.getMonth() : 0 ); 8735 inst.currentYear = ( dates ? date.getFullYear() : 0 ); 8736 this._adjustInstDate( inst ); 8737 }, 8738 8739 /* Retrieve the default date shown on opening. */ 8740 _getDefaultDate: function( inst ) { 8741 return this._restrictMinMax( inst, 8742 this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) ); 8743 }, 8744 8745 /* A date may be specified as an exact value or a relative one. */ 8746 _determineDate: function( inst, date, defaultDate ) { 8747 var offsetNumeric = function( offset ) { 8748 var date = new Date(); 8749 date.setDate( date.getDate() + offset ); 8750 return date; 8751 }, 8752 offsetString = function( offset ) { 8753 try { 8754 return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 8755 offset, $.datepicker._getFormatConfig( inst ) ); 8756 } 8757 catch ( e ) { 8758 8759 // Ignore 8760 } 8761 8762 var date = ( offset.toLowerCase().match( /^c/ ) ? 8763 $.datepicker._getDate( inst ) : null ) || new Date(), 8764 year = date.getFullYear(), 8765 month = date.getMonth(), 8766 day = date.getDate(), 8767 pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 8768 matches = pattern.exec( offset ); 8769 8770 while ( matches ) { 8771 switch ( matches[ 2 ] || "d" ) { 8772 case "d" : case "D" : 8773 day += parseInt( matches[ 1 ], 10 ); break; 8774 case "w" : case "W" : 8775 day += parseInt( matches[ 1 ], 10 ) * 7; break; 8776 case "m" : case "M" : 8777 month += parseInt( matches[ 1 ], 10 ); 8778 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 8779 break; 8780 case "y": case "Y" : 8781 year += parseInt( matches[ 1 ], 10 ); 8782 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 8783 break; 8784 } 8785 matches = pattern.exec( offset ); 8786 } 8787 return new Date( year, month, day ); 8788 }, 8789 newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) : 8790 ( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) ); 8791 8792 newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate ); 8793 if ( newDate ) { 8794 newDate.setHours( 0 ); 8795 newDate.setMinutes( 0 ); 8796 newDate.setSeconds( 0 ); 8797 newDate.setMilliseconds( 0 ); 8798 } 8799 return this._daylightSavingAdjust( newDate ); 8800 }, 8801 8802 /* Handle switch to/from daylight saving. 8803 * Hours may be non-zero on daylight saving cut-over: 8804 * > 12 when midnight changeover, but then cannot generate 8805 * midnight datetime, so jump to 1AM, otherwise reset. 8806 * @param date (Date) the date to check 8807 * @return (Date) the corrected date 8808 */ 8809 _daylightSavingAdjust: function( date ) { 8810 if ( !date ) { 8811 return null; 8812 } 8813 date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 ); 8814 return date; 8815 }, 8816 8817 /* Set the date(s) directly. */ 8818 _setDate: function( inst, date, noChange ) { 8819 var clear = !date, 8820 origMonth = inst.selectedMonth, 8821 origYear = inst.selectedYear, 8822 newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) ); 8823 8824 inst.selectedDay = inst.currentDay = newDate.getDate(); 8825 inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 8826 inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 8827 if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) { 8828 this._notifyChange( inst ); 8829 } 8830 this._adjustInstDate( inst ); 8831 if ( inst.input ) { 8832 inst.input.val( clear ? "" : this._formatDate( inst ) ); 8833 } 8834 }, 8835 8836 /* Retrieve the date(s) directly. */ 8837 _getDate: function( inst ) { 8838 var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null : 8839 this._daylightSavingAdjust( new Date( 8840 inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 8841 return startDate; 8842 }, 8843 8844 /* Attach the onxxx handlers. These are declared statically so 8845 * they work with static code transformers like Caja. 8846 */ 8847 _attachHandlers: function( inst ) { 8848 var stepMonths = this._get( inst, "stepMonths" ), 8849 id = "#" + inst.id.replace( /\\\\/g, "\\" );
vendor: 42,013 bytes, lines 8850-10034
8850 inst.dpDiv.find( "[data-handler]" ).map( function() { 8851 var handler = { 8852 prev: function() { 8853 $.datepicker._adjustDate( id, -stepMonths, "M" ); 8854 }, 8855 next: function() { 8856 $.datepicker._adjustDate( id, +stepMonths, "M" ); 8857 }, 8858 hide: function() { 8859 $.datepicker._hideDatepicker(); 8860 }, 8861 today: function() { 8862 $.datepicker._gotoToday( id ); 8863 }, 8864 selectDay: function() { 8865 $.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this ); 8866 return false; 8867 }, 8868 selectMonth: function() { 8869 $.datepicker._selectMonthYear( id, this, "M" ); 8870 return false; 8871 }, 8872 selectYear: function() { 8873 $.datepicker._selectMonthYear( id, this, "Y" ); 8874 return false; 8875 } 8876 }; 8877 $( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] ); 8878 } ); 8879 }, 8880 8881 /* Generate the HTML for the current state of the date picker. */ 8882 _generateHTML: function( inst ) { 8883 var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 8884 controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 8885 monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 8886 selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 8887 cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 8888 printDate, dRow, tbody, daySettings, otherMonth, unselectable, 8889 tempDate = new Date(), 8890 today = this._daylightSavingAdjust( 8891 new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time 8892 isRTL = this._get( inst, "isRTL" ), 8893 showButtonPanel = this._get( inst, "showButtonPanel" ), 8894 hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ), 8895 navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ), 8896 numMonths = this._getNumberOfMonths( inst ), 8897 showCurrentAtPos = this._get( inst, "showCurrentAtPos" ), 8898 stepMonths = this._get( inst, "stepMonths" ), 8899 isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ), 8900 currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) : 8901 new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ), 8902 minDate = this._getMinMaxDate( inst, "min" ), 8903 maxDate = this._getMinMaxDate( inst, "max" ), 8904 drawMonth = inst.drawMonth - showCurrentAtPos, 8905 drawYear = inst.drawYear; 8906 8907 if ( drawMonth < 0 ) { 8908 drawMonth += 12; 8909 drawYear--; 8910 } 8911 if ( maxDate ) { 8912 maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(), 8913 maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) ); 8914 maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw ); 8915 while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) { 8916 drawMonth--; 8917 if ( drawMonth < 0 ) { 8918 drawMonth = 11; 8919 drawYear--; 8920 } 8921 } 8922 } 8923 inst.drawMonth = drawMonth; 8924 inst.drawYear = drawYear; 8925 8926 prevText = this._get( inst, "prevText" ); 8927 prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText, 8928 this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ), 8929 this._getFormatConfig( inst ) ) ); 8930 8931 prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ? 8932 "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + 8933 " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" : 8934 ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) ); 8935 8936 nextText = this._get( inst, "nextText" ); 8937 nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText, 8938 this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ), 8939 this._getFormatConfig( inst ) ) ); 8940 8941 next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ? 8942 "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + 8943 " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" : 8944 ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) ); 8945 8946 currentText = this._get( inst, "currentText" ); 8947 gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today ); 8948 currentText = ( !navigationAsDateFormat ? currentText : 8949 this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) ); 8950 8951 controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + 8952 this._get( inst, "closeText" ) + "</button>" : "" ); 8953 8954 buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) + 8955 ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + 8956 ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : ""; 8957 8958 firstDay = parseInt( this._get( inst, "firstDay" ), 10 ); 8959 firstDay = ( isNaN( firstDay ) ? 0 : firstDay ); 8960 8961 showWeek = this._get( inst, "showWeek" ); 8962 dayNames = this._get( inst, "dayNames" ); 8963 dayNamesMin = this._get( inst, "dayNamesMin" ); 8964 monthNames = this._get( inst, "monthNames" ); 8965 monthNamesShort = this._get( inst, "monthNamesShort" ); 8966 beforeShowDay = this._get( inst, "beforeShowDay" ); 8967 showOtherMonths = this._get( inst, "showOtherMonths" ); 8968 selectOtherMonths = this._get( inst, "selectOtherMonths" ); 8969 defaultDate = this._getDefaultDate( inst ); 8970 html = ""; 8971 8972 for ( row = 0; row < numMonths[ 0 ]; row++ ) { 8973 group = ""; 8974 this.maxRows = 4; 8975 for ( col = 0; col < numMonths[ 1 ]; col++ ) { 8976 selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) ); 8977 cornerClass = " ui-corner-all"; 8978 calender = ""; 8979 if ( isMultiMonth ) { 8980 calender += "<div class='ui-datepicker-group"; 8981 if ( numMonths[ 1 ] > 1 ) { 8982 switch ( col ) { 8983 case 0: calender += " ui-datepicker-group-first"; 8984 cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break; 8985 case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last"; 8986 cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break; 8987 default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 8988 } 8989 } 8990 calender += "'>"; 8991 } 8992 calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 8993 ( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) + 8994 ( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) + 8995 this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate, 8996 row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers 8997 "</div><table class='ui-datepicker-calendar'><thead>" + 8998 "<tr>"; 8999 thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" ); 9000 for ( dow = 0; dow < 7; dow++ ) { // days of the week 9001 day = ( dow + firstDay ) % 7; 9002 thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" + 9003 "<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>"; 9004 } 9005 calender += thead + "</tr></thead><tbody>"; 9006 daysInMonth = this._getDaysInMonth( drawYear, drawMonth ); 9007 if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) { 9008 inst.selectedDay = Math.min( inst.selectedDay, daysInMonth ); 9009 } 9010 leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7; 9011 curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate 9012 numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043) 9013 this.maxRows = numRows; 9014 printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) ); 9015 for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows 9016 calender += "<tr>"; 9017 tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 9018 this._get( inst, "calculateWeek" )( printDate ) + "</td>" ); 9019 for ( dow = 0; dow < 7; dow++ ) { // create date picker days 9020 daySettings = ( beforeShowDay ? 9021 beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] ); 9022 otherMonth = ( printDate.getMonth() !== drawMonth ); 9023 unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] || 9024 ( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate ); 9025 tbody += "<td class='" + 9026 ( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends 9027 ( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months 9028 ( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key 9029 ( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ? 9030 9031 // or defaultDate is current printedDate and defaultDate is selectedDate 9032 " " + this._dayOverClass : "" ) + // highlight selected day 9033 ( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) + // highlight unselectable days 9034 ( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates 9035 ( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day 9036 ( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different) 9037 ( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "'" ) + "'" : "" ) + // cell title 9038 ( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions 9039 ( otherMonth && !showOtherMonths ? " " : // display for other months 9040 ( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 9041 ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) + 9042 ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day 9043 ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months 9044 "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date 9045 printDate.setDate( printDate.getDate() + 1 ); 9046 printDate = this._daylightSavingAdjust( printDate ); 9047 } 9048 calender += tbody + "</tr>"; 9049 } 9050 drawMonth++; 9051 if ( drawMonth > 11 ) { 9052 drawMonth = 0; 9053 drawYear++; 9054 } 9055 calender += "</tbody></table>" + ( isMultiMonth ? "</div>" + 9056 ( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" ); 9057 group += calender; 9058 } 9059 html += group; 9060 } 9061 html += buttonPanel; 9062 inst._keyEvent = false; 9063 return html; 9064 }, 9065 9066 /* Generate the month and year header. */ 9067 _generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate, 9068 secondary, monthNames, monthNamesShort ) { 9069 9070 var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 9071 changeMonth = this._get( inst, "changeMonth" ), 9072 changeYear = this._get( inst, "changeYear" ), 9073 showMonthAfterYear = this._get( inst, "showMonthAfterYear" ), 9074 html = "<div class='ui-datepicker-title'>", 9075 monthHtml = ""; 9076 9077 // Month selection 9078 if ( secondary || !changeMonth ) { 9079 monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>"; 9080 } else { 9081 inMinYear = ( minDate && minDate.getFullYear() === drawYear ); 9082 inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear ); 9083 monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; 9084 for ( month = 0; month < 12; month++ ) { 9085 if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) { 9086 monthHtml += "<option value='" + month + "'" + 9087 ( month === drawMonth ? " selected='selected'" : "" ) + 9088 ">" + monthNamesShort[ month ] + "</option>"; 9089 } 9090 } 9091 monthHtml += "</select>"; 9092 } 9093 9094 if ( !showMonthAfterYear ) { 9095 html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? " " : "" ); 9096 } 9097 9098 // Year selection 9099 if ( !inst.yearshtml ) { 9100 inst.yearshtml = ""; 9101 if ( secondary || !changeYear ) { 9102 html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 9103 } else { 9104 9105 // determine range of years to display 9106 years = this._get( inst, "yearRange" ).split( ":" ); 9107 thisYear = new Date().getFullYear(); 9108 determineYear = function( value ) { 9109 var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) : 9110 ( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) : 9111 parseInt( value, 10 ) ) ); 9112 return ( isNaN( year ) ? thisYear : year ); 9113 }; 9114 year = determineYear( years[ 0 ] ); 9115 endYear = Math.max( year, determineYear( years[ 1 ] || "" ) ); 9116 year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year ); 9117 endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear ); 9118 inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; 9119 for ( ; year <= endYear; year++ ) { 9120 inst.yearshtml += "<option value='" + year + "'" + 9121 ( year === drawYear ? " selected='selected'" : "" ) + 9122 ">" + year + "</option>"; 9123 } 9124 inst.yearshtml += "</select>"; 9125 9126 html += inst.yearshtml; 9127 inst.yearshtml = null; 9128 } 9129 } 9130 9131 html += this._get( inst, "yearSuffix" ); 9132 if ( showMonthAfterYear ) { 9133 html += ( secondary || !( changeMonth && changeYear ) ? " " : "" ) + monthHtml; 9134 } 9135 html += "</div>"; // Close datepicker_header 9136 return html; 9137 }, 9138 9139 /* Adjust one of the date sub-fields. */ 9140 _adjustInstDate: function( inst, offset, period ) { 9141 var year = inst.selectedYear + ( period === "Y" ? offset : 0 ), 9142 month = inst.selectedMonth + ( period === "M" ? offset : 0 ), 9143 day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ), 9144 date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) ); 9145 9146 inst.selectedDay = date.getDate(); 9147 inst.drawMonth = inst.selectedMonth = date.getMonth(); 9148 inst.drawYear = inst.selectedYear = date.getFullYear(); 9149 if ( period === "M" || period === "Y" ) { 9150 this._notifyChange( inst ); 9151 } 9152 }, 9153 9154 /* Ensure a date is within any min/max bounds. */ 9155 _restrictMinMax: function( inst, date ) { 9156 var minDate = this._getMinMaxDate( inst, "min" ), 9157 maxDate = this._getMinMaxDate( inst, "max" ), 9158 newDate = ( minDate && date < minDate ? minDate : date ); 9159 return ( maxDate && newDate > maxDate ? maxDate : newDate ); 9160 }, 9161 9162 /* Notify change of month/year. */ 9163 _notifyChange: function( inst ) { 9164 var onChange = this._get( inst, "onChangeMonthYear" ); 9165 if ( onChange ) { 9166 onChange.apply( ( inst.input ? inst.input[ 0 ] : null ), 9167 [ inst.selectedYear, inst.selectedMonth + 1, inst ] ); 9168 } 9169 }, 9170 9171 /* Determine the number of months to show. */ 9172 _getNumberOfMonths: function( inst ) { 9173 var numMonths = this._get( inst, "numberOfMonths" ); 9174 return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) ); 9175 }, 9176 9177 /* Determine the current maximum date - ensure no time components are set. */ 9178 _getMinMaxDate: function( inst, minMax ) { 9179 return this._determineDate( inst, this._get( inst, minMax + "Date" ), null ); 9180 }, 9181 9182 /* Find the number of days in a given month. */ 9183 _getDaysInMonth: function( year, month ) { 9184 return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate(); 9185 }, 9186 9187 /* Find the day of the week of the first of a month. */ 9188 _getFirstDayOfMonth: function( year, month ) { 9189 return new Date( year, month, 1 ).getDay(); 9190 }, 9191 9192 /* Determines if we should allow a "next/prev" month display change. */ 9193 _canAdjustMonth: function( inst, offset, curYear, curMonth ) { 9194 var numMonths = this._getNumberOfMonths( inst ), 9195 date = this._daylightSavingAdjust( new Date( curYear, 9196 curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) ); 9197 9198 if ( offset < 0 ) { 9199 date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) ); 9200 } 9201 return this._isInRange( inst, date ); 9202 }, 9203 9204 /* Is the given date in the accepted range? */ 9205 _isInRange: function( inst, date ) { 9206 var yearSplit, currentYear, 9207 minDate = this._getMinMaxDate( inst, "min" ), 9208 maxDate = this._getMinMaxDate( inst, "max" ), 9209 minYear = null, 9210 maxYear = null, 9211 years = this._get( inst, "yearRange" ); 9212 if ( years ) { 9213 yearSplit = years.split( ":" ); 9214 currentYear = new Date().getFullYear(); 9215 minYear = parseInt( yearSplit[ 0 ], 10 ); 9216 maxYear = parseInt( yearSplit[ 1 ], 10 ); 9217 if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) { 9218 minYear += currentYear; 9219 } 9220 if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) { 9221 maxYear += currentYear; 9222 } 9223 } 9224 9225 return ( ( !minDate || date.getTime() >= minDate.getTime() ) && 9226 ( !maxDate || date.getTime() <= maxDate.getTime() ) && 9227 ( !minYear || date.getFullYear() >= minYear ) && 9228 ( !maxYear || date.getFullYear() <= maxYear ) ); 9229 }, 9230 9231 /* Provide the configuration settings for formatting/parsing. */ 9232 _getFormatConfig: function( inst ) { 9233 var shortYearCutoff = this._get( inst, "shortYearCutoff" ); 9234 shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff : 9235 new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) ); 9236 return { shortYearCutoff: shortYearCutoff, 9237 dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ), 9238 monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) }; 9239 }, 9240 9241 /* Format the given date for display. */ 9242 _formatDate: function( inst, day, month, year ) { 9243 if ( !day ) { 9244 inst.currentDay = inst.selectedDay; 9245 inst.currentMonth = inst.selectedMonth; 9246 inst.currentYear = inst.selectedYear; 9247 } 9248 var date = ( day ? ( typeof day === "object" ? day : 9249 this._daylightSavingAdjust( new Date( year, month, day ) ) ) : 9250 this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 9251 return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) ); 9252 } 9253} ); 9254 9255/* 9256 * Bind hover events for datepicker elements. 9257 * Done via delegate so the binding only occurs once in the lifetime of the parent div. 9258 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. 9259 */ 9260function datepicker_bindHover( dpDiv ) { 9261 var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 9262 return dpDiv.on( "mouseout", selector, function() { 9263 $( this ).removeClass( "ui-state-hover" ); 9264 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 9265 $( this ).removeClass( "ui-datepicker-prev-hover" ); 9266 } 9267 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 9268 $( this ).removeClass( "ui-datepicker-next-hover" ); 9269 } 9270 } ) 9271 .on( "mouseover", selector, datepicker_handleMouseover ); 9272} 9273 9274function datepicker_handleMouseover() { 9275 if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) { 9276 $( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" ); 9277 $( this ).addClass( "ui-state-hover" ); 9278 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 9279 $( this ).addClass( "ui-datepicker-prev-hover" ); 9280 } 9281 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 9282 $( this ).addClass( "ui-datepicker-next-hover" ); 9283 } 9284 } 9285} 9286 9287/* jQuery extend now ignores nulls! */ 9288function datepicker_extendRemove( target, props ) { 9289 $.extend( target, props ); 9290 for ( var name in props ) { 9291 if ( props[ name ] == null ) { 9292 target[ name ] = props[ name ]; 9293 } 9294 } 9295 return target; 9296} 9297 9298/* Invoke the datepicker functionality. 9299 @param options string - a command, optionally followed by additional parameters or 9300 Object - settings for attaching new datepicker functionality 9301 @return jQuery object */ 9302$.fn.datepicker = function( options ) { 9303 9304 /* Verify an empty collection wasn't passed - Fixes #6976 */ 9305 if ( !this.length ) { 9306 return this; 9307 } 9308 9309 /* Initialise the date picker. */ 9310 if ( !$.datepicker.initialized ) { 9311 $( document ).on( "mousedown", $.datepicker._checkExternalClick ); 9312 $.datepicker.initialized = true; 9313 } 9314 9315 /* Append datepicker main container to body if not exist. */ 9316 if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) { 9317 $( "body" ).append( $.datepicker.dpDiv ); 9318 } 9319 9320 var otherArgs = Array.prototype.slice.call( arguments, 1 ); 9321 if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) { 9322 return $.datepicker[ "_" + options + "Datepicker" ]. 9323 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 9324 } 9325 if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) { 9326 return $.datepicker[ "_" + options + "Datepicker" ]. 9327 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 9328 } 9329 return this.each( function() { 9330 typeof options === "string" ? 9331 $.datepicker[ "_" + options + "Datepicker" ]. 9332 apply( $.datepicker, [ this ].concat( otherArgs ) ) : 9333 $.datepicker._attachDatepicker( this, options ); 9334 } ); 9335}; 9336 9337$.datepicker = new Datepicker(); // singleton instance 9338$.datepicker.initialized = false; 9339$.datepicker.uuid = new Date().getTime(); 9340$.datepicker.version = "1.12.1"; 9341 9342var widgetsDatepicker = $.datepicker; 9343 9344 9345 9346 9347// This file is deprecated 9348var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 9349 9350/*! 9351 * jQuery UI Mouse 1.12.1 9352 * http://jqueryui.com 9353 * 9354 * Copyright jQuery Foundation and other contributors 9355 * Released under the MIT license. 9356 * http://jquery.org/license 9357 */ 9358 9359//>>label: Mouse 9360//>>group: Widgets 9361//>>description: Abstracts mouse-based interactions to assist in creating certain widgets. 9362//>>docs: http://api.jqueryui.com/mouse/ 9363 9364 9365 9366var mouseHandled = false; 9367$( document ).on( "mouseup", function() { 9368 mouseHandled = false; 9369} ); 9370 9371var widgetsMouse = $.widget( "ui.mouse", { 9372 version: "1.12.1", 9373 options: { 9374 cancel: "input, textarea, button, select, option", 9375 distance: 1, 9376 delay: 0 9377 }, 9378 _mouseInit: function() { 9379 var that = this; 9380 9381 this.element 9382 .on( "mousedown." + this.widgetName, function( event ) { 9383 return that._mouseDown( event ); 9384 } ) 9385 .on( "click." + this.widgetName, function( event ) { 9386 if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { 9387 $.removeData( event.target, that.widgetName + ".preventClickEvent" ); 9388 event.stopImmediatePropagation(); 9389 return false; 9390 } 9391 } ); 9392 9393 this.started = false; 9394 }, 9395 9396 // TODO: make sure destroying one instance of mouse doesn't mess with 9397 // other instances of mouse 9398 _mouseDestroy: function() { 9399 this.element.off( "." + this.widgetName ); 9400 if ( this._mouseMoveDelegate ) { 9401 this.document 9402 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9403 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9404 } 9405 }, 9406 9407 _mouseDown: function( event ) { 9408 9409 // don't let more than one widget handle mouseStart 9410 if ( mouseHandled ) { 9411 return; 9412 } 9413 9414 this._mouseMoved = false; 9415 9416 // We may have missed mouseup (out of window) 9417 ( this._mouseStarted && this._mouseUp( event ) ); 9418 9419 this._mouseDownEvent = event; 9420 9421 var that = this, 9422 btnIsLeft = ( event.which === 1 ), 9423 9424 // event.target.nodeName works around a bug in IE 8 with 9425 // disabled inputs (#7620) 9426 elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? 9427 $( event.target ).closest( this.options.cancel ).length : false ); 9428 if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { 9429 return true; 9430 } 9431 9432 this.mouseDelayMet = !this.options.delay; 9433 if ( !this.mouseDelayMet ) { 9434 this._mouseDelayTimer = setTimeout( function() { 9435 that.mouseDelayMet = true; 9436 }, this.options.delay ); 9437 } 9438 9439 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 9440 this._mouseStarted = ( this._mouseStart( event ) !== false ); 9441 if ( !this._mouseStarted ) { 9442 event.preventDefault(); 9443 return true; 9444 } 9445 } 9446 9447 // Click event may never have fired (Gecko & Opera) 9448 if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { 9449 $.removeData( event.target, this.widgetName + ".preventClickEvent" ); 9450 } 9451 9452 // These delegates are required to keep context 9453 this._mouseMoveDelegate = function( event ) { 9454 return that._mouseMove( event ); 9455 }; 9456 this._mouseUpDelegate = function( event ) { 9457 return that._mouseUp( event ); 9458 }; 9459 9460 this.document 9461 .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9462 .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9463 9464 event.preventDefault(); 9465 9466 mouseHandled = true; 9467 return true; 9468 }, 9469 9470 _mouseMove: function( event ) { 9471 9472 // Only check for mouseups outside the document if you've moved inside the document 9473 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 9474 // fire a mousemove event if content is placed under the cursor. See #7778 9475 // Support: IE <9 9476 if ( this._mouseMoved ) { 9477 9478 // IE mouseup check - mouseup happened when mouse was out of window 9479 if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && 9480 !event.button ) { 9481 return this._mouseUp( event ); 9482 9483 // Iframe mouseup check - mouseup occurred in another document 9484 } else if ( !event.which ) { 9485 9486 // Support: Safari <=8 - 9 9487 // Safari sets which to 0 if you press any of the following keys 9488 // during a drag (#14461) 9489 if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || 9490 event.originalEvent.metaKey || event.originalEvent.shiftKey ) { 9491 this.ignoreMissingWhich = true; 9492 } else if ( !this.ignoreMissingWhich ) { 9493 return this._mouseUp( event ); 9494 } 9495 } 9496 } 9497 9498 if ( event.which || event.button ) { 9499 this._mouseMoved = true; 9500 } 9501 9502 if ( this._mouseStarted ) { 9503 this._mouseDrag( event ); 9504 return event.preventDefault(); 9505 } 9506 9507 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 9508 this._mouseStarted = 9509 ( this._mouseStart( this._mouseDownEvent, event ) !== false ); 9510 ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); 9511 } 9512 9513 return !this._mouseStarted; 9514 }, 9515 9516 _mouseUp: function( event ) { 9517 this.document 9518 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9519 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9520 9521 if ( this._mouseStarted ) { 9522 this._mouseStarted = false; 9523 9524 if ( event.target === this._mouseDownEvent.target ) { 9525 $.data( event.target, this.widgetName + ".preventClickEvent", true ); 9526 } 9527 9528 this._mouseStop( event ); 9529 } 9530 9531 if ( this._mouseDelayTimer ) { 9532 clearTimeout( this._mouseDelayTimer ); 9533 delete this._mouseDelayTimer; 9534 } 9535 9536 this.ignoreMissingWhich = false; 9537 mouseHandled = false; 9538 event.preventDefault(); 9539 }, 9540 9541 _mouseDistanceMet: function( event ) { 9542 return ( Math.max( 9543 Math.abs( this._mouseDownEvent.pageX - event.pageX ), 9544 Math.abs( this._mouseDownEvent.pageY - event.pageY ) 9545 ) >= this.options.distance 9546 ); 9547 }, 9548 9549 _mouseDelayMet: function( /* event */ ) { 9550 return this.mouseDelayMet; 9551 }, 9552 9553 // These are placeholder methods, to be overriden by extending plugin 9554 _mouseStart: function( /* event */ ) {}, 9555 _mouseDrag: function( /* event */ ) {}, 9556 _mouseStop: function( /* event */ ) {}, 9557 _mouseCapture: function( /* event */ ) { return true; } 9558} ); 9559 9560 9561 9562 9563// $.ui.plugin is deprecated. Use $.widget() extensions instead. 9564var plugin = $.ui.plugin = { 9565 add: function( module, option, set ) { 9566 var i, 9567 proto = $.ui[ module ].prototype; 9568 for ( i in set ) { 9569 proto.plugins[ i ] = proto.plugins[ i ] || []; 9570 proto.plugins[ i ].push( [ option, set[ i ] ] ); 9571 } 9572 }, 9573 call: function( instance, name, args, allowDisconnected ) { 9574 var i, 9575 set = instance.plugins[ name ]; 9576 9577 if ( !set ) { 9578 return; 9579 } 9580 9581 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || 9582 instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 9583 return; 9584 } 9585 9586 for ( i = 0; i < set.length; i++ ) { 9587 if ( instance.options[ set[ i ][ 0 ] ] ) { 9588 set[ i ][ 1 ].apply( instance.element, args ); 9589 } 9590 } 9591 } 9592}; 9593 9594 9595 9596var safeBlur = $.ui.safeBlur = function( element ) { 9597 9598 // Support: IE9 - 10 only 9599 // If the <body> is blurred, IE will switch windows, see #9420 9600 if ( element && element.nodeName.toLowerCase() !== "body" ) { 9601 $( element ).trigger( "blur" ); 9602 } 9603}; 9604 9605 9606/*! 9607 * jQuery UI Draggable 1.12.1 9608 * http://jqueryui.com 9609 * 9610 * Copyright jQuery Foundation and other contributors 9611 * Released under the MIT license. 9612 * http://jquery.org/license 9613 */ 9614 9615//>>label: Draggable 9616//>>group: Interactions 9617//>>description: Enables dragging functionality for any element. 9618//>>docs: http://api.jqueryui.com/draggable/ 9619//>>demos: http://jqueryui.com/draggable/ 9620//>>css.structure: ../../themes/base/draggable.css 9621 9622 9623 9624$.widget( "ui.draggable", $.ui.mouse, { 9625 version: "1.12.1", 9626 widgetEventPrefix: "drag", 9627 options: { 9628 addClasses: true, 9629 appendTo: "parent", 9630 axis: false, 9631 connectToSortable: false, 9632 containment: false, 9633 cursor: "auto", 9634 cursorAt: false, 9635 grid: false, 9636 handle: false, 9637 helper: "original", 9638 iframeFix: false, 9639 opacity: false, 9640 refreshPositions: false, 9641 revert: false, 9642 revertDuration: 500, 9643 scope: "default", 9644 scroll: true, 9645 scrollSensitivity: 20, 9646 scrollSpeed: 20, 9647 snap: false, 9648 snapMode: "both", 9649 snapTolerance: 20, 9650 stack: false, 9651 zIndex: false, 9652 9653 // Callbacks 9654 drag: null, 9655 start: null, 9656 stop: null 9657 }, 9658 _create: function() { 9659 9660 if ( this.options.helper === "original" ) { 9661 this._setPositionRelative(); 9662 } 9663 if ( this.options.addClasses ) { 9664 this._addClass( "ui-draggable" ); 9665 } 9666 this._setHandleClassName(); 9667 9668 this._mouseInit(); 9669 }, 9670 9671 _setOption: function( key, value ) { 9672 this._super( key, value ); 9673 if ( key === "handle" ) { 9674 this._removeHandleClassName(); 9675 this._setHandleClassName(); 9676 } 9677 }, 9678 9679 _destroy: function() { 9680 if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { 9681 this.destroyOnClear = true; 9682 return; 9683 } 9684 this._removeHandleClassName(); 9685 this._mouseDestroy(); 9686 }, 9687 9688 _mouseCapture: function( event ) { 9689 var o = this.options; 9690 9691 // Among others, prevent a drag on a resizable-handle 9692 if ( this.helper || o.disabled || 9693 $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) { 9694 return false; 9695 } 9696 9697 //Quit if we're not on a valid handle 9698 this.handle = this._getHandle( event ); 9699 if ( !this.handle ) { 9700 return false; 9701 } 9702 9703 this._blurActiveElement( event ); 9704 9705 this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); 9706 9707 return true; 9708 9709 }, 9710 9711 _blockFrames: function( selector ) { 9712 this.iframeBlocks = this.document.find( selector ).map( function() { 9713 var iframe = $( this ); 9714 9715 return $( "<div>" ) 9716 .css( "position", "absolute" ) 9717 .appendTo( iframe.parent() ) 9718 .outerWidth( iframe.outerWidth() ) 9719 .outerHeight( iframe.outerHeight() ) 9720 .offset( iframe.offset() )[ 0 ]; 9721 } ); 9722 }, 9723 9724 _unblockFrames: function() { 9725 if ( this.iframeBlocks ) { 9726 this.iframeBlocks.remove(); 9727 delete this.iframeBlocks; 9728 } 9729 }, 9730 9731 _blurActiveElement: function( event ) { 9732 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 9733 target = $( event.target ); 9734 9735 // Don't blur if the event occurred on an element that is within 9736 // the currently focused element 9737 // See #10527, #12472 9738 if ( target.closest( activeElement ).length ) { 9739 return; 9740 } 9741 9742 // Blur any element that currently has focus, see #4261 9743 $.ui.safeBlur( activeElement ); 9744 }, 9745 9746 _mouseStart: function( event ) { 9747 9748 var o = this.options; 9749 9750 //Create and append the visible helper 9751 this.helper = this._createHelper( event ); 9752 9753 this._addClass( this.helper, "ui-draggable-dragging" ); 9754 9755 //Cache the helper size 9756 this._cacheHelperProportions(); 9757 9758 //If ddmanager is used for droppables, set the global draggable 9759 if ( $.ui.ddmanager ) { 9760 $.ui.ddmanager.current = this; 9761 } 9762 9763 /* 9764 * - Position generation - 9765 * This block generates everything position related - it's the core of draggables. 9766 */ 9767 9768 //Cache the margins of the original element 9769 this._cacheMargins(); 9770 9771 //Store the helper's css position 9772 this.cssPosition = this.helper.css( "position" ); 9773 this.scrollParent = this.helper.scrollParent( true ); 9774 this.offsetParent = this.helper.offsetParent(); 9775 this.hasFixedAncestor = this.helper.parents().filter( function() { 9776 return $( this ).css( "position" ) === "fixed"; 9777 } ).length > 0; 9778 9779 //The element's absolute position on the page minus margins 9780 this.positionAbs = this.element.offset(); 9781 this._refreshOffsets( event ); 9782 9783 //Generate the original position 9784 this.originalPosition = this.position = this._generatePosition( event, false ); 9785 this.originalPageX = event.pageX; 9786 this.originalPageY = event.pageY; 9787 9788 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 9789 ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); 9790 9791 //Set a containment if given in the options 9792 this._setContainment(); 9793 9794 //Trigger event + callbacks 9795 if ( this._trigger( "start", event ) === false ) { 9796 this._clear(); 9797 return false; 9798 } 9799 9800 //Recache the helper size 9801 this._cacheHelperProportions(); 9802 9803 //Prepare the droppable offsets 9804 if ( $.ui.ddmanager && !o.dropBehaviour ) { 9805 $.ui.ddmanager.prepareOffsets( this, event ); 9806 } 9807 9808 // Execute the drag once - this causes the helper not to be visible before getting its 9809 // correct position 9810 this._mouseDrag( event, true ); 9811 9812 // If the ddmanager is used for droppables, inform the manager that dragging has started 9813 // (see #5003) 9814 if ( $.ui.ddmanager ) { 9815 $.ui.ddmanager.dragStart( this, event ); 9816 } 9817 9818 return true; 9819 }, 9820 9821 _refreshOffsets: function( event ) { 9822 this.offset = { 9823 top: this.positionAbs.top - this.margins.top, 9824 left: this.positionAbs.left - this.margins.left, 9825 scroll: false, 9826 parent: this._getParentOffset(), 9827 relative: this._getRelativeOffset() 9828 }; 9829 9830 this.offset.click = { 9831 left: event.pageX - this.offset.left, 9832 top: event.pageY - this.offset.top 9833 }; 9834 }, 9835 9836 _mouseDrag: function( event, noPropagation ) { 9837 9838 // reset any necessary cached properties (see #5009) 9839 if ( this.hasFixedAncestor ) { 9840 this.offset.parent = this._getParentOffset(); 9841 } 9842 9843 //Compute the helpers position 9844 this.position = this._generatePosition( event, true ); 9845 this.positionAbs = this._convertPositionTo( "absolute" ); 9846 9847 //Call plugins and callbacks and use the resulting position if something is returned 9848 if ( !noPropagation ) { 9849 var ui = this._uiHash(); 9850 if ( this._trigger( "drag", event, ui ) === false ) { 9851 this._mouseUp( new $.Event( "mouseup", event ) ); 9852 return false; 9853 } 9854 this.position = ui.position; 9855 } 9856 9857 this.helper[ 0 ].style.left = this.position.left + "px"; 9858 this.helper[ 0 ].style.top = this.position.top + "px"; 9859 9860 if ( $.ui.ddmanager ) { 9861 $.ui.ddmanager.drag( this, event ); 9862 } 9863 9864 return false; 9865 }, 9866 9867 _mouseStop: function( event ) { 9868 9869 //If we are using droppables, inform the manager about the drop 9870 var that = this, 9871 dropped = false; 9872 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 9873 dropped = $.ui.ddmanager.drop( this, event ); 9874 } 9875 9876 //if a drop comes from outside (a sortable) 9877 if ( this.dropped ) { 9878 dropped = this.dropped; 9879 this.dropped = false; 9880 } 9881 9882 if ( ( this.options.revert === "invalid" && !dropped ) || 9883 ( this.options.revert === "valid" && dropped ) || 9884 this.options.revert === true || ( $.isFunction( this.options.revert ) && 9885 this.options.revert.call( this.element, dropped ) ) 9886 ) { 9887 $( this.helper ).animate( 9888 this.originalPosition, 9889 parseInt( this.options.revertDuration, 10 ), 9890 function() { 9891 if ( that._trigger( "stop", event ) !== false ) { 9892 that._clear(); 9893 } 9894 } 9895 ); 9896 } else { 9897 if ( this._trigger( "stop", event ) !== false ) { 9898 this._clear(); 9899 } 9900 } 9901 9902 return false; 9903 }, 9904 9905 _mouseUp: function( event ) { 9906 this._unblockFrames(); 9907 9908 // If the ddmanager is used for droppables, inform the manager that dragging has stopped 9909 // (see #5003) 9910 if ( $.ui.ddmanager ) { 9911 $.ui.ddmanager.dragStop( this, event ); 9912 } 9913 9914 // Only need to focus if the event occurred on the draggable itself, see #10527 9915 if ( this.handleElement.is( event.target ) ) { 9916 9917 // The interaction is over; whether or not the click resulted in a drag, 9918 // focus the element 9919 this.element.trigger( "focus" ); 9920 } 9921 9922 return $.ui.mouse.prototype._mouseUp.call( this, event ); 9923 }, 9924 9925 cancel: function() { 9926 9927 if ( this.helper.is( ".ui-draggable-dragging" ) ) { 9928 this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) ); 9929 } else { 9930 this._clear(); 9931 } 9932 9933 return this; 9934 9935 }, 9936 9937 _getHandle: function( event ) { 9938 return this.options.handle ? 9939 !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 9940 true; 9941 }, 9942 9943 _setHandleClassName: function() { 9944 this.handleElement = this.options.handle ? 9945 this.element.find( this.options.handle ) : this.element; 9946 this._addClass( this.handleElement, "ui-draggable-handle" ); 9947 }, 9948 9949 _removeHandleClassName: function() { 9950 this._removeClass( this.handleElement, "ui-draggable-handle" ); 9951 }, 9952 9953 _createHelper: function( event ) { 9954 9955 var o = this.options, 9956 helperIsFunction = $.isFunction( o.helper ), 9957 helper = helperIsFunction ? 9958 $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : 9959 ( o.helper === "clone" ? 9960 this.element.clone().removeAttr( "id" ) : 9961 this.element ); 9962 9963 if ( !helper.parents( "body" ).length ) { 9964 helper.appendTo( ( o.appendTo === "parent" ? 9965 this.element[ 0 ].parentNode : 9966 o.appendTo ) ); 9967 } 9968 9969 // Http://bugs.jqueryui.com/ticket/9446 9970 // a helper function can return the original element 9971 // which wouldn't have been set to relative in _create 9972 if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { 9973 this._setPositionRelative(); 9974 } 9975 9976 if ( helper[ 0 ] !== this.element[ 0 ] && 9977 !( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) { 9978 helper.css( "position", "absolute" ); 9979 } 9980 9981 return helper; 9982 9983 }, 9984 9985 _setPositionRelative: function() { 9986 if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { 9987 this.element[ 0 ].style.position = "relative"; 9988 } 9989 }, 9990 9991 _adjustOffsetFromHelper: function( obj ) { 9992 if ( typeof obj === "string" ) { 9993 obj = obj.split( " " ); 9994 } 9995 if ( $.isArray( obj ) ) { 9996 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 9997 } 9998 if ( "left" in obj ) { 9999 this.offset.click.left = obj.left + this.margins.left; 10000 } 10001 if ( "right" in obj ) { 10002 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 10003 } 10004 if ( "top" in obj ) { 10005 this.offset.click.top = obj.top + this.margins.top; 10006 } 10007 if ( "bottom" in obj ) { 10008 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 10009 } 10010 }, 10011 10012 _isRootNode: function( element ) { 10013 return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; 10014 }, 10015 10016 _getParentOffset: function() { 10017 10018 //Get the offsetParent and cache its position 10019 var po = this.offsetParent.offset(), 10020 document = this.document[ 0 ]; 10021 10022 // This is a special case where we need to modify a offset calculated on start, since the 10023 // following happened: 10024 // 1. The position of the helper is absolute, so it's position is calculated based on the 10025 // next positioned parent 10026 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 10027 // the document, which means that the scroll is included in the initial calculation of the 10028 // offset of the parent, and never recalculated upon drag 10029 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document && 10030 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 10031 po.left += this.scrollParent.scrollLeft(); 10032 po.top += this.scrollParent.scrollTop(); 10033 } 10034
vendor: 13,156 bytes, lines 10035-10463
10035 if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { 10036 po = { top: 0, left: 0 }; 10037 } 10038 10039 return { 10040 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 10041 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 10042 }; 10043 10044 }, 10045 10046 _getRelativeOffset: function() { 10047 if ( this.cssPosition !== "relative" ) { 10048 return { top: 0, left: 0 }; 10049 } 10050 10051 var p = this.element.position(), 10052 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 10053 10054 return { 10055 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 10056 ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), 10057 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 10058 ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) 10059 }; 10060 10061 }, 10062 10063 _cacheMargins: function() { 10064 this.margins = { 10065 left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ), 10066 top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ), 10067 right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ), 10068 bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 ) 10069 }; 10070 }, 10071 10072 _cacheHelperProportions: function() { 10073 this.helperProportions = { 10074 width: this.helper.outerWidth(), 10075 height: this.helper.outerHeight() 10076 }; 10077 }, 10078 10079 _setContainment: function() { 10080 10081 var isUserScrollable, c, ce, 10082 o = this.options, 10083 document = this.document[ 0 ]; 10084 10085 this.relativeContainer = null; 10086 10087 if ( !o.containment ) { 10088 this.containment = null; 10089 return; 10090 } 10091 10092 if ( o.containment === "window" ) { 10093 this.containment = [ 10094 $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 10095 $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 10096 $( window ).scrollLeft() + $( window ).width() - 10097 this.helperProportions.width - this.margins.left, 10098 $( window ).scrollTop() + 10099 ( $( window ).height() || document.body.parentNode.scrollHeight ) - 10100 this.helperProportions.height - this.margins.top 10101 ]; 10102 return; 10103 } 10104 10105 if ( o.containment === "document" ) { 10106 this.containment = [ 10107 0, 10108 0, 10109 $( document ).width() - this.helperProportions.width - this.margins.left, 10110 ( $( document ).height() || document.body.parentNode.scrollHeight ) - 10111 this.helperProportions.height - this.margins.top 10112 ]; 10113 return; 10114 } 10115 10116 if ( o.containment.constructor === Array ) { 10117 this.containment = o.containment; 10118 return; 10119 } 10120 10121 if ( o.containment === "parent" ) { 10122 o.containment = this.helper[ 0 ].parentNode; 10123 } 10124 10125 c = $( o.containment ); 10126 ce = c[ 0 ]; 10127 10128 if ( !ce ) { 10129 return; 10130 } 10131 10132 isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); 10133 10134 this.containment = [ 10135 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + 10136 ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 10137 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + 10138 ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), 10139 ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 10140 ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - 10141 ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - 10142 this.helperProportions.width - 10143 this.margins.left - 10144 this.margins.right, 10145 ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 10146 ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - 10147 ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - 10148 this.helperProportions.height - 10149 this.margins.top - 10150 this.margins.bottom 10151 ]; 10152 this.relativeContainer = c; 10153 }, 10154 10155 _convertPositionTo: function( d, pos ) { 10156 10157 if ( !pos ) { 10158 pos = this.position; 10159 } 10160 10161 var mod = d === "absolute" ? 1 : -1, 10162 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 10163 10164 return { 10165 top: ( 10166 10167 // The absolute mouse position 10168 pos.top + 10169 10170 // Only for relative positioned nodes: Relative offset from element to offset parent 10171 this.offset.relative.top * mod + 10172 10173 // The offsetParent's offset without borders (offset + border) 10174 this.offset.parent.top * mod - 10175 ( ( this.cssPosition === "fixed" ? 10176 -this.offset.scroll.top : 10177 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod ) 10178 ), 10179 left: ( 10180 10181 // The absolute mouse position 10182 pos.left + 10183 10184 // Only for relative positioned nodes: Relative offset from element to offset parent 10185 this.offset.relative.left * mod + 10186 10187 // The offsetParent's offset without borders (offset + border) 10188 this.offset.parent.left * mod - 10189 ( ( this.cssPosition === "fixed" ? 10190 -this.offset.scroll.left : 10191 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod ) 10192 ) 10193 }; 10194 10195 }, 10196 10197 _generatePosition: function( event, constrainPosition ) { 10198 10199 var containment, co, top, left, 10200 o = this.options, 10201 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), 10202 pageX = event.pageX, 10203 pageY = event.pageY; 10204 10205 // Cache the scroll 10206 if ( !scrollIsRootNode || !this.offset.scroll ) { 10207 this.offset.scroll = { 10208 top: this.scrollParent.scrollTop(), 10209 left: this.scrollParent.scrollLeft() 10210 }; 10211 } 10212 10213 /* 10214 * - Position constraining - 10215 * Constrain the position to a mix of grid, containment. 10216 */ 10217 10218 // If we are not dragging yet, we won't check for options 10219 if ( constrainPosition ) { 10220 if ( this.containment ) { 10221 if ( this.relativeContainer ) { 10222 co = this.relativeContainer.offset(); 10223 containment = [ 10224 this.containment[ 0 ] + co.left, 10225 this.containment[ 1 ] + co.top, 10226 this.containment[ 2 ] + co.left, 10227 this.containment[ 3 ] + co.top 10228 ]; 10229 } else { 10230 containment = this.containment; 10231 } 10232 10233 if ( event.pageX - this.offset.click.left < containment[ 0 ] ) { 10234 pageX = containment[ 0 ] + this.offset.click.left; 10235 } 10236 if ( event.pageY - this.offset.click.top < containment[ 1 ] ) { 10237 pageY = containment[ 1 ] + this.offset.click.top; 10238 } 10239 if ( event.pageX - this.offset.click.left > containment[ 2 ] ) { 10240 pageX = containment[ 2 ] + this.offset.click.left; 10241 } 10242 if ( event.pageY - this.offset.click.top > containment[ 3 ] ) { 10243 pageY = containment[ 3 ] + this.offset.click.top; 10244 } 10245 } 10246 10247 if ( o.grid ) { 10248 10249 //Check for grid elements set to 0 to prevent divide by 0 error causing invalid 10250 // argument errors in IE (see ticket #6950) 10251 top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY - 10252 this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY; 10253 pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] || 10254 top - this.offset.click.top > containment[ 3 ] ) ? 10255 top : 10256 ( ( top - this.offset.click.top >= containment[ 1 ] ) ? 10257 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top; 10258 10259 left = o.grid[ 0 ] ? this.originalPageX + 10260 Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] : 10261 this.originalPageX; 10262 pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] || 10263 left - this.offset.click.left > containment[ 2 ] ) ? 10264 left : 10265 ( ( left - this.offset.click.left >= containment[ 0 ] ) ? 10266 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left; 10267 } 10268 10269 if ( o.axis === "y" ) { 10270 pageX = this.originalPageX; 10271 } 10272 10273 if ( o.axis === "x" ) { 10274 pageY = this.originalPageY; 10275 } 10276 } 10277 10278 return { 10279 top: ( 10280 10281 // The absolute mouse position 10282 pageY - 10283 10284 // Click offset (relative to the element) 10285 this.offset.click.top - 10286 10287 // Only for relative positioned nodes: Relative offset from element to offset parent 10288 this.offset.relative.top - 10289 10290 // The offsetParent's offset without borders (offset + border) 10291 this.offset.parent.top + 10292 ( this.cssPosition === "fixed" ? 10293 -this.offset.scroll.top : 10294 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) 10295 ), 10296 left: ( 10297 10298 // The absolute mouse position 10299 pageX - 10300 10301 // Click offset (relative to the element) 10302 this.offset.click.left - 10303 10304 // Only for relative positioned nodes: Relative offset from element to offset parent 10305 this.offset.relative.left - 10306 10307 // The offsetParent's offset without borders (offset + border) 10308 this.offset.parent.left + 10309 ( this.cssPosition === "fixed" ? 10310 -this.offset.scroll.left : 10311 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) 10312 ) 10313 }; 10314 10315 }, 10316 10317 _clear: function() { 10318 this._removeClass( this.helper, "ui-draggable-dragging" ); 10319 if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) { 10320 this.helper.remove(); 10321 } 10322 this.helper = null; 10323 this.cancelHelperRemoval = false; 10324 if ( this.destroyOnClear ) { 10325 this.destroy(); 10326 } 10327 }, 10328 10329 // From now on bulk stuff - mainly helpers 10330 10331 _trigger: function( type, event, ui ) { 10332 ui = ui || this._uiHash(); 10333 $.ui.plugin.call( this, type, [ event, ui, this ], true ); 10334 10335 // Absolute position and offset (see #6884 ) have to be recalculated after plugins 10336 if ( /^(drag|start|stop)/.test( type ) ) { 10337 this.positionAbs = this._convertPositionTo( "absolute" ); 10338 ui.offset = this.positionAbs; 10339 } 10340 return $.Widget.prototype._trigger.call( this, type, event, ui ); 10341 }, 10342 10343 plugins: {}, 10344 10345 _uiHash: function() { 10346 return { 10347 helper: this.helper, 10348 position: this.position, 10349 originalPosition: this.originalPosition, 10350 offset: this.positionAbs 10351 }; 10352 } 10353 10354} ); 10355 10356$.ui.plugin.add( "draggable", "connectToSortable", { 10357 start: function( event, ui, draggable ) { 10358 var uiSortable = $.extend( {}, ui, { 10359 item: draggable.element 10360 } ); 10361 10362 draggable.sortables = []; 10363 $( draggable.options.connectToSortable ).each( function() { 10364 var sortable = $( this ).sortable( "instance" ); 10365 10366 if ( sortable && !sortable.options.disabled ) { 10367 draggable.sortables.push( sortable ); 10368 10369 // RefreshPositions is called at drag start to refresh the containerCache 10370 // which is used in drag. This ensures it's initialized and synchronized 10371 // with any changes that might have happened on the page since initialization. 10372 sortable.refreshPositions(); 10373 sortable._trigger( "activate", event, uiSortable ); 10374 } 10375 } ); 10376 }, 10377 stop: function( event, ui, draggable ) { 10378 var uiSortable = $.extend( {}, ui, { 10379 item: draggable.element 10380 } ); 10381 10382 draggable.cancelHelperRemoval = false; 10383 10384 $.each( draggable.sortables, function() { 10385 var sortable = this; 10386 10387 if ( sortable.isOver ) { 10388 sortable.isOver = 0; 10389 10390 // Allow this sortable to handle removing the helper 10391 draggable.cancelHelperRemoval = true; 10392 sortable.cancelHelperRemoval = false; 10393 10394 // Use _storedCSS To restore properties in the sortable, 10395 // as this also handles revert (#9675) since the draggable 10396 // may have modified them in unexpected ways (#8809) 10397 sortable._storedCSS = { 10398 position: sortable.placeholder.css( "position" ), 10399 top: sortable.placeholder.css( "top" ), 10400 left: sortable.placeholder.css( "left" ) 10401 }; 10402 10403 sortable._mouseStop( event ); 10404 10405 // Once drag has ended, the sortable should return to using 10406 // its original helper, not the shared helper from draggable 10407 sortable.options.helper = sortable.options._helper; 10408 } else { 10409 10410 // Prevent this Sortable from removing the helper. 10411 // However, don't set the draggable to remove the helper 10412 // either as another connected Sortable may yet handle the removal. 10413 sortable.cancelHelperRemoval = true; 10414 10415 sortable._trigger( "deactivate", event, uiSortable ); 10416 } 10417 } ); 10418 }, 10419 drag: function( event, ui, draggable ) { 10420 $.each( draggable.sortables, function() { 10421 var innermostIntersecting = false, 10422 sortable = this; 10423 10424 // Copy over variables that sortable's _intersectsWith uses 10425 sortable.positionAbs = draggable.positionAbs; 10426 sortable.helperProportions = draggable.helperProportions; 10427 sortable.offset.click = draggable.offset.click; 10428 10429 if ( sortable._intersectsWith( sortable.containerCache ) ) { 10430 innermostIntersecting = true; 10431 10432 $.each( draggable.sortables, function() { 10433 10434 // Copy over variables that sortable's _intersectsWith uses 10435 this.positionAbs = draggable.positionAbs; 10436 this.helperProportions = draggable.helperProportions; 10437 this.offset.click = draggable.offset.click; 10438 10439 if ( this !== sortable && 10440 this._intersectsWith( this.containerCache ) && 10441 $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { 10442 innermostIntersecting = false; 10443 } 10444 10445 return innermostIntersecting; 10446 } ); 10447 } 10448 10449 if ( innermostIntersecting ) { 10450 10451 // If it intersects, we use a little isOver variable and set it once, 10452 // so that the move-in stuff gets fired only once. 10453 if ( !sortable.isOver ) { 10454 sortable.isOver = 1; 10455 10456 // Store draggable's parent in case we need to reappend to it later. 10457 draggable._parent = ui.helper.parent(); 10458 10459 sortable.currentItem = ui.helper 10460 .appendTo( sortable.element ) 10461 .data( "ui-sortable-item", true ); 10462 10463 // Store helper option to later restore it
vendor: 11,429 bytes, lines 10464-10838
10464 sortable.options._helper = sortable.options.helper; 10465 10466 sortable.options.helper = function() { 10467 return ui.helper[ 0 ]; 10468 }; 10469 10470 // Fire the start events of the sortable with our passed browser event, 10471 // and our own helper (so it doesn't create a new one) 10472 event.target = sortable.currentItem[ 0 ]; 10473 sortable._mouseCapture( event, true ); 10474 sortable._mouseStart( event, true, true ); 10475 10476 // Because the browser event is way off the new appended portlet, 10477 // modify necessary variables to reflect the changes 10478 sortable.offset.click.top = draggable.offset.click.top; 10479 sortable.offset.click.left = draggable.offset.click.left; 10480 sortable.offset.parent.left -= draggable.offset.parent.left - 10481 sortable.offset.parent.left; 10482 sortable.offset.parent.top -= draggable.offset.parent.top - 10483 sortable.offset.parent.top; 10484 10485 draggable._trigger( "toSortable", event ); 10486 10487 // Inform draggable that the helper is in a valid drop zone, 10488 // used solely in the revert option to handle "valid/invalid". 10489 draggable.dropped = sortable.element; 10490 10491 // Need to refreshPositions of all sortables in the case that 10492 // adding to one sortable changes the location of the other sortables (#9675) 10493 $.each( draggable.sortables, function() { 10494 this.refreshPositions(); 10495 } ); 10496 10497 // Hack so receive/update callbacks work (mostly) 10498 draggable.currentItem = draggable.element; 10499 sortable.fromOutside = draggable; 10500 } 10501 10502 if ( sortable.currentItem ) { 10503 sortable._mouseDrag( event ); 10504 10505 // Copy the sortable's position because the draggable's can potentially reflect 10506 // a relative position, while sortable is always absolute, which the dragged 10507 // element has now become. (#8809) 10508 ui.position = sortable.position; 10509 } 10510 } else { 10511 10512 // If it doesn't intersect with the sortable, and it intersected before, 10513 // we fake the drag stop of the sortable, but make sure it doesn't remove 10514 // the helper by using cancelHelperRemoval. 10515 if ( sortable.isOver ) { 10516 10517 sortable.isOver = 0; 10518 sortable.cancelHelperRemoval = true; 10519 10520 // Calling sortable's mouseStop would trigger a revert, 10521 // so revert must be temporarily false until after mouseStop is called. 10522 sortable.options._revert = sortable.options.revert; 10523 sortable.options.revert = false; 10524 10525 sortable._trigger( "out", event, sortable._uiHash( sortable ) ); 10526 sortable._mouseStop( event, true ); 10527 10528 // Restore sortable behaviors that were modfied 10529 // when the draggable entered the sortable area (#9481) 10530 sortable.options.revert = sortable.options._revert; 10531 sortable.options.helper = sortable.options._helper; 10532 10533 if ( sortable.placeholder ) { 10534 sortable.placeholder.remove(); 10535 } 10536 10537 // Restore and recalculate the draggable's offset considering the sortable 10538 // may have modified them in unexpected ways. (#8809, #10669) 10539 ui.helper.appendTo( draggable._parent ); 10540 draggable._refreshOffsets( event ); 10541 ui.position = draggable._generatePosition( event, true ); 10542 10543 draggable._trigger( "fromSortable", event ); 10544 10545 // Inform draggable that the helper is no longer in a valid drop zone 10546 draggable.dropped = false; 10547 10548 // Need to refreshPositions of all sortables just in case removing 10549 // from one sortable changes the location of other sortables (#9675) 10550 $.each( draggable.sortables, function() { 10551 this.refreshPositions(); 10552 } ); 10553 } 10554 } 10555 } ); 10556 } 10557} ); 10558 10559$.ui.plugin.add( "draggable", "cursor", { 10560 start: function( event, ui, instance ) { 10561 var t = $( "body" ), 10562 o = instance.options; 10563 10564 if ( t.css( "cursor" ) ) { 10565 o._cursor = t.css( "cursor" ); 10566 } 10567 t.css( "cursor", o.cursor ); 10568 }, 10569 stop: function( event, ui, instance ) { 10570 var o = instance.options; 10571 if ( o._cursor ) { 10572 $( "body" ).css( "cursor", o._cursor ); 10573 } 10574 } 10575} ); 10576 10577$.ui.plugin.add( "draggable", "opacity", { 10578 start: function( event, ui, instance ) { 10579 var t = $( ui.helper ), 10580 o = instance.options; 10581 if ( t.css( "opacity" ) ) { 10582 o._opacity = t.css( "opacity" ); 10583 } 10584 t.css( "opacity", o.opacity ); 10585 }, 10586 stop: function( event, ui, instance ) { 10587 var o = instance.options; 10588 if ( o._opacity ) { 10589 $( ui.helper ).css( "opacity", o._opacity ); 10590 } 10591 } 10592} ); 10593 10594$.ui.plugin.add( "draggable", "scroll", { 10595 start: function( event, ui, i ) { 10596 if ( !i.scrollParentNotHidden ) { 10597 i.scrollParentNotHidden = i.helper.scrollParent( false ); 10598 } 10599 10600 if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && 10601 i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { 10602 i.overflowOffset = i.scrollParentNotHidden.offset(); 10603 } 10604 }, 10605 drag: function( event, ui, i ) { 10606 10607 var o = i.options, 10608 scrolled = false, 10609 scrollParent = i.scrollParentNotHidden[ 0 ], 10610 document = i.document[ 0 ]; 10611 10612 if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { 10613 if ( !o.axis || o.axis !== "x" ) { 10614 if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < 10615 o.scrollSensitivity ) { 10616 scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; 10617 } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { 10618 scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; 10619 } 10620 } 10621 10622 if ( !o.axis || o.axis !== "y" ) { 10623 if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < 10624 o.scrollSensitivity ) { 10625 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; 10626 } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { 10627 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; 10628 } 10629 } 10630 10631 } else { 10632 10633 if ( !o.axis || o.axis !== "x" ) { 10634 if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) { 10635 scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed ); 10636 } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) < 10637 o.scrollSensitivity ) { 10638 scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed ); 10639 } 10640 } 10641 10642 if ( !o.axis || o.axis !== "y" ) { 10643 if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) { 10644 scrolled = $( document ).scrollLeft( 10645 $( document ).scrollLeft() - o.scrollSpeed 10646 ); 10647 } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) < 10648 o.scrollSensitivity ) { 10649 scrolled = $( document ).scrollLeft( 10650 $( document ).scrollLeft() + o.scrollSpeed 10651 ); 10652 } 10653 } 10654 10655 } 10656 10657 if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { 10658 $.ui.ddmanager.prepareOffsets( i, event ); 10659 } 10660 10661 } 10662} ); 10663 10664$.ui.plugin.add( "draggable", "snap", { 10665 start: function( event, ui, i ) { 10666 10667 var o = i.options; 10668 10669 i.snapElements = []; 10670 10671 $( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap ) 10672 .each( function() { 10673 var $t = $( this ), 10674 $o = $t.offset(); 10675 if ( this !== i.element[ 0 ] ) { 10676 i.snapElements.push( { 10677 item: this, 10678 width: $t.outerWidth(), height: $t.outerHeight(), 10679 top: $o.top, left: $o.left 10680 } ); 10681 } 10682 } ); 10683 10684 }, 10685 drag: function( event, ui, inst ) { 10686 10687 var ts, bs, ls, rs, l, r, t, b, i, first, 10688 o = inst.options, 10689 d = o.snapTolerance, 10690 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 10691 y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 10692 10693 for ( i = inst.snapElements.length - 1; i >= 0; i-- ) { 10694 10695 l = inst.snapElements[ i ].left - inst.margins.left; 10696 r = l + inst.snapElements[ i ].width; 10697 t = inst.snapElements[ i ].top - inst.margins.top; 10698 b = t + inst.snapElements[ i ].height; 10699 10700 if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || 10701 !$.contains( inst.snapElements[ i ].item.ownerDocument, 10702 inst.snapElements[ i ].item ) ) { 10703 if ( inst.snapElements[ i ].snapping ) { 10704 ( inst.options.snap.release && 10705 inst.options.snap.release.call( 10706 inst.element, 10707 event, 10708 $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } ) 10709 ) ); 10710 } 10711 inst.snapElements[ i ].snapping = false; 10712 continue; 10713 } 10714 10715 if ( o.snapMode !== "inner" ) { 10716 ts = Math.abs( t - y2 ) <= d; 10717 bs = Math.abs( b - y1 ) <= d; 10718 ls = Math.abs( l - x2 ) <= d; 10719 rs = Math.abs( r - x1 ) <= d; 10720 if ( ts ) { 10721 ui.position.top = inst._convertPositionTo( "relative", { 10722 top: t - inst.helperProportions.height, 10723 left: 0 10724 } ).top; 10725 } 10726 if ( bs ) { 10727 ui.position.top = inst._convertPositionTo( "relative", { 10728 top: b, 10729 left: 0 10730 } ).top; 10731 } 10732 if ( ls ) { 10733 ui.position.left = inst._convertPositionTo( "relative", { 10734 top: 0, 10735 left: l - inst.helperProportions.width 10736 } ).left; 10737 } 10738 if ( rs ) { 10739 ui.position.left = inst._convertPositionTo( "relative", { 10740 top: 0, 10741 left: r 10742 } ).left; 10743 } 10744 } 10745 10746 first = ( ts || bs || ls || rs ); 10747 10748 if ( o.snapMode !== "outer" ) { 10749 ts = Math.abs( t - y1 ) <= d; 10750 bs = Math.abs( b - y2 ) <= d; 10751 ls = Math.abs( l - x1 ) <= d; 10752 rs = Math.abs( r - x2 ) <= d; 10753 if ( ts ) { 10754 ui.position.top = inst._convertPositionTo( "relative", { 10755 top: t, 10756 left: 0 10757 } ).top; 10758 } 10759 if ( bs ) { 10760 ui.position.top = inst._convertPositionTo( "relative", { 10761 top: b - inst.helperProportions.height, 10762 left: 0 10763 } ).top; 10764 } 10765 if ( ls ) { 10766 ui.position.left = inst._convertPositionTo( "relative", { 10767 top: 0, 10768 left: l 10769 } ).left; 10770 } 10771 if ( rs ) { 10772 ui.position.left = inst._convertPositionTo( "relative", { 10773 top: 0, 10774 left: r - inst.helperProportions.width 10775 } ).left; 10776 } 10777 } 10778 10779 if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) { 10780 ( inst.options.snap.snap && 10781 inst.options.snap.snap.call( 10782 inst.element, 10783 event, 10784 $.extend( inst._uiHash(), { 10785 snapItem: inst.snapElements[ i ].item 10786 } ) ) ); 10787 } 10788 inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first ); 10789 10790 } 10791 10792 } 10793} ); 10794 10795$.ui.plugin.add( "draggable", "stack", { 10796 start: function( event, ui, instance ) { 10797 var min, 10798 o = instance.options, 10799 group = $.makeArray( $( o.stack ) ).sort( function( a, b ) { 10800 return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) - 10801 ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 ); 10802 } ); 10803 10804 if ( !group.length ) { return; } 10805 10806 min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0; 10807 $( group ).each( function( i ) { 10808 $( this ).css( "zIndex", min + i ); 10809 } ); 10810 this.css( "zIndex", ( min + group.length ) ); 10811 } 10812} ); 10813 10814$.ui.plugin.add( "draggable", "zIndex", { 10815 start: function( event, ui, instance ) { 10816 var t = $( ui.helper ), 10817 o = instance.options; 10818 10819 if ( t.css( "zIndex" ) ) { 10820 o._zIndex = t.css( "zIndex" ); 10821 } 10822 t.css( "zIndex", o.zIndex ); 10823 }, 10824 stop: function( event, ui, instance ) { 10825 var o = instance.options; 10826 10827 if ( o._zIndex ) { 10828 $( ui.helper ).css( "zIndex", o._zIndex ); 10829 } 10830 } 10831} ); 10832 10833var widgetsDraggable = $.ui.draggable; 10834 10835 10836/*! 10837 * jQuery UI Resizable 1.12.1 10838 * http://jqueryui.com
vendor: 6,932 bytes, lines 10839-11117
10839 * 10840 * Copyright jQuery Foundation and other contributors 10841 * Released under the MIT license. 10842 * http://jquery.org/license 10843 */ 10844 10845//>>label: Resizable 10846//>>group: Interactions 10847//>>description: Enables resize functionality for any element. 10848//>>docs: http://api.jqueryui.com/resizable/ 10849//>>demos: http://jqueryui.com/resizable/ 10850//>>css.structure: ../../themes/base/core.css 10851//>>css.structure: ../../themes/base/resizable.css 10852//>>css.theme: ../../themes/base/theme.css 10853 10854 10855 10856$.widget( "ui.resizable", $.ui.mouse, { 10857 version: "1.12.1", 10858 widgetEventPrefix: "resize", 10859 options: { 10860 alsoResize: false, 10861 animate: false, 10862 animateDuration: "slow", 10863 animateEasing: "swing", 10864 aspectRatio: false, 10865 autoHide: false, 10866 classes: { 10867 "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" 10868 }, 10869 containment: false, 10870 ghost: false, 10871 grid: false, 10872 handles: "e,s,se", 10873 helper: false, 10874 maxHeight: null, 10875 maxWidth: null, 10876 minHeight: 10, 10877 minWidth: 10, 10878 10879 // See #7960 10880 zIndex: 90, 10881 10882 // Callbacks 10883 resize: null, 10884 start: null, 10885 stop: null 10886 }, 10887 10888 _num: function( value ) { 10889 return parseFloat( value ) || 0; 10890 }, 10891 10892 _isNumber: function( value ) { 10893 return !isNaN( parseFloat( value ) ); 10894 }, 10895 10896 _hasScroll: function( el, a ) { 10897 10898 if ( $( el ).css( "overflow" ) === "hidden" ) { 10899 return false; 10900 } 10901 10902 var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 10903 has = false; 10904 10905 if ( el[ scroll ] > 0 ) { 10906 return true; 10907 } 10908 10909 // TODO: determine which cases actually cause this to happen 10910 // if the element doesn't have the scroll set, see if it's possible to 10911 // set the scroll 10912 el[ scroll ] = 1; 10913 has = ( el[ scroll ] > 0 ); 10914 el[ scroll ] = 0; 10915 return has; 10916 }, 10917 10918 _create: function() { 10919 10920 var margins, 10921 o = this.options, 10922 that = this; 10923 this._addClass( "ui-resizable" ); 10924 10925 $.extend( this, { 10926 _aspectRatio: !!( o.aspectRatio ), 10927 aspectRatio: o.aspectRatio, 10928 originalElement: this.element, 10929 _proportionallyResizeElements: [], 10930 _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 10931 } ); 10932 10933 // Wrap the element if it cannot hold child nodes 10934 if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) { 10935 10936 this.element.wrap( 10937 $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( { 10938 position: this.element.css( "position" ), 10939 width: this.element.outerWidth(), 10940 height: this.element.outerHeight(), 10941 top: this.element.css( "top" ), 10942 left: this.element.css( "left" ) 10943 } ) 10944 ); 10945 10946 this.element = this.element.parent().data( 10947 "ui-resizable", this.element.resizable( "instance" ) 10948 ); 10949 10950 this.elementIsWrapper = true; 10951 10952 margins = { 10953 marginTop: this.originalElement.css( "marginTop" ), 10954 marginRight: this.originalElement.css( "marginRight" ), 10955 marginBottom: this.originalElement.css( "marginBottom" ), 10956 marginLeft: this.originalElement.css( "marginLeft" ) 10957 }; 10958 10959 this.element.css( margins ); 10960 this.originalElement.css( "margin", 0 ); 10961 10962 // support: Safari 10963 // Prevent Safari textarea resize 10964 this.originalResizeStyle = this.originalElement.css( "resize" ); 10965 this.originalElement.css( "resize", "none" ); 10966 10967 this._proportionallyResizeElements.push( this.originalElement.css( { 10968 position: "static", 10969 zoom: 1, 10970 display: "block" 10971 } ) ); 10972 10973 // Support: IE9 10974 // avoid IE jump (hard set the margin) 10975 this.originalElement.css( margins ); 10976 10977 this._proportionallyResize(); 10978 } 10979 10980 this._setupHandles(); 10981 10982 if ( o.autoHide ) { 10983 $( this.element ) 10984 .on( "mouseenter", function() { 10985 if ( o.disabled ) { 10986 return; 10987 } 10988 that._removeClass( "ui-resizable-autohide" ); 10989 that._handles.show(); 10990 } ) 10991 .on( "mouseleave", function() { 10992 if ( o.disabled ) { 10993 return; 10994 } 10995 if ( !that.resizing ) { 10996 that._addClass( "ui-resizable-autohide" ); 10997 that._handles.hide(); 10998 } 10999 } ); 11000 } 11001 11002 this._mouseInit(); 11003 }, 11004 11005 _destroy: function() { 11006 11007 this._mouseDestroy(); 11008 11009 var wrapper, 11010 _destroy = function( exp ) { 11011 $( exp ) 11012 .removeData( "resizable" ) 11013 .removeData( "ui-resizable" ) 11014 .off( ".resizable" ) 11015 .find( ".ui-resizable-handle" ) 11016 .remove(); 11017 }; 11018 11019 // TODO: Unwrap at same DOM position 11020 if ( this.elementIsWrapper ) { 11021 _destroy( this.element ); 11022 wrapper = this.element; 11023 this.originalElement.css( { 11024 position: wrapper.css( "position" ), 11025 width: wrapper.outerWidth(), 11026 height: wrapper.outerHeight(), 11027 top: wrapper.css( "top" ), 11028 left: wrapper.css( "left" ) 11029 } ).insertAfter( wrapper ); 11030 wrapper.remove(); 11031 } 11032 11033 this.originalElement.css( "resize", this.originalResizeStyle ); 11034 _destroy( this.originalElement ); 11035 11036 return this; 11037 }, 11038 11039 _setOption: function( key, value ) { 11040 this._super( key, value ); 11041 11042 switch ( key ) { 11043 case "handles": 11044 this._removeHandles(); 11045 this._setupHandles(); 11046 break; 11047 default: 11048 break; 11049 } 11050 }, 11051 11052 _setupHandles: function() { 11053 var o = this.options, handle, i, n, hname, axis, that = this; 11054 this.handles = o.handles || 11055 ( !$( ".ui-resizable-handle", this.element ).length ? 11056 "e,s,se" : { 11057 n: ".ui-resizable-n", 11058 e: ".ui-resizable-e", 11059 s: ".ui-resizable-s", 11060 w: ".ui-resizable-w", 11061 se: ".ui-resizable-se", 11062 sw: ".ui-resizable-sw", 11063 ne: ".ui-resizable-ne", 11064 nw: ".ui-resizable-nw" 11065 } ); 11066 11067 this._handles = $(); 11068 if ( this.handles.constructor === String ) { 11069 11070 if ( this.handles === "all" ) { 11071 this.handles = "n,e,s,w,se,sw,ne,nw"; 11072 } 11073 11074 n = this.handles.split( "," ); 11075 this.handles = {}; 11076 11077 for ( i = 0; i < n.length; i++ ) { 11078 11079 handle = $.trim( n[ i ] ); 11080 hname = "ui-resizable-" + handle; 11081 axis = $( "<div>" ); 11082 this._addClass( axis, "ui-resizable-handle " + hname ); 11083 11084 axis.css( { zIndex: o.zIndex } ); 11085 11086 this.handles[ handle ] = ".ui-resizable-" + handle; 11087 this.element.append( axis ); 11088 } 11089 11090 } 11091 11092 this._renderAxis = function( target ) { 11093 11094 var i, axis, padPos, padWrapper; 11095 11096 target = target || this.element; 11097 11098 for ( i in this.handles ) { 11099 11100 if ( this.handles[ i ].constructor === String ) { 11101 this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show(); 11102 } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { 11103 this.handles[ i ] = $( this.handles[ i ] ); 11104 this._on( this.handles[ i ], { "mousedown": that._mouseDown } ); 11105 } 11106 11107 if ( this.elementIsWrapper && 11108 this.originalElement[ 0 ] 11109 .nodeName 11110 .match( /^(textarea|input|select|button)$/i ) ) { 11111 axis = $( this.handles[ i ], this.element ); 11112 11113 padWrapper = /sw|ne|nw|se|n|s/.test( i ) ? 11114 axis.outerHeight() : 11115 axis.outerWidth(); 11116 11117 padPos = [ "padding",
vendor: 4,678 bytes, lines 11118-11298
11118 /ne|nw|n/.test( i ) ? "Top" : 11119 /se|sw|s/.test( i ) ? "Bottom" : 11120 /^e$/.test( i ) ? "Right" : "Left" ].join( "" ); 11121 11122 target.css( padPos, padWrapper ); 11123 11124 this._proportionallyResize(); 11125 } 11126 11127 this._handles = this._handles.add( this.handles[ i ] ); 11128 } 11129 }; 11130 11131 // TODO: make renderAxis a prototype function 11132 this._renderAxis( this.element ); 11133 11134 this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); 11135 this._handles.disableSelection(); 11136 11137 this._handles.on( "mouseover", function() { 11138 if ( !that.resizing ) { 11139 if ( this.className ) { 11140 axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i ); 11141 } 11142 that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se"; 11143 } 11144 } ); 11145 11146 if ( o.autoHide ) { 11147 this._handles.hide(); 11148 this._addClass( "ui-resizable-autohide" ); 11149 } 11150 }, 11151 11152 _removeHandles: function() { 11153 this._handles.remove(); 11154 }, 11155 11156 _mouseCapture: function( event ) { 11157 var i, handle, 11158 capture = false; 11159 11160 for ( i in this.handles ) { 11161 handle = $( this.handles[ i ] )[ 0 ]; 11162 if ( handle === event.target || $.contains( handle, event.target ) ) { 11163 capture = true; 11164 } 11165 } 11166 11167 return !this.options.disabled && capture; 11168 }, 11169 11170 _mouseStart: function( event ) { 11171 11172 var curleft, curtop, cursor, 11173 o = this.options, 11174 el = this.element; 11175 11176 this.resizing = true; 11177 11178 this._renderProxy(); 11179 11180 curleft = this._num( this.helper.css( "left" ) ); 11181 curtop = this._num( this.helper.css( "top" ) ); 11182 11183 if ( o.containment ) { 11184 curleft += $( o.containment ).scrollLeft() || 0; 11185 curtop += $( o.containment ).scrollTop() || 0; 11186 } 11187 11188 this.offset = this.helper.offset(); 11189 this.position = { left: curleft, top: curtop }; 11190 11191 this.size = this._helper ? { 11192 width: this.helper.width(), 11193 height: this.helper.height() 11194 } : { 11195 width: el.width(), 11196 height: el.height() 11197 }; 11198 11199 this.originalSize = this._helper ? { 11200 width: el.outerWidth(), 11201 height: el.outerHeight() 11202 } : { 11203 width: el.width(), 11204 height: el.height() 11205 }; 11206 11207 this.sizeDiff = { 11208 width: el.outerWidth() - el.width(), 11209 height: el.outerHeight() - el.height() 11210 }; 11211 11212 this.originalPosition = { left: curleft, top: curtop }; 11213 this.originalMousePosition = { left: event.pageX, top: event.pageY }; 11214 11215 this.aspectRatio = ( typeof o.aspectRatio === "number" ) ? 11216 o.aspectRatio : 11217 ( ( this.originalSize.width / this.originalSize.height ) || 1 ); 11218 11219 cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" ); 11220 $( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor ); 11221 11222 this._addClass( "ui-resizable-resizing" ); 11223 this._propagate( "start", event ); 11224 return true; 11225 }, 11226 11227 _mouseDrag: function( event ) { 11228 11229 var data, props, 11230 smp = this.originalMousePosition, 11231 a = this.axis, 11232 dx = ( event.pageX - smp.left ) || 0, 11233 dy = ( event.pageY - smp.top ) || 0, 11234 trigger = this._change[ a ]; 11235 11236 this._updatePrevProperties(); 11237 11238 if ( !trigger ) { 11239 return false; 11240 } 11241 11242 data = trigger.apply( this, [ event, dx, dy ] ); 11243 11244 this._updateVirtualBoundaries( event.shiftKey ); 11245 if ( this._aspectRatio || event.shiftKey ) { 11246 data = this._updateRatio( data, event ); 11247 } 11248 11249 data = this._respectSize( data, event ); 11250 11251 this._updateCache( data ); 11252 11253 this._propagate( "resize", event ); 11254 11255 props = this._applyChanges(); 11256 11257 if ( !this._helper && this._proportionallyResizeElements.length ) { 11258 this._proportionallyResize(); 11259 } 11260 11261 if ( !$.isEmptyObject( props ) ) { 11262 this._updatePrevProperties(); 11263 this._trigger( "resize", event, this.ui() ); 11264 this._applyChanges(); 11265 } 11266 11267 return false; 11268 }, 11269 11270 _mouseStop: function( event ) { 11271 11272 this.resizing = false; 11273 var pr, ista, soffseth, soffsetw, s, left, top, 11274 o = this.options, that = this; 11275 11276 if ( this._helper ) { 11277 11278 pr = this._proportionallyResizeElements; 11279 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ); 11280 soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height; 11281 soffsetw = ista ? 0 : that.sizeDiff.width; 11282 11283 s = { 11284 width: ( that.helper.width() - soffsetw ), 11285 height: ( that.helper.height() - soffseth ) 11286 }; 11287 left = ( parseFloat( that.element.css( "left" ) ) + 11288 ( that.position.left - that.originalPosition.left ) ) || null; 11289 top = ( parseFloat( that.element.css( "top" ) ) + 11290 ( that.position.top - that.originalPosition.top ) ) || null; 11291 11292 if ( !o.animate ) { 11293 this.element.css( $.extend( s, { top: top, left: left } ) ); 11294 } 11295 11296 that.helper.height( that.size.height ); 11297 that.helper.width( that.size.width ); 11298
vendor: 6,168 bytes, lines 11299-11539
11299 if ( this._helper && !o.animate ) { 11300 this._proportionallyResize(); 11301 } 11302 } 11303 11304 $( "body" ).css( "cursor", "auto" ); 11305 11306 this._removeClass( "ui-resizable-resizing" ); 11307 11308 this._propagate( "stop", event ); 11309 11310 if ( this._helper ) { 11311 this.helper.remove(); 11312 } 11313 11314 return false; 11315 11316 }, 11317 11318 _updatePrevProperties: function() { 11319 this.prevPosition = { 11320 top: this.position.top, 11321 left: this.position.left 11322 }; 11323 this.prevSize = { 11324 width: this.size.width, 11325 height: this.size.height 11326 }; 11327 }, 11328 11329 _applyChanges: function() { 11330 var props = {}; 11331 11332 if ( this.position.top !== this.prevPosition.top ) { 11333 props.top = this.position.top + "px"; 11334 } 11335 if ( this.position.left !== this.prevPosition.left ) { 11336 props.left = this.position.left + "px"; 11337 } 11338 if ( this.size.width !== this.prevSize.width ) { 11339 props.width = this.size.width + "px"; 11340 } 11341 if ( this.size.height !== this.prevSize.height ) { 11342 props.height = this.size.height + "px"; 11343 } 11344 11345 this.helper.css( props ); 11346 11347 return props; 11348 }, 11349 11350 _updateVirtualBoundaries: function( forceAspectRatio ) { 11351 var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 11352 o = this.options; 11353 11354 b = { 11355 minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0, 11356 maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity, 11357 minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0, 11358 maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity 11359 }; 11360 11361 if ( this._aspectRatio || forceAspectRatio ) { 11362 pMinWidth = b.minHeight * this.aspectRatio; 11363 pMinHeight = b.minWidth / this.aspectRatio; 11364 pMaxWidth = b.maxHeight * this.aspectRatio; 11365 pMaxHeight = b.maxWidth / this.aspectRatio; 11366 11367 if ( pMinWidth > b.minWidth ) { 11368 b.minWidth = pMinWidth; 11369 } 11370 if ( pMinHeight > b.minHeight ) { 11371 b.minHeight = pMinHeight; 11372 } 11373 if ( pMaxWidth < b.maxWidth ) { 11374 b.maxWidth = pMaxWidth; 11375 } 11376 if ( pMaxHeight < b.maxHeight ) { 11377 b.maxHeight = pMaxHeight; 11378 } 11379 } 11380 this._vBoundaries = b; 11381 }, 11382 11383 _updateCache: function( data ) { 11384 this.offset = this.helper.offset(); 11385 if ( this._isNumber( data.left ) ) { 11386 this.position.left = data.left; 11387 } 11388 if ( this._isNumber( data.top ) ) { 11389 this.position.top = data.top; 11390 } 11391 if ( this._isNumber( data.height ) ) { 11392 this.size.height = data.height; 11393 } 11394 if ( this._isNumber( data.width ) ) { 11395 this.size.width = data.width; 11396 } 11397 }, 11398 11399 _updateRatio: function( data ) { 11400 11401 var cpos = this.position, 11402 csize = this.size, 11403 a = this.axis; 11404 11405 if ( this._isNumber( data.height ) ) { 11406 data.width = ( data.height * this.aspectRatio ); 11407 } else if ( this._isNumber( data.width ) ) { 11408 data.height = ( data.width / this.aspectRatio ); 11409 } 11410 11411 if ( a === "sw" ) { 11412 data.left = cpos.left + ( csize.width - data.width ); 11413 data.top = null; 11414 } 11415 if ( a === "nw" ) { 11416 data.top = cpos.top + ( csize.height - data.height ); 11417 data.left = cpos.left + ( csize.width - data.width ); 11418 } 11419 11420 return data; 11421 }, 11422 11423 _respectSize: function( data ) { 11424 11425 var o = this._vBoundaries, 11426 a = this.axis, 11427 ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ), 11428 ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ), 11429 isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ), 11430 isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ), 11431 dw = this.originalPosition.left + this.originalSize.width, 11432 dh = this.originalPosition.top + this.originalSize.height, 11433 cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a ); 11434 if ( isminw ) { 11435 data.width = o.minWidth; 11436 } 11437 if ( isminh ) { 11438 data.height = o.minHeight; 11439 } 11440 if ( ismaxw ) { 11441 data.width = o.maxWidth; 11442 } 11443 if ( ismaxh ) { 11444 data.height = o.maxHeight; 11445 } 11446 11447 if ( isminw && cw ) { 11448 data.left = dw - o.minWidth; 11449 } 11450 if ( ismaxw && cw ) { 11451 data.left = dw - o.maxWidth; 11452 } 11453 if ( isminh && ch ) { 11454 data.top = dh - o.minHeight; 11455 } 11456 if ( ismaxh && ch ) { 11457 data.top = dh - o.maxHeight; 11458 } 11459 11460 // Fixing jump error on top/left - bug #2330 11461 if ( !data.width && !data.height && !data.left && data.top ) { 11462 data.top = null; 11463 } else if ( !data.width && !data.height && !data.top && data.left ) { 11464 data.left = null; 11465 } 11466 11467 return data; 11468 }, 11469 11470 _getPaddingPlusBorderDimensions: function( element ) { 11471 var i = 0, 11472 widths = [], 11473 borders = [ 11474 element.css( "borderTopWidth" ), 11475 element.css( "borderRightWidth" ), 11476 element.css( "borderBottomWidth" ), 11477 element.css( "borderLeftWidth" ) 11478 ], 11479 paddings = [ 11480 element.css( "paddingTop" ), 11481 element.css( "paddingRight" ), 11482 element.css( "paddingBottom" ), 11483 element.css( "paddingLeft" ) 11484 ]; 11485 11486 for ( ; i < 4; i++ ) { 11487 widths[ i ] = ( parseFloat( borders[ i ] ) || 0 ); 11488 widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 ); 11489 } 11490 11491 return { 11492 height: widths[ 0 ] + widths[ 2 ], 11493 width: widths[ 1 ] + widths[ 3 ] 11494 }; 11495 }, 11496 11497 _proportionallyResize: function() { 11498 11499 if ( !this._proportionallyResizeElements.length ) { 11500 return; 11501 } 11502 11503 var prel, 11504 i = 0, 11505 element = this.helper || this.element; 11506 11507 for ( ; i < this._proportionallyResizeElements.length; i++ ) { 11508 11509 prel = this._proportionallyResizeElements[ i ]; 11510 11511 // TODO: Seems like a bug to cache this.outerDimensions 11512 // considering that we are in a loop. 11513 if ( !this.outerDimensions ) { 11514 this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); 11515 } 11516 11517 prel.css( { 11518 height: ( element.height() - this.outerDimensions.height ) || 0, 11519 width: ( element.width() - this.outerDimensions.width ) || 0 11520 } ); 11521 11522 } 11523 11524 }, 11525 11526 _renderProxy: function() { 11527 11528 var el = this.element, o = this.options; 11529 this.elementOffset = el.offset(); 11530 11531 if ( this._helper ) { 11532 11533 this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" ); 11534 11535 this._addClass( this.helper, this._helper ); 11536 this.helper.css( { 11537 width: this.element.outerWidth(), 11538 height: this.element.outerHeight(), 11539 position: "absolute",
vendor: 1,421 bytes, lines 11540-11587
11540 left: this.elementOffset.left + "px", 11541 top: this.elementOffset.top + "px", 11542 zIndex: ++o.zIndex //TODO: Don't modify option 11543 } ); 11544 11545 this.helper 11546 .appendTo( "body" ) 11547 .disableSelection(); 11548 11549 } else { 11550 this.helper = this.element; 11551 } 11552 11553 }, 11554 11555 _change: { 11556 e: function( event, dx ) { 11557 return { width: this.originalSize.width + dx }; 11558 }, 11559 w: function( event, dx ) { 11560 var cs = this.originalSize, sp = this.originalPosition; 11561 return { left: sp.left + dx, width: cs.width - dx }; 11562 }, 11563 n: function( event, dx, dy ) { 11564 var cs = this.originalSize, sp = this.originalPosition; 11565 return { top: sp.top + dy, height: cs.height - dy }; 11566 }, 11567 s: function( event, dx, dy ) { 11568 return { height: this.originalSize.height + dy }; 11569 }, 11570 se: function( event, dx, dy ) { 11571 return $.extend( this._change.s.apply( this, arguments ), 11572 this._change.e.apply( this, [ event, dx, dy ] ) ); 11573 }, 11574 sw: function( event, dx, dy ) { 11575 return $.extend( this._change.s.apply( this, arguments ), 11576 this._change.w.apply( this, [ event, dx, dy ] ) ); 11577 }, 11578 ne: function( event, dx, dy ) { 11579 return $.extend( this._change.n.apply( this, arguments ), 11580 this._change.e.apply( this, [ event, dx, dy ] ) ); 11581 }, 11582 nw: function( event, dx, dy ) { 11583 return $.extend( this._change.n.apply( this, arguments ), 11584 this._change.w.apply( this, [ event, dx, dy ] ) ); 11585 } 11586 }, 11587
vendor: 9,740 bytes, lines 11588-11953
11588 _propagate: function( n, event ) { 11589 $.ui.plugin.call( this, n, [ event, this.ui() ] ); 11590 ( n !== "resize" && this._trigger( n, event, this.ui() ) ); 11591 }, 11592 11593 plugins: {}, 11594 11595 ui: function() { 11596 return { 11597 originalElement: this.originalElement, 11598 element: this.element, 11599 helper: this.helper, 11600 position: this.position, 11601 size: this.size, 11602 originalSize: this.originalSize, 11603 originalPosition: this.originalPosition 11604 }; 11605 } 11606 11607} ); 11608 11609/* 11610 * Resizable Extensions 11611 */ 11612 11613$.ui.plugin.add( "resizable", "animate", { 11614 11615 stop: function( event ) { 11616 var that = $( this ).resizable( "instance" ), 11617 o = that.options, 11618 pr = that._proportionallyResizeElements, 11619 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ), 11620 soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height, 11621 soffsetw = ista ? 0 : that.sizeDiff.width, 11622 style = { 11623 width: ( that.size.width - soffsetw ), 11624 height: ( that.size.height - soffseth ) 11625 }, 11626 left = ( parseFloat( that.element.css( "left" ) ) + 11627 ( that.position.left - that.originalPosition.left ) ) || null, 11628 top = ( parseFloat( that.element.css( "top" ) ) + 11629 ( that.position.top - that.originalPosition.top ) ) || null; 11630 11631 that.element.animate( 11632 $.extend( style, top && left ? { top: top, left: left } : {} ), { 11633 duration: o.animateDuration, 11634 easing: o.animateEasing, 11635 step: function() { 11636 11637 var data = { 11638 width: parseFloat( that.element.css( "width" ) ), 11639 height: parseFloat( that.element.css( "height" ) ), 11640 top: parseFloat( that.element.css( "top" ) ), 11641 left: parseFloat( that.element.css( "left" ) ) 11642 }; 11643 11644 if ( pr && pr.length ) { 11645 $( pr[ 0 ] ).css( { width: data.width, height: data.height } ); 11646 } 11647 11648 // Propagating resize, and updating values for each animation step 11649 that._updateCache( data ); 11650 that._propagate( "resize", event ); 11651 11652 } 11653 } 11654 ); 11655 } 11656 11657} ); 11658 11659$.ui.plugin.add( "resizable", "containment", { 11660 11661 start: function() { 11662 var element, p, co, ch, cw, width, height, 11663 that = $( this ).resizable( "instance" ), 11664 o = that.options, 11665 el = that.element, 11666 oc = o.containment, 11667 ce = ( oc instanceof $ ) ? 11668 oc.get( 0 ) : 11669 ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; 11670 11671 if ( !ce ) { 11672 return; 11673 } 11674 11675 that.containerElement = $( ce ); 11676 11677 if ( /document/.test( oc ) || oc === document ) { 11678 that.containerOffset = { 11679 left: 0, 11680 top: 0 11681 }; 11682 that.containerPosition = { 11683 left: 0, 11684 top: 0 11685 }; 11686 11687 that.parentData = { 11688 element: $( document ), 11689 left: 0, 11690 top: 0, 11691 width: $( document ).width(), 11692 height: $( document ).height() || document.body.parentNode.scrollHeight 11693 }; 11694 } else { 11695 element = $( ce ); 11696 p = []; 11697 $( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) { 11698 p[ i ] = that._num( element.css( "padding" + name ) ); 11699 } ); 11700 11701 that.containerOffset = element.offset(); 11702 that.containerPosition = element.position(); 11703 that.containerSize = { 11704 height: ( element.innerHeight() - p[ 3 ] ), 11705 width: ( element.innerWidth() - p[ 1 ] ) 11706 }; 11707 11708 co = that.containerOffset; 11709 ch = that.containerSize.height; 11710 cw = that.containerSize.width; 11711 width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); 11712 height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; 11713 11714 that.parentData = { 11715 element: ce, 11716 left: co.left, 11717 top: co.top, 11718 width: width, 11719 height: height 11720 }; 11721 } 11722 }, 11723 11724 resize: function( event ) { 11725 var woset, hoset, isParent, isOffsetRelative, 11726 that = $( this ).resizable( "instance" ), 11727 o = that.options, 11728 co = that.containerOffset, 11729 cp = that.position, 11730 pRatio = that._aspectRatio || event.shiftKey, 11731 cop = { 11732 top: 0, 11733 left: 0 11734 }, 11735 ce = that.containerElement, 11736 continueResize = true; 11737 11738 if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { 11739 cop = co; 11740 } 11741 11742 if ( cp.left < ( that._helper ? co.left : 0 ) ) { 11743 that.size.width = that.size.width + 11744 ( that._helper ? 11745 ( that.position.left - co.left ) : 11746 ( that.position.left - cop.left ) ); 11747 11748 if ( pRatio ) { 11749 that.size.height = that.size.width / that.aspectRatio; 11750 continueResize = false; 11751 } 11752 that.position.left = o.helper ? co.left : 0; 11753 } 11754 11755 if ( cp.top < ( that._helper ? co.top : 0 ) ) { 11756 that.size.height = that.size.height + 11757 ( that._helper ? 11758 ( that.position.top - co.top ) : 11759 that.position.top ); 11760 11761 if ( pRatio ) { 11762 that.size.width = that.size.height * that.aspectRatio; 11763 continueResize = false; 11764 } 11765 that.position.top = that._helper ? co.top : 0; 11766 } 11767 11768 isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); 11769 isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); 11770 11771 if ( isParent && isOffsetRelative ) { 11772 that.offset.left = that.parentData.left + that.position.left; 11773 that.offset.top = that.parentData.top + that.position.top; 11774 } else { 11775 that.offset.left = that.element.offset().left; 11776 that.offset.top = that.element.offset().top; 11777 } 11778 11779 woset = Math.abs( that.sizeDiff.width + 11780 ( that._helper ? 11781 that.offset.left - cop.left : 11782 ( that.offset.left - co.left ) ) ); 11783 11784 hoset = Math.abs( that.sizeDiff.height + 11785 ( that._helper ? 11786 that.offset.top - cop.top : 11787 ( that.offset.top - co.top ) ) ); 11788 11789 if ( woset + that.size.width >= that.parentData.width ) { 11790 that.size.width = that.parentData.width - woset; 11791 if ( pRatio ) { 11792 that.size.height = that.size.width / that.aspectRatio; 11793 continueResize = false; 11794 } 11795 } 11796 11797 if ( hoset + that.size.height >= that.parentData.height ) { 11798 that.size.height = that.parentData.height - hoset; 11799 if ( pRatio ) { 11800 that.size.width = that.size.height * that.aspectRatio; 11801 continueResize = false; 11802 } 11803 } 11804 11805 if ( !continueResize ) { 11806 that.position.left = that.prevPosition.left; 11807 that.position.top = that.prevPosition.top; 11808 that.size.width = that.prevSize.width; 11809 that.size.height = that.prevSize.height; 11810 } 11811 }, 11812 11813 stop: function() { 11814 var that = $( this ).resizable( "instance" ), 11815 o = that.options, 11816 co = that.containerOffset, 11817 cop = that.containerPosition, 11818 ce = that.containerElement, 11819 helper = $( that.helper ), 11820 ho = helper.offset(), 11821 w = helper.outerWidth() - that.sizeDiff.width, 11822 h = helper.outerHeight() - that.sizeDiff.height; 11823 11824 if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { 11825 $( this ).css( { 11826 left: ho.left - cop.left - co.left, 11827 width: w, 11828 height: h 11829 } ); 11830 } 11831 11832 if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { 11833 $( this ).css( { 11834 left: ho.left - cop.left - co.left, 11835 width: w, 11836 height: h 11837 } ); 11838 } 11839 } 11840} ); 11841 11842$.ui.plugin.add( "resizable", "alsoResize", { 11843 11844 start: function() { 11845 var that = $( this ).resizable( "instance" ), 11846 o = that.options; 11847 11848 $( o.alsoResize ).each( function() { 11849 var el = $( this ); 11850 el.data( "ui-resizable-alsoresize", { 11851 width: parseFloat( el.width() ), height: parseFloat( el.height() ), 11852 left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) ) 11853 } ); 11854 } ); 11855 }, 11856 11857 resize: function( event, ui ) { 11858 var that = $( this ).resizable( "instance" ), 11859 o = that.options, 11860 os = that.originalSize, 11861 op = that.originalPosition, 11862 delta = { 11863 height: ( that.size.height - os.height ) || 0, 11864 width: ( that.size.width - os.width ) || 0, 11865 top: ( that.position.top - op.top ) || 0, 11866 left: ( that.position.left - op.left ) || 0 11867 }; 11868 11869 $( o.alsoResize ).each( function() { 11870 var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {}, 11871 css = el.parents( ui.originalElement[ 0 ] ).length ? 11872 [ "width", "height" ] : 11873 [ "width", "height", "top", "left" ]; 11874 11875 $.each( css, function( i, prop ) { 11876 var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 ); 11877 if ( sum && sum >= 0 ) { 11878 style[ prop ] = sum || null; 11879 } 11880 } ); 11881 11882 el.css( style ); 11883 } ); 11884 }, 11885 11886 stop: function() { 11887 $( this ).removeData( "ui-resizable-alsoresize" ); 11888 } 11889} ); 11890 11891$.ui.plugin.add( "resizable", "ghost", { 11892 11893 start: function() { 11894 11895 var that = $( this ).resizable( "instance" ), cs = that.size; 11896 11897 that.ghost = that.originalElement.clone(); 11898 that.ghost.css( { 11899 opacity: 0.25, 11900 display: "block", 11901 position: "relative", 11902 height: cs.height, 11903 width: cs.width, 11904 margin: 0, 11905 left: 0, 11906 top: 0 11907 } ); 11908 11909 that._addClass( that.ghost, "ui-resizable-ghost" ); 11910 11911 // DEPRECATED 11912 // TODO: remove after 1.12 11913 if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) { 11914 11915 // Ghost option 11916 that.ghost.addClass( this.options.ghost ); 11917 } 11918 11919 that.ghost.appendTo( that.helper ); 11920 11921 }, 11922 11923 resize: function() { 11924 var that = $( this ).resizable( "instance" ); 11925 if ( that.ghost ) { 11926 that.ghost.css( { 11927 position: "relative", 11928 height: that.size.height, 11929 width: that.size.width 11930 } ); 11931 } 11932 }, 11933 11934 stop: function() { 11935 var that = $( this ).resizable( "instance" ); 11936 if ( that.ghost && that.helper ) { 11937 that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) ); 11938 } 11939 } 11940 11941} ); 11942 11943$.ui.plugin.add( "resizable", "grid", { 11944 11945 resize: function() { 11946 var outerDimensions, 11947 that = $( this ).resizable( "instance" ), 11948 o = that.options, 11949 cs = that.size, 11950 os = that.originalSize, 11951 op = that.originalPosition, 11952 a = that.axis, 11953 grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
vendor: 4,400 bytes, lines 11954-12134
11954 gridX = ( grid[ 0 ] || 1 ), 11955 gridY = ( grid[ 1 ] || 1 ), 11956 ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX, 11957 oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY, 11958 newWidth = os.width + ox, 11959 newHeight = os.height + oy, 11960 isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ), 11961 isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ), 11962 isMinWidth = o.minWidth && ( o.minWidth > newWidth ), 11963 isMinHeight = o.minHeight && ( o.minHeight > newHeight ); 11964 11965 o.grid = grid; 11966 11967 if ( isMinWidth ) { 11968 newWidth += gridX; 11969 } 11970 if ( isMinHeight ) { 11971 newHeight += gridY; 11972 } 11973 if ( isMaxWidth ) { 11974 newWidth -= gridX; 11975 } 11976 if ( isMaxHeight ) { 11977 newHeight -= gridY; 11978 } 11979 11980 if ( /^(se|s|e)$/.test( a ) ) { 11981 that.size.width = newWidth; 11982 that.size.height = newHeight; 11983 } else if ( /^(ne)$/.test( a ) ) { 11984 that.size.width = newWidth; 11985 that.size.height = newHeight; 11986 that.position.top = op.top - oy; 11987 } else if ( /^(sw)$/.test( a ) ) { 11988 that.size.width = newWidth; 11989 that.size.height = newHeight; 11990 that.position.left = op.left - ox; 11991 } else { 11992 if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) { 11993 outerDimensions = that._getPaddingPlusBorderDimensions( this ); 11994 } 11995 11996 if ( newHeight - gridY > 0 ) { 11997 that.size.height = newHeight; 11998 that.position.top = op.top - oy; 11999 } else { 12000 newHeight = gridY - outerDimensions.height; 12001 that.size.height = newHeight; 12002 that.position.top = op.top + os.height - newHeight; 12003 } 12004 if ( newWidth - gridX > 0 ) { 12005 that.size.width = newWidth; 12006 that.position.left = op.left - ox; 12007 } else { 12008 newWidth = gridX - outerDimensions.width; 12009 that.size.width = newWidth; 12010 that.position.left = op.left + os.width - newWidth; 12011 } 12012 } 12013 } 12014 12015} ); 12016 12017var widgetsResizable = $.ui.resizable; 12018 12019 12020/*! 12021 * jQuery UI Dialog 1.12.1 12022 * http://jqueryui.com 12023 * 12024 * Copyright jQuery Foundation and other contributors 12025 * Released under the MIT license. 12026 * http://jquery.org/license 12027 */ 12028 12029//>>label: Dialog 12030//>>group: Widgets 12031//>>description: Displays customizable dialog windows. 12032//>>docs: http://api.jqueryui.com/dialog/ 12033//>>demos: http://jqueryui.com/dialog/ 12034//>>css.structure: ../../themes/base/core.css 12035//>>css.structure: ../../themes/base/dialog.css 12036//>>css.theme: ../../themes/base/theme.css 12037 12038 12039 12040$.widget( "ui.dialog", { 12041 version: "1.12.1", 12042 options: { 12043 appendTo: "body", 12044 autoOpen: true, 12045 buttons: [], 12046 classes: { 12047 "ui-dialog": "ui-corner-all", 12048 "ui-dialog-titlebar": "ui-corner-all" 12049 }, 12050 closeOnEscape: true, 12051 closeText: "Close", 12052 draggable: true, 12053 hide: null, 12054 height: "auto", 12055 maxHeight: null, 12056 maxWidth: null, 12057 minHeight: 150, 12058 minWidth: 150, 12059 modal: false, 12060 position: { 12061 my: "center", 12062 at: "center", 12063 of: window, 12064 collision: "fit", 12065 12066 // Ensure the titlebar is always visible 12067 using: function( pos ) { 12068 var topOffset = $( this ).css( pos ).offset().top; 12069 if ( topOffset < 0 ) { 12070 $( this ).css( "top", pos.top - topOffset ); 12071 } 12072 } 12073 }, 12074 resizable: true, 12075 show: null, 12076 title: null, 12077 width: 300, 12078 12079 // Callbacks 12080 beforeClose: null, 12081 close: null, 12082 drag: null, 12083 dragStart: null, 12084 dragStop: null, 12085 focus: null, 12086 open: null, 12087 resize: null, 12088 resizeStart: null, 12089 resizeStop: null 12090 }, 12091 12092 sizeRelatedOptions: { 12093 buttons: true, 12094 height: true, 12095 maxHeight: true, 12096 maxWidth: true, 12097 minHeight: true, 12098 minWidth: true, 12099 width: true 12100 }, 12101 12102 resizableRelatedOptions: { 12103 maxHeight: true, 12104 maxWidth: true, 12105 minHeight: true, 12106 minWidth: true 12107 }, 12108 12109 _create: function() { 12110 this.originalCss = { 12111 display: this.element[ 0 ].style.display, 12112 width: this.element[ 0 ].style.width, 12113 minHeight: this.element[ 0 ].style.minHeight, 12114 maxHeight: this.element[ 0 ].style.maxHeight, 12115 height: this.element[ 0 ].style.height 12116 }; 12117 this.originalPosition = { 12118 parent: this.element.parent(), 12119 index: this.element.parent().children().index( this.element ) 12120 }; 12121 this.originalTitle = this.element.attr( "title" ); 12122 if ( this.options.title == null && this.originalTitle != null ) { 12123 this.options.title = this.originalTitle; 12124 } 12125 12126 // Dialogs can't be disabled 12127 if ( this.options.disabled ) { 12128 this.options.disabled = false; 12129 } 12130 12131 this._createWrapper(); 12132 12133 this.element 12134 .show()
vendor: 34,211 bytes, lines 12135-13418
12135 .removeAttr( "title" ) 12136 .appendTo( this.uiDialog ); 12137 12138 this._addClass( "ui-dialog-content", "ui-widget-content" ); 12139 12140 this._createTitlebar(); 12141 this._createButtonPane(); 12142 12143 if ( this.options.draggable && $.fn.draggable ) { 12144 this._makeDraggable(); 12145 } 12146 if ( this.options.resizable && $.fn.resizable ) { 12147 this._makeResizable(); 12148 } 12149 12150 this._isOpen = false; 12151 12152 this._trackFocus(); 12153 }, 12154 12155 _init: function() { 12156 if ( this.options.autoOpen ) { 12157 this.open(); 12158 } 12159 }, 12160 12161 _appendTo: function() { 12162 var element = this.options.appendTo; 12163 if ( element && ( element.jquery || element.nodeType ) ) { 12164 return $( element ); 12165 } 12166 return this.document.find( element || "body" ).eq( 0 ); 12167 }, 12168 12169 _destroy: function() { 12170 var next, 12171 originalPosition = this.originalPosition; 12172 12173 this._untrackInstance(); 12174 this._destroyOverlay(); 12175 12176 this.element 12177 .removeUniqueId() 12178 .css( this.originalCss ) 12179 12180 // Without detaching first, the following becomes really slow 12181 .detach(); 12182 12183 this.uiDialog.remove(); 12184 12185 if ( this.originalTitle ) { 12186 this.element.attr( "title", this.originalTitle ); 12187 } 12188 12189 next = originalPosition.parent.children().eq( originalPosition.index ); 12190 12191 // Don't try to place the dialog next to itself (#8613) 12192 if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { 12193 next.before( this.element ); 12194 } else { 12195 originalPosition.parent.append( this.element ); 12196 } 12197 }, 12198 12199 widget: function() { 12200 return this.uiDialog; 12201 }, 12202 12203 disable: $.noop, 12204 enable: $.noop, 12205 12206 close: function( event ) { 12207 var that = this; 12208 12209 if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 12210 return; 12211 } 12212 12213 this._isOpen = false; 12214 this._focusedElement = null; 12215 this._destroyOverlay(); 12216 this._untrackInstance(); 12217 12218 if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) { 12219 12220 // Hiding a focused element doesn't trigger blur in WebKit 12221 // so in case we have nothing to focus on, explicitly blur the active element 12222 // https://bugs.webkit.org/show_bug.cgi?id=47182 12223 $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); 12224 } 12225 12226 this._hide( this.uiDialog, this.options.hide, function() { 12227 that._trigger( "close", event ); 12228 } ); 12229 }, 12230 12231 isOpen: function() { 12232 return this._isOpen; 12233 }, 12234 12235 moveToTop: function() { 12236 this._moveToTop(); 12237 }, 12238 12239 _moveToTop: function( event, silent ) { 12240 var moved = false, 12241 zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() { 12242 return +$( this ).css( "z-index" ); 12243 } ).get(), 12244 zIndexMax = Math.max.apply( null, zIndices ); 12245 12246 if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { 12247 this.uiDialog.css( "z-index", zIndexMax + 1 ); 12248 moved = true; 12249 } 12250 12251 if ( moved && !silent ) { 12252 this._trigger( "focus", event ); 12253 } 12254 return moved; 12255 }, 12256 12257 open: function() { 12258 var that = this; 12259 if ( this._isOpen ) { 12260 if ( this._moveToTop() ) { 12261 this._focusTabbable(); 12262 } 12263 return; 12264 } 12265 12266 this._isOpen = true; 12267 this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 12268 12269 this._size(); 12270 this._position(); 12271 this._createOverlay(); 12272 this._moveToTop( null, true ); 12273 12274 // Ensure the overlay is moved to the top with the dialog, but only when 12275 // opening. The overlay shouldn't move after the dialog is open so that 12276 // modeless dialogs opened after the modal dialog stack properly. 12277 if ( this.overlay ) { 12278 this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); 12279 } 12280 12281 this._show( this.uiDialog, this.options.show, function() { 12282 that._focusTabbable(); 12283 that._trigger( "focus" ); 12284 } ); 12285 12286 // Track the dialog immediately upon openening in case a focus event 12287 // somehow occurs outside of the dialog before an element inside the 12288 // dialog is focused (#10152) 12289 this._makeFocusTarget(); 12290 12291 this._trigger( "open" ); 12292 }, 12293 12294 _focusTabbable: function() { 12295 12296 // Set focus to the first match: 12297 // 1. An element that was focused previously 12298 // 2. First element inside the dialog matching [autofocus] 12299 // 3. Tabbable element inside the content element 12300 // 4. Tabbable element inside the buttonpane 12301 // 5. The close button 12302 // 6. The dialog itself 12303 var hasFocus = this._focusedElement; 12304 if ( !hasFocus ) { 12305 hasFocus = this.element.find( "[autofocus]" ); 12306 } 12307 if ( !hasFocus.length ) { 12308 hasFocus = this.element.find( ":tabbable" ); 12309 } 12310 if ( !hasFocus.length ) { 12311 hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); 12312 } 12313 if ( !hasFocus.length ) { 12314 hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); 12315 } 12316 if ( !hasFocus.length ) { 12317 hasFocus = this.uiDialog; 12318 } 12319 hasFocus.eq( 0 ).trigger( "focus" ); 12320 }, 12321 12322 _keepFocus: function( event ) { 12323 function checkFocus() { 12324 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 12325 isActive = this.uiDialog[ 0 ] === activeElement || 12326 $.contains( this.uiDialog[ 0 ], activeElement ); 12327 if ( !isActive ) { 12328 this._focusTabbable(); 12329 } 12330 } 12331 event.preventDefault(); 12332 checkFocus.call( this ); 12333 12334 // support: IE 12335 // IE <= 8 doesn't prevent moving focus even with event.preventDefault() 12336 // so we check again later 12337 this._delay( checkFocus ); 12338 }, 12339 12340 _createWrapper: function() { 12341 this.uiDialog = $( "<div>" ) 12342 .hide() 12343 .attr( { 12344 12345 // Setting tabIndex makes the div focusable 12346 tabIndex: -1, 12347 role: "dialog" 12348 } ) 12349 .appendTo( this._appendTo() ); 12350 12351 this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" ); 12352 this._on( this.uiDialog, { 12353 keydown: function( event ) { 12354 if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 12355 event.keyCode === $.ui.keyCode.ESCAPE ) { 12356 event.preventDefault(); 12357 this.close( event ); 12358 return; 12359 } 12360 12361 // Prevent tabbing out of dialogs 12362 if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { 12363 return; 12364 } 12365 var tabbables = this.uiDialog.find( ":tabbable" ), 12366 first = tabbables.filter( ":first" ), 12367 last = tabbables.filter( ":last" ); 12368 12369 if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) && 12370 !event.shiftKey ) { 12371 this._delay( function() { 12372 first.trigger( "focus" ); 12373 } ); 12374 event.preventDefault(); 12375 } else if ( ( event.target === first[ 0 ] || 12376 event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) { 12377 this._delay( function() { 12378 last.trigger( "focus" ); 12379 } ); 12380 event.preventDefault(); 12381 } 12382 }, 12383 mousedown: function( event ) { 12384 if ( this._moveToTop( event ) ) { 12385 this._focusTabbable(); 12386 } 12387 } 12388 } ); 12389 12390 // We assume that any existing aria-describedby attribute means 12391 // that the dialog content is marked up properly 12392 // otherwise we brute force the content as the description 12393 if ( !this.element.find( "[aria-describedby]" ).length ) { 12394 this.uiDialog.attr( { 12395 "aria-describedby": this.element.uniqueId().attr( "id" ) 12396 } ); 12397 } 12398 }, 12399 12400 _createTitlebar: function() { 12401 var uiDialogTitle; 12402 12403 this.uiDialogTitlebar = $( "<div>" ); 12404 this._addClass( this.uiDialogTitlebar, 12405 "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" ); 12406 this._on( this.uiDialogTitlebar, { 12407 mousedown: function( event ) { 12408 12409 // Don't prevent click on close button (#8838) 12410 // Focusing a dialog that is partially scrolled out of view 12411 // causes the browser to scroll it into view, preventing the click event 12412 if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { 12413 12414 // Dialog isn't getting focus when dragging (#8063) 12415 this.uiDialog.trigger( "focus" ); 12416 } 12417 } 12418 } ); 12419 12420 // Support: IE 12421 // Use type="button" to prevent enter keypresses in textboxes from closing the 12422 // dialog in IE (#9312) 12423 this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 12424 .button( { 12425 label: $( "<a>" ).text( this.options.closeText ).html(), 12426 icon: "ui-icon-closethick", 12427 showLabel: false 12428 } ) 12429 .appendTo( this.uiDialogTitlebar ); 12430 12431 this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" ); 12432 this._on( this.uiDialogTitlebarClose, { 12433 click: function( event ) { 12434 event.preventDefault(); 12435 this.close( event ); 12436 } 12437 } ); 12438 12439 uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar ); 12440 this._addClass( uiDialogTitle, "ui-dialog-title" ); 12441 this._title( uiDialogTitle ); 12442 12443 this.uiDialogTitlebar.prependTo( this.uiDialog ); 12444 12445 this.uiDialog.attr( { 12446 "aria-labelledby": uiDialogTitle.attr( "id" ) 12447 } ); 12448 }, 12449 12450 _title: function( title ) { 12451 if ( this.options.title ) { 12452 title.text( this.options.title ); 12453 } else { 12454 title.html( " " ); 12455 } 12456 }, 12457 12458 _createButtonPane: function() { 12459 this.uiDialogButtonPane = $( "<div>" ); 12460 this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane", 12461 "ui-widget-content ui-helper-clearfix" ); 12462 12463 this.uiButtonSet = $( "<div>" ) 12464 .appendTo( this.uiDialogButtonPane ); 12465 this._addClass( this.uiButtonSet, "ui-dialog-buttonset" ); 12466 12467 this._createButtons(); 12468 }, 12469 12470 _createButtons: function() { 12471 var that = this, 12472 buttons = this.options.buttons; 12473 12474 // If we already have a button pane, remove it 12475 this.uiDialogButtonPane.remove(); 12476 this.uiButtonSet.empty(); 12477 12478 if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) { 12479 this._removeClass( this.uiDialog, "ui-dialog-buttons" ); 12480 return; 12481 } 12482 12483 $.each( buttons, function( name, props ) { 12484 var click, buttonOptions; 12485 props = $.isFunction( props ) ? 12486 { click: props, text: name } : 12487 props; 12488 12489 // Default to a non-submitting button 12490 props = $.extend( { type: "button" }, props ); 12491 12492 // Change the context for the click callback to be the main element 12493 click = props.click; 12494 buttonOptions = { 12495 icon: props.icon, 12496 iconPosition: props.iconPosition, 12497 showLabel: props.showLabel, 12498 12499 // Deprecated options 12500 icons: props.icons, 12501 text: props.text 12502 }; 12503 12504 delete props.click; 12505 delete props.icon; 12506 delete props.iconPosition; 12507 delete props.showLabel; 12508 12509 // Deprecated options 12510 delete props.icons; 12511 if ( typeof props.text === "boolean" ) { 12512 delete props.text; 12513 } 12514 12515 $( "<button></button>", props ) 12516 .button( buttonOptions ) 12517 .appendTo( that.uiButtonSet ) 12518 .on( "click", function() { 12519 click.apply( that.element[ 0 ], arguments ); 12520 } ); 12521 } ); 12522 this._addClass( this.uiDialog, "ui-dialog-buttons" ); 12523 this.uiDialogButtonPane.appendTo( this.uiDialog ); 12524 }, 12525 12526 _makeDraggable: function() { 12527 var that = this, 12528 options = this.options; 12529 12530 function filteredUi( ui ) { 12531 return { 12532 position: ui.position, 12533 offset: ui.offset 12534 }; 12535 } 12536 12537 this.uiDialog.draggable( { 12538 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 12539 handle: ".ui-dialog-titlebar", 12540 containment: "document", 12541 start: function( event, ui ) { 12542 that._addClass( $( this ), "ui-dialog-dragging" ); 12543 that._blockFrames(); 12544 that._trigger( "dragStart", event, filteredUi( ui ) ); 12545 }, 12546 drag: function( event, ui ) { 12547 that._trigger( "drag", event, filteredUi( ui ) ); 12548 }, 12549 stop: function( event, ui ) { 12550 var left = ui.offset.left - that.document.scrollLeft(), 12551 top = ui.offset.top - that.document.scrollTop(); 12552 12553 options.position = { 12554 my: "left top", 12555 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 12556 "top" + ( top >= 0 ? "+" : "" ) + top, 12557 of: that.window 12558 }; 12559 that._removeClass( $( this ), "ui-dialog-dragging" ); 12560 that._unblockFrames(); 12561 that._trigger( "dragStop", event, filteredUi( ui ) ); 12562 } 12563 } ); 12564 }, 12565 12566 _makeResizable: function() { 12567 var that = this, 12568 options = this.options, 12569 handles = options.resizable, 12570 12571 // .ui-resizable has position: relative defined in the stylesheet 12572 // but dialogs have to use absolute or fixed positioning 12573 position = this.uiDialog.css( "position" ), 12574 resizeHandles = typeof handles === "string" ? 12575 handles : 12576 "n,e,s,w,se,sw,ne,nw"; 12577 12578 function filteredUi( ui ) { 12579 return { 12580 originalPosition: ui.originalPosition, 12581 originalSize: ui.originalSize, 12582 position: ui.position, 12583 size: ui.size 12584 }; 12585 } 12586 12587 this.uiDialog.resizable( { 12588 cancel: ".ui-dialog-content", 12589 containment: "document", 12590 alsoResize: this.element, 12591 maxWidth: options.maxWidth, 12592 maxHeight: options.maxHeight, 12593 minWidth: options.minWidth, 12594 minHeight: this._minHeight(), 12595 handles: resizeHandles, 12596 start: function( event, ui ) { 12597 that._addClass( $( this ), "ui-dialog-resizing" ); 12598 that._blockFrames(); 12599 that._trigger( "resizeStart", event, filteredUi( ui ) ); 12600 }, 12601 resize: function( event, ui ) { 12602 that._trigger( "resize", event, filteredUi( ui ) ); 12603 }, 12604 stop: function( event, ui ) { 12605 var offset = that.uiDialog.offset(), 12606 left = offset.left - that.document.scrollLeft(), 12607 top = offset.top - that.document.scrollTop(); 12608 12609 options.height = that.uiDialog.height(); 12610 options.width = that.uiDialog.width(); 12611 options.position = { 12612 my: "left top", 12613 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 12614 "top" + ( top >= 0 ? "+" : "" ) + top, 12615 of: that.window 12616 }; 12617 that._removeClass( $( this ), "ui-dialog-resizing" ); 12618 that._unblockFrames(); 12619 that._trigger( "resizeStop", event, filteredUi( ui ) ); 12620 } 12621 } ) 12622 .css( "position", position ); 12623 }, 12624 12625 _trackFocus: function() { 12626 this._on( this.widget(), { 12627 focusin: function( event ) { 12628 this._makeFocusTarget(); 12629 this._focusedElement = $( event.target ); 12630 } 12631 } ); 12632 }, 12633 12634 _makeFocusTarget: function() { 12635 this._untrackInstance(); 12636 this._trackingInstances().unshift( this ); 12637 }, 12638 12639 _untrackInstance: function() { 12640 var instances = this._trackingInstances(), 12641 exists = $.inArray( this, instances ); 12642 if ( exists !== -1 ) { 12643 instances.splice( exists, 1 ); 12644 } 12645 }, 12646 12647 _trackingInstances: function() { 12648 var instances = this.document.data( "ui-dialog-instances" ); 12649 if ( !instances ) { 12650 instances = []; 12651 this.document.data( "ui-dialog-instances", instances ); 12652 } 12653 return instances; 12654 }, 12655 12656 _minHeight: function() { 12657 var options = this.options; 12658 12659 return options.height === "auto" ? 12660 options.minHeight : 12661 Math.min( options.minHeight, options.height ); 12662 }, 12663 12664 _position: function() { 12665 12666 // Need to show the dialog to get the actual offset in the position plugin 12667 var isVisible = this.uiDialog.is( ":visible" ); 12668 if ( !isVisible ) { 12669 this.uiDialog.show(); 12670 } 12671 this.uiDialog.position( this.options.position ); 12672 if ( !isVisible ) { 12673 this.uiDialog.hide(); 12674 } 12675 }, 12676 12677 _setOptions: function( options ) { 12678 var that = this, 12679 resize = false, 12680 resizableOptions = {}; 12681 12682 $.each( options, function( key, value ) { 12683 that._setOption( key, value ); 12684 12685 if ( key in that.sizeRelatedOptions ) { 12686 resize = true; 12687 } 12688 if ( key in that.resizableRelatedOptions ) { 12689 resizableOptions[ key ] = value; 12690 } 12691 } ); 12692 12693 if ( resize ) { 12694 this._size(); 12695 this._position(); 12696 } 12697 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 12698 this.uiDialog.resizable( "option", resizableOptions ); 12699 } 12700 }, 12701 12702 _setOption: function( key, value ) { 12703 var isDraggable, isResizable, 12704 uiDialog = this.uiDialog; 12705 12706 if ( key === "disabled" ) { 12707 return; 12708 } 12709 12710 this._super( key, value ); 12711 12712 if ( key === "appendTo" ) { 12713 this.uiDialog.appendTo( this._appendTo() ); 12714 } 12715 12716 if ( key === "buttons" ) { 12717 this._createButtons(); 12718 } 12719 12720 if ( key === "closeText" ) { 12721 this.uiDialogTitlebarClose.button( { 12722 12723 // Ensure that we always pass a string 12724 label: $( "<a>" ).text( "" + this.options.closeText ).html() 12725 } ); 12726 } 12727 12728 if ( key === "draggable" ) { 12729 isDraggable = uiDialog.is( ":data(ui-draggable)" ); 12730 if ( isDraggable && !value ) { 12731 uiDialog.draggable( "destroy" ); 12732 } 12733 12734 if ( !isDraggable && value ) { 12735 this._makeDraggable(); 12736 } 12737 } 12738 12739 if ( key === "position" ) { 12740 this._position(); 12741 } 12742 12743 if ( key === "resizable" ) { 12744 12745 // currently resizable, becoming non-resizable 12746 isResizable = uiDialog.is( ":data(ui-resizable)" ); 12747 if ( isResizable && !value ) { 12748 uiDialog.resizable( "destroy" ); 12749 } 12750 12751 // Currently resizable, changing handles 12752 if ( isResizable && typeof value === "string" ) { 12753 uiDialog.resizable( "option", "handles", value ); 12754 } 12755 12756 // Currently non-resizable, becoming resizable 12757 if ( !isResizable && value !== false ) { 12758 this._makeResizable(); 12759 } 12760 } 12761 12762 if ( key === "title" ) { 12763 this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); 12764 } 12765 }, 12766 12767 _size: function() { 12768 12769 // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content 12770 // divs will both have width and height set, so we need to reset them 12771 var nonContentHeight, minContentHeight, maxContentHeight, 12772 options = this.options; 12773 12774 // Reset content sizing 12775 this.element.show().css( { 12776 width: "auto", 12777 minHeight: 0, 12778 maxHeight: "none", 12779 height: 0 12780 } ); 12781 12782 if ( options.minWidth > options.width ) { 12783 options.width = options.minWidth; 12784 } 12785 12786 // Reset wrapper sizing 12787 // determine the height of all the non-content elements 12788 nonContentHeight = this.uiDialog.css( { 12789 height: "auto", 12790 width: options.width 12791 } ) 12792 .outerHeight(); 12793 minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 12794 maxContentHeight = typeof options.maxHeight === "number" ? 12795 Math.max( 0, options.maxHeight - nonContentHeight ) : 12796 "none"; 12797 12798 if ( options.height === "auto" ) { 12799 this.element.css( { 12800 minHeight: minContentHeight, 12801 maxHeight: maxContentHeight, 12802 height: "auto" 12803 } ); 12804 } else { 12805 this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 12806 } 12807 12808 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 12809 this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 12810 } 12811 }, 12812 12813 _blockFrames: function() { 12814 this.iframeBlocks = this.document.find( "iframe" ).map( function() { 12815 var iframe = $( this ); 12816 12817 return $( "<div>" ) 12818 .css( { 12819 position: "absolute", 12820 width: iframe.outerWidth(), 12821 height: iframe.outerHeight() 12822 } ) 12823 .appendTo( iframe.parent() ) 12824 .offset( iframe.offset() )[ 0 ]; 12825 } ); 12826 }, 12827 12828 _unblockFrames: function() { 12829 if ( this.iframeBlocks ) { 12830 this.iframeBlocks.remove(); 12831 delete this.iframeBlocks; 12832 } 12833 }, 12834 12835 _allowInteraction: function( event ) { 12836 if ( $( event.target ).closest( ".ui-dialog" ).length ) { 12837 return true; 12838 } 12839 12840 // TODO: Remove hack when datepicker implements 12841 // the .ui-front logic (#8989) 12842 return !!$( event.target ).closest( ".ui-datepicker" ).length; 12843 }, 12844 12845 _createOverlay: function() { 12846 if ( !this.options.modal ) { 12847 return; 12848 } 12849 12850 // We use a delay in case the overlay is created from an 12851 // event that we're going to be cancelling (#2804) 12852 var isOpening = true; 12853 this._delay( function() { 12854 isOpening = false; 12855 } ); 12856 12857 if ( !this.document.data( "ui-dialog-overlays" ) ) { 12858 12859 // Prevent use of anchors and inputs 12860 // Using _on() for an event handler shared across many instances is 12861 // safe because the dialogs stack and must be closed in reverse order 12862 this._on( this.document, { 12863 focusin: function( event ) { 12864 if ( isOpening ) { 12865 return; 12866 } 12867 12868 if ( !this._allowInteraction( event ) ) { 12869 event.preventDefault(); 12870 this._trackingInstances()[ 0 ]._focusTabbable(); 12871 } 12872 } 12873 } ); 12874 } 12875 12876 this.overlay = $( "<div>" ) 12877 .appendTo( this._appendTo() ); 12878 12879 this._addClass( this.overlay, null, "ui-widget-overlay ui-front" ); 12880 this._on( this.overlay, { 12881 mousedown: "_keepFocus" 12882 } ); 12883 this.document.data( "ui-dialog-overlays", 12884 ( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 ); 12885 }, 12886 12887 _destroyOverlay: function() { 12888 if ( !this.options.modal ) { 12889 return; 12890 } 12891 12892 if ( this.overlay ) { 12893 var overlays = this.document.data( "ui-dialog-overlays" ) - 1; 12894 12895 if ( !overlays ) { 12896 this._off( this.document, "focusin" ); 12897 this.document.removeData( "ui-dialog-overlays" ); 12898 } else { 12899 this.document.data( "ui-dialog-overlays", overlays ); 12900 } 12901 12902 this.overlay.remove(); 12903 this.overlay = null; 12904 } 12905 } 12906} ); 12907 12908// DEPRECATED 12909// TODO: switch return back to widget declaration at top of file when this is removed 12910if ( $.uiBackCompat !== false ) { 12911 12912 // Backcompat for dialogClass option 12913 $.widget( "ui.dialog", $.ui.dialog, { 12914 options: { 12915 dialogClass: "" 12916 }, 12917 _createWrapper: function() { 12918 this._super(); 12919 this.uiDialog.addClass( this.options.dialogClass ); 12920 }, 12921 _setOption: function( key, value ) { 12922 if ( key === "dialogClass" ) { 12923 this.uiDialog 12924 .removeClass( this.options.dialogClass ) 12925 .addClass( value ); 12926 } 12927 this._superApply( arguments ); 12928 } 12929 } ); 12930} 12931 12932var widgetsDialog = $.ui.dialog; 12933 12934 12935/*! 12936 * jQuery UI Droppable 1.12.1 12937 * http://jqueryui.com 12938 * 12939 * Copyright jQuery Foundation and other contributors 12940 * Released under the MIT license. 12941 * http://jquery.org/license 12942 */ 12943 12944//>>label: Droppable 12945//>>group: Interactions 12946//>>description: Enables drop targets for draggable elements. 12947//>>docs: http://api.jqueryui.com/droppable/ 12948//>>demos: http://jqueryui.com/droppable/ 12949 12950 12951 12952$.widget( "ui.droppable", { 12953 version: "1.12.1", 12954 widgetEventPrefix: "drop", 12955 options: { 12956 accept: "*", 12957 addClasses: true, 12958 greedy: false, 12959 scope: "default", 12960 tolerance: "intersect", 12961 12962 // Callbacks 12963 activate: null, 12964 deactivate: null, 12965 drop: null, 12966 out: null, 12967 over: null 12968 }, 12969 _create: function() { 12970 12971 var proportions, 12972 o = this.options, 12973 accept = o.accept; 12974 12975 this.isover = false; 12976 this.isout = true; 12977 12978 this.accept = $.isFunction( accept ) ? accept : function( d ) { 12979 return d.is( accept ); 12980 }; 12981 12982 this.proportions = function( /* valueToWrite */ ) { 12983 if ( arguments.length ) { 12984 12985 // Store the droppable's proportions 12986 proportions = arguments[ 0 ]; 12987 } else { 12988 12989 // Retrieve or derive the droppable's proportions 12990 return proportions ? 12991 proportions : 12992 proportions = { 12993 width: this.element[ 0 ].offsetWidth, 12994 height: this.element[ 0 ].offsetHeight 12995 }; 12996 } 12997 }; 12998 12999 this._addToManager( o.scope ); 13000 13001 o.addClasses && this._addClass( "ui-droppable" ); 13002 13003 }, 13004 13005 _addToManager: function( scope ) { 13006 13007 // Add the reference and positions to the manager 13008 $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; 13009 $.ui.ddmanager.droppables[ scope ].push( this ); 13010 }, 13011 13012 _splice: function( drop ) { 13013 var i = 0; 13014 for ( ; i < drop.length; i++ ) { 13015 if ( drop[ i ] === this ) { 13016 drop.splice( i, 1 ); 13017 } 13018 } 13019 }, 13020 13021 _destroy: function() { 13022 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 13023 13024 this._splice( drop ); 13025 }, 13026 13027 _setOption: function( key, value ) { 13028 13029 if ( key === "accept" ) { 13030 this.accept = $.isFunction( value ) ? value : function( d ) { 13031 return d.is( value ); 13032 }; 13033 } else if ( key === "scope" ) { 13034 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 13035 13036 this._splice( drop ); 13037 this._addToManager( value ); 13038 } 13039 13040 this._super( key, value ); 13041 }, 13042 13043 _activate: function( event ) { 13044 var draggable = $.ui.ddmanager.current; 13045 13046 this._addActiveClass(); 13047 if ( draggable ) { 13048 this._trigger( "activate", event, this.ui( draggable ) ); 13049 } 13050 }, 13051 13052 _deactivate: function( event ) { 13053 var draggable = $.ui.ddmanager.current; 13054 13055 this._removeActiveClass(); 13056 if ( draggable ) { 13057 this._trigger( "deactivate", event, this.ui( draggable ) ); 13058 } 13059 }, 13060 13061 _over: function( event ) { 13062 13063 var draggable = $.ui.ddmanager.current; 13064 13065 // Bail if draggable and droppable are same element 13066 if ( !draggable || ( draggable.currentItem || 13067 draggable.element )[ 0 ] === this.element[ 0 ] ) { 13068 return; 13069 } 13070 13071 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 13072 draggable.element ) ) ) { 13073 this._addHoverClass(); 13074 this._trigger( "over", event, this.ui( draggable ) ); 13075 } 13076 13077 }, 13078 13079 _out: function( event ) { 13080 13081 var draggable = $.ui.ddmanager.current; 13082 13083 // Bail if draggable and droppable are same element 13084 if ( !draggable || ( draggable.currentItem || 13085 draggable.element )[ 0 ] === this.element[ 0 ] ) { 13086 return; 13087 } 13088 13089 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 13090 draggable.element ) ) ) { 13091 this._removeHoverClass(); 13092 this._trigger( "out", event, this.ui( draggable ) ); 13093 } 13094 13095 }, 13096 13097 _drop: function( event, custom ) { 13098 13099 var draggable = custom || $.ui.ddmanager.current, 13100 childrenIntersection = false; 13101 13102 // Bail if draggable and droppable are same element 13103 if ( !draggable || ( draggable.currentItem || 13104 draggable.element )[ 0 ] === this.element[ 0 ] ) { 13105 return false; 13106 } 13107 13108 this.element 13109 .find( ":data(ui-droppable)" ) 13110 .not( ".ui-draggable-dragging" ) 13111 .each( function() { 13112 var inst = $( this ).droppable( "instance" ); 13113 if ( 13114 inst.options.greedy && 13115 !inst.options.disabled && 13116 inst.options.scope === draggable.options.scope && 13117 inst.accept.call( 13118 inst.element[ 0 ], ( draggable.currentItem || draggable.element ) 13119 ) && 13120 intersect( 13121 draggable, 13122 $.extend( inst, { offset: inst.element.offset() } ), 13123 inst.options.tolerance, event 13124 ) 13125 ) { 13126 childrenIntersection = true; 13127 return false; } 13128 } ); 13129 if ( childrenIntersection ) { 13130 return false; 13131 } 13132 13133 if ( this.accept.call( this.element[ 0 ], 13134 ( draggable.currentItem || draggable.element ) ) ) { 13135 this._removeActiveClass(); 13136 this._removeHoverClass(); 13137 13138 this._trigger( "drop", event, this.ui( draggable ) ); 13139 return this.element; 13140 } 13141 13142 return false; 13143 13144 }, 13145 13146 ui: function( c ) { 13147 return { 13148 draggable: ( c.currentItem || c.element ), 13149 helper: c.helper, 13150 position: c.position, 13151 offset: c.positionAbs 13152 }; 13153 }, 13154 13155 // Extension points just to make backcompat sane and avoid duplicating logic 13156 // TODO: Remove in 1.13 along with call to it below 13157 _addHoverClass: function() { 13158 this._addClass( "ui-droppable-hover" ); 13159 }, 13160 13161 _removeHoverClass: function() { 13162 this._removeClass( "ui-droppable-hover" ); 13163 }, 13164 13165 _addActiveClass: function() { 13166 this._addClass( "ui-droppable-active" ); 13167 }, 13168 13169 _removeActiveClass: function() { 13170 this._removeClass( "ui-droppable-active" ); 13171 } 13172} ); 13173 13174var intersect = $.ui.intersect = ( function() { 13175 function isOverAxis( x, reference, size ) { 13176 return ( x >= reference ) && ( x < ( reference + size ) ); 13177 } 13178 13179 return function( draggable, droppable, toleranceMode, event ) { 13180 13181 if ( !droppable.offset ) { 13182 return false; 13183 } 13184 13185 var x1 = ( draggable.positionAbs || 13186 draggable.position.absolute ).left + draggable.margins.left, 13187 y1 = ( draggable.positionAbs || 13188 draggable.position.absolute ).top + draggable.margins.top, 13189 x2 = x1 + draggable.helperProportions.width, 13190 y2 = y1 + draggable.helperProportions.height, 13191 l = droppable.offset.left, 13192 t = droppable.offset.top, 13193 r = l + droppable.proportions().width, 13194 b = t + droppable.proportions().height; 13195 13196 switch ( toleranceMode ) { 13197 case "fit": 13198 return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); 13199 case "intersect": 13200 return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half 13201 x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half 13202 t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half 13203 y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half 13204 case "pointer": 13205 return isOverAxis( event.pageY, t, droppable.proportions().height ) && 13206 isOverAxis( event.pageX, l, droppable.proportions().width ); 13207 case "touch": 13208 return ( 13209 ( y1 >= t && y1 <= b ) || // Top edge touching 13210 ( y2 >= t && y2 <= b ) || // Bottom edge touching 13211 ( y1 < t && y2 > b ) // Surrounded vertically 13212 ) && ( 13213 ( x1 >= l && x1 <= r ) || // Left edge touching 13214 ( x2 >= l && x2 <= r ) || // Right edge touching 13215 ( x1 < l && x2 > r ) // Surrounded horizontally 13216 ); 13217 default: 13218 return false; 13219 } 13220 }; 13221} )(); 13222 13223/* 13224 This manager tracks offsets of draggables and droppables 13225*/ 13226$.ui.ddmanager = { 13227 current: null, 13228 droppables: { "default": [] }, 13229 prepareOffsets: function( t, event ) { 13230 13231 var i, j, 13232 m = $.ui.ddmanager.droppables[ t.options.scope ] || [], 13233 type = event ? event.type : null, // workaround for #2317 13234 list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); 13235 13236 droppablesLoop: for ( i = 0; i < m.length; i++ ) { 13237 13238 // No disabled and non-accepted 13239 if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], 13240 ( t.currentItem || t.element ) ) ) ) { 13241 continue; 13242 } 13243 13244 // Filter out elements in the current dragged item 13245 for ( j = 0; j < list.length; j++ ) { 13246 if ( list[ j ] === m[ i ].element[ 0 ] ) { 13247 m[ i ].proportions().height = 0; 13248 continue droppablesLoop; 13249 } 13250 } 13251 13252 m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; 13253 if ( !m[ i ].visible ) { 13254 continue; 13255 } 13256 13257 // Activate the droppable if used directly from draggables 13258 if ( type === "mousedown" ) { 13259 m[ i ]._activate.call( m[ i ], event ); 13260 } 13261 13262 m[ i ].offset = m[ i ].element.offset(); 13263 m[ i ].proportions( { 13264 width: m[ i ].element[ 0 ].offsetWidth, 13265 height: m[ i ].element[ 0 ].offsetHeight 13266 } ); 13267 13268 } 13269 13270 }, 13271 drop: function( draggable, event ) { 13272 13273 var dropped = false; 13274 13275 // Create a copy of the droppables in case the list changes during the drop (#9116) 13276 $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { 13277 13278 if ( !this.options ) { 13279 return; 13280 } 13281 if ( !this.options.disabled && this.visible && 13282 intersect( draggable, this, this.options.tolerance, event ) ) { 13283 dropped = this._drop.call( this, event ) || dropped; 13284 } 13285 13286 if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], 13287 ( draggable.currentItem || draggable.element ) ) ) { 13288 this.isout = true; 13289 this.isover = false; 13290 this._deactivate.call( this, event ); 13291 } 13292 13293 } ); 13294 return dropped; 13295 13296 }, 13297 dragStart: function( draggable, event ) { 13298 13299 // Listen for scrolling so that if the dragging causes scrolling the position of the 13300 // droppables can be recalculated (see #5003) 13301 draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() { 13302 if ( !draggable.options.refreshPositions ) { 13303 $.ui.ddmanager.prepareOffsets( draggable, event ); 13304 } 13305 } ); 13306 }, 13307 drag: function( draggable, event ) { 13308 13309 // If you have a highly dynamic page, you might try this option. It renders positions 13310 // every time you move the mouse. 13311 if ( draggable.options.refreshPositions ) { 13312 $.ui.ddmanager.prepareOffsets( draggable, event ); 13313 } 13314 13315 // Run through all droppables and check their positions based on specific tolerance options 13316 $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { 13317 13318 if ( this.options.disabled || this.greedyChild || !this.visible ) { 13319 return; 13320 } 13321 13322 var parentInstance, scope, parent, 13323 intersects = intersect( draggable, this, this.options.tolerance, event ), 13324 c = !intersects && this.isover ? 13325 "isout" : 13326 ( intersects && !this.isover ? "isover" : null ); 13327 if ( !c ) { 13328 return; 13329 } 13330 13331 if ( this.options.greedy ) { 13332 13333 // find droppable parents with same scope 13334 scope = this.options.scope; 13335 parent = this.element.parents( ":data(ui-droppable)" ).filter( function() { 13336 return $( this ).droppable( "instance" ).options.scope === scope; 13337 } ); 13338 13339 if ( parent.length ) { 13340 parentInstance = $( parent[ 0 ] ).droppable( "instance" ); 13341 parentInstance.greedyChild = ( c === "isover" ); 13342 } 13343 } 13344 13345 // We just moved into a greedy child 13346 if ( parentInstance && c === "isover" ) { 13347 parentInstance.isover = false; 13348 parentInstance.isout = true; 13349 parentInstance._out.call( parentInstance, event ); 13350 } 13351 13352 this[ c ] = true; 13353 this[ c === "isout" ? "isover" : "isout" ] = false; 13354 this[ c === "isover" ? "_over" : "_out" ].call( this, event ); 13355 13356 // We just moved out of a greedy child 13357 if ( parentInstance && c === "isout" ) { 13358 parentInstance.isout = false; 13359 parentInstance.isover = true; 13360 parentInstance._over.call( parentInstance, event ); 13361 } 13362 } ); 13363 13364 }, 13365 dragStop: function( draggable, event ) { 13366 draggable.element.parentsUntil( "body" ).off( "scroll.droppable" ); 13367 13368 // Call prepareOffsets one final time since IE does not fire return scroll events when 13369 // overflow was caused by drag (see #5003) 13370 if ( !draggable.options.refreshPositions ) { 13371 $.ui.ddmanager.prepareOffsets( draggable, event ); 13372 } 13373 } 13374}; 13375 13376// DEPRECATED 13377// TODO: switch return back to widget declaration at top of file when this is removed 13378if ( $.uiBackCompat !== false ) { 13379 13380 // Backcompat for activeClass and hoverClass options 13381 $.widget( "ui.droppable", $.ui.droppable, { 13382 options: { 13383 hoverClass: false, 13384 activeClass: false 13385 }, 13386 _addActiveClass: function() { 13387 this._super(); 13388 if ( this.options.activeClass ) { 13389 this.element.addClass( this.options.activeClass ); 13390 } 13391 }, 13392 _removeActiveClass: function() { 13393 this._super(); 13394 if ( this.options.activeClass ) { 13395 this.element.removeClass( this.options.activeClass ); 13396 } 13397 }, 13398 _addHoverClass: function() { 13399 this._super(); 13400 if ( this.options.hoverClass ) { 13401 this.element.addClass( this.options.hoverClass ); 13402 } 13403 }, 13404 _removeHoverClass: function() { 13405 this._super(); 13406 if ( this.options.hoverClass ) { 13407 this.element.removeClass( this.options.hoverClass ); 13408 } 13409 } 13410 } ); 13411} 13412 13413var widgetsDroppable = $.ui.droppable; 13414 13415 13416/*! 13417 * jQuery UI Progressbar 1.12.1 13418 * http://jqueryui.com
vendor: 12,231 bytes, lines 13419-13877
13419 * 13420 * Copyright jQuery Foundation and other contributors 13421 * Released under the MIT license. 13422 * http://jquery.org/license 13423 */ 13424 13425//>>label: Progressbar 13426//>>group: Widgets 13427// jscs:disable maximumLineLength 13428//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators. 13429// jscs:enable maximumLineLength 13430//>>docs: http://api.jqueryui.com/progressbar/ 13431//>>demos: http://jqueryui.com/progressbar/ 13432//>>css.structure: ../../themes/base/core.css 13433//>>css.structure: ../../themes/base/progressbar.css 13434//>>css.theme: ../../themes/base/theme.css 13435 13436 13437 13438var widgetsProgressbar = $.widget( "ui.progressbar", { 13439 version: "1.12.1", 13440 options: { 13441 classes: { 13442 "ui-progressbar": "ui-corner-all", 13443 "ui-progressbar-value": "ui-corner-left", 13444 "ui-progressbar-complete": "ui-corner-right" 13445 }, 13446 max: 100, 13447 value: 0, 13448 13449 change: null, 13450 complete: null 13451 }, 13452 13453 min: 0, 13454 13455 _create: function() { 13456 13457 // Constrain initial value 13458 this.oldValue = this.options.value = this._constrainedValue(); 13459 13460 this.element.attr( { 13461 13462 // Only set static values; aria-valuenow and aria-valuemax are 13463 // set inside _refreshValue() 13464 role: "progressbar", 13465 "aria-valuemin": this.min 13466 } ); 13467 this._addClass( "ui-progressbar", "ui-widget ui-widget-content" ); 13468 13469 this.valueDiv = $( "<div>" ).appendTo( this.element ); 13470 this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" ); 13471 this._refreshValue(); 13472 }, 13473 13474 _destroy: function() { 13475 this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" ); 13476 13477 this.valueDiv.remove(); 13478 }, 13479 13480 value: function( newValue ) { 13481 if ( newValue === undefined ) { 13482 return this.options.value; 13483 } 13484 13485 this.options.value = this._constrainedValue( newValue ); 13486 this._refreshValue(); 13487 }, 13488 13489 _constrainedValue: function( newValue ) { 13490 if ( newValue === undefined ) { 13491 newValue = this.options.value; 13492 } 13493 13494 this.indeterminate = newValue === false; 13495 13496 // Sanitize value 13497 if ( typeof newValue !== "number" ) { 13498 newValue = 0; 13499 } 13500 13501 return this.indeterminate ? false : 13502 Math.min( this.options.max, Math.max( this.min, newValue ) ); 13503 }, 13504 13505 _setOptions: function( options ) { 13506 13507 // Ensure "value" option is set after other values (like max) 13508 var value = options.value; 13509 delete options.value; 13510 13511 this._super( options ); 13512 13513 this.options.value = this._constrainedValue( value ); 13514 this._refreshValue(); 13515 }, 13516 13517 _setOption: function( key, value ) { 13518 if ( key === "max" ) { 13519 13520 // Don't allow a max less than min 13521 value = Math.max( this.min, value ); 13522 } 13523 this._super( key, value ); 13524 }, 13525 13526 _setOptionDisabled: function( value ) { 13527 this._super( value ); 13528 13529 this.element.attr( "aria-disabled", value ); 13530 this._toggleClass( null, "ui-state-disabled", !!value ); 13531 }, 13532 13533 _percentage: function() { 13534 return this.indeterminate ? 13535 100 : 13536 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); 13537 }, 13538 13539 _refreshValue: function() { 13540 var value = this.options.value, 13541 percentage = this._percentage(); 13542 13543 this.valueDiv 13544 .toggle( this.indeterminate || value > this.min ) 13545 .width( percentage.toFixed( 0 ) + "%" ); 13546 13547 this 13548 ._toggleClass( this.valueDiv, "ui-progressbar-complete", null, 13549 value === this.options.max ) 13550 ._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate ); 13551 13552 if ( this.indeterminate ) { 13553 this.element.removeAttr( "aria-valuenow" ); 13554 if ( !this.overlayDiv ) { 13555 this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv ); 13556 this._addClass( this.overlayDiv, "ui-progressbar-overlay" ); 13557 } 13558 } else { 13559 this.element.attr( { 13560 "aria-valuemax": this.options.max, 13561 "aria-valuenow": value 13562 } ); 13563 if ( this.overlayDiv ) { 13564 this.overlayDiv.remove(); 13565 this.overlayDiv = null; 13566 } 13567 } 13568 13569 if ( this.oldValue !== value ) { 13570 this.oldValue = value; 13571 this._trigger( "change" ); 13572 } 13573 if ( value === this.options.max ) { 13574 this._trigger( "complete" ); 13575 } 13576 } 13577} ); 13578 13579 13580/*! 13581 * jQuery UI Selectable 1.12.1 13582 * http://jqueryui.com 13583 * 13584 * Copyright jQuery Foundation and other contributors 13585 * Released under the MIT license. 13586 * http://jquery.org/license 13587 */ 13588 13589//>>label: Selectable 13590//>>group: Interactions 13591//>>description: Allows groups of elements to be selected with the mouse. 13592//>>docs: http://api.jqueryui.com/selectable/ 13593//>>demos: http://jqueryui.com/selectable/ 13594//>>css.structure: ../../themes/base/selectable.css 13595 13596 13597 13598var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { 13599 version: "1.12.1", 13600 options: { 13601 appendTo: "body", 13602 autoRefresh: true, 13603 distance: 0, 13604 filter: "*", 13605 tolerance: "touch", 13606 13607 // Callbacks 13608 selected: null, 13609 selecting: null, 13610 start: null, 13611 stop: null, 13612 unselected: null, 13613 unselecting: null 13614 }, 13615 _create: function() { 13616 var that = this; 13617 13618 this._addClass( "ui-selectable" ); 13619 13620 this.dragged = false; 13621 13622 // Cache selectee children based on filter 13623 this.refresh = function() { 13624 that.elementPos = $( that.element[ 0 ] ).offset(); 13625 that.selectees = $( that.options.filter, that.element[ 0 ] ); 13626 that._addClass( that.selectees, "ui-selectee" ); 13627 that.selectees.each( function() { 13628 var $this = $( this ), 13629 selecteeOffset = $this.offset(), 13630 pos = { 13631 left: selecteeOffset.left - that.elementPos.left, 13632 top: selecteeOffset.top - that.elementPos.top 13633 }; 13634 $.data( this, "selectable-item", { 13635 element: this, 13636 $element: $this, 13637 left: pos.left, 13638 top: pos.top, 13639 right: pos.left + $this.outerWidth(), 13640 bottom: pos.top + $this.outerHeight(), 13641 startselected: false, 13642 selected: $this.hasClass( "ui-selected" ), 13643 selecting: $this.hasClass( "ui-selecting" ), 13644 unselecting: $this.hasClass( "ui-unselecting" ) 13645 } ); 13646 } ); 13647 }; 13648 this.refresh(); 13649 13650 this._mouseInit(); 13651 13652 this.helper = $( "<div>" ); 13653 this._addClass( this.helper, "ui-selectable-helper" ); 13654 }, 13655 13656 _destroy: function() { 13657 this.selectees.removeData( "selectable-item" ); 13658 this._mouseDestroy(); 13659 }, 13660 13661 _mouseStart: function( event ) { 13662 var that = this, 13663 options = this.options; 13664 13665 this.opos = [ event.pageX, event.pageY ]; 13666 this.elementPos = $( this.element[ 0 ] ).offset(); 13667 13668 if ( this.options.disabled ) { 13669 return; 13670 } 13671 13672 this.selectees = $( options.filter, this.element[ 0 ] ); 13673 13674 this._trigger( "start", event ); 13675 13676 $( options.appendTo ).append( this.helper ); 13677 13678 // position helper (lasso) 13679 this.helper.css( { 13680 "left": event.pageX, 13681 "top": event.pageY, 13682 "width": 0, 13683 "height": 0 13684 } ); 13685 13686 if ( options.autoRefresh ) { 13687 this.refresh(); 13688 } 13689 13690 this.selectees.filter( ".ui-selected" ).each( function() { 13691 var selectee = $.data( this, "selectable-item" ); 13692 selectee.startselected = true; 13693 if ( !event.metaKey && !event.ctrlKey ) { 13694 that._removeClass( selectee.$element, "ui-selected" ); 13695 selectee.selected = false; 13696 that._addClass( selectee.$element, "ui-unselecting" ); 13697 selectee.unselecting = true; 13698 13699 // selectable UNSELECTING callback 13700 that._trigger( "unselecting", event, { 13701 unselecting: selectee.element 13702 } ); 13703 } 13704 } ); 13705 13706 $( event.target ).parents().addBack().each( function() { 13707 var doSelect, 13708 selectee = $.data( this, "selectable-item" ); 13709 if ( selectee ) { 13710 doSelect = ( !event.metaKey && !event.ctrlKey ) || 13711 !selectee.$element.hasClass( "ui-selected" ); 13712 that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" ) 13713 ._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" ); 13714 selectee.unselecting = !doSelect; 13715 selectee.selecting = doSelect; 13716 selectee.selected = doSelect; 13717 13718 // selectable (UN)SELECTING callback 13719 if ( doSelect ) { 13720 that._trigger( "selecting", event, { 13721 selecting: selectee.element 13722 } ); 13723 } else { 13724 that._trigger( "unselecting", event, { 13725 unselecting: selectee.element 13726 } ); 13727 } 13728 return false; 13729 } 13730 } ); 13731 13732 }, 13733 13734 _mouseDrag: function( event ) { 13735 13736 this.dragged = true; 13737 13738 if ( this.options.disabled ) { 13739 return; 13740 } 13741 13742 var tmp, 13743 that = this, 13744 options = this.options, 13745 x1 = this.opos[ 0 ], 13746 y1 = this.opos[ 1 ], 13747 x2 = event.pageX, 13748 y2 = event.pageY; 13749 13750 if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; } 13751 if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; } 13752 this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } ); 13753 13754 this.selectees.each( function() { 13755 var selectee = $.data( this, "selectable-item" ), 13756 hit = false, 13757 offset = {}; 13758 13759 //prevent helper from being selected if appendTo: selectable 13760 if ( !selectee || selectee.element === that.element[ 0 ] ) { 13761 return; 13762 } 13763 13764 offset.left = selectee.left + that.elementPos.left; 13765 offset.right = selectee.right + that.elementPos.left; 13766 offset.top = selectee.top + that.elementPos.top; 13767 offset.bottom = selectee.bottom + that.elementPos.top; 13768 13769 if ( options.tolerance === "touch" ) { 13770 hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 || 13771 offset.bottom < y1 ) ); 13772 } else if ( options.tolerance === "fit" ) { 13773 hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 && 13774 offset.bottom < y2 ); 13775 } 13776 13777 if ( hit ) { 13778 13779 // SELECT 13780 if ( selectee.selected ) { 13781 that._removeClass( selectee.$element, "ui-selected" ); 13782 selectee.selected = false; 13783 } 13784 if ( selectee.unselecting ) { 13785 that._removeClass( selectee.$element, "ui-unselecting" ); 13786 selectee.unselecting = false; 13787 } 13788 if ( !selectee.selecting ) { 13789 that._addClass( selectee.$element, "ui-selecting" ); 13790 selectee.selecting = true; 13791 13792 // selectable SELECTING callback 13793 that._trigger( "selecting", event, { 13794 selecting: selectee.element 13795 } ); 13796 } 13797 } else { 13798 13799 // UNSELECT 13800 if ( selectee.selecting ) { 13801 if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) { 13802 that._removeClass( selectee.$element, "ui-selecting" ); 13803 selectee.selecting = false; 13804 that._addClass( selectee.$element, "ui-selected" ); 13805 selectee.selected = true; 13806 } else { 13807 that._removeClass( selectee.$element, "ui-selecting" ); 13808 selectee.selecting = false; 13809 if ( selectee.startselected ) { 13810 that._addClass( selectee.$element, "ui-unselecting" ); 13811 selectee.unselecting = true; 13812 } 13813 13814 // selectable UNSELECTING callback 13815 that._trigger( "unselecting", event, { 13816 unselecting: selectee.element 13817 } ); 13818 } 13819 } 13820 if ( selectee.selected ) { 13821 if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) { 13822 that._removeClass( selectee.$element, "ui-selected" ); 13823 selectee.selected = false; 13824 13825 that._addClass( selectee.$element, "ui-unselecting" ); 13826 selectee.unselecting = true; 13827 13828 // selectable UNSELECTING callback 13829 that._trigger( "unselecting", event, { 13830 unselecting: selectee.element 13831 } ); 13832 } 13833 } 13834 } 13835 } ); 13836 13837 return false; 13838 }, 13839 13840 _mouseStop: function( event ) { 13841 var that = this; 13842 13843 this.dragged = false; 13844 13845 $( ".ui-unselecting", this.element[ 0 ] ).each( function() { 13846 var selectee = $.data( this, "selectable-item" ); 13847 that._removeClass( selectee.$element, "ui-unselecting" ); 13848 selectee.unselecting = false; 13849 selectee.startselected = false; 13850 that._trigger( "unselected", event, { 13851 unselected: selectee.element 13852 } ); 13853 } ); 13854 $( ".ui-selecting", this.element[ 0 ] ).each( function() { 13855 var selectee = $.data( this, "selectable-item" ); 13856 that._removeClass( selectee.$element, "ui-selecting" ) 13857 ._addClass( selectee.$element, "ui-selected" ); 13858 selectee.selecting = false; 13859 selectee.selected = true; 13860 selectee.startselected = true; 13861 that._trigger( "selected", event, { 13862 selected: selectee.element 13863 } ); 13864 } ); 13865 this._trigger( "stop", event ); 13866 13867 this.helper.remove(); 13868 13869 return false; 13870 } 13871 13872} ); 13873 13874 13875/*! 13876 * jQuery UI Selectmenu 1.12.1 13877 * http://jqueryui.com
vendor: 5,543 bytes, lines 13878-14084
13878 * 13879 * Copyright jQuery Foundation and other contributors 13880 * Released under the MIT license. 13881 * http://jquery.org/license 13882 */ 13883 13884//>>label: Selectmenu 13885//>>group: Widgets 13886// jscs:disable maximumLineLength 13887//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select. 13888// jscs:enable maximumLineLength 13889//>>docs: http://api.jqueryui.com/selectmenu/ 13890//>>demos: http://jqueryui.com/selectmenu/ 13891//>>css.structure: ../../themes/base/core.css 13892//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css 13893//>>css.theme: ../../themes/base/theme.css 13894 13895 13896 13897var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { 13898 version: "1.12.1", 13899 defaultElement: "<select>", 13900 options: { 13901 appendTo: null, 13902 classes: { 13903 "ui-selectmenu-button-open": "ui-corner-top", 13904 "ui-selectmenu-button-closed": "ui-corner-all" 13905 }, 13906 disabled: null, 13907 icons: { 13908 button: "ui-icon-triangle-1-s" 13909 }, 13910 position: { 13911 my: "left top", 13912 at: "left bottom", 13913 collision: "none" 13914 }, 13915 width: false, 13916 13917 // Callbacks 13918 change: null, 13919 close: null, 13920 focus: null, 13921 open: null, 13922 select: null 13923 }, 13924 13925 _create: function() { 13926 var selectmenuId = this.element.uniqueId().attr( "id" ); 13927 this.ids = { 13928 element: selectmenuId, 13929 button: selectmenuId + "-button", 13930 menu: selectmenuId + "-menu" 13931 }; 13932 13933 this._drawButton(); 13934 this._drawMenu(); 13935 this._bindFormResetHandler(); 13936 13937 this._rendered = false; 13938 this.menuItems = $(); 13939 }, 13940 13941 _drawButton: function() { 13942 var icon, 13943 that = this, 13944 item = this._parseOption( 13945 this.element.find( "option:selected" ), 13946 this.element[ 0 ].selectedIndex 13947 ); 13948 13949 // Associate existing label with the new button 13950 this.labels = this.element.labels().attr( "for", this.ids.button ); 13951 this._on( this.labels, { 13952 click: function( event ) { 13953 this.button.focus(); 13954 event.preventDefault(); 13955 } 13956 } ); 13957 13958 // Hide original select element 13959 this.element.hide(); 13960 13961 // Create button 13962 this.button = $( "<span>", { 13963 tabindex: this.options.disabled ? -1 : 0, 13964 id: this.ids.button, 13965 role: "combobox", 13966 "aria-expanded": "false", 13967 "aria-autocomplete": "list", 13968 "aria-owns": this.ids.menu, 13969 "aria-haspopup": "true", 13970 title: this.element.attr( "title" ) 13971 } ) 13972 .insertAfter( this.element ); 13973 13974 this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed", 13975 "ui-button ui-widget" ); 13976 13977 icon = $( "<span>" ).appendTo( this.button ); 13978 this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button ); 13979 this.buttonItem = this._renderButtonItem( item ) 13980 .appendTo( this.button ); 13981 13982 if ( this.options.width !== false ) { 13983 this._resizeButton(); 13984 } 13985 13986 this._on( this.button, this._buttonEvents ); 13987 this.button.one( "focusin", function() { 13988 13989 // Delay rendering the menu items until the button receives focus. 13990 // The menu may have already been rendered via a programmatic open. 13991 if ( !that._rendered ) { 13992 that._refreshMenu(); 13993 } 13994 } ); 13995 }, 13996 13997 _drawMenu: function() { 13998 var that = this; 13999 14000 // Create menu 14001 this.menu = $( "<ul>", { 14002 "aria-hidden": "true", 14003 "aria-labelledby": this.ids.button, 14004 id: this.ids.menu 14005 } ); 14006 14007 // Wrap menu 14008 this.menuWrap = $( "<div>" ).append( this.menu ); 14009 this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" ); 14010 this.menuWrap.appendTo( this._appendTo() ); 14011 14012 // Initialize menu widget 14013 this.menuInstance = this.menu 14014 .menu( { 14015 classes: { 14016 "ui-menu": "ui-corner-bottom" 14017 }, 14018 role: "listbox", 14019 select: function( event, ui ) { 14020 event.preventDefault(); 14021 14022 // Support: IE8 14023 // If the item was selected via a click, the text selection 14024 // will be destroyed in IE 14025 that._setSelection(); 14026 14027 that._select( ui.item.data( "ui-selectmenu-item" ), event ); 14028 }, 14029 focus: function( event, ui ) { 14030 var item = ui.item.data( "ui-selectmenu-item" ); 14031 14032 // Prevent inital focus from firing and check if its a newly focused item 14033 if ( that.focusIndex != null && item.index !== that.focusIndex ) { 14034 that._trigger( "focus", event, { item: item } ); 14035 if ( !that.isOpen ) { 14036 that._select( item, event ); 14037 } 14038 } 14039 that.focusIndex = item.index; 14040 14041 that.button.attr( "aria-activedescendant", 14042 that.menuItems.eq( item.index ).attr( "id" ) ); 14043 } 14044 } ) 14045 .menu( "instance" ); 14046 14047 // Don't close the menu on mouseleave 14048 this.menuInstance._off( this.menu, "mouseleave" ); 14049 14050 // Cancel the menu's collapseAll on document click 14051 this.menuInstance._closeOnDocumentClick = function() { 14052 return false; 14053 }; 14054 14055 // Selects often contain empty items, but never contain dividers 14056 this.menuInstance._isDivider = function() { 14057 return false; 14058 }; 14059 }, 14060 14061 refresh: function() { 14062 this._refreshMenu(); 14063 this.buttonItem.replaceWith( 14064 this.buttonItem = this._renderButtonItem( 14065 14066 // Fall back to an empty object in case there are no options 14067 this._getSelectedItem().data( "ui-selectmenu-item" ) || {} 14068 ) 14069 ); 14070 if ( this.options.width === null ) { 14071 this._resizeButton(); 14072 } 14073 }, 14074 14075 _refreshMenu: function() { 14076 var item, 14077 options = this.element.find( "option" ); 14078 14079 this.menu.empty(); 14080 14081 this._parseOptions( options ); 14082 this._renderMenu( this.menu, this.items ); 14083 14084 this.menuInstance.refresh();
vendor: 9,769 bytes, lines 14085-14492
14085 this.menuItems = this.menu.find( "li" ) 14086 .not( ".ui-selectmenu-optgroup" ) 14087 .find( ".ui-menu-item-wrapper" ); 14088 14089 this._rendered = true; 14090 14091 if ( !options.length ) { 14092 return; 14093 } 14094 14095 item = this._getSelectedItem(); 14096 14097 // Update the menu to have the correct item focused 14098 this.menuInstance.focus( null, item ); 14099 this._setAria( item.data( "ui-selectmenu-item" ) ); 14100 14101 // Set disabled state 14102 this._setOption( "disabled", this.element.prop( "disabled" ) ); 14103 }, 14104 14105 open: function( event ) { 14106 if ( this.options.disabled ) { 14107 return; 14108 } 14109 14110 // If this is the first time the menu is being opened, render the items 14111 if ( !this._rendered ) { 14112 this._refreshMenu(); 14113 } else { 14114 14115 // Menu clears focus on close, reset focus to selected item 14116 this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" ); 14117 this.menuInstance.focus( null, this._getSelectedItem() ); 14118 } 14119 14120 // If there are no options, don't open the menu 14121 if ( !this.menuItems.length ) { 14122 return; 14123 } 14124 14125 this.isOpen = true; 14126 this._toggleAttr(); 14127 this._resizeMenu(); 14128 this._position(); 14129 14130 this._on( this.document, this._documentClick ); 14131 14132 this._trigger( "open", event ); 14133 }, 14134 14135 _position: function() { 14136 this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); 14137 }, 14138 14139 close: function( event ) { 14140 if ( !this.isOpen ) { 14141 return; 14142 } 14143 14144 this.isOpen = false; 14145 this._toggleAttr(); 14146 14147 this.range = null; 14148 this._off( this.document ); 14149 14150 this._trigger( "close", event ); 14151 }, 14152 14153 widget: function() { 14154 return this.button; 14155 }, 14156 14157 menuWidget: function() { 14158 return this.menu; 14159 }, 14160 14161 _renderButtonItem: function( item ) { 14162 var buttonItem = $( "<span>" ); 14163 14164 this._setText( buttonItem, item.label ); 14165 this._addClass( buttonItem, "ui-selectmenu-text" ); 14166 14167 return buttonItem; 14168 }, 14169 14170 _renderMenu: function( ul, items ) { 14171 var that = this, 14172 currentOptgroup = ""; 14173 14174 $.each( items, function( index, item ) { 14175 var li; 14176 14177 if ( item.optgroup !== currentOptgroup ) { 14178 li = $( "<li>", { 14179 text: item.optgroup 14180 } ); 14181 that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" + 14182 ( item.element.parent( "optgroup" ).prop( "disabled" ) ? 14183 " ui-state-disabled" : 14184 "" ) ); 14185 14186 li.appendTo( ul ); 14187 14188 currentOptgroup = item.optgroup; 14189 } 14190 14191 that._renderItemData( ul, item ); 14192 } ); 14193 }, 14194 14195 _renderItemData: function( ul, item ) { 14196 return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); 14197 }, 14198 14199 _renderItem: function( ul, item ) { 14200 var li = $( "<li>" ), 14201 wrapper = $( "<div>", { 14202 title: item.element.attr( "title" ) 14203 } ); 14204 14205 if ( item.disabled ) { 14206 this._addClass( li, null, "ui-state-disabled" ); 14207 } 14208 this._setText( wrapper, item.label ); 14209 14210 return li.append( wrapper ).appendTo( ul ); 14211 }, 14212 14213 _setText: function( element, value ) { 14214 if ( value ) { 14215 element.text( value ); 14216 } else { 14217 element.html( " " ); 14218 } 14219 }, 14220 14221 _move: function( direction, event ) { 14222 var item, next, 14223 filter = ".ui-menu-item"; 14224 14225 if ( this.isOpen ) { 14226 item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 14227 } else { 14228 item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 14229 filter += ":not(.ui-state-disabled)"; 14230 } 14231 14232 if ( direction === "first" || direction === "last" ) { 14233 next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); 14234 } else { 14235 next = item[ direction + "All" ]( filter ).eq( 0 ); 14236 } 14237 14238 if ( next.length ) { 14239 this.menuInstance.focus( event, next ); 14240 } 14241 }, 14242 14243 _getSelectedItem: function() { 14244 return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 14245 }, 14246 14247 _toggle: function( event ) { 14248 this[ this.isOpen ? "close" : "open" ]( event ); 14249 }, 14250 14251 _setSelection: function() { 14252 var selection; 14253 14254 if ( !this.range ) { 14255 return; 14256 } 14257 14258 if ( window.getSelection ) { 14259 selection = window.getSelection(); 14260 selection.removeAllRanges(); 14261 selection.addRange( this.range ); 14262 14263 // Support: IE8 14264 } else { 14265 this.range.select(); 14266 } 14267 14268 // Support: IE 14269 // Setting the text selection kills the button focus in IE, but 14270 // restoring the focus doesn't kill the selection. 14271 this.button.focus(); 14272 }, 14273 14274 _documentClick: { 14275 mousedown: function( event ) { 14276 if ( !this.isOpen ) { 14277 return; 14278 } 14279 14280 if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + 14281 $.ui.escapeSelector( this.ids.button ) ).length ) { 14282 this.close( event ); 14283 } 14284 } 14285 }, 14286 14287 _buttonEvents: { 14288 14289 // Prevent text selection from being reset when interacting with the selectmenu (#10144) 14290 mousedown: function() { 14291 var selection; 14292 14293 if ( window.getSelection ) { 14294 selection = window.getSelection(); 14295 if ( selection.rangeCount ) { 14296 this.range = selection.getRangeAt( 0 ); 14297 } 14298 14299 // Support: IE8 14300 } else { 14301 this.range = document.selection.createRange(); 14302 } 14303 }, 14304 14305 click: function( event ) { 14306 this._setSelection(); 14307 this._toggle( event ); 14308 }, 14309 14310 keydown: function( event ) { 14311 var preventDefault = true; 14312 switch ( event.keyCode ) { 14313 case $.ui.keyCode.TAB: 14314 case $.ui.keyCode.ESCAPE: 14315 this.close( event ); 14316 preventDefault = false; 14317 break; 14318 case $.ui.keyCode.ENTER: 14319 if ( this.isOpen ) { 14320 this._selectFocusedItem( event ); 14321 } 14322 break; 14323 case $.ui.keyCode.UP: 14324 if ( event.altKey ) { 14325 this._toggle( event ); 14326 } else { 14327 this._move( "prev", event ); 14328 } 14329 break; 14330 case $.ui.keyCode.DOWN: 14331 if ( event.altKey ) { 14332 this._toggle( event ); 14333 } else { 14334 this._move( "next", event ); 14335 } 14336 break; 14337 case $.ui.keyCode.SPACE: 14338 if ( this.isOpen ) { 14339 this._selectFocusedItem( event ); 14340 } else { 14341 this._toggle( event ); 14342 } 14343 break; 14344 case $.ui.keyCode.LEFT: 14345 this._move( "prev", event ); 14346 break; 14347 case $.ui.keyCode.RIGHT: 14348 this._move( "next", event ); 14349 break; 14350 case $.ui.keyCode.HOME: 14351 case $.ui.keyCode.PAGE_UP: 14352 this._move( "first", event ); 14353 break; 14354 case $.ui.keyCode.END: 14355 case $.ui.keyCode.PAGE_DOWN: 14356 this._move( "last", event ); 14357 break; 14358 default: 14359 this.menu.trigger( event ); 14360 preventDefault = false; 14361 } 14362 14363 if ( preventDefault ) { 14364 event.preventDefault(); 14365 } 14366 } 14367 }, 14368 14369 _selectFocusedItem: function( event ) { 14370 var item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 14371 if ( !item.hasClass( "ui-state-disabled" ) ) { 14372 this._select( item.data( "ui-selectmenu-item" ), event ); 14373 } 14374 }, 14375 14376 _select: function( item, event ) { 14377 var oldIndex = this.element[ 0 ].selectedIndex; 14378 14379 // Change native select element 14380 this.element[ 0 ].selectedIndex = item.index; 14381 this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) ); 14382 this._setAria( item ); 14383 this._trigger( "select", event, { item: item } ); 14384 14385 if ( item.index !== oldIndex ) { 14386 this._trigger( "change", event, { item: item } ); 14387 } 14388 14389 this.close( event ); 14390 }, 14391 14392 _setAria: function( item ) { 14393 var id = this.menuItems.eq( item.index ).attr( "id" ); 14394 14395 this.button.attr( { 14396 "aria-labelledby": id, 14397 "aria-activedescendant": id 14398 } ); 14399 this.menu.attr( "aria-activedescendant", id ); 14400 }, 14401 14402 _setOption: function( key, value ) { 14403 if ( key === "icons" ) { 14404 var icon = this.button.find( "span.ui-icon" ); 14405 this._removeClass( icon, null, this.options.icons.button ) 14406 ._addClass( icon, null, value.button ); 14407 } 14408 14409 this._super( key, value ); 14410 14411 if ( key === "appendTo" ) { 14412 this.menuWrap.appendTo( this._appendTo() ); 14413 } 14414 14415 if ( key === "width" ) { 14416 this._resizeButton(); 14417 } 14418 }, 14419 14420 _setOptionDisabled: function( value ) { 14421 this._super( value ); 14422 14423 this.menuInstance.option( "disabled", value ); 14424 this.button.attr( "aria-disabled", value ); 14425 this._toggleClass( this.button, null, "ui-state-disabled", value ); 14426 14427 this.element.prop( "disabled", value ); 14428 if ( value ) { 14429 this.button.attr( "tabindex", -1 ); 14430 this.close(); 14431 } else { 14432 this.button.attr( "tabindex", 0 ); 14433 } 14434 }, 14435 14436 _appendTo: function() { 14437 var element = this.options.appendTo; 14438 14439 if ( element ) { 14440 element = element.jquery || element.nodeType ? 14441 $( element ) : 14442 this.document.find( element ).eq( 0 ); 14443 } 14444 14445 if ( !element || !element[ 0 ] ) { 14446 element = this.element.closest( ".ui-front, dialog" ); 14447 } 14448 14449 if ( !element.length ) { 14450 element = this.document[ 0 ].body; 14451 } 14452 14453 return element; 14454 }, 14455 14456 _toggleAttr: function() { 14457 this.button.attr( "aria-expanded", this.isOpen ); 14458 14459 // We can't use two _toggleClass() calls here, because we need to make sure 14460 // we always remove classes first and add them second, otherwise if both classes have the 14461 // same theme class, it will be removed after we add it. 14462 this._removeClass( this.button, "ui-selectmenu-button-" + 14463 ( this.isOpen ? "closed" : "open" ) ) 14464 ._addClass( this.button, "ui-selectmenu-button-" + 14465 ( this.isOpen ? "open" : "closed" ) ) 14466 ._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen ); 14467 14468 this.menu.attr( "aria-hidden", !this.isOpen ); 14469 }, 14470 14471 _resizeButton: function() { 14472 var width = this.options.width; 14473 14474 // For `width: false`, just remove inline style and stop 14475 if ( width === false ) { 14476 this.button.css( "width", "" ); 14477 return; 14478 } 14479 14480 // For `width: null`, match the width of the original element 14481 if ( width === null ) { 14482 width = this.element.show().outerWidth(); 14483 this.element.hide(); 14484 } 14485 14486 this.button.outerWidth( width ); 14487 }, 14488 14489 _resizeMenu: function() { 14490 this.menu.outerWidth( Math.max( 14491 this.button.outerWidth(), 14492
vendor: 5,390 bytes, lines 14493-14706
14493 // Support: IE10 14494 // IE10 wraps long text (possibly a rounding bug) 14495 // so we add 1px to avoid the wrapping 14496 this.menu.width( "" ).outerWidth() + 1 14497 ) ); 14498 }, 14499 14500 _getCreateOptions: function() { 14501 var options = this._super(); 14502 14503 options.disabled = this.element.prop( "disabled" ); 14504 14505 return options; 14506 }, 14507 14508 _parseOptions: function( options ) { 14509 var that = this, 14510 data = []; 14511 options.each( function( index, item ) { 14512 data.push( that._parseOption( $( item ), index ) ); 14513 } ); 14514 this.items = data; 14515 }, 14516 14517 _parseOption: function( option, index ) { 14518 var optgroup = option.parent( "optgroup" ); 14519 14520 return { 14521 element: option, 14522 index: index, 14523 value: option.val(), 14524 label: option.text(), 14525 optgroup: optgroup.attr( "label" ) || "", 14526 disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) 14527 }; 14528 }, 14529 14530 _destroy: function() { 14531 this._unbindFormResetHandler(); 14532 this.menuWrap.remove(); 14533 this.button.remove(); 14534 this.element.show(); 14535 this.element.removeUniqueId(); 14536 this.labels.attr( "for", this.ids.element ); 14537 } 14538} ] ); 14539 14540 14541/*! 14542 * jQuery UI Slider 1.12.1 14543 * http://jqueryui.com 14544 * 14545 * Copyright jQuery Foundation and other contributors 14546 * Released under the MIT license. 14547 * http://jquery.org/license 14548 */ 14549 14550//>>label: Slider 14551//>>group: Widgets 14552//>>description: Displays a flexible slider with ranges and accessibility via keyboard. 14553//>>docs: http://api.jqueryui.com/slider/ 14554//>>demos: http://jqueryui.com/slider/ 14555//>>css.structure: ../../themes/base/core.css 14556//>>css.structure: ../../themes/base/slider.css 14557//>>css.theme: ../../themes/base/theme.css 14558 14559 14560 14561var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { 14562 version: "1.12.1", 14563 widgetEventPrefix: "slide", 14564 14565 options: { 14566 animate: false, 14567 classes: { 14568 "ui-slider": "ui-corner-all", 14569 "ui-slider-handle": "ui-corner-all", 14570 14571 // Note: ui-widget-header isn't the most fittingly semantic framework class for this 14572 // element, but worked best visually with a variety of themes 14573 "ui-slider-range": "ui-corner-all ui-widget-header" 14574 }, 14575 distance: 0, 14576 max: 100, 14577 min: 0, 14578 orientation: "horizontal", 14579 range: false, 14580 step: 1, 14581 value: 0, 14582 values: null, 14583 14584 // Callbacks 14585 change: null, 14586 slide: null, 14587 start: null, 14588 stop: null 14589 }, 14590 14591 // Number of pages in a slider 14592 // (how many times can you page up/down to go through the whole range) 14593 numPages: 5, 14594 14595 _create: function() { 14596 this._keySliding = false; 14597 this._mouseSliding = false; 14598 this._animateOff = true; 14599 this._handleIndex = null; 14600 this._detectOrientation(); 14601 this._mouseInit(); 14602 this._calculateNewMax(); 14603 14604 this._addClass( "ui-slider ui-slider-" + this.orientation, 14605 "ui-widget ui-widget-content" ); 14606 14607 this._refresh(); 14608 14609 this._animateOff = false; 14610 }, 14611 14612 _refresh: function() { 14613 this._createRange(); 14614 this._createHandles(); 14615 this._setupEvents(); 14616 this._refreshValue(); 14617 }, 14618 14619 _createHandles: function() { 14620 var i, handleCount, 14621 options = this.options, 14622 existingHandles = this.element.find( ".ui-slider-handle" ), 14623 handle = "<span tabindex='0'></span>", 14624 handles = []; 14625 14626 handleCount = ( options.values && options.values.length ) || 1; 14627 14628 if ( existingHandles.length > handleCount ) { 14629 existingHandles.slice( handleCount ).remove(); 14630 existingHandles = existingHandles.slice( 0, handleCount ); 14631 } 14632 14633 for ( i = existingHandles.length; i < handleCount; i++ ) { 14634 handles.push( handle ); 14635 } 14636 14637 this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 14638 14639 this._addClass( this.handles, "ui-slider-handle", "ui-state-default" ); 14640 14641 this.handle = this.handles.eq( 0 ); 14642 14643 this.handles.each( function( i ) { 14644 $( this ) 14645 .data( "ui-slider-handle-index", i ) 14646 .attr( "tabIndex", 0 ); 14647 } ); 14648 }, 14649 14650 _createRange: function() { 14651 var options = this.options; 14652 14653 if ( options.range ) { 14654 if ( options.range === true ) { 14655 if ( !options.values ) { 14656 options.values = [ this._valueMin(), this._valueMin() ]; 14657 } else if ( options.values.length && options.values.length !== 2 ) { 14658 options.values = [ options.values[ 0 ], options.values[ 0 ] ]; 14659 } else if ( $.isArray( options.values ) ) { 14660 options.values = options.values.slice( 0 ); 14661 } 14662 } 14663 14664 if ( !this.range || !this.range.length ) { 14665 this.range = $( "<div>" ) 14666 .appendTo( this.element ); 14667 14668 this._addClass( this.range, "ui-slider-range" ); 14669 } else { 14670 this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" ); 14671 14672 // Handle range switching from true to min/max 14673 this.range.css( { 14674 "left": "", 14675 "bottom": "" 14676 } ); 14677 } 14678 if ( options.range === "min" || options.range === "max" ) { 14679 this._addClass( this.range, "ui-slider-range-" + options.range ); 14680 } 14681 } else { 14682 if ( this.range ) { 14683 this.range.remove(); 14684 } 14685 this.range = null; 14686 } 14687 }, 14688 14689 _setupEvents: function() { 14690 this._off( this.handles ); 14691 this._on( this.handles, this._handleEvents ); 14692 this._hoverable( this.handles ); 14693 this._focusable( this.handles ); 14694 }, 14695 14696 _destroy: function() { 14697 this.handles.remove(); 14698 if ( this.range ) { 14699 this.range.remove(); 14700 } 14701 14702 this._mouseDestroy(); 14703 }, 14704 14705 _mouseCapture: function( event ) { 14706 var position, normValue, distance, closestHandle, index, allowed, offset, mou
vendor: 15,762 bytes, lines 14706-15279
14706seOverHandle, 14707 that = this, 14708 o = this.options; 14709 14710 if ( o.disabled ) { 14711 return false; 14712 } 14713 14714 this.elementSize = { 14715 width: this.element.outerWidth(), 14716 height: this.element.outerHeight() 14717 }; 14718 this.elementOffset = this.element.offset(); 14719 14720 position = { x: event.pageX, y: event.pageY }; 14721 normValue = this._normValueFromMouse( position ); 14722 distance = this._valueMax() - this._valueMin() + 1; 14723 this.handles.each( function( i ) { 14724 var thisDistance = Math.abs( normValue - that.values( i ) ); 14725 if ( ( distance > thisDistance ) || 14726 ( distance === thisDistance && 14727 ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) { 14728 distance = thisDistance; 14729 closestHandle = $( this ); 14730 index = i; 14731 } 14732 } ); 14733 14734 allowed = this._start( event, index ); 14735 if ( allowed === false ) { 14736 return false; 14737 } 14738 this._mouseSliding = true; 14739 14740 this._handleIndex = index; 14741 14742 this._addClass( closestHandle, null, "ui-state-active" ); 14743 closestHandle.trigger( "focus" ); 14744 14745 offset = closestHandle.offset(); 14746 mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 14747 this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 14748 left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 14749 top: event.pageY - offset.top - 14750 ( closestHandle.height() / 2 ) - 14751 ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) - 14752 ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) + 14753 ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 ) 14754 }; 14755 14756 if ( !this.handles.hasClass( "ui-state-hover" ) ) { 14757 this._slide( event, index, normValue ); 14758 } 14759 this._animateOff = true; 14760 return true; 14761 }, 14762 14763 _mouseStart: function() { 14764 return true; 14765 }, 14766 14767 _mouseDrag: function( event ) { 14768 var position = { x: event.pageX, y: event.pageY }, 14769 normValue = this._normValueFromMouse( position ); 14770 14771 this._slide( event, this._handleIndex, normValue ); 14772 14773 return false; 14774 }, 14775 14776 _mouseStop: function( event ) { 14777 this._removeClass( this.handles, null, "ui-state-active" ); 14778 this._mouseSliding = false; 14779 14780 this._stop( event, this._handleIndex ); 14781 this._change( event, this._handleIndex ); 14782 14783 this._handleIndex = null; 14784 this._clickOffset = null; 14785 this._animateOff = false; 14786 14787 return false; 14788 }, 14789 14790 _detectOrientation: function() { 14791 this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 14792 }, 14793 14794 _normValueFromMouse: function( position ) { 14795 var pixelTotal, 14796 pixelMouse, 14797 percentMouse, 14798 valueTotal, 14799 valueMouse; 14800 14801 if ( this.orientation === "horizontal" ) { 14802 pixelTotal = this.elementSize.width; 14803 pixelMouse = position.x - this.elementOffset.left - 14804 ( this._clickOffset ? this._clickOffset.left : 0 ); 14805 } else { 14806 pixelTotal = this.elementSize.height; 14807 pixelMouse = position.y - this.elementOffset.top - 14808 ( this._clickOffset ? this._clickOffset.top : 0 ); 14809 } 14810 14811 percentMouse = ( pixelMouse / pixelTotal ); 14812 if ( percentMouse > 1 ) { 14813 percentMouse = 1; 14814 } 14815 if ( percentMouse < 0 ) { 14816 percentMouse = 0; 14817 } 14818 if ( this.orientation === "vertical" ) { 14819 percentMouse = 1 - percentMouse; 14820 } 14821 14822 valueTotal = this._valueMax() - this._valueMin(); 14823 valueMouse = this._valueMin() + percentMouse * valueTotal; 14824 14825 return this._trimAlignValue( valueMouse ); 14826 }, 14827 14828 _uiHash: function( index, value, values ) { 14829 var uiHash = { 14830 handle: this.handles[ index ], 14831 handleIndex: index, 14832 value: value !== undefined ? value : this.value() 14833 }; 14834 14835 if ( this._hasMultipleValues() ) { 14836 uiHash.value = value !== undefined ? value : this.values( index ); 14837 uiHash.values = values || this.values(); 14838 } 14839 14840 return uiHash; 14841 }, 14842 14843 _hasMultipleValues: function() { 14844 return this.options.values && this.options.values.length; 14845 }, 14846 14847 _start: function( event, index ) { 14848 return this._trigger( "start", event, this._uiHash( index ) ); 14849 }, 14850 14851 _slide: function( event, index, newVal ) { 14852 var allowed, otherVal, 14853 currentValue = this.value(), 14854 newValues = this.values(); 14855 14856 if ( this._hasMultipleValues() ) { 14857 otherVal = this.values( index ? 0 : 1 ); 14858 currentValue = this.values( index ); 14859 14860 if ( this.options.values.length === 2 && this.options.range === true ) { 14861 newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal ); 14862 } 14863 14864 newValues[ index ] = newVal; 14865 } 14866 14867 if ( newVal === currentValue ) { 14868 return; 14869 } 14870 14871 allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) ); 14872 14873 // A slide can be canceled by returning false from the slide callback 14874 if ( allowed === false ) { 14875 return; 14876 } 14877 14878 if ( this._hasMultipleValues() ) { 14879 this.values( index, newVal ); 14880 } else { 14881 this.value( newVal ); 14882 } 14883 }, 14884 14885 _stop: function( event, index ) { 14886 this._trigger( "stop", event, this._uiHash( index ) ); 14887 }, 14888 14889 _change: function( event, index ) { 14890 if ( !this._keySliding && !this._mouseSliding ) { 14891 14892 //store the last changed value index for reference when handles overlap 14893 this._lastChangedValue = index; 14894 this._trigger( "change", event, this._uiHash( index ) ); 14895 } 14896 }, 14897 14898 value: function( newValue ) { 14899 if ( arguments.length ) { 14900 this.options.value = this._trimAlignValue( newValue ); 14901 this._refreshValue(); 14902 this._change( null, 0 ); 14903 return; 14904 } 14905 14906 return this._value(); 14907 }, 14908 14909 values: function( index, newValue ) { 14910 var vals, 14911 newValues, 14912 i; 14913 14914 if ( arguments.length > 1 ) { 14915 this.options.values[ index ] = this._trimAlignValue( newValue ); 14916 this._refreshValue(); 14917 this._change( null, index ); 14918 return; 14919 } 14920 14921 if ( arguments.length ) { 14922 if ( $.isArray( arguments[ 0 ] ) ) { 14923 vals = this.options.values; 14924 newValues = arguments[ 0 ]; 14925 for ( i = 0; i < vals.length; i += 1 ) { 14926 vals[ i ] = this._trimAlignValue( newValues[ i ] ); 14927 this._change( null, i ); 14928 } 14929 this._refreshValue(); 14930 } else { 14931 if ( this._hasMultipleValues() ) { 14932 return this._values( index ); 14933 } else { 14934 return this.value(); 14935 } 14936 } 14937 } else { 14938 return this._values(); 14939 } 14940 }, 14941 14942 _setOption: function( key, value ) { 14943 var i, 14944 valsLength = 0; 14945 14946 if ( key === "range" && this.options.range === true ) { 14947 if ( value === "min" ) { 14948 this.options.value = this._values( 0 ); 14949 this.options.values = null; 14950 } else if ( value === "max" ) { 14951 this.options.value = this._values( this.options.values.length - 1 ); 14952 this.options.values = null; 14953 } 14954 } 14955 14956 if ( $.isArray( this.options.values ) ) { 14957 valsLength = this.options.values.length; 14958 } 14959 14960 this._super( key, value ); 14961 14962 switch ( key ) { 14963 case "orientation": 14964 this._detectOrientation(); 14965 this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) 14966 ._addClass( "ui-slider-" + this.orientation ); 14967 this._refreshValue(); 14968 if ( this.options.range ) { 14969 this._refreshRange( value ); 14970 } 14971 14972 // Reset positioning from previous orientation 14973 this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 14974 break; 14975 case "value": 14976 this._animateOff = true; 14977 this._refreshValue(); 14978 this._change( null, 0 ); 14979 this._animateOff = false; 14980 break; 14981 case "values": 14982 this._animateOff = true; 14983 this._refreshValue(); 14984 14985 // Start from the last handle to prevent unreachable handles (#9046) 14986 for ( i = valsLength - 1; i >= 0; i-- ) { 14987 this._change( null, i ); 14988 } 14989 this._animateOff = false; 14990 break; 14991 case "step": 14992 case "min": 14993 case "max": 14994 this._animateOff = true; 14995 this._calculateNewMax(); 14996 this._refreshValue(); 14997 this._animateOff = false; 14998 break; 14999 case "range": 15000 this._animateOff = true; 15001 this._refresh(); 15002 this._animateOff = false; 15003 break; 15004 } 15005 }, 15006 15007 _setOptionDisabled: function( value ) { 15008 this._super( value ); 15009 15010 this._toggleClass( null, "ui-state-disabled", !!value ); 15011 }, 15012 15013 //internal value getter 15014 // _value() returns value trimmed by min and max, aligned by step 15015 _value: function() { 15016 var val = this.options.value; 15017 val = this._trimAlignValue( val ); 15018 15019 return val; 15020 }, 15021 15022 //internal values getter 15023 // _values() returns array of values trimmed by min and max, aligned by step 15024 // _values( index ) returns single value trimmed by min and max, aligned by step 15025 _values: function( index ) { 15026 var val, 15027 vals, 15028 i; 15029 15030 if ( arguments.length ) { 15031 val = this.options.values[ index ]; 15032 val = this._trimAlignValue( val ); 15033 15034 return val; 15035 } else if ( this._hasMultipleValues() ) { 15036 15037 // .slice() creates a copy of the array 15038 // this copy gets trimmed by min and max and then returned 15039 vals = this.options.values.slice(); 15040 for ( i = 0; i < vals.length; i += 1 ) { 15041 vals[ i ] = this._trimAlignValue( vals[ i ] ); 15042 } 15043 15044 return vals; 15045 } else { 15046 return []; 15047 } 15048 }, 15049 15050 // Returns the step-aligned value that val is closest to, between (inclusive) min and max 15051 _trimAlignValue: function( val ) { 15052 if ( val <= this._valueMin() ) { 15053 return this._valueMin(); 15054 } 15055 if ( val >= this._valueMax() ) { 15056 return this._valueMax(); 15057 } 15058 var step = ( this.options.step > 0 ) ? this.options.step : 1, 15059 valModStep = ( val - this._valueMin() ) % step, 15060 alignValue = val - valModStep; 15061 15062 if ( Math.abs( valModStep ) * 2 >= step ) { 15063 alignValue += ( valModStep > 0 ) ? step : ( -step ); 15064 } 15065 15066 // Since JavaScript has problems with large floats, round 15067 // the final value to 5 digits after the decimal point (see #4124) 15068 return parseFloat( alignValue.toFixed( 5 ) ); 15069 }, 15070 15071 _calculateNewMax: function() { 15072 var max = this.options.max, 15073 min = this._valueMin(), 15074 step = this.options.step, 15075 aboveMin = Math.round( ( max - min ) / step ) * step; 15076 max = aboveMin + min; 15077 if ( max > this.options.max ) { 15078 15079 //If max is not divisible by step, rounding off may increase its value 15080 max -= step; 15081 } 15082 this.max = parseFloat( max.toFixed( this._precision() ) ); 15083 }, 15084 15085 _precision: function() { 15086 var precision = this._precisionOf( this.options.step ); 15087 if ( this.options.min !== null ) { 15088 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 15089 } 15090 return precision; 15091 }, 15092 15093 _precisionOf: function( num ) { 15094 var str = num.toString(), 15095 decimal = str.indexOf( "." ); 15096 return decimal === -1 ? 0 : str.length - decimal - 1; 15097 }, 15098 15099 _valueMin: function() { 15100 return this.options.min; 15101 }, 15102 15103 _valueMax: function() { 15104 return this.max; 15105 }, 15106 15107 _refreshRange: function( orientation ) { 15108 if ( orientation === "vertical" ) { 15109 this.range.css( { "width": "", "left": "" } ); 15110 } 15111 if ( orientation === "horizontal" ) { 15112 this.range.css( { "height": "", "bottom": "" } ); 15113 } 15114 }, 15115 15116 _refreshValue: function() { 15117 var lastValPercent, valPercent, value, valueMin, valueMax, 15118 oRange = this.options.range, 15119 o = this.options, 15120 that = this, 15121 animate = ( !this._animateOff ) ? o.animate : false, 15122 _set = {}; 15123 15124 if ( this._hasMultipleValues() ) { 15125 this.handles.each( function( i ) { 15126 valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - 15127 that._valueMin() ) * 100; 15128 _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 15129 $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 15130 if ( that.options.range === true ) { 15131 if ( that.orientation === "horizontal" ) { 15132 if ( i === 0 ) { 15133 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15134 left: valPercent + "%" 15135 }, o.animate ); 15136 } 15137 if ( i === 1 ) { 15138 that.range[ animate ? "animate" : "css" ]( { 15139 width: ( valPercent - lastValPercent ) + "%" 15140 }, { 15141 queue: false, 15142 duration: o.animate 15143 } ); 15144 } 15145 } else { 15146 if ( i === 0 ) { 15147 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15148 bottom: ( valPercent ) + "%" 15149 }, o.animate ); 15150 } 15151 if ( i === 1 ) { 15152 that.range[ animate ? "animate" : "css" ]( { 15153 height: ( valPercent - lastValPercent ) + "%" 15154 }, { 15155 queue: false, 15156 duration: o.animate 15157 } ); 15158 } 15159 } 15160 } 15161 lastValPercent = valPercent; 15162 } ); 15163 } else { 15164 value = this.value(); 15165 valueMin = this._valueMin(); 15166 valueMax = this._valueMax(); 15167 valPercent = ( valueMax !== valueMin ) ? 15168 ( value - valueMin ) / ( valueMax - valueMin ) * 100 : 15169 0; 15170 _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 15171 this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 15172 15173 if ( oRange === "min" && this.orientation === "horizontal" ) { 15174 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15175 width: valPercent + "%" 15176 }, o.animate ); 15177 } 15178 if ( oRange === "max" && this.orientation === "horizontal" ) { 15179 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15180 width: ( 100 - valPercent ) + "%" 15181 }, o.animate ); 15182 } 15183 if ( oRange === "min" && this.orientation === "vertical" ) { 15184 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15185 height: valPercent + "%" 15186 }, o.animate ); 15187 } 15188 if ( oRange === "max" && this.orientation === "vertical" ) { 15189 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15190 height: ( 100 - valPercent ) + "%" 15191 }, o.animate ); 15192 } 15193 } 15194 }, 15195 15196 _handleEvents: { 15197 keydown: function( event ) { 15198 var allowed, curVal, newVal, step, 15199 index = $( event.target ).data( "ui-slider-handle-index" ); 15200 15201 switch ( event.keyCode ) { 15202 case $.ui.keyCode.HOME: 15203 case $.ui.keyCode.END: 15204 case $.ui.keyCode.PAGE_UP: 15205 case $.ui.keyCode.PAGE_DOWN: 15206 case $.ui.keyCode.UP: 15207 case $.ui.keyCode.RIGHT: 15208 case $.ui.keyCode.DOWN: 15209 case $.ui.keyCode.LEFT: 15210 event.preventDefault(); 15211 if ( !this._keySliding ) { 15212 this._keySliding = true; 15213 this._addClass( $( event.target ), null, "ui-state-active" ); 15214 allowed = this._start( event, index ); 15215 if ( allowed === false ) { 15216 return; 15217 } 15218 } 15219 break; 15220 } 15221 15222 step = this.options.step; 15223 if ( this._hasMultipleValues() ) { 15224 curVal = newVal = this.values( index ); 15225 } else { 15226 curVal = newVal = this.value(); 15227 } 15228 15229 switch ( event.keyCode ) { 15230 case $.ui.keyCode.HOME: 15231 newVal = this._valueMin(); 15232 break; 15233 case $.ui.keyCode.END: 15234 newVal = this._valueMax(); 15235 break; 15236 case $.ui.keyCode.PAGE_UP: 15237 newVal = this._trimAlignValue( 15238 curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 15239 ); 15240 break; 15241 case $.ui.keyCode.PAGE_DOWN: 15242 newVal = this._trimAlignValue( 15243 curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) ); 15244 break; 15245 case $.ui.keyCode.UP: 15246 case $.ui.keyCode.RIGHT: 15247 if ( curVal === this._valueMax() ) { 15248 return; 15249 } 15250 newVal = this._trimAlignValue( curVal + step ); 15251 break; 15252 case $.ui.keyCode.DOWN: 15253 case $.ui.keyCode.LEFT: 15254 if ( curVal === this._valueMin() ) { 15255 return; 15256 } 15257 newVal = this._trimAlignValue( curVal - step ); 15258 break; 15259 } 15260 15261 this._slide( event, index, newVal ); 15262 }, 15263 keyup: function( event ) { 15264 var index = $( event.target ).data( "ui-slider-handle-index" ); 15265 15266 if ( this._keySliding ) { 15267 this._keySliding = false; 15268 this._stop( event, index ); 15269 this._change( event, index ); 15270 this._removeClass( $( event.target ), null, "ui-state-active" ); 15271 } 15272 } 15273 } 15274} ); 15275 15276 15277/*! 15278 * jQuery UI Sortable 1.12.1 15279 * http://jqueryui.com
vendor: 35,818 bytes, lines 15280-16467
15280 * 15281 * Copyright jQuery Foundation and other contributors 15282 * Released under the MIT license. 15283 * http://jquery.org/license 15284 */ 15285 15286//>>label: Sortable 15287//>>group: Interactions 15288//>>description: Enables items in a list to be sorted using the mouse. 15289//>>docs: http://api.jqueryui.com/sortable/ 15290//>>demos: http://jqueryui.com/sortable/ 15291//>>css.structure: ../../themes/base/sortable.css 15292 15293 15294 15295var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { 15296 version: "1.12.1", 15297 widgetEventPrefix: "sort", 15298 ready: false, 15299 options: { 15300 appendTo: "parent", 15301 axis: false, 15302 connectWith: false, 15303 containment: false, 15304 cursor: "auto", 15305 cursorAt: false, 15306 dropOnEmpty: true, 15307 forcePlaceholderSize: false, 15308 forceHelperSize: false, 15309 grid: false, 15310 handle: false, 15311 helper: "original", 15312 items: "> *", 15313 opacity: false, 15314 placeholder: false, 15315 revert: false, 15316 scroll: true, 15317 scrollSensitivity: 20, 15318 scrollSpeed: 20, 15319 scope: "default", 15320 tolerance: "intersect", 15321 zIndex: 1000, 15322 15323 // Callbacks 15324 activate: null, 15325 beforeStop: null, 15326 change: null, 15327 deactivate: null, 15328 out: null, 15329 over: null, 15330 receive: null, 15331 remove: null, 15332 sort: null, 15333 start: null, 15334 stop: null, 15335 update: null 15336 }, 15337 15338 _isOverAxis: function( x, reference, size ) { 15339 return ( x >= reference ) && ( x < ( reference + size ) ); 15340 }, 15341 15342 _isFloating: function( item ) { 15343 return ( /left|right/ ).test( item.css( "float" ) ) || 15344 ( /inline|table-cell/ ).test( item.css( "display" ) ); 15345 }, 15346 15347 _create: function() { 15348 this.containerCache = {}; 15349 this._addClass( "ui-sortable" ); 15350 15351 //Get the items 15352 this.refresh(); 15353 15354 //Let's determine the parent's offset 15355 this.offset = this.element.offset(); 15356 15357 //Initialize mouse events for interaction 15358 this._mouseInit(); 15359 15360 this._setHandleClassName(); 15361 15362 //We're ready to go 15363 this.ready = true; 15364 15365 }, 15366 15367 _setOption: function( key, value ) { 15368 this._super( key, value ); 15369 15370 if ( key === "handle" ) { 15371 this._setHandleClassName(); 15372 } 15373 }, 15374 15375 _setHandleClassName: function() { 15376 var that = this; 15377 this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" ); 15378 $.each( this.items, function() { 15379 that._addClass( 15380 this.instance.options.handle ? 15381 this.item.find( this.instance.options.handle ) : 15382 this.item, 15383 "ui-sortable-handle" 15384 ); 15385 } ); 15386 }, 15387 15388 _destroy: function() { 15389 this._mouseDestroy(); 15390 15391 for ( var i = this.items.length - 1; i >= 0; i-- ) { 15392 this.items[ i ].item.removeData( this.widgetName + "-item" ); 15393 } 15394 15395 return this; 15396 }, 15397 15398 _mouseCapture: function( event, overrideHandle ) { 15399 var currentItem = null, 15400 validHandle = false, 15401 that = this; 15402 15403 if ( this.reverting ) { 15404 return false; 15405 } 15406 15407 if ( this.options.disabled || this.options.type === "static" ) { 15408 return false; 15409 } 15410 15411 //We have to refresh the items data once first 15412 this._refreshItems( event ); 15413 15414 //Find out if the clicked node (or one of its parents) is a actual item in this.items 15415 $( event.target ).parents().each( function() { 15416 if ( $.data( this, that.widgetName + "-item" ) === that ) { 15417 currentItem = $( this ); 15418 return false; 15419 } 15420 } ); 15421 if ( $.data( event.target, that.widgetName + "-item" ) === that ) { 15422 currentItem = $( event.target ); 15423 } 15424 15425 if ( !currentItem ) { 15426 return false; 15427 } 15428 if ( this.options.handle && !overrideHandle ) { 15429 $( this.options.handle, currentItem ).find( "*" ).addBack().each( function() { 15430 if ( this === event.target ) { 15431 validHandle = true; 15432 } 15433 } ); 15434 if ( !validHandle ) { 15435 return false; 15436 } 15437 } 15438 15439 this.currentItem = currentItem; 15440 this._removeCurrentsFromItems(); 15441 return true; 15442 15443 }, 15444 15445 _mouseStart: function( event, overrideHandle, noActivation ) { 15446 15447 var i, body, 15448 o = this.options; 15449 15450 this.currentContainer = this; 15451 15452 //We only need to call refreshPositions, because the refreshItems call has been moved to 15453 // mouseCapture 15454 this.refreshPositions(); 15455 15456 //Create and append the visible helper 15457 this.helper = this._createHelper( event ); 15458 15459 //Cache the helper size 15460 this._cacheHelperProportions(); 15461 15462 /* 15463 * - Position generation - 15464 * This block generates everything position related - it's the core of draggables. 15465 */ 15466 15467 //Cache the margins of the original element 15468 this._cacheMargins(); 15469 15470 //Get the next scrolling parent 15471 this.scrollParent = this.helper.scrollParent(); 15472 15473 //The element's absolute position on the page minus margins 15474 this.offset = this.currentItem.offset(); 15475 this.offset = { 15476 top: this.offset.top - this.margins.top, 15477 left: this.offset.left - this.margins.left 15478 }; 15479 15480 $.extend( this.offset, { 15481 click: { //Where the click happened, relative to the element 15482 left: event.pageX - this.offset.left, 15483 top: event.pageY - this.offset.top 15484 }, 15485 parent: this._getParentOffset(), 15486 15487 // This is a relative to absolute position minus the actual position calculation - 15488 // only used for relative positioned helper 15489 relative: this._getRelativeOffset() 15490 } ); 15491 15492 // Only after we got the offset, we can change the helper's position to absolute 15493 // TODO: Still need to figure out a way to make relative sorting possible 15494 this.helper.css( "position", "absolute" ); 15495 this.cssPosition = this.helper.css( "position" ); 15496 15497 //Generate the original position 15498 this.originalPosition = this._generatePosition( event ); 15499 this.originalPageX = event.pageX; 15500 this.originalPageY = event.pageY; 15501 15502 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 15503 ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); 15504 15505 //Cache the former DOM position 15506 this.domPosition = { 15507 prev: this.currentItem.prev()[ 0 ], 15508 parent: this.currentItem.parent()[ 0 ] 15509 }; 15510 15511 // If the helper is not the original, hide the original so it's not playing any role during 15512 // the drag, won't cause anything bad this way 15513 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 15514 this.currentItem.hide(); 15515 } 15516 15517 //Create the placeholder 15518 this._createPlaceholder(); 15519 15520 //Set a containment if given in the options 15521 if ( o.containment ) { 15522 this._setContainment(); 15523 } 15524 15525 if ( o.cursor && o.cursor !== "auto" ) { // cursor option 15526 body = this.document.find( "body" ); 15527 15528 // Support: IE 15529 this.storedCursor = body.css( "cursor" ); 15530 body.css( "cursor", o.cursor ); 15531 15532 this.storedStylesheet = 15533 $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body ); 15534 } 15535 15536 if ( o.opacity ) { // opacity option 15537 if ( this.helper.css( "opacity" ) ) { 15538 this._storedOpacity = this.helper.css( "opacity" ); 15539 } 15540 this.helper.css( "opacity", o.opacity ); 15541 } 15542 15543 if ( o.zIndex ) { // zIndex option 15544 if ( this.helper.css( "zIndex" ) ) { 15545 this._storedZIndex = this.helper.css( "zIndex" ); 15546 } 15547 this.helper.css( "zIndex", o.zIndex ); 15548 } 15549 15550 //Prepare scrolling 15551 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 15552 this.scrollParent[ 0 ].tagName !== "HTML" ) { 15553 this.overflowOffset = this.scrollParent.offset(); 15554 } 15555 15556 //Call callbacks 15557 this._trigger( "start", event, this._uiHash() ); 15558 15559 //Recache the helper size 15560 if ( !this._preserveHelperProportions ) { 15561 this._cacheHelperProportions(); 15562 } 15563 15564 //Post "activate" events to possible containers 15565 if ( !noActivation ) { 15566 for ( i = this.containers.length - 1; i >= 0; i-- ) { 15567 this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); 15568 } 15569 } 15570 15571 //Prepare possible droppables 15572 if ( $.ui.ddmanager ) { 15573 $.ui.ddmanager.current = this; 15574 } 15575 15576 if ( $.ui.ddmanager && !o.dropBehaviour ) { 15577 $.ui.ddmanager.prepareOffsets( this, event ); 15578 } 15579 15580 this.dragging = true; 15581 15582 this._addClass( this.helper, "ui-sortable-helper" ); 15583 15584 // Execute the drag once - this causes the helper not to be visiblebefore getting its 15585 // correct position 15586 this._mouseDrag( event ); 15587 return true; 15588 15589 }, 15590 15591 _mouseDrag: function( event ) { 15592 var i, item, itemElement, intersection, 15593 o = this.options, 15594 scrolled = false; 15595 15596 //Compute the helpers position 15597 this.position = this._generatePosition( event ); 15598 this.positionAbs = this._convertPositionTo( "absolute" ); 15599 15600 if ( !this.lastPositionAbs ) { 15601 this.lastPositionAbs = this.positionAbs; 15602 } 15603 15604 //Do scrolling 15605 if ( this.options.scroll ) { 15606 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 15607 this.scrollParent[ 0 ].tagName !== "HTML" ) { 15608 15609 if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - 15610 event.pageY < o.scrollSensitivity ) { 15611 this.scrollParent[ 0 ].scrollTop = 15612 scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; 15613 } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { 15614 this.scrollParent[ 0 ].scrollTop = 15615 scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; 15616 } 15617 15618 if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - 15619 event.pageX < o.scrollSensitivity ) { 15620 this.scrollParent[ 0 ].scrollLeft = scrolled = 15621 this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; 15622 } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { 15623 this.scrollParent[ 0 ].scrollLeft = scrolled = 15624 this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; 15625 } 15626 15627 } else { 15628 15629 if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { 15630 scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); 15631 } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < 15632 o.scrollSensitivity ) { 15633 scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); 15634 } 15635 15636 if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { 15637 scrolled = this.document.scrollLeft( 15638 this.document.scrollLeft() - o.scrollSpeed 15639 ); 15640 } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < 15641 o.scrollSensitivity ) { 15642 scrolled = this.document.scrollLeft( 15643 this.document.scrollLeft() + o.scrollSpeed 15644 ); 15645 } 15646 15647 } 15648 15649 if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { 15650 $.ui.ddmanager.prepareOffsets( this, event ); 15651 } 15652 } 15653 15654 //Regenerate the absolute position used for position checks 15655 this.positionAbs = this._convertPositionTo( "absolute" ); 15656 15657 //Set the helper position 15658 if ( !this.options.axis || this.options.axis !== "y" ) { 15659 this.helper[ 0 ].style.left = this.position.left + "px"; 15660 } 15661 if ( !this.options.axis || this.options.axis !== "x" ) { 15662 this.helper[ 0 ].style.top = this.position.top + "px"; 15663 } 15664 15665 //Rearrange 15666 for ( i = this.items.length - 1; i >= 0; i-- ) { 15667 15668 //Cache variables and intersection, continue if no intersection 15669 item = this.items[ i ]; 15670 itemElement = item.item[ 0 ]; 15671 intersection = this._intersectsWithPointer( item ); 15672 if ( !intersection ) { 15673 continue; 15674 } 15675 15676 // Only put the placeholder inside the current Container, skip all 15677 // items from other containers. This works because when moving 15678 // an item from one container to another the 15679 // currentContainer is switched before the placeholder is moved. 15680 // 15681 // Without this, moving items in "sub-sortables" can cause 15682 // the placeholder to jitter between the outer and inner container. 15683 if ( item.instance !== this.currentContainer ) { 15684 continue; 15685 } 15686 15687 // Cannot intersect with itself 15688 // no useless actions that have been done before 15689 // no action if the item moved is the parent of the item checked 15690 if ( itemElement !== this.currentItem[ 0 ] && 15691 this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement && 15692 !$.contains( this.placeholder[ 0 ], itemElement ) && 15693 ( this.options.type === "semi-dynamic" ? 15694 !$.contains( this.element[ 0 ], itemElement ) : 15695 true 15696 ) 15697 ) { 15698 15699 this.direction = intersection === 1 ? "down" : "up"; 15700 15701 if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) { 15702 this._rearrange( event, item ); 15703 } else { 15704 break; 15705 } 15706 15707 this._trigger( "change", event, this._uiHash() ); 15708 break; 15709 } 15710 } 15711 15712 //Post events to containers 15713 this._contactContainers( event ); 15714 15715 //Interconnect with droppables 15716 if ( $.ui.ddmanager ) { 15717 $.ui.ddmanager.drag( this, event ); 15718 } 15719 15720 //Call callbacks 15721 this._trigger( "sort", event, this._uiHash() ); 15722 15723 this.lastPositionAbs = this.positionAbs; 15724 return false; 15725 15726 }, 15727 15728 _mouseStop: function( event, noPropagation ) { 15729 15730 if ( !event ) { 15731 return; 15732 } 15733 15734 //If we are using droppables, inform the manager about the drop 15735 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 15736 $.ui.ddmanager.drop( this, event ); 15737 } 15738 15739 if ( this.options.revert ) { 15740 var that = this, 15741 cur = this.placeholder.offset(), 15742 axis = this.options.axis, 15743 animation = {}; 15744 15745 if ( !axis || axis === "x" ) { 15746 animation.left = cur.left - this.offset.parent.left - this.margins.left + 15747 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 15748 0 : 15749 this.offsetParent[ 0 ].scrollLeft 15750 ); 15751 } 15752 if ( !axis || axis === "y" ) { 15753 animation.top = cur.top - this.offset.parent.top - this.margins.top + 15754 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 15755 0 : 15756 this.offsetParent[ 0 ].scrollTop 15757 ); 15758 } 15759 this.reverting = true; 15760 $( this.helper ).animate( 15761 animation, 15762 parseInt( this.options.revert, 10 ) || 500, 15763 function() { 15764 that._clear( event ); 15765 } 15766 ); 15767 } else { 15768 this._clear( event, noPropagation ); 15769 } 15770 15771 return false; 15772 15773 }, 15774 15775 cancel: function() { 15776 15777 if ( this.dragging ) { 15778 15779 this._mouseUp( new $.Event( "mouseup", { target: null } ) ); 15780 15781 if ( this.options.helper === "original" ) { 15782 this.currentItem.css( this._storedCSS ); 15783 this._removeClass( this.currentItem, "ui-sortable-helper" ); 15784 } else { 15785 this.currentItem.show(); 15786 } 15787 15788 //Post deactivating events to containers 15789 for ( var i = this.containers.length - 1; i >= 0; i-- ) { 15790 this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) ); 15791 if ( this.containers[ i ].containerCache.over ) { 15792 this.containers[ i ]._trigger( "out", null, this._uiHash( this ) ); 15793 this.containers[ i ].containerCache.over = 0; 15794 } 15795 } 15796 15797 } 15798 15799 if ( this.placeholder ) { 15800 15801 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 15802 // it unbinds ALL events from the original node! 15803 if ( this.placeholder[ 0 ].parentNode ) { 15804 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 15805 } 15806 if ( this.options.helper !== "original" && this.helper && 15807 this.helper[ 0 ].parentNode ) { 15808 this.helper.remove(); 15809 } 15810 15811 $.extend( this, { 15812 helper: null, 15813 dragging: false, 15814 reverting: false, 15815 _noFinalSort: null 15816 } ); 15817 15818 if ( this.domPosition.prev ) { 15819 $( this.domPosition.prev ).after( this.currentItem ); 15820 } else { 15821 $( this.domPosition.parent ).prepend( this.currentItem ); 15822 } 15823 } 15824 15825 return this; 15826 15827 }, 15828 15829 serialize: function( o ) { 15830 15831 var items = this._getItemsAsjQuery( o && o.connected ), 15832 str = []; 15833 o = o || {}; 15834 15835 $( items ).each( function() { 15836 var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" ) 15837 .match( o.expression || ( /(.+)[\-=_](.+)/ ) ); 15838 if ( res ) { 15839 str.push( 15840 ( o.key || res[ 1 ] + "[]" ) + 15841 "=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) ); 15842 } 15843 } ); 15844 15845 if ( !str.length && o.key ) { 15846 str.push( o.key + "=" ); 15847 } 15848 15849 return str.join( "&" ); 15850 15851 }, 15852 15853 toArray: function( o ) { 15854 15855 var items = this._getItemsAsjQuery( o && o.connected ), 15856 ret = []; 15857 15858 o = o || {}; 15859 15860 items.each( function() { 15861 ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" ); 15862 } ); 15863 return ret; 15864 15865 }, 15866 15867 /* Be careful with the following core functions */ 15868 _intersectsWith: function( item ) { 15869 15870 var x1 = this.positionAbs.left, 15871 x2 = x1 + this.helperProportions.width, 15872 y1 = this.positionAbs.top, 15873 y2 = y1 + this.helperProportions.height, 15874 l = item.left, 15875 r = l + item.width, 15876 t = item.top, 15877 b = t + item.height, 15878 dyClick = this.offset.click.top, 15879 dxClick = this.offset.click.left, 15880 isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && 15881 ( y1 + dyClick ) < b ), 15882 isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && 15883 ( x1 + dxClick ) < r ), 15884 isOverElement = isOverElementHeight && isOverElementWidth; 15885 15886 if ( this.options.tolerance === "pointer" || 15887 this.options.forcePointerForContainers || 15888 ( this.options.tolerance !== "pointer" && 15889 this.helperProportions[ this.floating ? "width" : "height" ] > 15890 item[ this.floating ? "width" : "height" ] ) 15891 ) { 15892 return isOverElement; 15893 } else { 15894 15895 return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half 15896 x2 - ( this.helperProportions.width / 2 ) < r && // Left Half 15897 t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half 15898 y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half 15899 15900 } 15901 }, 15902 15903 _intersectsWithPointer: function( item ) { 15904 var verticalDirection, horizontalDirection, 15905 isOverElementHeight = ( this.options.axis === "x" ) || 15906 this._isOverAxis( 15907 this.positionAbs.top + this.offset.click.top, item.top, item.height ), 15908 isOverElementWidth = ( this.options.axis === "y" ) || 15909 this._isOverAxis( 15910 this.positionAbs.left + this.offset.click.left, item.left, item.width ), 15911 isOverElement = isOverElementHeight && isOverElementWidth; 15912 15913 if ( !isOverElement ) { 15914 return false; 15915 } 15916 15917 verticalDirection = this._getDragVerticalDirection(); 15918 horizontalDirection = this._getDragHorizontalDirection(); 15919 15920 return this.floating ? 15921 ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) 15922 : ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) ); 15923 15924 }, 15925 15926 _intersectsWithSides: function( item ) { 15927 15928 var isOverBottomHalf = this._isOverAxis( this.positionAbs.top + 15929 this.offset.click.top, item.top + ( item.height / 2 ), item.height ), 15930 isOverRightHalf = this._isOverAxis( this.positionAbs.left + 15931 this.offset.click.left, item.left + ( item.width / 2 ), item.width ), 15932 verticalDirection = this._getDragVerticalDirection(), 15933 horizontalDirection = this._getDragHorizontalDirection(); 15934 15935 if ( this.floating && horizontalDirection ) { 15936 return ( ( horizontalDirection === "right" && isOverRightHalf ) || 15937 ( horizontalDirection === "left" && !isOverRightHalf ) ); 15938 } else { 15939 return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) || 15940 ( verticalDirection === "up" && !isOverBottomHalf ) ); 15941 } 15942 15943 }, 15944 15945 _getDragVerticalDirection: function() { 15946 var delta = this.positionAbs.top - this.lastPositionAbs.top; 15947 return delta !== 0 && ( delta > 0 ? "down" : "up" ); 15948 }, 15949 15950 _getDragHorizontalDirection: function() { 15951 var delta = this.positionAbs.left - this.lastPositionAbs.left; 15952 return delta !== 0 && ( delta > 0 ? "right" : "left" ); 15953 }, 15954 15955 refresh: function( event ) { 15956 this._refreshItems( event ); 15957 this._setHandleClassName(); 15958 this.refreshPositions(); 15959 return this; 15960 }, 15961 15962 _connectWith: function() { 15963 var options = this.options; 15964 return options.connectWith.constructor === String ? 15965 [ options.connectWith ] : 15966 options.connectWith; 15967 }, 15968 15969 _getItemsAsjQuery: function( connected ) { 15970 15971 var i, j, cur, inst, 15972 items = [], 15973 queries = [], 15974 connectWith = this._connectWith(); 15975 15976 if ( connectWith && connected ) { 15977 for ( i = connectWith.length - 1; i >= 0; i-- ) { 15978 cur = $( connectWith[ i ], this.document[ 0 ] ); 15979 for ( j = cur.length - 1; j >= 0; j-- ) { 15980 inst = $.data( cur[ j ], this.widgetFullName ); 15981 if ( inst && inst !== this && !inst.options.disabled ) { 15982 queries.push( [ $.isFunction( inst.options.items ) ? 15983 inst.options.items.call( inst.element ) : 15984 $( inst.options.items, inst.element ) 15985 .not( ".ui-sortable-helper" ) 15986 .not( ".ui-sortable-placeholder" ), inst ] ); 15987 } 15988 } 15989 } 15990 } 15991 15992 queries.push( [ $.isFunction( this.options.items ) ? 15993 this.options.items 15994 .call( this.element, null, { options: this.options, item: this.currentItem } ) : 15995 $( this.options.items, this.element ) 15996 .not( ".ui-sortable-helper" ) 15997 .not( ".ui-sortable-placeholder" ), this ] ); 15998 15999 function addItems() { 16000 items.push( this ); 16001 } 16002 for ( i = queries.length - 1; i >= 0; i-- ) { 16003 queries[ i ][ 0 ].each( addItems ); 16004 } 16005 16006 return $( items ); 16007 16008 }, 16009 16010 _removeCurrentsFromItems: function() { 16011 16012 var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" ); 16013 16014 this.items = $.grep( this.items, function( item ) { 16015 for ( var j = 0; j < list.length; j++ ) { 16016 if ( list[ j ] === item.item[ 0 ] ) { 16017 return false; 16018 } 16019 } 16020 return true; 16021 } ); 16022 16023 }, 16024 16025 _refreshItems: function( event ) { 16026 16027 this.items = []; 16028 this.containers = [ this ]; 16029 16030 var i, j, cur, inst, targetData, _queries, item, queriesLength, 16031 items = this.items, 16032 queries = [ [ $.isFunction( this.options.items ) ? 16033 this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) : 16034 $( this.options.items, this.element ), this ] ], 16035 connectWith = this._connectWith(); 16036 16037 //Shouldn't be run the first time through due to massive slow-down 16038 if ( connectWith && this.ready ) { 16039 for ( i = connectWith.length - 1; i >= 0; i-- ) { 16040 cur = $( connectWith[ i ], this.document[ 0 ] ); 16041 for ( j = cur.length - 1; j >= 0; j-- ) { 16042 inst = $.data( cur[ j ], this.widgetFullName ); 16043 if ( inst && inst !== this && !inst.options.disabled ) { 16044 queries.push( [ $.isFunction( inst.options.items ) ? 16045 inst.options.items 16046 .call( inst.element[ 0 ], event, { item: this.currentItem } ) : 16047 $( inst.options.items, inst.element ), inst ] ); 16048 this.containers.push( inst ); 16049 } 16050 } 16051 } 16052 } 16053 16054 for ( i = queries.length - 1; i >= 0; i-- ) { 16055 targetData = queries[ i ][ 1 ]; 16056 _queries = queries[ i ][ 0 ]; 16057 16058 for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) { 16059 item = $( _queries[ j ] ); 16060 16061 // Data for target checking (mouse manager) 16062 item.data( this.widgetName + "-item", targetData ); 16063 16064 items.push( { 16065 item: item, 16066 instance: targetData, 16067 width: 0, height: 0, 16068 left: 0, top: 0 16069 } ); 16070 } 16071 } 16072 16073 }, 16074 16075 refreshPositions: function( fast ) { 16076 16077 // Determine whether items are being displayed horizontally 16078 this.floating = this.items.length ? 16079 this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : 16080 false; 16081 16082 //This has to be redone because due to the item being moved out/into the offsetParent, 16083 // the offsetParent's position will change 16084 if ( this.offsetParent && this.helper ) { 16085 this.offset.parent = this._getParentOffset(); 16086 } 16087 16088 var i, item, t, p; 16089 16090 for ( i = this.items.length - 1; i >= 0; i-- ) { 16091 item = this.items[ i ]; 16092 16093 //We ignore calculating positions of all connected containers when we're not over them 16094 if ( item.instance !== this.currentContainer && this.currentContainer && 16095 item.item[ 0 ] !== this.currentItem[ 0 ] ) { 16096 continue; 16097 } 16098 16099 t = this.options.toleranceElement ? 16100 $( this.options.toleranceElement, item.item ) : 16101 item.item; 16102 16103 if ( !fast ) { 16104 item.width = t.outerWidth(); 16105 item.height = t.outerHeight(); 16106 } 16107 16108 p = t.offset(); 16109 item.left = p.left; 16110 item.top = p.top; 16111 } 16112 16113 if ( this.options.custom && this.options.custom.refreshContainers ) { 16114 this.options.custom.refreshContainers.call( this ); 16115 } else { 16116 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16117 p = this.containers[ i ].element.offset(); 16118 this.containers[ i ].containerCache.left = p.left; 16119 this.containers[ i ].containerCache.top = p.top; 16120 this.containers[ i ].containerCache.width = 16121 this.containers[ i ].element.outerWidth(); 16122 this.containers[ i ].containerCache.height = 16123 this.containers[ i ].element.outerHeight(); 16124 } 16125 } 16126 16127 return this; 16128 }, 16129 16130 _createPlaceholder: function( that ) { 16131 that = that || this; 16132 var className, 16133 o = that.options; 16134 16135 if ( !o.placeholder || o.placeholder.constructor === String ) { 16136 className = o.placeholder; 16137 o.placeholder = { 16138 element: function() { 16139 16140 var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(), 16141 element = $( "<" + nodeName + ">", that.document[ 0 ] ); 16142 16143 that._addClass( element, "ui-sortable-placeholder", 16144 className || that.currentItem[ 0 ].className ) 16145 ._removeClass( element, "ui-sortable-helper" ); 16146 16147 if ( nodeName === "tbody" ) { 16148 that._createTrPlaceholder( 16149 that.currentItem.find( "tr" ).eq( 0 ), 16150 $( "<tr>", that.document[ 0 ] ).appendTo( element ) 16151 ); 16152 } else if ( nodeName === "tr" ) { 16153 that._createTrPlaceholder( that.currentItem, element ); 16154 } else if ( nodeName === "img" ) { 16155 element.attr( "src", that.currentItem.attr( "src" ) ); 16156 } 16157 16158 if ( !className ) { 16159 element.css( "visibility", "hidden" ); 16160 } 16161 16162 return element; 16163 }, 16164 update: function( container, p ) { 16165 16166 // 1. If a className is set as 'placeholder option, we don't force sizes - 16167 // the class is responsible for that 16168 // 2. The option 'forcePlaceholderSize can be enabled to force it even if a 16169 // class name is specified 16170 if ( className && !o.forcePlaceholderSize ) { 16171 return; 16172 } 16173 16174 //If the element doesn't have a actual height by itself (without styles coming 16175 // from a stylesheet), it receives the inline height from the dragged item 16176 if ( !p.height() ) { 16177 p.height( 16178 that.currentItem.innerHeight() - 16179 parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) - 16180 parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) ); 16181 } 16182 if ( !p.width() ) { 16183 p.width( 16184 that.currentItem.innerWidth() - 16185 parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) - 16186 parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) ); 16187 } 16188 } 16189 }; 16190 } 16191 16192 //Create the placeholder 16193 that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) ); 16194 16195 //Append it after the actual current item 16196 that.currentItem.after( that.placeholder ); 16197 16198 //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) 16199 o.placeholder.update( that, that.placeholder ); 16200 16201 }, 16202 16203 _createTrPlaceholder: function( sourceTr, targetTr ) { 16204 var that = this; 16205 16206 sourceTr.children().each( function() { 16207 $( "<td> </td>", that.document[ 0 ] ) 16208 .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) 16209 .appendTo( targetTr ); 16210 } ); 16211 }, 16212 16213 _contactContainers: function( event ) { 16214 var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, 16215 floating, axis, 16216 innermostContainer = null, 16217 innermostIndex = null; 16218 16219 // Get innermost container that intersects with item 16220 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16221 16222 // Never consider a container that's located within the item itself 16223 if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) { 16224 continue; 16225 } 16226 16227 if ( this._intersectsWith( this.containers[ i ].containerCache ) ) { 16228 16229 // If we've already found a container and it's more "inner" than this, then continue 16230 if ( innermostContainer && 16231 $.contains( 16232 this.containers[ i ].element[ 0 ], 16233 innermostContainer.element[ 0 ] ) ) { 16234 continue; 16235 } 16236 16237 innermostContainer = this.containers[ i ]; 16238 innermostIndex = i; 16239 16240 } else { 16241 16242 // container doesn't intersect. trigger "out" event if necessary 16243 if ( this.containers[ i ].containerCache.over ) { 16244 this.containers[ i ]._trigger( "out", event, this._uiHash( this ) ); 16245 this.containers[ i ].containerCache.over = 0; 16246 } 16247 } 16248 16249 } 16250 16251 // If no intersecting containers found, return 16252 if ( !innermostContainer ) { 16253 return; 16254 } 16255 16256 // Move the item into the container if it's not there already 16257 if ( this.containers.length === 1 ) { 16258 if ( !this.containers[ innermostIndex ].containerCache.over ) { 16259 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 16260 this.containers[ innermostIndex ].containerCache.over = 1; 16261 } 16262 } else { 16263 16264 // When entering a new container, we will find the item with the least distance and 16265 // append our item near it 16266 dist = 10000; 16267 itemWithLeastDistance = null; 16268 floating = innermostContainer.floating || this._isFloating( this.currentItem ); 16269 posProperty = floating ? "left" : "top"; 16270 sizeProperty = floating ? "width" : "height"; 16271 axis = floating ? "pageX" : "pageY"; 16272 16273 for ( j = this.items.length - 1; j >= 0; j-- ) { 16274 if ( !$.contains( 16275 this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] ) 16276 ) { 16277 continue; 16278 } 16279 if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) { 16280 continue; 16281 } 16282 16283 cur = this.items[ j ].item.offset()[ posProperty ]; 16284 nearBottom = false; 16285 if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { 16286 nearBottom = true; 16287 } 16288 16289 if ( Math.abs( event[ axis ] - cur ) < dist ) { 16290 dist = Math.abs( event[ axis ] - cur ); 16291 itemWithLeastDistance = this.items[ j ]; 16292 this.direction = nearBottom ? "up" : "down"; 16293 } 16294 } 16295 16296 //Check if dropOnEmpty is enabled 16297 if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) { 16298 return; 16299 } 16300 16301 if ( this.currentContainer === this.containers[ innermostIndex ] ) { 16302 if ( !this.currentContainer.containerCache.over ) { 16303 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); 16304 this.currentContainer.containerCache.over = 1; 16305 } 16306 return; 16307 } 16308 16309 itemWithLeastDistance ? 16310 this._rearrange( event, itemWithLeastDistance, null, true ) : 16311 this._rearrange( event, null, this.containers[ innermostIndex ].element, true ); 16312 this._trigger( "change", event, this._uiHash() ); 16313 this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) ); 16314 this.currentContainer = this.containers[ innermostIndex ]; 16315 16316 //Update the placeholder 16317 this.options.placeholder.update( this.currentContainer, this.placeholder ); 16318 16319 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 16320 this.containers[ innermostIndex ].containerCache.over = 1; 16321 } 16322 16323 }, 16324 16325 _createHelper: function( event ) { 16326 16327 var o = this.options, 16328 helper = $.isFunction( o.helper ) ? 16329 $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) : 16330 ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem ); 16331 16332 //Add the helper to the DOM if that didn't happen already 16333 if ( !helper.parents( "body" ).length ) { 16334 $( o.appendTo !== "parent" ? 16335 o.appendTo : 16336 this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] ); 16337 } 16338 16339 if ( helper[ 0 ] === this.currentItem[ 0 ] ) { 16340 this._storedCSS = { 16341 width: this.currentItem[ 0 ].style.width, 16342 height: this.currentItem[ 0 ].style.height, 16343 position: this.currentItem.css( "position" ), 16344 top: this.currentItem.css( "top" ), 16345 left: this.currentItem.css( "left" ) 16346 }; 16347 } 16348 16349 if ( !helper[ 0 ].style.width || o.forceHelperSize ) { 16350 helper.width( this.currentItem.width() ); 16351 } 16352 if ( !helper[ 0 ].style.height || o.forceHelperSize ) { 16353 helper.height( this.currentItem.height() ); 16354 } 16355 16356 return helper; 16357 16358 }, 16359 16360 _adjustOffsetFromHelper: function( obj ) { 16361 if ( typeof obj === "string" ) { 16362 obj = obj.split( " " ); 16363 } 16364 if ( $.isArray( obj ) ) { 16365 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 16366 } 16367 if ( "left" in obj ) { 16368 this.offset.click.left = obj.left + this.margins.left; 16369 } 16370 if ( "right" in obj ) { 16371 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 16372 } 16373 if ( "top" in obj ) { 16374 this.offset.click.top = obj.top + this.margins.top; 16375 } 16376 if ( "bottom" in obj ) { 16377 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 16378 } 16379 }, 16380 16381 _getParentOffset: function() { 16382 16383 //Get the offsetParent and cache its position 16384 this.offsetParent = this.helper.offsetParent(); 16385 var po = this.offsetParent.offset(); 16386 16387 // This is a special case where we need to modify a offset calculated on start, since the 16388 // following happened: 16389 // 1. The position of the helper is absolute, so it's position is calculated based on the 16390 // next positioned parent 16391 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 16392 // the document, which means that the scroll is included in the initial calculation of the 16393 // offset of the parent, and never recalculated upon drag 16394 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] && 16395 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 16396 po.left += this.scrollParent.scrollLeft(); 16397 po.top += this.scrollParent.scrollTop(); 16398 } 16399 16400 // This needs to be actually done for all browsers, since pageX/pageY includes this 16401 // information with an ugly IE fix 16402 if ( this.offsetParent[ 0 ] === this.document[ 0 ].body || 16403 ( this.offsetParent[ 0 ].tagName && 16404 this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) { 16405 po = { top: 0, left: 0 }; 16406 } 16407 16408 return { 16409 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 16410 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 16411 }; 16412 16413 }, 16414 16415 _getRelativeOffset: function() { 16416 16417 if ( this.cssPosition === "relative" ) { 16418 var p = this.currentItem.position(); 16419 return { 16420 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 16421 this.scrollParent.scrollTop(), 16422 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 16423 this.scrollParent.scrollLeft() 16424 }; 16425 } else { 16426 return { top: 0, left: 0 }; 16427 } 16428 16429 }, 16430 16431 _cacheMargins: function() { 16432 this.margins = { 16433 left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ), 16434 top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 ) 16435 }; 16436 }, 16437 16438 _cacheHelperProportions: function() { 16439 this.helperProportions = { 16440 width: this.helper.outerWidth(), 16441 height: this.helper.outerHeight() 16442 }; 16443 }, 16444 16445 _setContainment: function() { 16446 16447 var ce, co, over, 16448 o = this.options; 16449 if ( o.containment === "parent" ) { 16450 o.containment = this.helper[ 0 ].parentNode; 16451 } 16452 if ( o.containment === "document" || o.containment === "window" ) { 16453 this.containment = [ 16454 0 - this.offset.relative.left - this.offset.parent.left, 16455 0 - this.offset.relative.top - this.offset.parent.top, 16456 o.containment === "document" ? 16457 this.document.width() : 16458 this.window.width() - this.helperProportions.width - this.margins.left, 16459 ( o.containment === "document" ? 16460 ( this.document.height() || document.body.parentNode.scrollHeight ) : 16461 this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight 16462 ) - this.helperProportions.height - this.margins.top 16463 ]; 16464 } 16465 16466 if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) { 16467 ce = $( o.containment )[ 0 ];
vendor: 2,294 bytes, lines 16468-16528
16468 co = $( o.containment ).offset(); 16469 over = ( $( ce ).css( "overflow" ) !== "hidden" ); 16470 16471 this.containment = [ 16472 co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) + 16473 ( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left, 16474 co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) + 16475 ( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top, 16476 co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 16477 ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) - 16478 ( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) - 16479 this.helperProportions.width - this.margins.left, 16480 co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 16481 ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) - 16482 ( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) - 16483 this.helperProportions.height - this.margins.top 16484 ]; 16485 } 16486 16487 }, 16488 16489 _convertPositionTo: function( d, pos ) { 16490 16491 if ( !pos ) { 16492 pos = this.position; 16493 } 16494 var mod = d === "absolute" ? 1 : -1, 16495 scroll = this.cssPosition === "absolute" && 16496 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16497 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 16498 this.offsetParent : 16499 this.scrollParent, 16500 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 16501 16502 return { 16503 top: ( 16504 16505 // The absolute mouse position 16506 pos.top + 16507 16508 // Only for relative positioned nodes: Relative offset from element to offset parent 16509 this.offset.relative.top * mod + 16510 16511 // The offsetParent's offset without borders (offset + border) 16512 this.offset.parent.top * mod - 16513 ( ( this.cssPosition === "fixed" ? 16514 -this.scrollParent.scrollTop() : 16515 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod ) 16516 ), 16517 left: ( 16518 16519 // The absolute mouse position 16520 pos.left + 16521 16522 // Only for relative positioned nodes: Relative offset from element to offset parent 16523 this.offset.relative.left * mod + 16524 16525 // The offsetParent's offset without borders (offset + border) 16526 this.offset.parent.left * mod - 16527 ( ( this.cssPosition === "fixed" ? 16528 -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 9,150 bytes, lines 16529-16813
16529 scroll.scrollLeft() ) * mod ) 16530 ) 16531 }; 16532 16533 }, 16534 16535 _generatePosition: function( event ) { 16536 16537 var top, left, 16538 o = this.options, 16539 pageX = event.pageX, 16540 pageY = event.pageY, 16541 scroll = this.cssPosition === "absolute" && 16542 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16543 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 16544 this.offsetParent : 16545 this.scrollParent, 16546 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 16547 16548 // This is another very weird special case that only happens for relative elements: 16549 // 1. If the css position is relative 16550 // 2. and the scroll parent is the document or similar to the offset parent 16551 // we have to refresh the relative offset during the scroll so there are no jumps 16552 if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16553 this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) { 16554 this.offset.relative = this._getRelativeOffset(); 16555 } 16556 16557 /* 16558 * - Position constraining - 16559 * Constrain the position to a mix of grid, containment. 16560 */ 16561 16562 if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options 16563 16564 if ( this.containment ) { 16565 if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) { 16566 pageX = this.containment[ 0 ] + this.offset.click.left; 16567 } 16568 if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) { 16569 pageY = this.containment[ 1 ] + this.offset.click.top; 16570 } 16571 if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) { 16572 pageX = this.containment[ 2 ] + this.offset.click.left; 16573 } 16574 if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) { 16575 pageY = this.containment[ 3 ] + this.offset.click.top; 16576 } 16577 } 16578 16579 if ( o.grid ) { 16580 top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) / 16581 o.grid[ 1 ] ) * o.grid[ 1 ]; 16582 pageY = this.containment ? 16583 ( ( top - this.offset.click.top >= this.containment[ 1 ] && 16584 top - this.offset.click.top <= this.containment[ 3 ] ) ? 16585 top : 16586 ( ( top - this.offset.click.top >= this.containment[ 1 ] ) ? 16587 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : 16588 top; 16589 16590 left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) / 16591 o.grid[ 0 ] ) * o.grid[ 0 ]; 16592 pageX = this.containment ? 16593 ( ( left - this.offset.click.left >= this.containment[ 0 ] && 16594 left - this.offset.click.left <= this.containment[ 2 ] ) ? 16595 left : 16596 ( ( left - this.offset.click.left >= this.containment[ 0 ] ) ? 16597 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : 16598 left; 16599 } 16600 16601 } 16602 16603 return { 16604 top: ( 16605 16606 // The absolute mouse position 16607 pageY - 16608 16609 // Click offset (relative to the element) 16610 this.offset.click.top - 16611 16612 // Only for relative positioned nodes: Relative offset from element to offset parent 16613 this.offset.relative.top - 16614 16615 // The offsetParent's offset without borders (offset + border) 16616 this.offset.parent.top + 16617 ( ( this.cssPosition === "fixed" ? 16618 -this.scrollParent.scrollTop() : 16619 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) ) 16620 ), 16621 left: ( 16622 16623 // The absolute mouse position 16624 pageX - 16625 16626 // Click offset (relative to the element) 16627 this.offset.click.left - 16628 16629 // Only for relative positioned nodes: Relative offset from element to offset parent 16630 this.offset.relative.left - 16631 16632 // The offsetParent's offset without borders (offset + border) 16633 this.offset.parent.left + 16634 ( ( this.cssPosition === "fixed" ? 16635 -this.scrollParent.scrollLeft() : 16636 scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) 16637 ) 16638 }; 16639 16640 }, 16641 16642 _rearrange: function( event, i, a, hardRefresh ) { 16643 16644 a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) : 16645 i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ], 16646 ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) ); 16647 16648 //Various things done here to improve the performance: 16649 // 1. we create a setTimeout, that calls refreshPositions 16650 // 2. on the instance, we have a counter variable, that get's higher after every append 16651 // 3. on the local scope, we copy the counter variable, and check in the timeout, 16652 // if it's still the same 16653 // 4. this lets only the last addition to the timeout stack through 16654 this.counter = this.counter ? ++this.counter : 1; 16655 var counter = this.counter; 16656 16657 this._delay( function() { 16658 if ( counter === this.counter ) { 16659 16660 //Precompute after each DOM insertion, NOT on mousemove 16661 this.refreshPositions( !hardRefresh ); 16662 } 16663 } ); 16664 16665 }, 16666 16667 _clear: function( event, noPropagation ) { 16668 16669 this.reverting = false; 16670 16671 // We delay all events that have to be triggered to after the point where the placeholder 16672 // has been removed and everything else normalized again 16673 var i, 16674 delayedTriggers = []; 16675 16676 // We first have to update the dom position of the actual currentItem 16677 // Note: don't do it if the current item is already removed (by a user), or it gets 16678 // reappended (see #4088) 16679 if ( !this._noFinalSort && this.currentItem.parent().length ) { 16680 this.placeholder.before( this.currentItem ); 16681 } 16682 this._noFinalSort = null; 16683 16684 if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) { 16685 for ( i in this._storedCSS ) { 16686 if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) { 16687 this._storedCSS[ i ] = ""; 16688 } 16689 } 16690 this.currentItem.css( this._storedCSS ); 16691 this._removeClass( this.currentItem, "ui-sortable-helper" ); 16692 } else { 16693 this.currentItem.show(); 16694 } 16695 16696 if ( this.fromOutside && !noPropagation ) { 16697 delayedTriggers.push( function( event ) { 16698 this._trigger( "receive", event, this._uiHash( this.fromOutside ) ); 16699 } ); 16700 } 16701 if ( ( this.fromOutside || 16702 this.domPosition.prev !== 16703 this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] || 16704 this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) { 16705 16706 // Trigger update callback if the DOM position has changed 16707 delayedTriggers.push( function( event ) { 16708 this._trigger( "update", event, this._uiHash() ); 16709 } ); 16710 } 16711 16712 // Check if the items Container has Changed and trigger appropriate 16713 // events. 16714 if ( this !== this.currentContainer ) { 16715 if ( !noPropagation ) { 16716 delayedTriggers.push( function( event ) { 16717 this._trigger( "remove", event, this._uiHash() ); 16718 } ); 16719 delayedTriggers.push( ( function( c ) { 16720 return function( event ) { 16721 c._trigger( "receive", event, this._uiHash( this ) ); 16722 }; 16723 } ).call( this, this.currentContainer ) ); 16724 delayedTriggers.push( ( function( c ) { 16725 return function( event ) { 16726 c._trigger( "update", event, this._uiHash( this ) ); 16727 }; 16728 } ).call( this, this.currentContainer ) ); 16729 } 16730 } 16731 16732 //Post events to containers 16733 function delayEvent( type, instance, container ) { 16734 return function( event ) { 16735 container._trigger( type, event, instance._uiHash( instance ) ); 16736 }; 16737 } 16738 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16739 if ( !noPropagation ) { 16740 delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); 16741 } 16742 if ( this.containers[ i ].containerCache.over ) { 16743 delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); 16744 this.containers[ i ].containerCache.over = 0; 16745 } 16746 } 16747 16748 //Do what was originally in plugins 16749 if ( this.storedCursor ) { 16750 this.document.find( "body" ).css( "cursor", this.storedCursor ); 16751 this.storedStylesheet.remove(); 16752 } 16753 if ( this._storedOpacity ) { 16754 this.helper.css( "opacity", this._storedOpacity ); 16755 } 16756 if ( this._storedZIndex ) { 16757 this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex ); 16758 } 16759 16760 this.dragging = false; 16761 16762 if ( !noPropagation ) { 16763 this._trigger( "beforeStop", event, this._uiHash() ); 16764 } 16765 16766 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 16767 // it unbinds ALL events from the original node! 16768 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 16769 16770 if ( !this.cancelHelperRemoval ) { 16771 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 16772 this.helper.remove(); 16773 } 16774 this.helper = null; 16775 } 16776 16777 if ( !noPropagation ) { 16778 for ( i = 0; i < delayedTriggers.length; i++ ) { 16779 16780 // Trigger all delayed events 16781 delayedTriggers[ i ].call( this, event ); 16782 } 16783 this._trigger( "stop", event, this._uiHash() ); 16784 } 16785 16786 this.fromOutside = false; 16787 return !this.cancelHelperRemoval; 16788 16789 }, 16790 16791 _trigger: function() { 16792 if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) { 16793 this.cancel(); 16794 } 16795 }, 16796 16797 _uiHash: function( _inst ) { 16798 var inst = _inst || this; 16799 return { 16800 helper: inst.helper, 16801 placeholder: inst.placeholder || $( [] ), 16802 position: inst.position, 16803 originalPosition: inst.originalPosition, 16804 offset: inst.positionAbs, 16805 item: inst.currentItem, 16806 sender: _inst ? _inst.element : null 16807 }; 16808 } 16809 16810} ); 16811 16812 16813/*!
vendor: 4,519 bytes, lines 16814-16980
16814 * jQuery UI Spinner 1.12.1 16815 * http://jqueryui.com 16816 * 16817 * Copyright jQuery Foundation and other contributors 16818 * Released under the MIT license. 16819 * http://jquery.org/license 16820 */ 16821 16822//>>label: Spinner 16823//>>group: Widgets 16824//>>description: Displays buttons to easily input numbers via the keyboard or mouse. 16825//>>docs: http://api.jqueryui.com/spinner/ 16826//>>demos: http://jqueryui.com/spinner/ 16827//>>css.structure: ../../themes/base/core.css 16828//>>css.structure: ../../themes/base/spinner.css 16829//>>css.theme: ../../themes/base/theme.css 16830 16831 16832 16833function spinnerModifer( fn ) { 16834 return function() { 16835 var previous = this.element.val(); 16836 fn.apply( this, arguments ); 16837 this._refresh(); 16838 if ( previous !== this.element.val() ) { 16839 this._trigger( "change" ); 16840 } 16841 }; 16842} 16843 16844$.widget( "ui.spinner", { 16845 version: "1.12.1", 16846 defaultElement: "<input>", 16847 widgetEventPrefix: "spin", 16848 options: { 16849 classes: { 16850 "ui-spinner": "ui-corner-all", 16851 "ui-spinner-down": "ui-corner-br", 16852 "ui-spinner-up": "ui-corner-tr" 16853 }, 16854 culture: null, 16855 icons: { 16856 down: "ui-icon-triangle-1-s", 16857 up: "ui-icon-triangle-1-n" 16858 }, 16859 incremental: true, 16860 max: null, 16861 min: null, 16862 numberFormat: null, 16863 page: 10, 16864 step: 1, 16865 16866 change: null, 16867 spin: null, 16868 start: null, 16869 stop: null 16870 }, 16871 16872 _create: function() { 16873 16874 // handle string values that need to be parsed 16875 this._setOption( "max", this.options.max ); 16876 this._setOption( "min", this.options.min ); 16877 this._setOption( "step", this.options.step ); 16878 16879 // Only format if there is a value, prevents the field from being marked 16880 // as invalid in Firefox, see #9573. 16881 if ( this.value() !== "" ) { 16882 16883 // Format the value, but don't constrain. 16884 this._value( this.element.val(), true ); 16885 } 16886 16887 this._draw(); 16888 this._on( this._events ); 16889 this._refresh(); 16890 16891 // Turning off autocomplete prevents the browser from remembering the 16892 // value when navigating through history, so we re-enable autocomplete 16893 // if the page is unloaded before the widget is destroyed. #7790 16894 this._on( this.window, { 16895 beforeunload: function() { 16896 this.element.removeAttr( "autocomplete" ); 16897 } 16898 } ); 16899 }, 16900 16901 _getCreateOptions: function() { 16902 var options = this._super(); 16903 var element = this.element; 16904 16905 $.each( [ "min", "max", "step" ], function( i, option ) { 16906 var value = element.attr( option ); 16907 if ( value != null && value.length ) { 16908 options[ option ] = value; 16909 } 16910 } ); 16911 16912 return options; 16913 }, 16914 16915 _events: { 16916 keydown: function( event ) { 16917 if ( this._start( event ) && this._keydown( event ) ) { 16918 event.preventDefault(); 16919 } 16920 }, 16921 keyup: "_stop", 16922 focus: function() { 16923 this.previous = this.element.val(); 16924 }, 16925 blur: function( event ) { 16926 if ( this.cancelBlur ) { 16927 delete this.cancelBlur; 16928 return; 16929 } 16930 16931 this._stop(); 16932 this._refresh(); 16933 if ( this.previous !== this.element.val() ) { 16934 this._trigger( "change", event ); 16935 } 16936 }, 16937 mousewheel: function( event, delta ) { 16938 if ( !delta ) { 16939 return; 16940 } 16941 if ( !this.spinning && !this._start( event ) ) { 16942 return false; 16943 } 16944 16945 this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event ); 16946 clearTimeout( this.mousewheelTimer ); 16947 this.mousewheelTimer = this._delay( function() { 16948 if ( this.spinning ) { 16949 this._stop( event ); 16950 } 16951 }, 100 ); 16952 event.preventDefault(); 16953 }, 16954 "mousedown .ui-spinner-button": function( event ) { 16955 var previous; 16956 16957 // We never want the buttons to have focus; whenever the user is 16958 // interacting with the spinner, the focus should be on the input. 16959 // If the input is focused then this.previous is properly set from 16960 // when the input first received focus. If the input is not focused 16961 // then we need to set this.previous based on the value before spinning. 16962 previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ? 16963 this.previous : this.element.val(); 16964 function checkFocus() { 16965 var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ); 16966 if ( !isActive ) { 16967 this.element.trigger( "focus" ); 16968 this.previous = previous; 16969 16970 // support: IE 16971 // IE sets focus asynchronously, so we need to check if focus 16972 // moved off of the input because the user clicked on the button. 16973 this._delay( function() { 16974 this.previous = previous; 16975 } ); 16976 } 16977 } 16978 16979 // Ensure focus is on (or stays on) the text field 16980 event.preventDefault();
vendor: 5,986 bytes, lines 16981-17210
16981 checkFocus.call( this ); 16982 16983 // Support: IE 16984 // IE doesn't prevent moving focus even with event.preventDefault() 16985 // so we set a flag to know when we should ignore the blur event 16986 // and check (again) if focus moved off of the input. 16987 this.cancelBlur = true; 16988 this._delay( function() { 16989 delete this.cancelBlur; 16990 checkFocus.call( this ); 16991 } ); 16992 16993 if ( this._start( event ) === false ) { 16994 return; 16995 } 16996 16997 this._repeat( null, $( event.currentTarget ) 16998 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 16999 }, 17000 "mouseup .ui-spinner-button": "_stop", 17001 "mouseenter .ui-spinner-button": function( event ) { 17002 17003 // button will add ui-state-active if mouse was down while mouseleave and kept down 17004 if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 17005 return; 17006 } 17007 17008 if ( this._start( event ) === false ) { 17009 return false; 17010 } 17011 this._repeat( null, $( event.currentTarget ) 17012 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 17013 }, 17014 17015 // TODO: do we really want to consider this a stop? 17016 // shouldn't we just stop the repeater and wait until mouseup before 17017 // we trigger the stop event? 17018 "mouseleave .ui-spinner-button": "_stop" 17019 }, 17020 17021 // Support mobile enhanced option and make backcompat more sane 17022 _enhance: function() { 17023 this.uiSpinner = this.element 17024 .attr( "autocomplete", "off" ) 17025 .wrap( "<span>" ) 17026 .parent() 17027 17028 // Add buttons 17029 .append( 17030 "<a></a><a></a>" 17031 ); 17032 }, 17033 17034 _draw: function() { 17035 this._enhance(); 17036 17037 this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" ); 17038 this._addClass( "ui-spinner-input" ); 17039 17040 this.element.attr( "role", "spinbutton" ); 17041 17042 // Button bindings 17043 this.buttons = this.uiSpinner.children( "a" ) 17044 .attr( "tabIndex", -1 ) 17045 .attr( "aria-hidden", true ) 17046 .button( { 17047 classes: { 17048 "ui-button": "" 17049 } 17050 } ); 17051 17052 // TODO: Right now button does not support classes this is already updated in button PR 17053 this._removeClass( this.buttons, "ui-corner-all" ); 17054 17055 this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" ); 17056 this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" ); 17057 this.buttons.first().button( { 17058 "icon": this.options.icons.up, 17059 "showLabel": false 17060 } ); 17061 this.buttons.last().button( { 17062 "icon": this.options.icons.down, 17063 "showLabel": false 17064 } ); 17065 17066 // IE 6 doesn't understand height: 50% for the buttons 17067 // unless the wrapper has an explicit height 17068 if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) && 17069 this.uiSpinner.height() > 0 ) { 17070 this.uiSpinner.height( this.uiSpinner.height() ); 17071 } 17072 }, 17073 17074 _keydown: function( event ) { 17075 var options = this.options, 17076 keyCode = $.ui.keyCode; 17077 17078 switch ( event.keyCode ) { 17079 case keyCode.UP: 17080 this._repeat( null, 1, event ); 17081 return true; 17082 case keyCode.DOWN: 17083 this._repeat( null, -1, event ); 17084 return true; 17085 case keyCode.PAGE_UP: 17086 this._repeat( null, options.page, event ); 17087 return true; 17088 case keyCode.PAGE_DOWN: 17089 this._repeat( null, -options.page, event ); 17090 return true; 17091 } 17092 17093 return false; 17094 }, 17095 17096 _start: function( event ) { 17097 if ( !this.spinning && this._trigger( "start", event ) === false ) { 17098 return false; 17099 } 17100 17101 if ( !this.counter ) { 17102 this.counter = 1; 17103 } 17104 this.spinning = true; 17105 return true; 17106 }, 17107 17108 _repeat: function( i, steps, event ) { 17109 i = i || 500; 17110 17111 clearTimeout( this.timer ); 17112 this.timer = this._delay( function() { 17113 this._repeat( 40, steps, event ); 17114 }, i ); 17115 17116 this._spin( steps * this.options.step, event ); 17117 }, 17118 17119 _spin: function( step, event ) { 17120 var value = this.value() || 0; 17121 17122 if ( !this.counter ) { 17123 this.counter = 1; 17124 } 17125 17126 value = this._adjustValue( value + step * this._increment( this.counter ) ); 17127 17128 if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) { 17129 this._value( value ); 17130 this.counter++; 17131 } 17132 }, 17133 17134 _increment: function( i ) { 17135 var incremental = this.options.incremental; 17136 17137 if ( incremental ) { 17138 return $.isFunction( incremental ) ? 17139 incremental( i ) : 17140 Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); 17141 } 17142 17143 return 1; 17144 }, 17145 17146 _precision: function() { 17147 var precision = this._precisionOf( this.options.step ); 17148 if ( this.options.min !== null ) { 17149 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 17150 } 17151 return precision; 17152 }, 17153 17154 _precisionOf: function( num ) { 17155 var str = num.toString(), 17156 decimal = str.indexOf( "." ); 17157 return decimal === -1 ? 0 : str.length - decimal - 1; 17158 }, 17159 17160 _adjustValue: function( value ) { 17161 var base, aboveMin, 17162 options = this.options; 17163 17164 // Make sure we're at a valid step 17165 // - find out where we are relative to the base (min or 0) 17166 base = options.min !== null ? options.min : 0; 17167 aboveMin = value - base; 17168 17169 // - round to the nearest step 17170 aboveMin = Math.round( aboveMin / options.step ) * options.step; 17171 17172 // - rounding is based on 0, so adjust back to our base 17173 value = base + aboveMin; 17174 17175 // Fix precision from bad JS floating point math 17176 value = parseFloat( value.toFixed( this._precision() ) ); 17177 17178 // Clamp the value 17179 if ( options.max !== null && value > options.max ) { 17180 return options.max; 17181 } 17182 if ( options.min !== null && value < options.min ) { 17183 return options.min; 17184 } 17185 17186 return value; 17187 }, 17188 17189 _stop: function( event ) { 17190 if ( !this.spinning ) { 17191 return; 17192 } 17193 17194 clearTimeout( this.timer ); 17195 clearTimeout( this.mousewheelTimer ); 17196 this.counter = 0; 17197 this.spinning = false; 17198 this._trigger( "stop", event ); 17199 }, 17200 17201 _setOption: function( key, value ) { 17202 var prevValue, first, last; 17203 17204 if ( key === "culture" || key === "numberFormat" ) { 17205 prevValue = this._parse( this.element.val() ); 17206 this.options[ key ] = value; 17207 this.element.val( this._format( prevValue ) ); 17208 return; 17209 } 17210
vendor: 12,860 bytes, lines 17211-17707
17211 if ( key === "max" || key === "min" || key === "step" ) { 17212 if ( typeof value === "string" ) { 17213 value = this._parse( value ); 17214 } 17215 } 17216 if ( key === "icons" ) { 17217 first = this.buttons.first().find( ".ui-icon" ); 17218 this._removeClass( first, null, this.options.icons.up ); 17219 this._addClass( first, null, value.up ); 17220 last = this.buttons.last().find( ".ui-icon" ); 17221 this._removeClass( last, null, this.options.icons.down ); 17222 this._addClass( last, null, value.down ); 17223 } 17224 17225 this._super( key, value ); 17226 }, 17227 17228 _setOptionDisabled: function( value ) { 17229 this._super( value ); 17230 17231 this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value ); 17232 this.element.prop( "disabled", !!value ); 17233 this.buttons.button( value ? "disable" : "enable" ); 17234 }, 17235 17236 _setOptions: spinnerModifer( function( options ) { 17237 this._super( options ); 17238 } ), 17239 17240 _parse: function( val ) { 17241 if ( typeof val === "string" && val !== "" ) { 17242 val = window.Globalize && this.options.numberFormat ? 17243 Globalize.parseFloat( val, 10, this.options.culture ) : +val; 17244 } 17245 return val === "" || isNaN( val ) ? null : val; 17246 }, 17247 17248 _format: function( value ) { 17249 if ( value === "" ) { 17250 return ""; 17251 } 17252 return window.Globalize && this.options.numberFormat ? 17253 Globalize.format( value, this.options.numberFormat, this.options.culture ) : 17254 value; 17255 }, 17256 17257 _refresh: function() { 17258 this.element.attr( { 17259 "aria-valuemin": this.options.min, 17260 "aria-valuemax": this.options.max, 17261 17262 17263 "aria-valuenow": this._parse( this.element.val() ) 17264 } ); 17265 }, 17266 17267 isValid: function() { 17268 var value = this.value(); 17269 17270 // Null is invalid 17271 if ( value === null ) { 17272 return false; 17273 } 17274 17275 // If value gets adjusted, it's invalid 17276 return value === this._adjustValue( value ); 17277 }, 17278 17279 // Update the value without triggering change 17280 _value: function( value, allowAny ) { 17281 var parsed; 17282 if ( value !== "" ) { 17283 parsed = this._parse( value ); 17284 if ( parsed !== null ) { 17285 if ( !allowAny ) { 17286 parsed = this._adjustValue( parsed ); 17287 } 17288 value = this._format( parsed ); 17289 } 17290 } 17291 this.element.val( value ); 17292 this._refresh(); 17293 }, 17294 17295 _destroy: function() { 17296 this.element 17297 .prop( "disabled", false ) 17298 .removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" ); 17299 17300 this.uiSpinner.replaceWith( this.element ); 17301 }, 17302 17303 stepUp: spinnerModifer( function( steps ) { 17304 this._stepUp( steps ); 17305 } ), 17306 _stepUp: function( steps ) { 17307 if ( this._start() ) { 17308 this._spin( ( steps || 1 ) * this.options.step ); 17309 this._stop(); 17310 } 17311 }, 17312 17313 stepDown: spinnerModifer( function( steps ) { 17314 this._stepDown( steps ); 17315 } ), 17316 _stepDown: function( steps ) { 17317 if ( this._start() ) { 17318 this._spin( ( steps || 1 ) * -this.options.step ); 17319 this._stop(); 17320 } 17321 }, 17322 17323 pageUp: spinnerModifer( function( pages ) { 17324 this._stepUp( ( pages || 1 ) * this.options.page ); 17325 } ), 17326 17327 pageDown: spinnerModifer( function( pages ) { 17328 this._stepDown( ( pages || 1 ) * this.options.page ); 17329 } ), 17330 17331 value: function( newVal ) { 17332 if ( !arguments.length ) { 17333 return this._parse( this.element.val() ); 17334 } 17335 spinnerModifer( this._value ).call( this, newVal ); 17336 }, 17337 17338 widget: function() { 17339 return this.uiSpinner; 17340 } 17341} ); 17342 17343// DEPRECATED 17344// TODO: switch return back to widget declaration at top of file when this is removed 17345if ( $.uiBackCompat !== false ) { 17346 17347 // Backcompat for spinner html extension points 17348 $.widget( "ui.spinner", $.ui.spinner, { 17349 _enhance: function() { 17350 this.uiSpinner = this.element 17351 .attr( "autocomplete", "off" ) 17352 .wrap( this._uiSpinnerHtml() ) 17353 .parent() 17354 17355 // Add buttons 17356 .append( this._buttonHtml() ); 17357 }, 17358 _uiSpinnerHtml: function() { 17359 return "<span>"; 17360 }, 17361 17362 _buttonHtml: function() { 17363 return "<a></a><a></a>"; 17364 } 17365 } ); 17366} 17367 17368var widgetsSpinner = $.ui.spinner; 17369 17370 17371/*! 17372 * jQuery UI Tabs 1.12.1 17373 * http://jqueryui.com 17374 * 17375 * Copyright jQuery Foundation and other contributors 17376 * Released under the MIT license. 17377 * http://jquery.org/license 17378 */ 17379 17380//>>label: Tabs 17381//>>group: Widgets 17382//>>description: Transforms a set of container elements into a tab structure. 17383//>>docs: http://api.jqueryui.com/tabs/ 17384//>>demos: http://jqueryui.com/tabs/ 17385//>>css.structure: ../../themes/base/core.css 17386//>>css.structure: ../../themes/base/tabs.css 17387//>>css.theme: ../../themes/base/theme.css 17388 17389 17390 17391$.widget( "ui.tabs", { 17392 version: "1.12.1", 17393 delay: 300, 17394 options: { 17395 active: null, 17396 classes: { 17397 "ui-tabs": "ui-corner-all", 17398 "ui-tabs-nav": "ui-corner-all", 17399 "ui-tabs-panel": "ui-corner-bottom", 17400 "ui-tabs-tab": "ui-corner-top" 17401 }, 17402 collapsible: false, 17403 event: "click", 17404 heightStyle: "content", 17405 hide: null, 17406 show: null, 17407 17408 // Callbacks 17409 activate: null, 17410 beforeActivate: null, 17411 beforeLoad: null, 17412 load: null 17413 }, 17414 17415 _isLocal: ( function() { 17416 var rhash = /#.*$/; 17417 17418 return function( anchor ) { 17419 var anchorUrl, locationUrl; 17420 17421 anchorUrl = anchor.href.replace( rhash, "" ); 17422 locationUrl = location.href.replace( rhash, "" ); 17423 17424 // Decoding may throw an error if the URL isn't UTF-8 (#9518) 17425 try { 17426 anchorUrl = decodeURIComponent( anchorUrl ); 17427 } catch ( error ) {} 17428 try { 17429 locationUrl = decodeURIComponent( locationUrl ); 17430 } catch ( error ) {} 17431 17432 return anchor.hash.length > 1 && anchorUrl === locationUrl; 17433 }; 17434 } )(), 17435 17436 _create: function() { 17437 var that = this, 17438 options = this.options; 17439 17440 this.running = false; 17441 17442 this._addClass( "ui-tabs", "ui-widget ui-widget-content" ); 17443 this._toggleClass( "ui-tabs-collapsible", null, options.collapsible ); 17444 17445 this._processTabs(); 17446 options.active = this._initialActive(); 17447 17448 // Take disabling tabs via class attribute from HTML 17449 // into account and update option properly. 17450 if ( $.isArray( options.disabled ) ) { 17451 options.disabled = $.unique( options.disabled.concat( 17452 $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { 17453 return that.tabs.index( li ); 17454 } ) 17455 ) ).sort(); 17456 } 17457 17458 // Check for length avoids error when initializing empty list 17459 if ( this.options.active !== false && this.anchors.length ) { 17460 this.active = this._findActive( options.active ); 17461 } else { 17462 this.active = $(); 17463 } 17464 17465 this._refresh(); 17466 17467 if ( this.active.length ) { 17468 this.load( options.active ); 17469 } 17470 }, 17471 17472 _initialActive: function() { 17473 var active = this.options.active, 17474 collapsible = this.options.collapsible, 17475 locationHash = location.hash.substring( 1 ); 17476 17477 if ( active === null ) { 17478 17479 // check the fragment identifier in the URL 17480 if ( locationHash ) { 17481 this.tabs.each( function( i, tab ) { 17482 if ( $( tab ).attr( "aria-controls" ) === locationHash ) { 17483 active = i; 17484 return false; 17485 } 17486 } ); 17487 } 17488 17489 // Check for a tab marked active via a class 17490 if ( active === null ) { 17491 active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); 17492 } 17493 17494 // No active tab, set to false 17495 if ( active === null || active === -1 ) { 17496 active = this.tabs.length ? 0 : false; 17497 } 17498 } 17499 17500 // Handle numbers: negative, out of range 17501 if ( active !== false ) { 17502 active = this.tabs.index( this.tabs.eq( active ) ); 17503 if ( active === -1 ) { 17504 active = collapsible ? false : 0; 17505 } 17506 } 17507 17508 // Don't allow collapsible: false and active: false 17509 if ( !collapsible && active === false && this.anchors.length ) { 17510 active = 0; 17511 } 17512 17513 return active; 17514 }, 17515 17516 _getCreateEventData: function() { 17517 return { 17518 tab: this.active, 17519 panel: !this.active.length ? $() : this._getPanelForTab( this.active ) 17520 }; 17521 }, 17522 17523 _tabKeydown: function( event ) { 17524 var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ), 17525 selectedIndex = this.tabs.index( focusedTab ), 17526 goingForward = true; 17527 17528 if ( this._handlePageNav( event ) ) { 17529 return; 17530 } 17531 17532 switch ( event.keyCode ) { 17533 case $.ui.keyCode.RIGHT: 17534 case $.ui.keyCode.DOWN: 17535 selectedIndex++; 17536 break; 17537 case $.ui.keyCode.UP: 17538 case $.ui.keyCode.LEFT: 17539 goingForward = false; 17540 selectedIndex--; 17541 break; 17542 case $.ui.keyCode.END: 17543 selectedIndex = this.anchors.length - 1; 17544 break; 17545 case $.ui.keyCode.HOME: 17546 selectedIndex = 0; 17547 break; 17548 case $.ui.keyCode.SPACE: 17549 17550 // Activate only, no collapsing 17551 event.preventDefault(); 17552 clearTimeout( this.activating ); 17553 this._activate( selectedIndex ); 17554 return; 17555 case $.ui.keyCode.ENTER: 17556 17557 // Toggle (cancel delayed activation, allow collapsing) 17558 event.preventDefault(); 17559 clearTimeout( this.activating ); 17560 17561 // Determine if we should collapse or activate 17562 this._activate( selectedIndex === this.options.active ? false : selectedIndex ); 17563 return; 17564 default: 17565 return; 17566 } 17567 17568 // Focus the appropriate tab, based on which key was pressed 17569 event.preventDefault(); 17570 clearTimeout( this.activating ); 17571 selectedIndex = this._focusNextTab( selectedIndex, goingForward ); 17572 17573 // Navigating with control/command key will prevent automatic activation 17574 if ( !event.ctrlKey && !event.metaKey ) { 17575 17576 // Update aria-selected immediately so that AT think the tab is already selected. 17577 // Otherwise AT may confuse the user by stating that they need to activate the tab, 17578 // but the tab will already be activated by the time the announcement finishes. 17579 focusedTab.attr( "aria-selected", "false" ); 17580 this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); 17581 17582 this.activating = this._delay( function() { 17583 this.option( "active", selectedIndex ); 17584 }, this.delay ); 17585 } 17586 }, 17587 17588 _panelKeydown: function( event ) { 17589 if ( this._handlePageNav( event ) ) { 17590 return; 17591 } 17592 17593 // Ctrl+up moves focus to the current tab 17594 if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { 17595 event.preventDefault(); 17596 this.active.trigger( "focus" ); 17597 } 17598 }, 17599 17600 // Alt+page up/down moves focus to the previous/next tab (and activates) 17601 _handlePageNav: function( event ) { 17602 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { 17603 this._activate( this._focusNextTab( this.options.active - 1, false ) ); 17604 return true; 17605 } 17606 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { 17607 this._activate( this._focusNextTab( this.options.active + 1, true ) ); 17608 return true; 17609 } 17610 }, 17611 17612 _findNextTab: function( index, goingForward ) { 17613 var lastTabIndex = this.tabs.length - 1; 17614 17615 function constrain() { 17616 if ( index > lastTabIndex ) { 17617 index = 0; 17618 } 17619 if ( index < 0 ) { 17620 index = lastTabIndex; 17621 } 17622 return index; 17623 } 17624 17625 while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { 17626 index = goingForward ? index + 1 : index - 1; 17627 } 17628 17629 return index; 17630 }, 17631 17632 _focusNextTab: function( index, goingForward ) { 17633 index = this._findNextTab( index, goingForward ); 17634 this.tabs.eq( index ).trigger( "focus" ); 17635 return index; 17636 }, 17637 17638 _setOption: function( key, value ) { 17639 if ( key === "active" ) { 17640 17641 // _activate() will handle invalid values and update this.options 17642 this._activate( value ); 17643 return; 17644 } 17645 17646 this._super( key, value ); 17647 17648 if ( key === "collapsible" ) { 17649 this._toggleClass( "ui-tabs-collapsible", null, value ); 17650 17651 // Setting collapsible: false while collapsed; open first panel 17652 if ( !value && this.options.active === false ) { 17653 this._activate( 0 ); 17654 } 17655 } 17656 17657 if ( key === "event" ) { 17658 this._setupEvents( value ); 17659 } 17660 17661 if ( key === "heightStyle" ) { 17662 this._setupHeightStyle( value ); 17663 } 17664 }, 17665 17666 _sanitizeSelector: function( hash ) { 17667 return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; 17668 }, 17669 17670 refresh: function() { 17671 var options = this.options, 17672 lis = this.tablist.children( ":has(a[href])" ); 17673 17674 // Get disabled tabs from class attribute from HTML 17675 // this will get converted to a boolean if needed in _refresh() 17676 options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { 17677 return lis.index( tab ); 17678 } ); 17679 17680 this._processTabs(); 17681 17682 // Was collapsed or no tabs 17683 if ( options.active === false || !this.anchors.length ) { 17684 options.active = false; 17685 this.active = $(); 17686 17687 // was active, but active tab is gone 17688 } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { 17689 17690 // all remaining tabs are disabled 17691 if ( this.tabs.length === options.disabled.length ) { 17692 options.active = false; 17693 this.active = $(); 17694 17695 // activate previous tab 17696 } else { 17697 this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); 17698 } 17699 17700 // was active, active tab still exists 17701 } else { 17702 17703 // make sure active index is correct 17704 options.active = this.tabs.index( this.active ); 17705 } 17706 17707 this._refresh();
vendor: 13,454 bytes, lines 17708-18210
17708 }, 17709 17710 _refresh: function() { 17711 this._setOptionDisabled( this.options.disabled ); 17712 this._setupEvents( this.options.event ); 17713 this._setupHeightStyle( this.options.heightStyle ); 17714 17715 this.tabs.not( this.active ).attr( { 17716 "aria-selected": "false", 17717 "aria-expanded": "false", 17718 tabIndex: -1 17719 } ); 17720 this.panels.not( this._getPanelForTab( this.active ) ) 17721 .hide() 17722 .attr( { 17723 "aria-hidden": "true" 17724 } ); 17725 17726 // Make sure one tab is in the tab order 17727 if ( !this.active.length ) { 17728 this.tabs.eq( 0 ).attr( "tabIndex", 0 ); 17729 } else { 17730 this.active 17731 .attr( { 17732 "aria-selected": "true", 17733 "aria-expanded": "true", 17734 tabIndex: 0 17735 } ); 17736 this._addClass( this.active, "ui-tabs-active", "ui-state-active" ); 17737 this._getPanelForTab( this.active ) 17738 .show() 17739 .attr( { 17740 "aria-hidden": "false" 17741 } ); 17742 } 17743 }, 17744 17745 _processTabs: function() { 17746 var that = this, 17747 prevTabs = this.tabs, 17748 prevAnchors = this.anchors, 17749 prevPanels = this.panels; 17750 17751 this.tablist = this._getList().attr( "role", "tablist" ); 17752 this._addClass( this.tablist, "ui-tabs-nav", 17753 "ui-helper-reset ui-helper-clearfix ui-widget-header" ); 17754 17755 // Prevent users from focusing disabled tabs via click 17756 this.tablist 17757 .on( "mousedown" + this.eventNamespace, "> li", function( event ) { 17758 if ( $( this ).is( ".ui-state-disabled" ) ) { 17759 event.preventDefault(); 17760 } 17761 } ) 17762 17763 // Support: IE <9 17764 // Preventing the default action in mousedown doesn't prevent IE 17765 // from focusing the element, so if the anchor gets focused, blur. 17766 // We don't have to worry about focusing the previously focused 17767 // element since clicking on a non-focusable element should focus 17768 // the body anyway. 17769 .on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() { 17770 if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { 17771 this.blur(); 17772 } 17773 } ); 17774 17775 this.tabs = this.tablist.find( "> li:has(a[href])" ) 17776 .attr( { 17777 role: "tab", 17778 tabIndex: -1 17779 } ); 17780 this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" ); 17781 17782 this.anchors = this.tabs.map( function() { 17783 return $( "a", this )[ 0 ]; 17784 } ) 17785 .attr( { 17786 role: "presentation", 17787 tabIndex: -1 17788 } ); 17789 this._addClass( this.anchors, "ui-tabs-anchor" ); 17790 17791 this.panels = $(); 17792 17793 this.anchors.each( function( i, anchor ) { 17794 var selector, panel, panelId, 17795 anchorId = $( anchor ).uniqueId().attr( "id" ), 17796 tab = $( anchor ).closest( "li" ), 17797 originalAriaControls = tab.attr( "aria-controls" ); 17798 17799 // Inline tab 17800 if ( that._isLocal( anchor ) ) { 17801 selector = anchor.hash; 17802 panelId = selector.substring( 1 ); 17803 panel = that.element.find( that._sanitizeSelector( selector ) ); 17804 17805 // remote tab 17806 } else { 17807 17808 // If the tab doesn't already have aria-controls, 17809 // generate an id by using a throw-away element 17810 panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; 17811 selector = "#" + panelId; 17812 panel = that.element.find( selector ); 17813 if ( !panel.length ) { 17814 panel = that._createPanel( panelId ); 17815 panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); 17816 } 17817 panel.attr( "aria-live", "polite" ); 17818 } 17819 17820 if ( panel.length ) { 17821 that.panels = that.panels.add( panel ); 17822 } 17823 if ( originalAriaControls ) { 17824 tab.data( "ui-tabs-aria-controls", originalAriaControls ); 17825 } 17826 tab.attr( { 17827 "aria-controls": panelId, 17828 "aria-labelledby": anchorId 17829 } ); 17830 panel.attr( "aria-labelledby", anchorId ); 17831 } ); 17832 17833 this.panels.attr( "role", "tabpanel" ); 17834 this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" ); 17835 17836 // Avoid memory leaks (#10056) 17837 if ( prevTabs ) { 17838 this._off( prevTabs.not( this.tabs ) ); 17839 this._off( prevAnchors.not( this.anchors ) ); 17840 this._off( prevPanels.not( this.panels ) ); 17841 } 17842 }, 17843 17844 // Allow overriding how to find the list for rare usage scenarios (#7715) 17845 _getList: function() { 17846 return this.tablist || this.element.find( "ol, ul" ).eq( 0 ); 17847 }, 17848 17849 _createPanel: function( id ) { 17850 return $( "<div>" ) 17851 .attr( "id", id ) 17852 .data( "ui-tabs-destroy", true ); 17853 }, 17854 17855 _setOptionDisabled: function( disabled ) { 17856 var currentItem, li, i; 17857 17858 if ( $.isArray( disabled ) ) { 17859 if ( !disabled.length ) { 17860 disabled = false; 17861 } else if ( disabled.length === this.anchors.length ) { 17862 disabled = true; 17863 } 17864 } 17865 17866 // Disable tabs 17867 for ( i = 0; ( li = this.tabs[ i ] ); i++ ) { 17868 currentItem = $( li ); 17869 if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { 17870 currentItem.attr( "aria-disabled", "true" ); 17871 this._addClass( currentItem, null, "ui-state-disabled" ); 17872 } else { 17873 currentItem.removeAttr( "aria-disabled" ); 17874 this._removeClass( currentItem, null, "ui-state-disabled" ); 17875 } 17876 } 17877 17878 this.options.disabled = disabled; 17879 17880 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, 17881 disabled === true ); 17882 }, 17883 17884 _setupEvents: function( event ) { 17885 var events = {}; 17886 if ( event ) { 17887 $.each( event.split( " " ), function( index, eventName ) { 17888 events[ eventName ] = "_eventHandler"; 17889 } ); 17890 } 17891 17892 this._off( this.anchors.add( this.tabs ).add( this.panels ) ); 17893 17894 // Always prevent the default action, even when disabled 17895 this._on( true, this.anchors, { 17896 click: function( event ) { 17897 event.preventDefault(); 17898 } 17899 } ); 17900 this._on( this.anchors, events ); 17901 this._on( this.tabs, { keydown: "_tabKeydown" } ); 17902 this._on( this.panels, { keydown: "_panelKeydown" } ); 17903 17904 this._focusable( this.tabs ); 17905 this._hoverable( this.tabs ); 17906 }, 17907 17908 _setupHeightStyle: function( heightStyle ) { 17909 var maxHeight, 17910 parent = this.element.parent(); 17911 17912 if ( heightStyle === "fill" ) { 17913 maxHeight = parent.height(); 17914 maxHeight -= this.element.outerHeight() - this.element.height(); 17915 17916 this.element.siblings( ":visible" ).each( function() { 17917 var elem = $( this ), 17918 position = elem.css( "position" ); 17919 17920 if ( position === "absolute" || position === "fixed" ) { 17921 return; 17922 } 17923 maxHeight -= elem.outerHeight( true ); 17924 } ); 17925 17926 this.element.children().not( this.panels ).each( function() { 17927 maxHeight -= $( this ).outerHeight( true ); 17928 } ); 17929 17930 this.panels.each( function() { 17931 $( this ).height( Math.max( 0, maxHeight - 17932 $( this ).innerHeight() + $( this ).height() ) ); 17933 } ) 17934 .css( "overflow", "auto" ); 17935 } else if ( heightStyle === "auto" ) { 17936 maxHeight = 0; 17937 this.panels.each( function() { 17938 maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 17939 } ).height( maxHeight ); 17940 } 17941 }, 17942 17943 _eventHandler: function( event ) { 17944 var options = this.options, 17945 active = this.active, 17946 anchor = $( event.currentTarget ), 17947 tab = anchor.closest( "li" ), 17948 clickedIsActive = tab[ 0 ] === active[ 0 ], 17949 collapsing = clickedIsActive && options.collapsible, 17950 toShow = collapsing ? $() : this._getPanelForTab( tab ), 17951 toHide = !active.length ? $() : this._getPanelForTab( active ), 17952 eventData = { 17953 oldTab: active, 17954 oldPanel: toHide, 17955 newTab: collapsing ? $() : tab, 17956 newPanel: toShow 17957 }; 17958 17959 event.preventDefault(); 17960 17961 if ( tab.hasClass( "ui-state-disabled" ) || 17962 17963 // tab is already loading 17964 tab.hasClass( "ui-tabs-loading" ) || 17965 17966 // can't switch durning an animation 17967 this.running || 17968 17969 // click on active header, but not collapsible 17970 ( clickedIsActive && !options.collapsible ) || 17971 17972 // allow canceling activation 17973 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 17974 return; 17975 } 17976 17977 options.active = collapsing ? false : this.tabs.index( tab ); 17978 17979 this.active = clickedIsActive ? $() : tab; 17980 if ( this.xhr ) { 17981 this.xhr.abort(); 17982 } 17983 17984 if ( !toHide.length && !toShow.length ) { 17985 $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); 17986 } 17987 17988 if ( toShow.length ) { 17989 this.load( this.tabs.index( tab ), event ); 17990 } 17991 this._toggle( event, eventData ); 17992 }, 17993 17994 // Handles show/hide for selecting tabs 17995 _toggle: function( event, eventData ) { 17996 var that = this, 17997 toShow = eventData.newPanel, 17998 toHide = eventData.oldPanel; 17999 18000 this.running = true; 18001 18002 function complete() { 18003 that.running = false; 18004 that._trigger( "activate", event, eventData ); 18005 } 18006 18007 function show() { 18008 that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" ); 18009 18010 if ( toShow.length && that.options.show ) { 18011 that._show( toShow, that.options.show, complete ); 18012 } else { 18013 toShow.show(); 18014 complete(); 18015 } 18016 } 18017 18018 // Start out by hiding, then showing, then completing 18019 if ( toHide.length && this.options.hide ) { 18020 this._hide( toHide, this.options.hide, function() { 18021 that._removeClass( eventData.oldTab.closest( "li" ), 18022 "ui-tabs-active", "ui-state-active" ); 18023 show(); 18024 } ); 18025 } else { 18026 this._removeClass( eventData.oldTab.closest( "li" ), 18027 "ui-tabs-active", "ui-state-active" ); 18028 toHide.hide(); 18029 show(); 18030 } 18031 18032 toHide.attr( "aria-hidden", "true" ); 18033 eventData.oldTab.attr( { 18034 "aria-selected": "false", 18035 "aria-expanded": "false" 18036 } ); 18037 18038 // If we're switching tabs, remove the old tab from the tab order. 18039 // If we're opening from collapsed state, remove the previous tab from the tab order. 18040 // If we're collapsing, then keep the collapsing tab in the tab order. 18041 if ( toShow.length && toHide.length ) { 18042 eventData.oldTab.attr( "tabIndex", -1 ); 18043 } else if ( toShow.length ) { 18044 this.tabs.filter( function() { 18045 return $( this ).attr( "tabIndex" ) === 0; 18046 } ) 18047 .attr( "tabIndex", -1 ); 18048 } 18049 18050 toShow.attr( "aria-hidden", "false" ); 18051 eventData.newTab.attr( { 18052 "aria-selected": "true", 18053 "aria-expanded": "true", 18054 tabIndex: 0 18055 } ); 18056 }, 18057 18058 _activate: function( index ) { 18059 var anchor, 18060 active = this._findActive( index ); 18061 18062 // Trying to activate the already active panel 18063 if ( active[ 0 ] === this.active[ 0 ] ) { 18064 return; 18065 } 18066 18067 // Trying to collapse, simulate a click on the current active header 18068 if ( !active.length ) { 18069 active = this.active; 18070 } 18071 18072 anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; 18073 this._eventHandler( { 18074 target: anchor, 18075 currentTarget: anchor, 18076 preventDefault: $.noop 18077 } ); 18078 }, 18079 18080 _findActive: function( index ) { 18081 return index === false ? $() : this.tabs.eq( index ); 18082 }, 18083 18084 _getIndex: function( index ) { 18085 18086 // meta-function to give users option to provide a href string instead of a numerical index. 18087 if ( typeof index === "string" ) { 18088 index = this.anchors.index( this.anchors.filter( "[href$='" + 18089 $.ui.escapeSelector( index ) + "']" ) ); 18090 } 18091 18092 return index; 18093 }, 18094 18095 _destroy: function() { 18096 if ( this.xhr ) { 18097 this.xhr.abort(); 18098 } 18099 18100 this.tablist 18101 .removeAttr( "role" ) 18102 .off( this.eventNamespace ); 18103 18104 this.anchors 18105 .removeAttr( "role tabIndex" ) 18106 .removeUniqueId(); 18107 18108 this.tabs.add( this.panels ).each( function() { 18109 if ( $.data( this, "ui-tabs-destroy" ) ) { 18110 $( this ).remove(); 18111 } else { 18112 $( this ).removeAttr( "role tabIndex " + 18113 "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" ); 18114 } 18115 } ); 18116 18117 this.tabs.each( function() { 18118 var li = $( this ), 18119 prev = li.data( "ui-tabs-aria-controls" ); 18120 if ( prev ) { 18121 li 18122 .attr( "aria-controls", prev ) 18123 .removeData( "ui-tabs-aria-controls" ); 18124 } else { 18125 li.removeAttr( "aria-controls" ); 18126 } 18127 } ); 18128 18129 this.panels.show(); 18130 18131 if ( this.options.heightStyle !== "content" ) { 18132 this.panels.css( "height", "" ); 18133 } 18134 }, 18135 18136 enable: function( index ) { 18137 var disabled = this.options.disabled; 18138 if ( disabled === false ) { 18139 return; 18140 } 18141 18142 if ( index === undefined ) { 18143 disabled = false; 18144 } else { 18145 index = this._getIndex( index ); 18146 if ( $.isArray( disabled ) ) { 18147 disabled = $.map( disabled, function( num ) { 18148 return num !== index ? num : null; 18149 } ); 18150 } else { 18151 disabled = $.map( this.tabs, function( li, num ) { 18152 return num !== index ? num : null; 18153 } ); 18154 } 18155 } 18156 this._setOptionDisabled( disabled ); 18157 }, 18158 18159 disable: function( index ) { 18160 var disabled = this.options.disabled; 18161 if ( disabled === true ) { 18162 return; 18163 } 18164 18165 if ( index === undefined ) { 18166 disabled = true; 18167 } else { 18168 index = this._getIndex( index ); 18169 if ( $.inArray( index, disabled ) !== -1 ) { 18170 return; 18171 } 18172 if ( $.isArray( disabled ) ) { 18173 disabled = $.merge( [ index ], disabled ).sort(); 18174 } else { 18175 disabled = [ index ]; 18176 } 18177 } 18178 this._setOptionDisabled( disabled ); 18179 }, 18180 18181 load: function( index, event ) { 18182 index = this._getIndex( index ); 18183 var that = this, 18184 tab = this.tabs.eq( index ), 18185 anchor = tab.find( ".ui-tabs-anchor" ), 18186 panel = this._getPanelForTab( tab ), 18187 eventData = { 18188 tab: tab, 18189 panel: panel 18190 }, 18191 complete = function( jqXHR, status ) { 18192 if ( status === "abort" ) { 18193 that.panels.stop( false, true ); 18194 } 18195 18196 that._removeClass( tab, "ui-tabs-loading" ); 18197 panel.removeAttr( "aria-busy" ); 18198 18199 if ( jqXHR === that.xhr ) { 18200 delete that.xhr; 18201 } 18202 }; 18203 18204 // Not remote 18205 if ( this._isLocal( anchor[ 0 ] ) ) { 18206 return; 18207 } 18208 18209 this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); 18210
18211 // Support: jQuery <1.8 18212 // jQuery <1.8 returns false if the request is canceled in beforeSend, 18213 // but as of 1.8, $.ajax() always returns a jqXHR object. 18214 if ( this.xhr && this.xhr.statusText !== "canceled" ) { 18215 this._addClass( tab, "ui-tabs-loading" ); 18216 panel.attr( "aria-busy", "true" ); 18217 18218 this.xhr 18219 .done( function( response, status, jqXHR ) { 18220 18221 // support: jQuery <1.8 18222 // http://bugs.jquery.com/ticket/11778 18223 setTimeout( function() { 18224 panel.html( response ); 18225 that._trigger( "load", event, eventData ); 18226 18227 complete( jqXHR, status ); 18228 }, 1 ); 18229 } ) 18230 .fail( function( jqXHR, status ) { 18231 18232 // support: jQuery <1.8 18233 // http://bugs.jquery.com/ticket/11778 18234 setTimeout( function() { 18235 complete( jqXHR, status ); 18236 }, 1 ); 18237 } ); 18238 } 18239 }, 18240 18241 _ajaxSettings: function( anchor, event, eventData ) { 18242 var that = this; 18243 return { 18244 18245 // Support: IE <11 only 18246 // Strip any hash that exists to prevent errors with the Ajax request 18247 url: anchor.attr( "href" ).replace( /#.*$/, "" ), 18248 beforeSend: function( jqXHR, settings ) { 18249 return that._trigger( "beforeLoad", event, 18250 $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); 18251 } 18252 }; 18253 }, 18254 18255 _getPanelForTab: function( tab ) { 18256 var id = $( tab ).attr( "aria-controls" ); 18257 return this.element.find( this._sanitizeSelector( "#" + id ) ); 18258 } 18259} ); 18260 18261 18262if ( $.uiBackCompat !== false ) { 18263 18264 $.widget( "ui.tabs", $.ui.tabs, { 18265 _processTabs: function() { 18266 this._superApply( arguments ); 18267 this._addClass( this.tabs, "ui-tab" ); 18268 } 18269 } ); 18270} 18271 18272var widgetsTabs = $.ui.tabs; 18273})); 18274/* End */ 18275; 18276; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/concept_phoenix_s4/js/subscribe.min.js?175034561613478";s:6:"source";s:52:"/bitrix/templates/concept_phoenix_s4/js/subscribe.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 18277(function (window){if (!!window.JCCatalogProductSubscribe)return;var subscribeButton = function (params){subscribeButton.superclass.constructor.apply(this,arguments);this.nameNode = BX.create('span',{props:{id:this.id},style:typeof (params.style) === 'object' ? params.style :{},text:params.text});this.buttonNode = BX.create('a',{attrs:{className:params.className},children:[this.nameNode],events:this.contextEvents});if (BX.browser.IsIE()){this.buttonNode.setAttribute("hideFocus","hidefocus")}};BX.extend(subscribeButton,BX.PopupWindowButton);window.JCCatalogProductSubscribe = function (params){this.buttonId = params.buttonId;this.buttonClass = params.buttonClass;this.jsObject = params.jsObject;this.ajaxUrl = '/bitrix/components/bitrix/catalog.product.subscribe/ajax.php';this.alreadySubscribed = params.alreadySubscribed;this.listIdAlreadySubscribed = params.listIdAlreadySubscribed;this.urlListSubscriptions = params.urlListSubscriptions;this.listOldItemId ={};this.landingId = params.landingId;this.elemButtonSubscribe = null;this.elemPopupWin = null;this.defaultButtonClass = 'bx-catalog-subscribe-button';this.buttonMainColorClass = params.buttonMainColorClass;this._elemButtonSubscribeClickHandler = BX.delegate(this.subscribe,this);this._elemHiddenClickHandler = BX.delegate(this.checkSubscribe,this);BX.ready(BX.delegate(this.init,this))};window.JCCatalogProductSubscribe.prototype.init = function (){if (!!this.buttonId){this.elemButtonSubscribe = BX(this.buttonId);this.elemHiddenSubscribe = BX(this.buttonId + '_hidden')}if (!!this.elemButtonSubscribe){BX.bind(this.elemButtonSubscribe,'click',this._elemButtonSubscribeClickHandler)}if (!!this.elemHiddenSubscribe){BX.bind(this.elemHiddenSubscribe,'click',this._elemHiddenClickHandler)}this.setButton(this.alreadySubscribed);this.setIdAlreadySubscribed(this.listIdAlreadySubscribed)};window.JCCatalogProductSubscribe.prototype.checkSubscribe = function (){if (!this.elemHiddenSubscribe || !this.elemButtonSubscribe) return;if (this.listOldItemId.hasOwnProperty(this.elemButtonSubscribe.dataset.item)){this.setButton(true)}else{BX.ajax({method:'POST',dataType:'json',url:this.ajaxUrl,data:{sessid:BX.bitrix_sessid(),checkSubscribe:'Y',itemId:this.elemButtonSubscribe.dataset.item},onsuccess:BX.delegate(function (result){if (result.subscribe){this.setButton(true);this.listOldItemId[this.elemButtonSubscribe.dataset.item] = true}else{this.setButton(false)}},this)})}};window.JCCatalogProductSubscribe.prototype.subscribe = function (){this.elemButtonSubscribe = BX.proxy_context;if (!this.elemButtonSubscribe) return false;BX.ajax({method:'POST',dataType:'json',url:this.ajaxUrl,data:{sessid:BX.bitrix_sessid(),subscribe:'Y',itemId:this.elemButtonSubscribe.dataset.item,siteId:BX.message('SITE_ID'),landingId:this.landingId},onsuccess:BX.delegate(function (result){if (result.success){this.createSuccessPopup(result);this.setButton(true);this.listOldItemId[this.elemButtonSubscribe.dataset.item] = true}else if (result.contactFormSubmit){this.initPopupWindow();this.elemPopupWin.setTitleBar(BX.message('CPST_SUBSCRIBE_POPUP_TITLE'));var form = this.createContentForPopup(result);this.elemPopupWin.setContent(form);this.elemPopupWin.setButtons([new subscribeButton({text:BX.message('CPST_SUBSCRIBE_BUTTON_NAME'),
18277className:'main-color button-def ' + this.buttonMainColorClass,events:{click:BX.delegate(function (){if (!this.validateContactField(result.contactTypeData)){return false}BX.ajax.submitAjax(form,{method:'POST',url:this.ajaxUrl,processData:true,onsuccess:BX.delegate(function (resultForm){resultForm = BX.parseJSON(resultForm,{});if (resultForm.success){this.createSuccessPopup(resultForm);this.setButton(true);this.listOldItemId[this.elemButtonSubscribe.dataset.item] = true}else if (resultForm.error){if (resultForm.hasOwnProperty('setButton')){this.listOldItemId[this.elemButtonSubscribe.dataset.item] = true;this.setButton(true)}var errorMessage = resultForm.message;if (resultForm.hasOwnProperty('typeName')){errorMessage = resultForm.message.replace('USER_CONTACT',resultForm.typeName)}BX('bx-catalog-subscribe-form-notify').style.color = 'red';BX('bx-catalog-subscribe-form-notify').innerHTML = errorMessage}},this)})},this)}})]);this.elemPopupWin.show()}else if (result.error){if (result.hasOwnProperty('setButton')){this.listOldItemId[this.elemButtonSubscribe.dataset.item] = true;this.setButton(true)}this.showWindowWithAnswer({status:'error',message:result.message})}},this)})};window.JCCatalogProductSubscribe.prototype.validateContactField = function (contactTypeData){var inputFields = BX.findChildren(BX('bx-catalog-subscribe-form'),{'tag':'input','attribute':{id:'userContact'}},true);if (!inputFields.length || typeof contactTypeData !== 'object'){BX('bx-catalog-subscribe-form-notify').style.color = 'red';BX('bx-catalog-subscribe-form-notify').innerHTML = BX.message('CPST_SUBSCRIBE_VALIDATE_UNKNOW_ERROR');return false}var contactTypeId,contactValue,useContact,errors = [],useContactErrors = [];for (var k = 0;k < inputFields.length;k++){contactTypeId = inputFields[k].getAttribute('data-id');contactValue = inputFields[k].value;useContact = BX('bx-contact-use-' + contactTypeId);if (useContact && useContact.value == 'N'){useContactErrors.push(true);continue}if (!contactValue.length){errors.push(BX.message('CPST_SUBSCRIBE_VALIDATE_ERROR_EMPTY_FIELD').replace('#FIELD#',contactTypeData[contactTypeId].contactLable))}}if (inputFields.length == useContactErrors.length){BX('bx-catalog-subscribe-form-notify').style.color = 'red';BX('bx-catalog-subscribe-form-notify').innerHTML = BX.message('CPST_SUBSCRIBE_VALIDATE_ERROR');return false}if (errors.length){BX('bx-catalog-subscribe-form-notify').style.color = 'red';for (var i = 0;i < errors.length;i++){BX('bx-catalog-subscribe-form-notify').innerHTML = errors[i]}return false}return true};window.JCCatalogProductSubscribe.prototype.reloadCaptcha = function (){BX.ajax.get(this.ajaxUrl + '?reloadCaptcha=Y','',function (captchaCode){BX('captcha_sid').value = captchaCode;BX('captcha_img').src = '/bitrix/tools/captcha.php?captcha_sid=' + captchaCode + ''})};window.JCCatalogProductSubscribe.prototype.createContentForPopup = function (responseData){if (!responseData.hasOwnProperty('contactTypeData')){return null}var contactTypeData = responseData.contactTypeData,contactCount = Object.keys(contactTypeData).length,styleInputForm = '',manyContact = 'N',content = document.createDocumentFragment();if (contactCount > 1){manyContact = 'Y';styleInputForm = 'display:none;';content.appendChild(BX.create('p',{text:BX.message('CPST_SUBSCRIBE_MANY_CONTACT_NOTIFY')}))}content.appendChild(BX.create('p',{props:{id:'bx-catalog-subscribe-form-notify'}}));for (var k in contactTypeData){if (contactCount > 1){content.appendChild(BX.create('div',{props:{className:'bx-catalog-subscribe-form-container'},children:[BX.create('div',{props:{className:'checkbox'},children:[BX.create('lable',{props:{className:'bx-filter-param-label'},attrs:{onclick:this.jsObject + '.selectContactType(' + k + ',event);'},children:[BX.create('input',{props:{type:'hidden',id:'bx-contact-use-' + k,name:'contact[' + k + '][use]',value:'N'}}),BX.create('input',{props:{id:'bx-contact-checkbox-' + k,type:'checkbox'}}),BX.create('span',{props:{className:'bx-filter-param-text'},text:contactTypeData[k].contactLable})]})]})]}))}content.appendChild(BX.create('div',{props:{id:'bx-catalog-subscribe-form-container-' + k,className:'bx-catalog-subscribe-form-container',style:styleInputForm},children:[BX.create('div',{props:{className:'bx-catalog-subscribe-form-container-input input-simple inp-small'},children:[BX.create('DIV',{props:{className:"bg"},}),BX.create('SPAN',{props:{className:"desc"},html:BX.message('CPST_SUBSCRIBE_LABLE_CONTACT_INPUT').replace('#CONTACT#',contactTypeData[k].c
18277ontactLable)}),BX.create('input',{props:{id:'userContact',className:'focus-anim bord-1 b-ra inp-require',type:'text',name:'contact[' + k + '][user]'},attrs:{'data-id':k}})]})]}))}if (responseData.hasOwnProperty('captchaCode')){content.appendChild(BX.create('div',{props:{className:'bx-catalog-subscribe-form-container'},children:[BX.create('span',{props:{className:'bx-catalog-subscribe-form-star-required'},text:'*'}),BX.message('CPST_ENTER_WORD_PICTURE'),BX.create('div',{props:{className:'bx-captcha'},children:[BX.create('input',{props:{type:'hidden',id:'captcha_sid',name:'captcha_sid',value:responseData.captchaCode}}),BX.create('img',{props:{id:'captcha_img',src:'/bitrix/tools/captcha.php?captcha_sid=' + responseData.captchaCode + ''},attrs:{width:'180',height:'40',alt:'captcha',onclick:this.jsObject + '.reloadCaptcha();'}})]}),BX.create('div',{props:{className:'bx-catalog-subscribe-form-container-input'},children:[BX.create('input',{props:{id:'captcha_word',className:'',type:'text',name:'captcha_word'},attrs:{maxlength:'50'}})]})]}))}var form = BX.create('form',{props:{id:'bx-catalog-subscribe-form'},children:[BX.create('input',{props:{type:'hidden',name:'manyContact',value:manyContact}}),BX.create('input',{props:{type:'hidden',name:'sessid',value:BX.bitrix_sessid()}}),BX.create('input',{props:{type:'hidden',name:'itemId',value:this.elemButtonSubscribe.dataset.item}}),BX.create('input',{props:{type:'hidden',name:'landingId',value:this.landingId}}),BX.create('input',{props:{type:'hidden',name:'siteId',value:BX.message('SITE_ID')}}),BX.create('input',{props:{type:'hidden',name:'contactFormSubmit',value:'Y'}})]});form.appendChild(content);return form};window.JCCatalogProductSubscribe.prototype.selectContactType = function (contactTypeId,event){var contactInput = BX('bx-catalog-subscribe-form-container-' + contactTypeId),visibility = '',checkboxInput = BX('bx-contact-checkbox-' + contactTypeId);if (!contactInput){return false}if (checkboxInput != event.target){if (checkboxInput.checked){checkboxInput.checked = false}else{checkboxInput.checked = true}}if (contactInput.currentStyle){visibility = contactInput.currentStyle.display}else if (window.getComputedStyle){var computedStyle = window.getComputedStyle(contactInput,null);visibility = computedStyle.getPropertyValue('display')}if (visibility === 'none'){BX('bx-contact-use-' + contactTypeId).value = 'Y';BX.style(contactInput,'display','')}else{BX('bx-contact-use-' + contactTypeId).value = 'N';BX.style(contactInput,'display','none')}};window.JCCatalogProductSubscribe.prototype.createSuccessPopup = function (result){this.initPopupWindow();this.elemPopupWin.setTitleBar(BX.message('CPST_SUBSCRIBE_POPUP_TITLE'));var content = BX.create('div',{props:{className:'bx-catalog-popup-content text-content center'},children:[BX.create('p',{props:{className:'bx-catalog-popup-message'},text:result.message})]});this.elemPopupWin.setContent(content);this.elemPopupWin.show()};window.JCCatalogProductSubscribe.prototype.initPopupWindow = function (){this.elemPopupWin = BX.PopupWindowManager.create('CatalogSubscribe_' + this.buttonId,null,{autoHide:false,offsetLeft:0,offsetTop:0,overlay:true,closeByEsc:true,titleBar:true,closeIcon:true,contentColor:'white'})};window.JCCatalogProductSubscribe.prototype.setButton = function (statusSubscription){this.alreadySubscribed = Boolean(statusSubscription);if (this.alreadySubscribed){this.elemButtonSubscribe.className = this.buttonClass + ' ' + this.defaultButtonClass + ' disabled';this.elemButtonSubscribe.innerHTML = '<span>' + BX.message('CPST_TITLE_ALREADY_SUBSCRIBED') + '</span>';BX.unbind(this.elemButtonSubscribe,'click',this._elemButtonSubscribeClickHandler)}else{this.elemButtonSubscribe.className = this.buttonClass + ' ' + this.defaultButtonClass;this.elemButtonSubscribe.innerHTML = '<span>' + BX.message('CPST_SUBSCRIBE_BUTTON_NAME') + '</span>';BX.bind(this.elemButtonSubscribe,'click',this._elemButtonSubscribeClickHandler)}};window.JCCatalogProductSubscribe.prototype.setIdAlreadySubscribed = function (listIdAlreadySubscribed){if (BX.type.isPlainObject(listIdAlreadySubscribed)){this.listOldItemId = listIdAlreadySubscribed}};window.JCCatalogProductSubscribe.prototype.showWindowWithAnswer = function (answer){answer = answer ||{};if (!answer.message){if (answer.status == 'success'){answer.message = BX.message('CPST_STATUS_SUCCESS')}else{answer.message = BX.message('CPST_STATUS_ERROR')}}var messageBox = BX.create('div',{props:{className:'bx-catalog-subscribe-alert'},children:[BX.create('span',{props:{className:'bx-catalog-subscribe-aligner'}}),BX.create('span',{props:{className:'bx-catalog-subscribe-alert-text'},text:answer.message}),BX.create('div',{props:{className:'bx-catalog-subscribe-alert-footer'}})]});var currentPopup = BX.PopupWindowManager.getCurrentPopup();if (currentPopup){currentPopup.destroy()}var idTimeout = setTimeout(function (){var w = BX.PopupWindowManager.getCurrentPopup();if (!w || w.uniquePopupId != 'bx-catalog-subscribe-status-action'){return}w.close();w.destroy()},3500);var popupConfirm = BX.PopupWindowManager.create('bx-catalog-subscribe-status-action',null,{content:messageBox,onPopupClose:function (){this.destroy();clearTimeout(idTimeout)},autoHide:true,zIndex:2000,className:'bx-catalog-subscribe-alert-popup'});popupConfirm.show();BX('bx-catalog-subscribe-status-action').onmouseover = function (e){clearTimeout(idTimeout)};BX('bx-catalog-subscribe-status-action').onmouseout = function (e){idTimeout = setTimeout(function (){var w = BX.PopupWindowManager.getCurrentPopup();if (!w || w.uniquePopupId != 'bx-catalog-subscribe-status-action'){return}w.close();w.destroy()},3500)}}})(window); 18278/* End */ 18279; 18280; /* Start:"a:4:{s:4:"full";
18280s:70:"/bitrix/templates/concept_phoenix_s4/js/script.min.js?1782498637212557";s:6:"source";s:49:"/bitrix/templates/concept_phoenix_s4/js/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 18281var stopScrollBasket = false,arStatusBasketPhoenix ={},contentSideHeight = 0,menuSideHeight = 0,basketPoolQuantity ={},cur_pos = 0,cart_page = "N",customEvent = false,layerPopup = 0,windowWidth = document.documentElement.clientWidth,windowHeight = document.documentElement.clientHeight;var paramsLazy ={scrollDirection:'vertical',threshold:500,visibleOnly:true,effect:'fadeIn'};function generateMaps(container){var mapBlock = $(".iframe-map-area",container);if (mapBlock.length > 0){mapBlock.each(function (index,element){$(element).after($(element).attr("data-src"));$(element).remove()})}}function generateVideos(container){var videoBlock = $(".iframe-video-area",container);if (videoBlock.length > 0){videoBlock.each(function (index,element){$(element).after($(element).attr("data-src"));$(element).remove()})}}function showWaitSearch(form){form.find(".circleG-area").addClass('active')}function hideWaitSearch(form){form.find(".circleG-area").removeClass('active')}function openCart(){$('.no-click-block').addClass('on');$('div.cart-parent').addClass('open');startBlurWrapperContainer();var openCartOut = setTimeout(function (){$('div.cart-parent').addClass('on');clearTimeout(openCartOut)},200)}function closeCart(){stopBlurWrapperContainer();$('div.cart-parent').removeClass('on');$('.no-click-block').removeClass('on');var closeCartOut = setTimeout(function (){$('div.cart-parent').removeClass('open');clearTimeout(closeCartOut)},700)}function showFormOrder(){if ($(window).width() <= 767)$(".right-p",".basket-style.page").removeClass('d-none')}function hideFormOrder(){if ($(window).width() <= 767)$(".right-p",".basket-style.page").addClass('d-none')}function showTabContent(arParams){var curUrlParam = "-1";var urlParams = getUrlParams();arParams = arParams ||{};if (urlParams['url-tab'] !== undefined){curUrlParam = urlParams['url-tab'];if (curUrlParam == "products" && arParams.products)curUrlParam = "products";else if (curUrlParam == "delayed" && arParams.delay)curUrlParam = "delayed";else if (arParams.products)curUrlParam = "products";else if (arParams.delay)curUrlParam = "delayed"}if ($(".url-tab[data-url-tab='" + curUrlParam + "']").length > 0){$(".url-tab[data-url-tab='" + curUrlParam + "']").parents(".url-tab-parent").find(".url-tab").removeClass('active').parents(".url-tab-parent").find(".url-tab-content").removeClass('active');$(".url-tab[data-url-tab='" + curUrlParam + "']").addClass('active');$(".url-tab-content[data-url-tab='" + curUrlParam + "']").addClass('active');if (curUrlParam == "delayed")hideFormOrder()}}function getChar(evt){evt = (evt) ? evt :window.event;var charCode = (evt.which) ? evt.which :evt.keyCode;if (charCode >
18281 31 && (charCode < 46 || charCode > 57)){return null}return true}function menuOffset(li){var mainPosition = $(li).parents('.main-menu-inner').width() + $(li).parents('.main-menu-inner').offset().left;var liPosition = $(li).children('ul').offset().left + $(li).children('ul').width();if (liPosition >= mainPosition) $(li).addClass('reverse')}function mobileMenuPositionFooter(){if ($('.open-menu-mobile').height() > ($('div.open-menu-mobile div.menu-mobile-inner').outerHeight() + $('div.open-menu-mobile div.foot-wrap').outerHeight(true))) $('div.open-menu-mobile div.foot-wrap').addClass('absolute');else{$('div.open-menu-mobile div.foot-wrap').removeClass('absolute')}}function openMenuFooterPos(){var totalHeight = $('.open-menu .head-menu-wrap').outerHeight(true) + $('.open-menu .body-menu').outerHeight(true) + $('.open-menu .footer-menu-wrap').outerHeight(true);var needHeight = $('.open-menu').height() - totalHeight + $('.open-menu .body-menu').outerHeight();if ($(window).height() > totalHeight) $('.open-menu .body-menu').css('min-height',needHeight + 'px')}function phoenixResizeVideo(){var win_height = $('div.video-modal').height();var modal = 590;if ($(window).width() > 767){if (win_height > modal) $("div.video-modal div.phoenix-modal-dialog").addClass('pos-absolute');else{$("div.video-modal div.phoenix-modal-dialog").removeClass('pos-absolute')}}else{$("div.video-modal div.phoenix-modal-dialog").addClass('pos-absolute')}}function scrollToBlock(dist,elem,offset){var moreDist = 0;offset = offset || 0;elem = elem || 0;if ($('header').hasClass("fixed"))moreDist = 69;if ($("div.catalog-card-wrap").length > 0 || $("div.catalog-list-wrap").length > 0){moreDist = 0;if ($('header').hasClass("fixed")) moreDist = 80;if (elem){if (elem.hasClass('review')) moreDist = 100}}var destinationhref = parseInt($(dist).offset().top - moreDist - offset);$("html:not(:animated),body:not(:animated)").animate({scrollTop:destinationhref},1000,"linear",function (){setTimeout(function (){if (100 < Math.abs(parseInt($(dist).offset().top - moreDist - offset) - destinationhref)){$("html:not(:animated),body:not(:animated)").animate({scrollTop:parseInt($(dist).offset().top - moreDist - offset)},300,"linear")}},300)})}function timerCookie(form){var timeout = true;var timer = form.find('input.timerVal').val();var forCookieTime = parseFloat(form.find('input.forCookieTime').val());var totalTime = 0;var mainTime = new Date().getTime();var idElem = form.find("input[name='element']").val();var idSect = form.find('input.idSect').val();var firstEnter = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnter' + idSect + idElem);var firstEnterVal = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnterVal' + idSect + idElem);setTimeout(function (){form.css('min-height',form.outerHeight())},100);if (forCookieTime <= 0)forCookieTime = 1;form.find('.phoenixtimer').addClass('active');if (typeof (firstEnter) == "undefined" || firstEnterVal != timer){BX.setCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnter' + idSect + idElem,mainTime,{expires:forCookieTime * 60 * 60});BX.setCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnterVal' + idSect + idElem,timer,{expires:forCookieTime * 60 * 60});firstEnter = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnter' + idSect + idElem);firstEnterVal = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenixFirstEnterVal' + idSect + idElem)}totalTime = ((mainTime - firstEnter) / 1000).toFixed();if (totalTime < timer * 60) timer = timer * 60 - totalTime;else{timeout = false}if (timeout) form.find('.phoenixtimer').countdown({until:timer,format:'HMS',onExpiry:liftOff,layout:form.find('.phoenixtimer').html()},$.countdown.regionalOptions['ru']);else{form.find('.questions').removeClass('active');form.find('.timeout_text').addClass('active')}function liftOff(){form.find('.questions').removeClass('active');form.find('.timeout_text').addClass('active')}}function parseCount(newVal,ratio,minVal){var ost = newVal % ratio;var ratio_ = ratio - ost;newVal = newVal - minVal;newVal -= (newVal % ratio);if (ratio_ >= ost){newVal += minVal}else{newVal += minVal + ratio}if (newVal <= minVal || isNaN(newVal))newVal = minVal;return newVal}
18281function formatNum(val){val = String(val).replace(/(\d)(?=(\d{3})+([^\d]|$))/g,'$1 ');return val}function formAttentionScroll(dist,parent){$(parent).animate({scrollTop:dist},700)}function setHeaderBgImg(attr){if (typeof attr !== 'undefined')$('header').css({"background-image":"url('" + attr + "')"})}var lazyController = false,parentContainerSlide ={},parent ={},arImagesLazyload ={};function updateLazyLoad(){$('.lazyload').Lazy({scrollDirection:'vertical',threshold:500,visibleOnly:true,effect:'fadeIn',afterLoad:function (element){if (contentSideHeight > 0)contentSideHeight = $(".parent-fixedSrollBlock").outerHeight(true);parent = $(element).parent();parentContainerSlide = parent.find('.parent-slider-item-js');if ($(element).hasClass("slider-start")){if (typeof arImagesLazyload["id" + $(element).attr("data-id")] === "undefined")arImagesLazyload["id" + $(element).attr("data-id")] ={"s":0,"f":0,"type":null};arImagesLazyload["id" + $(element).attr("data-id")].s = 1;arImagesLazyload["id" + $(element).attr("data-id")].type = parentContainerSlide}if ($(element).hasClass('slider-finish')){if (typeof arImagesLazyload["id" + $(element).attr("data-id")] === "undefined")arImagesLazyload["id" + $(element).attr("data-id")] ={"s":0,"f":0,"type":null};arImagesLazyload["id" + $(element).attr("data-id")].f = 1;arImagesLazyload["id" + $(element).attr("data-id")].type = parentContainerSlide}if ($(element).hasClass('slider-finish') || $(element).hasClass("slider-start")){for (key in arImagesLazyload){if (arImagesLazyload[key].s == 1 && arImagesLazyload[key].f == 1){controllerSliders(arImagesLazyload[key].type);delete arImagesLazyload[key]}}}if ($(element).parents(".parent-video-bg").find(".videoBG").length > 0)correctSizeVideoBg($(element).parents(".parent-video-bg").find(".videoBG"));if ($(element).hasClass('map-start'))generateMaps($(element).parents("div.block"));if ($(element).hasClass('video-start'))generateVideos($(element).parents("div.block"));if ($(element).hasClass('video-start-js'))generateVideos($(element).parents("div.video-start-parent"));if ($(element).hasClass('videoBG-start'))generateVideoBG($(element).parents("div.block"));if ($(element).hasClass('videoBG-start-fb'))generateVideoBG($(element).parents("div.first-block"))}})}function initMobileSideMenu(){if ($(window).width() <= 991 && $(".menu-navigation-inner").length > 0){var clone = $(".menu-navigation-inner").clone();$(".menu-navigation-inner").remove();clone.addClass('wr-transform-to-dialog-by-mob d-none container-close-from-scroll').children().addClass('transform-to-dialog-by-mob').find(".scroll").addClass('from-modal');clone.appendTo("body")}}function setSharesValues(){if ($(".public_shares").length > 0){var title = "",description = "",image = "",url = "";if ($("meta[property=\"og:title\"]").length)title = $("meta[property=\"og:title\"]").attr("content");if ($("meta[property=\"og:description\"]").length)description = $("meta[property=\"og:description\"]").attr("content");if ($("meta[property=\"og:image\"]").length)image = $("meta[property=\"og:image\"]").attr("content");if ($("meta[property=\"og:url\"]").length)url = $("meta[property=\"og:url\"]").attr("content");$(".public_shares a.vkontakte").attr("onclick","Share.vkontakte('" + url + "','" + title + "','" + image + "','" + description + "')");$(".public_shares a.facebook").attr("onclick","Share.facebook('" + url + "','" + title + "','" + image + "','" + description + "')");$(".public_shares a.twitter").attr("onclick","Share.twitter('" + url + "','" + title + "')")}}function ShowApplyRegion(){if ($(".popup-block.region-apply").length > 0){setTimeout(function (){$(".popup-block.region-apply").removeClass('d-none');$(".popup-block.region-apply").addClass('fadeInUp');if ($(window).width() < 768){startBlurWrapperContainer()}},2000)}}function controllerSliders(obj){if(obj){if(!obj.hasClass('slider-init')){if (obj.hasClass('block-slider-list'))initSlider(obj);if (obj.hasClass('slider'))initOpSlider(obj);if (obj.hasClass('slider-mini'))initOpMiniSlider(obj);if (obj.hasClass('slider_catalog_big_items'))initCSlider(obj);if (obj.hasClass('partners-slider-list'))initPartnersSlider(obj);if (obj.hasClass('slider-gallery'))initGallerySlider(obj);if (obj.hasClass('big-advantages-slide'))initAdvantagesBigSlider(obj);if (obj.hasClass('small-advantages-slide'))initAdvantagesSmallSlider(obj);if (obj.hasClass('slider-news-big'))initNewsBigSlider(obj);if (obj.hasClass('slider-news-small'))initNewsSmallSlider(obj);if (obj.hasClass('menu-banner-slider'))initBannersSlider(obj);if (obj.hasClass('slider-news-detail'))initNewsDetailSlider(obj);if (obj.hasClass('catalog-list-slider'))initCatalogDetailSlider(obj);if (obj.hasClass('section-items-slider'))initCatalogSubSectionsSlider(obj)}}}function setChangerBlocks(){$("div.changer-blocks").each(function(){var block = $(this);$("div.changer-link-js",block).each(function(index,value){var arIds = $(this).attr("data-id").split(",");if(arIds){for (var i = 0;i < arIds.length;i++){if($(this).hasClass("active")){$("div#block"+arIds[i]).removeClass("d-none");$('.lazyload').Lazy(paramsLazy);var obj = $("div#block"+arIds[i]).find(".parent-slider-item-js");controllerSliders(obj)}}}})});$("div.changer-link-js").click(function(){var block = $(this).parents("div.changer-blocks");$("div.changer-link-js",block).removeClass("active");$(this).addClass("active");$("div.changer-link-js",block).each(function(index,value){var arIds = $(this).attr("data-id").split(",");if(arIds){for (var i = 0;i < arIds.length;i++){$("div#block"+arIds[i]).addClass("d-none")}}});var arIds = $(this).attr("data-id").split(",");if(arIds){for (var i = 0;i < arIds.length;i++){$("div#block"+arIds[i]).removeClass("d-none");$('.lazyload').Lazy(paramsLazy);var obj = $("div#block"+arIds[i]).find(".parent-slider-item-js");controllerSliders(obj)}}})}$(document).ready(function (){setSharesValues();initMobileSideMenu();if ($(window).width() >= 991)$(".slide-hidden-lg").remove();else{$(".slide-hidden-xs").remove()}if ($(window).width() >= 768)setHeaderBgImg($('header').attr('data-src-lg'));if ($(window).width() < 768){setHeaderBgImg($('header').attr('data-src-xs'));if ($(".error-404").length > 0)$("div.wrapper").addClass('overflow-visible')}updateLazyLoad();if (window.frameCacheVars !== undefined){BX.addCustomEvent("onFrameDataReceived",function (json){customEvent = true})}initZoomer($('.zoom'));$('.date-group').datetimepicker({timepicker:false,format:'d.m.Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1});getCatalogStories();setChangerBlocks();setComments()});function ajaxGetComments(params){var path = "/bitrix/tools/concept.phoenix/ajax/comments/comments_block.php";params = params || 0;showProcessLoadBlock($(".block-comments-js"));$.post(path,{site_id:$("input.site_id").val(),id:$(".block-comments-js").attr("data-element-id"),mode:params.mode,page:params.pageNum},function (html){closeProcessLoadBlock($(".block-comments-js"));if(params.this){if (params.this.hasClass('get-comments-js')){$(".block-comments-js .comments-set-js").append(html);params.this.remove()}}else{$('.comments-set-js').append(html)}if(params.newItem){$.ajax({url:"/bitrix/tools/concept.phoenix/ajax/ajax_hit_page.php",method:'POST',success:function(json){}});var otherHeight = 0;if ($('header').hasClass('fixed')) otherHeight = 100;var newItem = $('.comments-set-js').find('.review-item.first');newItem.addClass('new');formAttentionScroll(newItem.offset().top - otherHeight,"html:not(:animated),body:not(:animated)");setTimeout(function(){newItem.removeClass('new')},2000)}})}function setComments(newItem){if($('.block-comments-js').length>0){newItem = newItem || '';var params ={newItem:newItem,mode:"full"};ajaxGetComments(params)}}$(document).on("click",".get-comments-js",function (){var params ={"this":$(this),"pageNum":$(this).attr("data-page"),"mode":"list"};ajaxGetComments(params)});function deleteComment(params){var path = "/bitrix/tools/concept.phoenix/ajax/comments/delete.php";params = params || 0;showProcessLoadBlock($(".block-comments-js"));$.post(path,{site_id:$("input.site_id").val(),ELEMENT_ID:params.ELEMENT_ID},function (data){closeProcessLoadBlock($(".block-comments-js"));if (data.OK == "Y"){$(".review-item[data-review-id='"+params.ELEMENT_ID+"']").remove()}else{$('.comments-set-js').html('');setComments()}},"json")}$(document).on("click",".comment-delete-js",function (){var params ={"ELEMENT_ID":$(this).attr("data-review-id")};deleteComment(params)});function sendComments(that,fields){fields = fields || null;var form = that.parents("form"),load = form.find(".loader-simple"),question = form.find(".question-js"),thank = form.find(".thank-js"),text = form.find("textarea[name=TEXT]"),btn = that;if(text.val()<=5){text.addClass('has-error');formAttentionScroll(text.offset().top - form.offset().top,"html:not(:animated),body:not(:animated)");return false}else{load.removeClass('d-none');btn.addClass('d-none');var formSendAll = buildFormValues(form);formSendAll.append("send","Y");formSendAll.append("site_id",$("input.site_id").val());if(fields){if(fields.captchaToken)formSendAll.append("captchaToken",fields.captchaToken)}var path = "/bitrix/tools/concept.phoenix/ajax/comments/add.php";$.ajax({url:path,method:'POST',contentType:false,processData:false,data:formSendAll,dataType:'json',success:function (json){if (json.OK == "Y"){thank.html(json.MESSAGE);question.addClass('d-none');thank.removeClass('d-none');setTimeout(function(){if(json.NEW === 'Y'){$('.comments-set-js').html('');setComments(json.NEW)}question.removeClass('d-none');thank.addClass('d-none');load.addClass('d-none');btn.removeClass('d-none');text.val('');text.parent().removeClass('in-focus')},2000);$.ajax({url:"/bitrix/tools/concept.phoenix/ajax/ajax_hit_page.php",method:'POST',success:function (json){}})}else if (json.OK == "N"){question.removeClass('d-none');thank.addClass('d-none');load.addClass('d-none');btn.removeClass('d-none')}console.log(json.CAPTCHA_SCORE)}})}}$(document).on("click",".btn-submit-comments-js",function (){var that = $(this);
18281if($("body").hasClass('captcha')){grecaptcha.execute($(".captcha-site-key").val(),{action:'homepage'}).then(function(token){sendComments(that,{captchaToken:token})})}else{sendComments(that)}});function initZoomer(obj){if ($(window).width() > 1024)obj.zoom()}function correctBgStyle(obj){$('div.lazyload',obj).each(function (index,element){if (typeof $(element).attr("src") != "undefined"){$(element).attr("style","background-image:url(" + $(element).attr("src") + ");");$(element).removeAttr("src")}})}function correctLazyloadInSlider(obj){if ($('.lazyload',obj).length){$('.lazyload',obj).each(function (index,element){$(element).attr("src",$(element).attr("data-src"));$(element).removeAttr("data-src")});if ($('div.lazyload',obj).length)correctBgStyle(obj)}}function initNewsDetailSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:3,slidesToScroll:1,dots:false,infinite:true,centerPadding:0,arrows:true,responsive:[{breakpoint:991,settings:{slidesToShow:2}},{breakpoint:575.98,settings:{slidesToShow:1}},{breakpoint:0,settings:"unslick"}]})}function initCatalogSubSectionsSlider(obj){if ($(window).width() < 768){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj)});obj.slick({arrows:false,slidesToShow:3,slidesToScroll:3,centerMode:false,variableWidth:true,infinite:false,})}}function initCatalogDetailSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}correctLazyloadInSlider(obj)});var count = 3;if(obj.attr('data-count'))count = obj.attr('data-count');obj.slick({slidesToShow:count,slidesToScroll:1,dots:false,infinite:true,centerPadding:0,arrows:true,responsive:[{breakpoint:991,settings:{slidesToShow:(count - 1)}},{breakpoint:575.98,settings:{slidesToShow:2,adaptiveHeight:true}},{breakpoint:0,settings:"unslick"}]})}function initNewsBigSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:4,slidesToScroll:1,dots:false,infinite:true,centerPadding:0,centerMode:false,adaptiveHeight:false,focusOnSelect:false,arrows:true,responsive:[{breakpoint:1200,settings:{slidesToShow:3,}},{breakpoint:991,settings:{slidesToShow:2}},{breakpoint:767,settings:{slidesToShow:2}},{breakpoint:575.98,settings:{slidesToShow:1,adaptiveHeight:true,}},{breakpoint:0,settings:"unslick"}]})}function initNewsSmallSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:3,slidesToScroll:1,dots:false,infinite:true,centerPadding:0,centerMode:false,adaptiveHeight:false,focusOnSelect:false,arrows:true,responsive:[{breakpoint:1200,settings:{slidesToShow:2,}},{breakpoint:767,settings:{slidesToShow:2}},{breakpoint:575.98,settings:{slidesToShow:1}},{breakpoint:0,settings:"unslick"}]})}function initAdvantagesBigSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:3,slidesToScroll:1,dots:false,infinite:true,centerPadding:0,centerMode:false,adaptiveHeight:false,focusOnSelect:false,responsive:[{breakpoint:1200,settings:{slidesToShow:3,}},{breakpoint:991,settings:{slidesToShow:2}},{breakpoint:575.98,settings:{slidesToShow:1}},{breakpoint:0,settings:"unslick"}]})}function initBannersSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:1,slidesToScroll:1,autoplay:true,autoplaySpeed:5000,dots:false,infinite:true,adaptiveHeight:false,speed:500,arrows:false})}function initAdvantagesBigSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({dots:true,adaptiveHeight:false})}function initAdvantagesSmallSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({dots:true,slidesToShow:2,adaptiveHeight:false,slidesToScroll:2,responsive:[{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:575.98,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:0,settings:"unslick"}]})}function initOpMiniSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({dots:true,infinite:true,adaptiveHeight:true,arrows:true})}function initOpSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});var count = obj.attr('data-count');if (count == 1){$('.slider-for',obj).slick({slidesToShow:1,arrows:false,asNavFor:obj.find('.slider-nav'),appendArrows:obj.find('.slider-nav-wrap')});$('.slider-nav',obj).slick({slidesToShow:1,asNavFor:obj.find('.slider-for'),centerPadding:0,dots:false,centerMode:true,focusOnSelect:true,});obj.addClass("one-slide")}else if (count == 2){$('.slider-for',obj).slick({slidesToShow:1,slidesToScroll:1,speed:300,fade:true,adaptiveHeight:true,arrows:false,asNavFor:obj.find('.slider-nav'),appendArrows:obj.find('.slider-nav-wrap')});$('.slider-nav',obj).slick({slidesToShow:2,slidesToScroll:1,speed:300,asNavFor:obj.find('.slider-for'),centerPadding:0,dots:false,centerMode:true,focusOnSelect:true,responsive:[{breakpoint:1200,settings:{slidesToShow:2}},{breakpoint:991,settings:{slidesToShow:1}},{breakpoint:0,settings:"unslick"}]})}else{$('.slider-for',obj).slick({slidesToShow:1,slidesToScroll:1,speed:300,fade:true,adaptiveHeight:true,arrows:false,asNavFor:obj.find('.slider-nav'),appendArrows:obj.find('.slider-nav-wrap')});$('.slider-nav',obj).slick({slidesToShow:3,slidesToScroll:1,speed:300,asNavFor:obj.find('.slider-for'),centerPadding:0,dots:false,centerMode:true,focusOnSelect:true,responsive:[{breakpoint:1200,settings:{slidesToShow:3}},{breakpoint:991,settings:{slidesToShow:1}},{breakpoint:0,settings:"unslick"}]})}}
18281function initCSlider(obj){var sliderCount = 0;if (obj.attr("data-count"))sliderCount = parseInt(obj.attr("data-count"));if (sliderCount > 1){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.on('beforeChange',function (event,slick,currentSlide,nextSlide){correctLazyloadInSlider(obj)});obj.addClass("slider-init");obj.slick({slidesToShow:1,slidesToScroll:1,autoplay:false,dots:true,infinite:false,adaptiveHeight:true,speed:500,arrows:true,responsive:[{breakpoint:767.98,settings:{dots:false}}]})}else{obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init")}}function initGallerySlider(obj){var count = parseInt(obj.attr("data-slide-visible"));obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({dots:true,adaptiveHeight:true,slidesToScroll:count,slidesToShow:count,responsive:[{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1,}},{breakpoint:0,settings:"unslick"}]})}function initPartnersSlider(obj){obj.on('init',function (event,slick){obj.find(".slick-slide").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick({slidesToShow:6,slidesToScroll:1,dots:false,infinite:true,adaptiveHeight:false,speed:500,arrows:true,responsive:[{breakpoint:1200,settings:{slidesToShow:4,}},{breakpoint:767,settings:{slidesToShow:1,}},{breakpoint:0,settings:"unslick"}]})}function setHeightForFirstSlider(){if ($(window).width() >= 768 || ($(window).width() < 768 && $(".wrap-first-slider").attr("data-full-height") == "Y")){var height1 = 0,height2 = 0,sizeSlides = $('div.first-slider div.first-block').length;$('div.first-slider div.first-block').each(function (index){if ($(this).outerHeight() > height2){height1 = $(this).height();height2 = $(this).outerHeight()}if (sizeSlides == index + 1){if (sizeSlides > 1)$('div.first-slider div.first-block-container').css("height",height1);if ($(".wrap-first-slider").attr("data-full-height") == "Y"){if ($(window).height() > $(".wrap-first-slider").height())$(".wrap-first-slider").find(".slick-track").css("height",$(window).height() +"px")}if (($(window).width() < 768 && $(".wrap-first-slider").attr("data-full-height") == "Y")){if ($(window).height() > $(".wrap-first-slider").height())$(".wrap-first-slider").find(".slick-track").css("height",$(window).height() +"px")}if ($('div.first-slider div.first-block').find(".videoBG").length > 0){$($('div.first-slider div.first-block').find(".videoBG")).each(function (index){correctSizeVideoBg($(this))})}}})}}function initFSlider(obj,size){var adaptiveMob = ($(window).width() < 768 && $(".wrap-first-slider").attr("data-full-height") == "Y") ? false :true,sizeSlides = $('div.first-slider div.first-block').length,params ={};if (size == "lg"){params ={dots:false,infinite:true,adaptiveHeight:false,speed:500,pauseOnFocus:false,pauseOnHover:false}}else if (size == "xs"){params ={dots:false,infinite:true,adaptiveHeight:false,speed:500,pauseOnFocus:false,pauseOnHover:false,responsive:[{breakpoint:767,settings:{adaptiveHeight:adaptiveMob,}},{breakpoint:0,settings:"unslick"}]}}obj.on('init',function (event,slick){obj.find(".first-block").removeClass('noactive-slide-lazyload');setHeightForFirstSlider()});if ($(".wrap-first-slider").attr("data-autoslide") == "Y"){params["autoplaySpeed"] = $(".wrap-first-slider").attr("data-autoslide-time");params["autoplay"] = true}obj.slick(params)}function initSlider(obj){var speed = 0,params ={autoplay:false,autoplaySpeed:0,slidesToShow:1,slidesToScroll:1,infinite:true,dots:true,infinite:true,adaptiveHeight:false,speed:500,arrows:true,responsive:[{breakpoint:991,settings:{adaptiveHeight:true}},{breakpoint:767,settings:{dots:false}},{breakpoint:0,settings:"unslick"}]};if (typeof (obj.attr("data-scroll-speed")) != 'undefined')speed = +(obj.attr("data-scroll-speed"));if (obj.attr("data-count") == "1")params["dots"] = false;params["autoplay"] = false;params["autoplaySpeed"] = 0;if (speed > 0){params["autoplay"] = true;params["autoplaySpeed"] = speed * 1000}obj.on('init',function (event,slick){obj.find(".block-slider-item").removeClass('noactive-slide-lazyload');obj.addClass("slider-init");correctLazyloadInSlider(obj);if (obj.parents(".parent-video-bg").find(".videoBG").length > 0){correctSizeVideoBg(obj.parents(".parent-video-bg").find(".videoBG"))}});obj.slick(params)}var contentSidePosTop = 0,contentSidePosBot = 0,contentSidePosBot = 0,currentPosTop = 0,currentPosBot = 0,headerHeight = 0;function setParamsScrollSide(){contentSideHeight = $(".parent-fixedSrollBlock").outerHeight(true);menuSideHeight = $(".selector-fixedSrollBlock-real-height").outerHeight(true);contentSidePosTop = $(".parent-fixedSrollBlock").offset().top;contentSidePosBot = contentSidePosTop + contentSideHeight;currentPosTop = $(document).scrollTop() + headerHeight;currentPosBot = currentPosTop + menuSideHeight}function setPositionScrollSide(){setParamsScrollSide();if (contentSideHeight > menuSideHeight && !$(".selector-fixedSrollBlock").hasClass('fixed-finish')){if (currentPosTop >= contentSidePosTop && currentPosBot <= contentSidePosBot){$(".selector-fixedSrollBlock").removeClass('fixed-stop fixed-start');$(".selector-fixedSrollBlock").addClass('fixed-move')}else if (currentPosBot >= contentSidePosBot){$(".selector-fixedSrollBlock").removeClass('fixed-move fixed-start');$(".selector-fixedSrollBlock").addClass('fixed-stop')}else{$(".selector-fixedSrollBlock").removeClass('fixed-move fixed-stop');$(".selector-fixedSrollBlock").addClass('fixed-start')}}else{$(".selector-fixedSrollBlock").removeClass('fixed-move fixed-stop');$(".selector-fixedSrollBlock").addClass('fixed-start fixed-finish')}}function setHeaderHeight(){if ($(".fix-board").length > 0)headerHeight = 69}function setStartParamsScrollSide(){$(".selector-fixedSrollBlock").css({"width":$(".wrapperW
18281idthFixedSrollBlock").width() + "px","top":headerHeight + "px"})}function scrollSideInit(){if ($(".parent-fixedSrollBlock").length && $(window).width() > 1023){setStartParamsScrollSide();setPositionScrollSide();$(window).scroll(function (){if ($(".parent-fixedSrollBlock").length)setPositionScrollSide()})}}function initblueimp(){setTimeout(function (){$("body").append('<div class="blueimp-gallery blueimp-gallery-controls" id="blueimp-gallery">' +'<div class="slides"></div>' +'<h3 class="title bold"></h3>' +'<a class="prev"></a>' +'<a class="next"></a>' +'<a class="close"></a>' +'</div>')},2000)}$(document).ready(function (){initblueimp();setHeaderHeight();scrollSideInit();correctColsHead()});function correctColsHead(){if ($(".correct-cols-head").length > 0){var cols = "",selector = "";$(".correct-cols-head").each(function (index){cols = $(this).attr("data-head-cols");selector = $(this).attr("data-head-target");$("." + selector).addClass(cols)})}}function markProductAddBasket(id){arStatusBasketPhoenix ={};setInfoBasket("add2Basket")}function markProductDelayBasket(id,action){if (action == 'active')$('.add2delay[data-item=' + id + ']').addClass('active');if (action == 'delete')$('.add2delay[data-item=' + id + ']').removeClass('active');arStatusBasketPhoenix ={};setInfoBasket()}function markProductCompareBasket(id,action){if (action == 'active')$('.add2compare[data-item=' + id + ']').addClass('active');if (action == 'delete')$('.add2compare[data-item=' + id + ']').removeClass('active');arStatusBasketPhoenix ={};setInfoBasket()}function delParamURL(url,param){var a = url.split('?');var re = new RegExp('(\\?|&)' + param + '=[^&]+','g');if (url == "undefined")url = "";url = ('?' + a[1]).replace(re,'');url = url.replace(/^&|\?/,'');if (url == "undefined")url = "";var dlm = (url == '') ? '' :'?';return a[0] + dlm + url}function addParam2URL(param,value){var url = window.location.href;if (history.replaceState){var baseUrl = delParamURL(url,param);baseUrl += (baseUrl.split('?')[1] ? '&' :'?') + param + "=" + value;history.replaceState(null,null,baseUrl)}else{console.warn('History API don`t support')}}function deleteProduct(id,params){params = params || null;showProcessLoad();if (params !== null){var productsCount = $("input#products_count"),delayedCount = $("input#delayed_count");if (params.action == "product" && productsCount)addParam2URL("url-tab","products");else if (params.action == "delayed" && delayedCount)addParam2URL("url-tab","delayed");else{addParam2URL("url-tab","-1")}}$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/basket/delete_product_basket.php',method:'POST',data:{site_id:$("input.site_id").val(),id:id},success:function (data){closeProcessLoad();if (data.OK == "Y"){arStatusBasketPhoenix ={};setInfoBasket()}}})}function clearBasket(){showProcessLoad();$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/basket/clear_basket.php',method:'POST',data:{site_id:$("input.site_id").val()},success:function (data){closeProcessLoad();closeCart();arStatusBasketPhoenix ={};setInfoBasket()}})}$(document).on("click",".basket-item-actions-remove",function (){arStatusBasketPhoenix ={};setInfoBasket()});$(document).on("click",".clear-cart",function (){clearBasket();arStatusBasketPhoenix ={};setInfoBasket()});function setCountBasket(count,classValue,classParent){count = count || 0;if (count)$(classParent).addClass('active');else{$(classParent).removeClass('active')}$(classValue).text(count)}function setCountMiniBasket(count){count = count || 0;if (count)$(".open-cart").removeClass('cart-empty').addClass('no-empty');else{$(".open-cart").removeClass('no-empty').addClass('cart-empty')}$(".open-cart span.count").text(count)}function updateBasket(params){basketPoolQuantity = new BasketPoolQuantity();if (params.type_mode == "fly"){$.post('/bitrix/tools/concept.phoenix/ajax/basket/' + params.path,{site_id:$("input.site_id").val()},function (html){$(params.selector).html(html);basketPoolQuantity = new BasketPoolQuantity()})}else if (params.type_mode == "page"){var productsCount = 0,delayed_count = 0;function updateBasketProductsInfo(){if ($("#products_count").length > 0)productsCount = parseInt($("#products_count").val());if ($("#delayed_count").length > 0)delayed_count = parseInt($("#delayed_count").val());if (productsCount > 0)$(".clear-basket-node-control").removeClass("d-none");else{$(".clear-basket-node-control").addClass("d-none")}if (productsCount > 0 || delayed_count > 0){$(".basket-style.page .cart-advantage").removeClass('hidden');$(".basket-page-header-btn").removeClass('d-none')}else{$(".basket-style.page .cart-advantage").addClass('hidden')}if ($("input.basketOrder").length > 0){if (productsCount > 0)$(".basketOrder-body").removeClass('d-none');else{$(".basketOrder-body").addClass('d-none')}}if (productsCount <= 0 && delayed_count <= 0){$(".basket-page-header-btn").addClass('d-none');$(".clear-basket-node-control").addClass('d-none');if ($("input.basketOrder").length > 0)$(".basketOrder-side").addClass('d-none')}closeProcessLoad();if (params.firstLoad != "Y"){if ($("input.basketOrder").length > 0 && (productsCount > 0 || delayed_count > 0))BX.Sale.OrderAjaxComponent.sendRequest("refreshOrderAjax","noRedirect")}}if (params.firstLoad != "Y"){showProcessLoad();$.post("/bitrix/tools/concept.phoenix/ajax/basket/" + params.path,{"site_id":$("input.site_id").val(),"ajax_content":"products"},function (html){$(".body-basket-ajax-left").html(html);basketPoolQuantity = new BasketPoolQuantity();updateBasketProductsInfo();$.post("/bitrix/tools/concept.phoenix/ajax/basket/" + params.path,{"site_id":$("input.site_id").val(),"ajax_content":"side"},function (html){$(".body-basket-ajax-right").html(html);scrollSideInit();closeProcessLoad()})})}else{updateBasketProductsInfo()}}}function setInfoBasket(param){param = param || "";if ($("input#basketPage").length > 0)showProcessLoad();$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/basket/get_ajax_basket.php',method:'POST',data:{iblockID:$("input#catalogIblockID").val(),site_id:$("input.site_id").val()},success:function (data){arStatusBasketPhoenix = data;setItemButtonStatus(arStatusBasketPhoenix);setCountMiniBasket(arStatusBasketPhoenix.BASKET_COUNT);setCountBasket(arStatusBasketPhoenix.BASKET_COUNT,'.count-basket','.count-basket-items-parent');setCountBasket(arStatusBasketPhoenix.DELAY_COUNT,'.count-delay','.count-delay-parent');setCountBasket(arStatusBasketPhoenix.COMPARE_COUNT,'.count-compare','.count-compare-parent');var optBasket ={};if ($("input#basketPage").length > 0){optBasket ={"type_mode":"page","path":"get_basket_items.php","selector":".body-basket-ajax",}}else{optBasket ={"type_mode":"fly","path":"get_fly_basket.php","selector":".body-fly-basket-ajax",}}if (param == "firstLoad")optBasket["firstLoad"] = "Y";updateBasket(optBasket);if (param == "add2Basket" &&$("input#showBasketAfterFirstAdd").val() == "Y" &&arStatusBasketPhoenix.BASKET_COUNT == 1 &&$("input#basketPage").val() != "basket_page" &&$(window).width() > 767){openCart()}if (arStatusBasketPhoenix.BASKET_COUNT == 0 && param != "firstLoad")closeCart()}})}function setItemButtonStatus(data,parent,inBasket,inDelay,inCompare){if (inBasket || inDelay || inCompare){parent = parent || '';if (parent.length > 0)parent = "#" + parent;$(parent + ' .add2basket').parents('.catalog-item').removeClass('in-cart');$(parent + ' .add2delay').removeClass('active');$(parent + ' .add2compare').removeClass('active');if (inBasket)$(parent + ' .add2basket[data-item=' + data + ']').parents('.catalog-item').addClass('in-cart');if (inDelay)$(parent + ' .add2delay[data-item=' + data + ']').addClass('active');if (inCompare)$(parent + ' .add2compare[data-item=' + data + ']').addClass('active')}else{$('.add2basket').parents('.catalog-item').removeClass('in-cart');$('.add2delay').removeClass('active');$('.add2compare').removeClass('active');$('.common-btn-basket-style').removeClass('added');if (data.BASKET){for (var i in data.BASKET){var id = data.BASKET[i];if (typeof id === 'number' || typeof id === 'string'){$('.add2basket[data-item=' + id + ']').parents('.catalog-item').addClass('in-cart');$('.common-btn-basket-style[data-item=' + id + ']').addClass('added')}}}if (data.DELAY){for (var i in data.DELAY){var id = data.DELAY[i];if (typeof id === 'number' || typeof id === 'string'){$('.add2delay[data-item=' + id + ']').addClass('active')}}}if (data.COMPARE){for (var i in data.COMPARE){var id = data.COMPARE[i];if (typeof id === 'number' || typeof id === 'string'){$('.add2compare[data-item=' + id + ']').addClass('active')}}}}}$(document).ready(function (){if (device.ios())$('div.block.parallax-attachment').removeClass('parallax-attachment');if ($('div.first-slider.slider-lg').length > 0)initFSlider($('div.first-slider.slider-lg'),"lg");if ($('div.first-slider.slider-xs').length > 0)initFSlider($('div.first-slider.slider-xs'),"xs");if ($("form.timer_form").length > 0){$("form.timer_form").each(function (index){timerCookie($(this))})}if ($(window).width() > 1024){$('.services').find('.service-item').hover(function (){var element_height = $(this).find('.service-element').height();var element_bot_height = $(this).find('.bot-wrap').height();var need_height = element_height - element_bot_height;$(this).css({'height':need_height + 'px'})},function (){$(this).css({'height':'auto'})})}else{$('.services').find('.service-item').hover(function (){$(this).css({'height':'auto'})})}if ($("div.expired-page").length)$("div.expired-page").height($(document).height());if ($("div.error-404").length){$("html").addClass('height-100');$("div.error-404").height($(document).height())}if ($(window).width() > 1199){$(document).on({mouseenter:function (){var th = $(this);$.data(this,'timer',setTimeout($.proxy(function (){$(th).parents(".parent-show-board-contact-js").find('.list-contacts').stop(true,true).addClass('open')},this),300))},mouseleave:function (){clearTimeout($.data(this,'timer'))},},".show-board-contact-js");
18281$(document).on({mouseleave:function (){$(this).removeClass('open')},},"header .list-contacts");$('nav.main-menu > li.parent.view_1').hover(function (){var th = $(this);jQuery.data(this,'timer',setTimeout(jQuery.proxy(function (){if (th.find("ul.child").length > 0){$('ul.child',this).stop(true,true).addClass("show-open");menuOffset(this);if ($('ul.child',this).width() < th.width())$('ul.child',this).css('width',th.width())}if (th.hasClass('catalog-view-flat')){th.find(".wrapper-catalog-menu-board").addClass('on');setTimeout(function (){th.find(".wrapper-catalog-menu-board").addClass('active');$('.lazyload').Lazy(paramsLazy)},100)}},this),350))},function (){var th = $(this);clearTimeout(jQuery.data(this,'timer'));if (th.find("ul.child").length > 0)$('ul.child',this).stop(true,true).removeClass("show-open");if (th.hasClass('catalog-view-flat')){th.find(".wrapper-catalog-menu-board").removeClass('active');setTimeout(function (){th.find(".wrapper-catalog-menu-board").removeClass('on')},100)}$('.lazyload').Lazy(paramsLazy)});$('nav.main-menu > li.parent.view_2').hover(function (){var th = $(this);menuLvls4Selected(th);jQuery.data(this,'timer',setTimeout(jQuery.proxy(function (){th.find(".dropdown-menu-view-2").addClass('on');setTimeout(function (){th.find(".dropdown-menu-view-2").addClass('active');$('.lazyload').Lazy(paramsLazy)},100)},this),200))},function (){var th = $(this);clearTimeout(jQuery.data(this,'timer'));th.find(".dropdown-menu-view-2").removeClass('active');setTimeout(function (){th.find(".dropdown-menu-view-2").removeClass('on')},100)});$('nav.main-menu ul.child > li.parent2').hover(function (){jQuery.data(this,'timer',setTimeout(jQuery.proxy(function (){$('ul.child2',this).stop(true,true).addClass("show-open");menuOffset(this)},this),100))},function (){clearTimeout(jQuery.data(this,'timer'));$('ul.child2',this).stop(true,true).removeClass("show-open")})}$('body').append('<div class="modalArea modalAreaEmployee"></div><div class="modalArea modalAreaDetail"></div><div class="modalArea modalAreaVideo"></div><div class="modalArea modalAreaForm"></div><div class="modalArea modalAreaWindow"></div><div class="modalArea modalAreaAgreement"></div>');$.datetimepicker.setLocale('ru');$('form.form .date').datetimepicker({timepicker:false,format:'d/m/Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1});if ($(window).width() < 767){var anim_callmob_in = setTimeout(function (){$("#callphone-mob .callphone-desc").show().addClass('active');clearTimeout(anim_callmob_in)},5000);var anim_callmob_out = setTimeout(function (){$("#callphone-mob .callphone-desc").removeClass('active');clearTimeout(anim_callmob_out)},12000);var anim_callmob_out2 = setTimeout(function (){$("#callphone-mob .callphone-desc").hide();clearTimeout(anim_callmob_out2)},12500)}if ($(window).width() > 767){$(window).enllax();new WOW().init();var wow = new WOW({boxClass:'parent-animate',animateClass:'animated',offset:0,mobile:true,live:true,callback:function (box){var sec = 0;if ($(box).attr("data-delay"))sec = parseFloat($(box).attr("data-delay")) * 1000;$("div.child-animate",box).each(function (){var elem = $(this);setTimeout(function (){elem.removeClass("opacity-zero").addClass("animated fadeIn")},sec);sec += 500})},scrollContainer:null});wow.init()}$('[data-toggle="tooltip"]').tooltip({html:true});$('[data-toggle="filter-tooltip"]').tooltip({html:true,container:".bx-filter-section"});$('[data-toggle="sku-tooltip"]').tooltip({html:true});$('[data-toggle="prop-tooltip"]').tooltip({html:true});if ($(window).width() > 767){setTimeout(function (){$('div.wrap-scroll-down').addClass('active')},3000)}var url = location.href;url = url.split("#");if (typeof (url[1]) != "undefined" && url[1].length > 0 && url[1].length < 20){var urlRes = url[1];if (url[1].indexOf('?') !== -1){url = url[1].split("?");urlRes = url[0]}if ($("#" + urlRes).length > 0)scrollToBlock("#" + urlRes,false)}});$(document).on("click","div.switcher-wrap div.switcher-title",function (){var block = $(this).parents("div.switcher-wrap");if (!block.hasClass("active")){$("div.switcher-content",block).slideDown(200,function (){block.addClass("active")})}else{$("div.switcher-content",block).slideUp(200,function (){block.removeClass("active")})}});function correctSizeVideoBg(obj){var height = obj.parents('.parent-video-bg').outerHeight();var videoThis = obj.find(".video-bg-display");var width = $(window).width();var video_w = 0;var video_h = 0;var add = 4;if (width / height < 16 / 9){video_w = height * 16 / 9 + add;video_h = height + add}else{video_w = width + add;video_h = width * 9 / 16 + add}videoThis.width(video_w).height(video_h);videoThis.addClass('active')}function generateVideoBG(container){if ($(window).width() >= 1200 || ($(window).width() >= 768 && $(window).width() < 1200 && !device.android() && !device.ios())){var videoBG = $(".videoBG",container),iframeType = videoBG.attr("data-type"),srcMP4 = videoBG.attr("data-srcMP4"),srcWEBM = videoBG.attr("data-srcWEBM"),srcOGG = videoBG.attr("data-srcOGG"),srcYB = videoBG.attr("data-srcYB"),html = "";if (iframeType == "file"){if (videoBG.children('video').length <= 0){if (srcMP4)html += '<source src="' + srcMP4 + '" type="video/mp4">';
18281if (srcWEBM)html += '<source src="' + srcWEBM + '" type="video/webm">';if (srcOGG)html += '<source src="' + srcOGG + '" type="video/ogg">';html = '<video class="video-bg-display" autoplay="autoplay" loop="loop" preload="auto" muted="muted">' + html + '</video>'}}else if (iframeType == "iframe"){if (videoBG.children('iframe').length <= 0){if (srcYB)html += '<iframe src="' + srcYB + '" class="video-bg-display" allowfullscreen="" frameborder="0" height="100%" width="100%"></iframe>'}}if (html)videoBG.prepend(html);correctSizeVideoBg(videoBG)}}function updateMainMenu(menu){if (menu.length > 0){menu.removeClass('full');menu.find('li.lvl1').removeClass('visible');menu.parents(".wrap-main-menu").removeClass('ready');var totalWidth = menu.parents("td.wrapper-menu").width();if ($(document).width() > 767){var visible = 0;var size = menu.find('li.lvl1').length;menu.find('li.lvl1').each(function (index){if (visible > 4){menu.addClass('full')}if (totalWidth > ($(this).width())){totalWidth = totalWidth - $(this).width();$(this).addClass('visible');visible++;if (size == (index + 1))menu.parents(".wrap-main-menu").addClass('ready')}else{menu.parents(".wrap-main-menu").addClass('ready');return false}})}}}$(document).ready(function (){updateMainMenu($('nav.main-menu'))});$(window).on("load",function (){setInfoBasket("firstLoad");if ($(".hide-adv").length > 0){setTimeout(function (){$.post("/bitrix/tools/concept.phoenix/ajax/hide_adv.php",{"check":"Y","USER_ID":$(".hide-adv").attr("data-user")},function (data){if (data.OK == "Y"){$("body").append('<script type="text/javascript">
vendor: 281 bytes, line 18281
18281 (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window,document,"script","https://mc.yandex.ru/metrika/tag.js","ym");ym(
1828154591493
vendor: 69 bytes, line 18281
18281,"init",{clickmap:false,trackLinks:false,accurateTrackBounce:false});
18281</script> <noscript><div><img src="https://mc.yandex.ru/watch/54591493" style="position:absolute;left:-9999px;" alt="" /></div></noscript><script>ym(54591493,"reachGoal","hide_phoenix");</script>')}},"json")},20000)}});$(window).scroll(function (){if ($('header').hasClass('fixed')){var headerBotPos = $('header').outerHeight(true) + 150;if ($(window).scrollTop() >= headerBotPos){$('header').addClass('top');setTimeout(function (){$('header').addClass('on')},100)}else{$('header').removeClass('top');setTimeout(function (){$('header').removeClass('on')},50)}}var top = $(document).scrollTop();var height = $('header').height();if (top >= height)$('a.up').addClass('on');else{$('a.up').removeClass('on')}});var windowWidth = $(window).width();$(window).resize(function (){phoenixResizeVideo();if (windowWidth != $(window).width()){mobileMenuPositionFooter();updateMainMenu($('nav.main-menu'))}});if ($(window).width() < 1199){$(document).on("click","header .open-list-contact",function (){$("header div.list-contacts").addClass('open')});$(document).mouseup(function (e){var div = $("header div.list-contacts");if (!div.is(e.target) && div.has(e.target).length === 0) div.removeClass('open')});$(document).on("click","nav.main-menu li.parent.view_1",function (){var menu = $(this).parents('nav.main-menu');if (!$(this).children('a').hasClass("open")){$('li.parent',menu).find("ul.child").removeClass("show-open").find("ul.child2").removeClass("show-open");$('li.parent > a',menu).removeClass("open");$(this).find("ul.child").addClass("show-open");$(this).children('a').addClass("open");menuOffset(this);return false}});$(document).on("click","nav.main-menu li.parent.view_2",function (){if (!$(this).children('a').hasClass("open")){$(this).children('a').addClass("open");var th = $(this);menuLvls4Selected(th);$('.lazyload').Lazy(paramsLazy);$(this).find(".dropdown-menu-view-2").addClass('on');setTimeout(function (){th.find(".dropdown-menu-view-2").addClass('active')},100);return false}});$(document).on("click","nav.main-menu li.parent2",function (){var menu = $(this).parents('nav.main-menu');var menu_list = $("ul.child > li.parent2",menu);if (!$(this).children('a').hasClass("open")){if ($(this).find("ul.child").length > 0){menu.find("ul.child2").removeClass("show-open");$(this).find("ul.child2").addClass("show-open");menuOffset(this)}$("a",menu_list).removeClass("open");$(this).children('a').addClass("open");return false}});$(document).mouseup(function (e){var div = $("nav.main-menu");if (!div.is(e.target) && div.has(e.target).length === 0){$('li.parent > a',div).removeClass("open");$("ul.child",div).removeClass("show-open");$('li.parent2 > a',div).removeClass("open");$("ul.child2",div).removeClass("show-open");if ($("li.parent",div).hasClass('catalog-view-flat')){$("li.parent",div).find(".wrapper-catalog-menu-board").removeClass('active');setTimeout(function (){$("li.parent",div).find(".wrapper-catalog-menu-board").removeClass('on')},100)}}})}$(document).on("click",".universal-arrows-mini .arrow-prev",function (){$(this).parents(".universal-parent-slider").find('.universal-slider').slick("slickPrev")});$(document).on("click",".universal-arrows-mini .arrow-next",function (){$(this).parents('.universal-parent-slider').find('.universal-slider').slick("slickNext")});$(document).on("click",".cart-show",function (){if ($(this).hasClass('cart-empty'))return false;openCart()});$(document).on("click",".cart-close",function (){closeCart()});$(document).on("keypress","input.count-val",function (e){e = e || event;if (e.ctrlKey || e.altKey || e.metaKey) return;var chr = getChar(e);if (chr == null) return false});$(document).on('click','ul.switcher-tab li:not(.active)',function (){$(this).addClass('active').siblings().removeClass('active').closest('div.switcher').find('div.switcher-wrap').removeClass('active').eq($(this).index()).addClass('active')});$(document).on('click','a.map-show',function (){$(this).parent().hide();$(this).parents('div.map-block').find(".map-height").show()});$(document).on("click",".bl-txt .wr-tabs li:not(.active)",function (){var img = $(this).closest('.wr-tabs').find('img').eq($(this).index());$(this).addClass('active').siblings().removeClass('active').closest('.wr-tabs').find('img').removeClass('active').eq($(this).index()).addClass('active');if (img.attr("data-src"))$(img).Lazy()});$(document).on("click",".bl-txt .wr-tabs .title-mobile",function (){var block = $(this).parent(".item");if (!$(this).hasClass("active")){if ($("img",block).attr("data-src")){var _this = $(this);$("img",block).Lazy({afterLoad:function (element){$("img",block).removeAttr('style');_this.addClass("active");$("img",block).slideDown(200,function (){$(this).addClass("active")})}})}else{$(this).addClass("active");$("img",block).slideDown(200,function (){$(this).addClass("active")})}}else{$(this).removeClass("active");$("img",block).slideUp(200,function (){$(this).removeClass("active")})}});$(document).on("click","div.wrap-scroll-down .scroll-down",function (){var s_b = $(this).parents('div.parent-scroll-down').next(),heightOut = 70,destination = null;while (s_b.hasClass('hidden-lg')){s_b = s_b.next()}destination = $(s_b).offset().top - heightOut;$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},700)});$(document).on('click','.open-main-menu',function (){if ($(window).width() <= 767){$('div.open-menu-mobile').addClass('show-open');setTimeout(function (){$('div.open-menu-mobile.show-open').addClass('on')},50);setTimeout(function (){$('a.close-menu.mobile').addClass('on')},1000);setTimeout(function (){mobileMenuPositionFooter()},100);$('body').addClass('modal-open')}else{$('div.open-menu').addClass('show-open');setTimeout(function (){openMenuFooterPos()},100);setTimeout(function (){$('div.open-menu').addClass('on')},150);$('div.wrapper').addClass('blur');$('div.menu-shadow').addClass('show-open');$('body').addClass('modal-open');$(".open-cart").addClass('off')}$('.lazyload').Lazy(paramsLazy)});$(document).on('click','.close-menu',function (){if ($(window).width() <= 767){$('div.open-menu-mobile').removeClass('on');$('body').removeClass('modal-open');$('a.close-menu.mobile').removeClass('on');setTimeout(function (){$('div.open-menu-mobile.show-open').removeClass('show-open')},500)}else{$('div.wrapper').removeClass('blur');$('div.open-menu').removeClass('show-open');$('div.menu-shadow').removeClass('show-open');$('body').removeClass('modal-open');$(".open-cart").removeClass('off')}});$(document).on('click','.close-menu-js.open',function (){$('div.wrapper').removeClass('blur');$('div.open-menu').removeClass('show-open');$('div.menu-shadow').removeClass('show-open');$('body').removeClass('modal-open');$(".open-cart").removeClass('off')});$(document).on('click','.close-menu-mobile-js',function (){$('div.open-menu-mobile').removeClass('on');$('body').removeClass('modal-open');$('a.close-menu.mobile').removeClass('on');setTimeout(function (){$('div.open-menu-mobile.show-open').removeClass('show-open')},500)});$(document).on("click","div.list-menu li.parent",function (){var menu = $(this).parents('div.list-menu');var Li = $(this);menu.find('ul.child2').slideUp(200);if (!$(this).children('a').hasClass("open")){$('li.parent > a',menu).removeClass("open");$("ul.child2",Li).slideDown(200);$(this).children('a').addClass("open");return false}else if ($(this).children('a').hasClass("empty-link")){menu.find('ul.child2').slideUp(200);$('li.parent > a',menu).removeClass("open")}});$(document).on('click','a.open-mobile-list',function (){$('ul.mobile-menu-list').removeClass('show-open');$("ul.mobile-menu-list[data-menu-list='" + $(this).attr('data-menu-list') +"']").addClass('show-open');mobileMenuPositionFooter()});$(document).on('click','div.open-menu-mobile div.open-list-contact',function (){var btn = $(this);btn.parents('div.contacts').find('div.list-contacts').addClass('open');btn.hide();if (btn.parents('div.contacts').find(".iframe-map-area").length > 0)generateMaps(btn.parents('div.contacts').find(".contact-wrap.map"));mobileMenuPositionFooter()});$(document).on("click",".scroll-after",function (){var elementClick = $(this).attr("href");setTimeout(function (){scrollToBlock(elementClick,$(this))},200);return false});$(document).on("click","a.scroll",function (){var elementClick = $(this).attr("href");scrollToBlock(elementClick,$(this));if ($(this).hasClass('from-modal')){$('div.no-click-block').removeClass('on');$('body').removeClass('modal-open');$('div.wrapper').removeClass('blur');if (device.ios()){window.scrollTo(0,cur_pos);$("body").removeClass("modal-ios")}if ($(this).parents(".container-close-from-scroll").length > 0)$(this).parents(".container-close-from-scroll").addClass('d-none')}return false});$(document).on('click','div.tab-child:not(.active)',function (){$(this).addClass('active').siblings().removeClass('active').closest('div.tab-parent').find('div.tab-content').removeClass('active').eq($(this).index()).addClass('active')});$(document).on('click','.select-list-choose',function (){$(this).parents('.form-select').addClass('open')});$(document).on('click','.ar-down',function (){if ($(this).parents('.form-select').hasClass('open')) $(this).parents('.form-select').removeClass('open');else{$(this).parents('.form-select').addClass('open')}});$(document).on('click','.form-select .name',function (){$(this).parents('.form-select').find('.select-list-choose').removeClass('first').find(".list-area").text($(this).text());$(this).parents('.form-select').removeClass('open')});function callModal(arParams){showProcessLoad();
18281$.post("/bitrix/tools/concept.phoenix/ajax/popup/" + arParams.path,{arParams:arParams,platform:arParams["platform"],site_id:$("input.site_id").val()},function (html){closeProcessLoad();startBlurWrapperContainer();var $area = $('div.' + arParams.container);$area.html(html);(function(){var $captcha = $area.find('#captcha-container,.smart-captcha').first();var $loader= $area.find('.load-captcha').first();if(!$captcha.length || !$loader.length) return;$loader.show();var elapsed = 0;var iv = setInterval(function(){var hasToken = $captcha.find('input[name="smart-token"]').length && $.trim($captcha.find('input[name="smart-token"]').val()).length;var hasIframe = $captcha.find('iframe').length;if(hasToken || hasIframe){clearInterval(iv);$loader.fadeOut(50);return}elapsed += 100;if(elapsed >= 5000){clearInterval(iv);$loader.fadeOut(50)}},100)})();setTimeout(function (){$area.find('.phoenix-modal').addClass('active')},100);if (arParams.from_modal == "Y"){$area.find('.close-modal').addClass('remove-blur-container').attr('data-blur-container',arParams.element_id)}if (arParams.container == 'modalAreaForm'){$area.find("form.form .date").datetimepicker({timepicker:false,format:'d/m/Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1})}if (typeof (arParams.header) != "undefined"){if (arParams.header.length > 0){$area.find('input[name="header"]').val(arParams.header)}}})}$(document).on('click','.call-modal',function (){var arParams ={},element_id = $(this).attr("data-call-modal"),platform = $(this).attr("data-video-platform"),all_id = $(this).attr("data-all-id");if ($(this).hasClass('callform')){arParams["path"] = "formmodal.php";arParams["element_id"] = element_id.replace("form","");arParams["container"] = "modalAreaForm"}else if ($(this).hasClass('callvideo')){arParams["path"] = "videomodal.php";arParams["element_id"] = element_id;arParams["container"] = "modalAreaVideo";arParams["platform"] = platform}else if ($(this).hasClass('callmodal')){arParams["path"] = "windowmodal.php";arParams["element_id"] = element_id.replace("modal","");arParams["container"] = "modalAreaWindow"}else if ($(this).hasClass('callagreement')){arParams["path"] = "agreemodal.php";arParams["element_id"] = element_id.replace("agreement","");arParams["container"] = "modalAreaAgreement"}else if ($(this).hasClass('callemployee')){arParams["path"] = "employee.php";arParams["element_id"] = element_id;arParams["container"] = "modalAreaEmployee";if(all_id)arParams["all_id"] = all_id}if ($(this).hasClass("element-item")){arParams["element_item_id"] = $(this).attr("data-element-item-id");arParams["element_item_type"] = $(this).attr("data-element-item-type");arParams["element_item_name"] = $(this).attr("data-element-item-name");arParams["element_item_price"] = $(this).attr("data-element-item-price")}if (typeof ($(this).attr("data-header")) != "undefined"){if ($(this).attr("data-header").length > 0){arParams["header"] = $(this).attr("data-header")}}arParams["from_modal"] = "N";if ($(this).hasClass("from-modal")){arParams["from_modal"] = "Y";$(this).parents(".blur-container").addClass('blur-active').attr("data-blur-container",arParams["element_id"])}callModal(arParams)});function resetCustomDynamicInputs(){for (var i = 1;i <= 3;i++){$('#custom-dynamic-input-'+i).val('')}}$(document).on('click','.close-modal',function (){$('div.modalAreaForm form.form .date').datetimepicker('destroy');if ($(this).hasClass('remove-blur-container')){$(".blur-container[data-blur-container='" + $(this).attr("data-blur-container") + "']").removeClass('blur-active')}else{stopBlurWrapperContainer()}if ($(this).hasClass('wind-close'))$(this).parents("div.shadow-modal-wind-contact").removeClass('on');else{$(this).parents("div.modalArea").children().remove()}resetCustomDynamicInputs()});$(document).on('click','.open_modal_contacts',function (){$('div.shadow-modal-wind-contact').addClass('on');startBlurWrapperContainer()});$(document).on('click','.tab-menu',function (){$(this).parents('.tab-control').find('.tab-menu').removeClass('active');$(this).parents('.tab-control').find('.tabb-content').removeClass('active');$(this).addClass('active');$('.tabb-content[data-tab="' + $(this).attr("data-tab") + '"]').addClass('active')});$(document).on('click','.show-hidden',function (){if ($(this).parent().hasClass('off')){$(this).parents('.show-hidden-parent').find('.show-hidden-child').addClass('hidden');$(this).parent().removeClass('off')}else{$(this).parents('.show-hidden-parent').find('.show-hidden-child').removeClass('hidden');$(this).parent().addClass('off')}});$(document).on("click",".click-slide-show",function (){var block = $(this).parent(".parent-slide-show");if (!$(this).hasClass("active")){$(this).addClass("active");$(".content-slide-show",block).slideDown(200,function (){$(this).addClass("active")})}else{$(this).removeClass("active");$(".content-slide-show",block).slideUp(200,function (){$(this).removeClass("active")})}});Share ={vkontakte:function (purl,ptitle,pimg,text){url = 'http://vkontakte.ru/share.php?';url += 'url=' + encodeURIComponent(purl);url += '&title=' + encodeURIComponent(ptitle);url += '&description=' + encodeURIComponent(text);url += '&image=' + encodeURIComponent(pimg);url += '&noparse=true';Share.popup(url)},facebook:function (purl,ptitle,pimg,text){url = 'https://www.facebook.com/sharer/sharer.php?';url += '&title=' + encodeURIComponent(ptitle);url += '&description=' + encodeURIComponent(text);url += '&u=' + encodeURIComponent(purl);url += '&picture=' + encodeURIComponent(pimg);Share.popup(url)},twitter:function (purl,ptitle){url = 'http://twitter.com/share?';url += 'text=' + encodeURIComponent(ptitle);url += '&url=' + encodeURIComponent(purl);url += '&counturl=' + encodeURIComponent(purl);Share.popup(url)},ok:function (purl,ptitle){url = 'https://connect.ok.ru/dk?st.cmd=WidgetSharePreview';url += '&st.title=' + encodeURIComponent(ptitle);url += '&st.shareUrl=' + encodeURIComponent(purl);Share.popup(url)},mailRu:function (purl,ptitle){url = 'https://connect.mail.ru/share?';url += '&url=' + encodeURIComponent(purl);url += '&title=' + encodeURIComponent(ptitle);Share.popup(url)},wtsApp:function (purl,ptitle){url = 'https://api.whatsapp.com/se
18281nd?';url += '&text=' + encodeURIComponent(ptitle) + ' ' + encodeURIComponent(purl);Share.popup(url)},telegram:function (purl,ptitle){url = 'https://telegram.me/share/url?';url += 'url=' + encodeURIComponent(purl);url += '&text=' + encodeURIComponent(ptitle);Share.popup(url)},skype:function (purl){url = 'https://web.skype.com/share?';url += 'url=' + encodeURIComponent(purl);Share.popup(url)},gPlus:function (purl){url = 'https://plus.google.com/share?';url += 'url=' + encodeURIComponent(purl);Share.popup(url)},reddit:function (purl){url = 'https://www.reddit.com/submit?';url += 'url=' + encodeURIComponent(purl);Share.popup(url)},popup:function (url){window.open(url,'','toolbar=0,status=0,width=626,height=436')}};$(document).on('click','.click-show-pic',function (){$(this).parents('.parent-show-pic').find('.item-show-pic').removeClass('active');$(this).parents('.parent-show-pic').find('.click-show-pic').removeClass('active');$(this).parents('.parent-show-pic').find('.item-show-pic[data-show-pic="' +$(this).attr("data-show-pic") + '"]').addClass('active');$(this).addClass('active')});$(document).on('click','.scroll-next',function (){var dist = $(this).parents('.scroll-next-parent').next().offset().top - 40;if ($("header").hasClass("fixed")) dist -= 70;$("html:not(:animated),body:not(:animated)").animate({scrollTop:dist},700)});$(document).on("click",".phoenix-alert-btn",function (){$("div.alert-block div.phoenix-alert-btn").addClass("on");$("div.alert-block div.alert-block-content").addClass("on")});$(document).on("click","a.alert-close",function (){$("div.alert-block div.phoenix-alert-btn").removeClass("on");$("div.alert-block div.alert-block-content").removeClass("on")});var mouseUp = (device.ios()) ? "touchend" :"mouseup";$(document).on(mouseUp,function (e){var div = $(".form-select");if (!div.is(e.target) && div.has(e.target).length === 0)div.removeClass('open');var div2 = $(".search-list");if (!div2.is(e.target) && div2.hasClass("active"))div2.removeClass('active');var search_top_js = $(".search-top-js");if (!search_top_js.is(e.target) && search_top_js.has(e.target).length === 0){if (search_top_js.hasClass("active")){search_top_js.removeClass('active');$(".no-click-block").removeClass('on');if (!$('.open-menu').hasClass('show-open'))stopBlurWrapperContainer();if ($('.open-menu').hasClass('show-open'))$('.open-menu').removeClass('blur-active');var st = setTimeout(function (){search_top_js.removeClass('fixed');clearTimeout(st)},100);$(".ajax-search-results").hide()}}var bxFilterSearch = $(".bx-filter-popup-result");if (!bxFilterSearch.is(e.target))bxFilterSearch.hide();var selectInputSku = $(".wrapper-select-input");if (!selectInputSku.is(e.target) && selectInputSku.has(e.target).length === 0)selectInputSku.removeClass('open');var checboxReq = $(".check-require.has-error");if (!checboxReq.is(e.target))checboxReq.removeClass('has-error');var selectReq = $(".form-select.has-error");if (!selectReq.is(e.target))selectReq.removeClass('has-error')});$(document).on('change',".cart-choose-select",function (){$(this).parents(".parent-choose-select").find(".inp-show-js").removeClass('active');$(this).parents(".parent-choose-select").find(".inp-show-js[data-choose-select='" + $(this).attr("data-choose-select") +"']").addClass('active')});$(document).on("click",".search-icon-js",function (){$(this).parents(".search-input-box").find(".search-js").focus();scrollToBlock($(this).parents(".search-input-box").find(".search-scroll-focus"),'',40)});$(document).on("click",".show-search-list",function (){$(this).parents(".show-search-list-parent").find(".search-list").addClass('active')});function checkInput(input){if (input.val().length > 0){input.parents('.search-panel-js').find('.hint-area').hide();input.parents('.search-panel-js').find('.search-btns-box').addClass('before-active');var timeOut = setTimeout(function (){input.parents('.search-panel-js').find('.search-btns-box').addClass('active');clearTimeout(timeOut)},100)}else{input.parents('.search-panel-js').find('.search-btns-box').removeClass('before-active active');input.parents('.search-panel-js').find('.hint-area').show()}}$(document).on("keyup","form.search-form input.search-js",function (){checkInput($(this))});$('form.search-form input.search-js').focusout(function (){checkInput($(this))});$(document).on("click","input.search-scroll-focus",function (){scrollToBlock($(this),'',40)});$(document).on("focus","form.search-form.fix-header input.search-js",function (){$(this).parents("form.search-form.fix-header").addClass('focus')});$(document).on("focusout",'form.search-form.fix-header input.search-js',function (){if ($(this).val().length <= 0)$(this).parents("form.search-form.fix-header").removeClass('focus')});$(document).on("click",".open-search-top",function (){$(".search-top-js").addClass('fixed');if ($('.open-menu').hasClass('show-open'))$('.open-menu').addClass('blur-active');else{startBlurWrapperContainer()}var st = setTimeout(function (){$(".no-click-block").addClass('on');$(".search-top-js").addClass('active');$(".search-top-js").find('input.search-js').focus();clearTimeout(st)},100)});$(document).on("click",".close-search-top",function (){$(this).parents(".search-top-js").removeClass('active');var th = $(this);$(".no-click-block").removeClass('on');if ($('.open-menu').hasClass('show-open'))$('.open-menu').removeClass('blur-active');else{stopBlurWrapperContainer()}var st = setTimeout(function (){th.parents(".search-top-js").removeClass('fixed');clearTimeout(st)},100);$(".ajax-search-results").hide()});function showContentCtTab(th,param,blockID){if (typeof param != 'undefined'){if (param.length > 0){th = th || "";if (th.length > 0){th.parents(".parent-tab").find(".tab-section").removeClass('active');th.addClass('active');th.parents(".parent-tab").find(".tab-element").removeClass('active');th.parents(".parent-tab").find(".tab-element." + th.attr("data-tab")).addClass('active')}else{var head = "";if (param.length > 0){blockID = blockID || "";head = $("#" + blockID).find(".parent-tab")}else{head = $(".parent-tab")}head.find(".tab-section").removeClass('active');head.find(".tab-section[data-tab=" + param + "]").addClass('active');head.find(".tab-element").removeClass('active');head.find(".tab-element." + param).addClass('active')}$('.lazyload').Lazy(paramsLazy)}}}$(document).on("click",".tab-section",function (){showContentCtTab($(this),$(this).attr("data-tab"))});function getUrlParams(){var params = window.location.search.replace('?','').split('&').reduce(function (p,e){var a = e.split('=');p[a[0]] = a[1];return p},{});return params}$(document).ready(function (){var params = getUrlParams();showContentCtTab("",params["ct_tab"],params["ct_tab_blockID"])});(function (window){window.JCCatalogElement = function (arParams){this.element = arParam
18281s;this.nodes ={};this.currentElement ={};this.oldElement ={};this.errorCode = 0;this.firstLoad = true;this.selectedValues ={};if (typeof arParams === 'object'){this.initConfig();switch (this.element.PRODUCT_TYPE){case 0:case 1:case 2:this.initProductData();break;case 3:this.initOffersData();break;default:this.errorCode = -1}}if (this.errorCode === 0)BX.ready(BX.delegate(this.init,this))};window.JCCatalogElement.prototype ={initConfig:function (){this.nodes.obProduct = BX(this.element.VISUAL.ID);if (!this.nodes.obProduct)this.errorCode = -1;this.element.PRODUCT_TYPE = parseInt(this.element.PRODUCT_TYPE,10);this.nodes.obBigSlider = BX(this.element.VISUAL.BIG_SLIDER);this.nodes.obBasketActions = BX(this.element.VISUAL.BASKET_ACTIONS);this.nodes.obPreorderBtn = BX(this.element.VISUAL.PREORDER);this.nodes.obWrPreorderBtn = this.nodes.obPreorderBtn.parentNode;this.nodes.obPreorderBtn && BX.bind(this.nodes.obPreorderBtn,'click',BX.proxy(this.preOrder,this));this.nodes.obMeasure = BX(this.element.VISUAL.QUANTITY_MEASURE);this.nodes.obPreviewText = BX(this.element.VISUAL.PREVIEW_TEXT);this.nodes.obWrSubscribe = BX(this.element.VISUAL.SUBSCRIBE);this.nodes.obBlockChars = this.nodes.obProduct.querySelector("#chars");this.nodes.obSkuChars = BX(this.element.VISUAL.SKU_CHARS);if (this.nodes.obBasketActions){this.nodes.obWrBuyBtn = this.nodes.obBasketActions.querySelector('.wr-btn-fast-order');this.nodes.obWrBasketBtn = this.nodes.obBasketActions.querySelector('.wr-btn-basket');this.nodes.obFastOrder = BX(this.element.VISUAL.FAST_ORDER);this.nodes.obFastOrder && BX.bind(this.nodes.obFastOrder,'click',BX.proxy(this.fastOrder,this));this.nodes.obAdd2BasketBtn = BX(this.element.VISUAL.ADD2BASKET);this.nodes.obMove2Basket = BX(this.element.VISUAL.MOVE2BASKET);this.nodes.obAdd2BasketBtn && BX.bind(this.nodes.obAdd2BasketBtn,'click',BX.proxy(this.add2Basket,this))}this.nodes.obPriceMatrix = BX(this.element.VISUAL.PRICE_MATRIX);this.nodes.obArticleAvailable = BX(this.element.VISUAL.ARTICLE_AVAILABLE);if (this.element.VISUAL.CALL_FORM_BETTER_PRICE){this.nodes.obCallFormBetterPrice = BX(this.element.VISUAL.CALL_FORM_BETTER_PRICE);BX.bind(this.nodes.obCallFormBetterPrice,'click',BX.delegate(this.callFormBetterPrice,this))}if (this.element.CONFIG.USE_DELAY === "Y"){this.nodes.obDelay = BX(this.element.VISUAL.DELAY);this.nodes.obDelay && BX.bind(this.nodes.obDelay,'click',BX.proxy(this.add2Delay,this))}if (this.element.CONFIG.USE_COMPARE === "Y"){this.nodes.obCompare = BX(this.element.VISUAL.COMPARE);this.nodes.obCompare && BX.bind(this.nodes.obCompare,'click',BX.proxy(this.add2Compare,this))}if (this.element.CONFIG.SHOW_PRICE === "Y"){this.nodes.obPrice ={wrapper:null,price:null,old:null,discount:null,percent:null,total:null};this.nodes.obPrice.price = BX(this.element.VISUAL.PRICE);if (!this.nodes.obPrice.price){this.errorCode = -16}else{this.nodes.obPrice.total = BX(this.element.VISUAL.PRICE_TOTAL);this.nodes.obPrice.old = BX(this.element.VISUAL.OLD_PRICE);this.nodes.obPrice.discount = BX(this.element.VISUAL.DISCOUNT_PRICE);this.nodes.obPrice.percent = BX(this.element.VISUAL.DISCOUNT_PERCENT)}}if (this.element.CONFIG.SHOW_QUANTITY === "Y"){this.nodes.obQuantity = BX(this.element.VISUAL.QUANTITY);this.nodes.quantity = this.nodes.obProduct.querySelector('.quantity-block');if (this.element.VISUAL.QUANTITY_UP){this.nodes.obQuantityUp = BX(this.element.VISUAL.QUANTITY_UP);BX.bind(this.nodes.obQuantityUp,'click',BX.delegate(this.quantityUp,this))}if (this.element.VISUAL.QUANTITY_DOWN){this.nodes.obQuantityDown = BX(this.element.VISUAL.QUANTITY_DOWN);BX.bind(this.nodes.obQuantityDown,'click',BX.delegate(this.quantityDown,this))}if (this.nodes.obQuantity)BX.bind(this.nodes.obQuantity,'change',BX.delegate(this.quantityChange,this));this.element.precisionFactor = Math.pow(10,this.element.CONFIG.PRECISION)}},initProductData:function (){this.currentElement = this.element;this.oldElement = this.currentElement;this.currentElement.MAX_QUANTITY = this.currentElement.QUANTITY_FLOAT ?parseFloat(this.element.MAX_QUANTITY) :parseInt(this.element.MAX_QUANTITY,10);this.currentElement.STEP_QUANTITY = this.currentElement.QUANTITY_FLOAT ?parseFloat(this.currentElement.STEP_QUANTITY) :parseInt(this.currentElement.STEP_QUANTITY,10);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseFloat(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY;if (this.currentElement.QUANTITY_FLOAT)this.currentElement.STEP_QUANTITY = Math.round(this.currentElement.STEP_QUANTITY * this.element.precisionFactor) / this.element.precisionFactor;this.setPrice();this.setQuantityHtml();this.btnsControl();if (this.nodes.obPriceMatrix && this.currentElement.PRICE_MATRIX_RESULT.HTML)this.setPriceMatrix(this.currentElement.PRICE_MATRIX_RESULT.HTML)},setQuantityHtml:function (){if (this.currentElement.QUANTITY.HTML){var productAvailableValue = this.nodes.obProduct.querySelector(".product-available-js");productAvailableValue.innerHTML = this.currentElement.QUANTITY.HTML;productAvailableValue.classList.add("active")}},changeDetailUrl:function (ID){var arNames = this.nodes.obProduct.querySelectorAll("a.product-name");if (arNames){for (i = 0;i < arNames.length;i++){arNames[i].href = this.currentElement.DETAIL_PAGE_URL}}},init:function (){var i = 0,j = 0,treeItems = null;if (this.errorCode === 0){switch (this.element.PRODUCT_TYPE){case 0:case 1:case 2:this.checkQuantityControl
18281s();getHtmlStoreList(this.currentElement.ID,this.element.STORE,this.currentElement.MEASURE);break;case 3:treeItems = this.nodes.obTree.querySelectorAll('li');for (i = 0;i < treeItems.length;i++){BX.bind(treeItems[i],'click',BX.delegate(this.selectOfferProp,this))}this.setCurrent();break}}},getEntities:function (parent,entity,additionalFilter){if (!parent || !entity)return{length:0};additionalFilter = additionalFilter || '';return parent.querySelectorAll(additionalFilter + '[data-entity="' + entity + '"]')},initOffersData:function (){if (this.element.CONFIG.SHOW_OFFERS){this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];if (this.element.CONFIG.USE_OID === 'Y')this.addParameterToURL("oID",this.currentElement.ID);this.nodes.obTree = BX(this.element.VISUAL.TREE);if (!this.nodes.obTree)this.errorCode = -256}else{this.errorCode = -1}},preOrder:function (){var arParams ={path:"formmodal.php",element_id:this.element.FORM_PREORDER_ID,container:"modalAreaForm",element_item_type:"PREORDER",element_item_name:this.element.NAME},element_id = $(this).attr("data-call-modal"),header = $(this).attr("data-header");arParams["element_item_id"] = this.currentElement.ID.toString();arParams["ARTICLE"] = this.currentElement.ARTICLE;arParams["PHOTO"] = this.currentElement.PHOTO;switch (this.element.PRODUCT_TYPE){case 1:case 2:arParams["element_item_input"] = this.element.NAME;break;case 3:arParams["element_item_offers"] = this.currentElement.TREE_INFO;arParams["element_item_input"] = getStringNameItem(this.element.NAME,this.currentElement.TREE_INFO);break;default:break}callModal(arParams)},callFormBetterPrice:function (){var arParams ={path:"formmodal.php",element_id:this.element.FORM_BETTER_PRICE_ID,container:"modalAreaForm",element_item_type:"BETTER_PRICE",element_item_name:this.element.NAME},element_id = $(this).attr("data-call-modal"),header = $(this).attr("data-header");arParams["element_item_id"] = this.currentElement.ID.toString();arParams["ARTICLE"] = this.currentElement.ARTICLE;arParams["PHOTO"] = this.currentElement.PHOTO;switch (this.element.PRODUCT_TYPE){case 1:case 2:arParams["element_item_input"] = this.element.NAME;break;case 3:arParams["element_item_offers"] = this.currentElement.TREE_INFO;arParams["element_item_input"] = getStringNameItem(this.element.NAME,this.currentElement.TREE_INFO);break;default:break}callModal(arParams)},fastOrder:function (){if (!this.currentElement.CAN_BUY)return;var productID = '',value = 1,productItem ={};if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;productItem ={"QUANTITY":value,"PRICE":this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED],"NAME":this.currentElement.NAME_HTML};productItem["PRODUCT_ID"] = this.currentElement.ID.toString();productItem["ARTICLE"] = this.currentElement.ARTICLE;productItem["PHOTO"] = this.currentElement.PHOTO;switch (this.element.PRODUCT_TYPE){case 1:case 2:break;case 3:productItem["element_item_offers"] = this.currentElement.TREE_INFO;break;default:break}showProcessLoad();BX.ajax({method:'POST',dataType:'html',url:'/bitrix/tools/concept.phoenix/ajax/basket/call_form_fast_order.php',data:{productItem:productItem,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.callFormResult,this)})},callFormResult:function (html){closeProcessLoad();startModalMode("div.modalAreaForm");$('div.modalAreaForm').html(html);$('div.modalAreaForm form.form .date').datetimepicker({timepicker:false,format:'d/m/Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1})},add2Delay:function (){var productID = '',value = 1;if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/wishlist.php',data:{product_id:this.currentElement.ID,price_id:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].ID,price:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].PRICE,name:this.currentElement.NAME,detail_page:this.currentElement.DETAIL_PAGE_URL,can_buy:this.currentElement.CAN_BUY,quantity:value,currency:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].CURRENCY,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.delayResult,this)})},delayResult:function (arResult){if (arResult["OK"] == "Y"){if (this.element.PRODUCT_TYPE == 3){if (arResult["ACTION"] == 'active')this.currentElement.IN_DELAY = true;if (arResult["ACTION"] == 'delete')this.currentElement.IN_DELAY = false}markProductDelayBasket(this.currentElement.ID,arResult["ACTION"])}else{console.log(arResult["OK"])}},add2Compare:function (){var checked = false;if (!BX.hasClass(this.nodes.obCompare,"active"))checked = true;var url = checked ? this.element.CONFIG.COMPARE_URL + '?action=ADD_TO_COMPARE_LIST&id=#ID#' :this.element.CONFIG.COMPARE_URL + '?action=DELETE_FROM_COMPARE_LIST&id=#ID#',compareLink;if (url){compareLink = url.replace('#ID#',this.currentElement.ID);
18281BX.ajax({method:'POST',dataType:checked ? 'json' :'html',url:compareLink + (compareLink.indexOf('?') !== -1 ? '&' :'?') + 'ajax_action=Y',onsuccess:checked ?BX.proxy(this.compareResult,this) :BX.proxy(this.compareDeleteResult,this)})}},compareResult:function (arResult){if (this.element.OFFERS.length > 0)this.currentElement.IN_COMPARE = true;markProductCompareBasket(this.currentItemId,'active')},compareDeleteResult:function (arResult){if (this.element.OFFERS.length > 0)this.currentElement.IN_COMPARE = false;markProductCompareBasket(this.currentItemId,'delete')},add2Basket:function (){if (!this.currentElement.CAN_BUY)return;var productID = '',value = 1;if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;productItem ={PRODUCT_ID:this.currentElement.ID,QUANTITY:value,PRICE_ID:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].ID};$(this.nodes.obAdd2BasketBtn).addClass("btn-processing");BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/add2basket.php',data:{productItem:productItem,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.basketResult,this)})},basketResult:function (arResult){if (arResult["OK"] == "Y"){if (this.element.PRODUCT_TYPE === 3)this.element.OFFERS[this.element.OFFER_ID_SELECTED].IN_BASKET = true;markProductAddBasket(this.currentElement.ID);if (arResult["SCRIPTS"])$('body').append(arResult["SCRIPTS"])}$(this.nodes.obAdd2BasketBtn).removeClass("btn-processing")},deleteParameterURL:function (url,param){var a = url.split('?');var re = new RegExp('(\\?|&)' + param + '=[^&]+','g');if (url == "undefined")url = "";url = ('?' + a[1]).replace(re,'');url = url.replace(/^&|\?/,'');if (url == "undefined")url = "";var dlm = (url == '') ? '' :'?';return a[0] + dlm + url},addParameterToURL:function (param,value){var url = window.location.href;if (history.replaceState){var baseUrl = this.deleteParameterURL(url,param);baseUrl += (baseUrl.split('?')[1] ? '&' :'?') + param + "=" + value;history.replaceState(null,null,baseUrl)}else{console.warn('History API don`t support')}},selectOfferProp:function (){var i = 0,strTreeValue = '',arTreeItem = [],rowItems = null,target = BX.proxy_context,smallCardItem;if (target && target.hasAttribute('data-treevalue')){if (BX.hasClass(target,'active'))return;if (typeof document.activeElement === 'object'){document.activeElement.blur()}strTreeValue = target.getAttribute('data-treevalue');arTreeItem = strTreeValue.split('_');this.searchOfferPropIndex(arTreeItem[0],arTreeItem[1]);rowItems = BX.findChildren(target.parentNode,{tagName:'li'},false);if (rowItems && rowItems.length){for (i = 0;i < rowItems.length;i++){BX.removeClass(rowItems[i],'active')}}BX.addClass(target,'active')}},searchOfferPropIndex:function (strPropID,strPropValue){var strName = '',arShowValues = false,arCanBuyValues = [],allValues = [],index = -1,i,j,arFilter ={},tmpFilter = [];for (i = 0;i < this.element.TREE_PROPS.length;i++){if (this.element.TREE_PROPS[i].ID === strPropID){index = i;break}}if (index > -1){for (i = 0;i < index;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arFilter[strName] = this.selectedValues[strName]}strName = 'PROP_' + this.element.TREE_PROPS[index].ID;arFilter[strName] = strPropValue;for (i = index + 1;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;allValues = [];if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];allValues[allValues.length] = arShowValues[j];if (this.getCanBuy(tmpFilter))arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}else{arCanBuyValues = arShowValues}if (this.selectedValues[strName] && BX.util.in_array(this.selectedValues[strName],arCanBuyValues)){arFilter[strName] = this.selectedValues[strName]}else{if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arFilter[strName] = (arCanBuyValues.length ? arCanBuyValues[0] :allValues[0])}else{arFilter[strName] = arCanBuyValues[0]}}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()}if (this.element.CONFIG.USE_OID === 'Y')this.addParameterToURL("oID",this.currentElement.ID)},setCurrent:function (){var i,j = 0,strName = '',arShowValues = false,arCanBuyValues = [],arFilter ={},tmpFilter = [],current = this.currentElement.TREE;for (i = 0;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;if (BX.util.in_array(current[strName],arShowValues)){arFilter[strName] = current[strName]}else{arFilter[strName] = arShowValues[0];this.element.OFFER_ID_SELECTED = 0}if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];if (this.getCanBuy(tmpFilter)){arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}}else{arCanBuyValues = arShowValues}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()},getRowValues:function (arFilter,index){var arValues = [],i = 0,j = 0,boolSearch = false,boolOneSearch = true;if (arFilter.length === 0){for (i = 0;i < this.element.OFFERS.length;i++){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}}boolSearch = true}else{for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}boolSearch = true}}}return (boolSearch ? arValues :false)},updateRow:function (intNumber,activeId,showId,canBuyId){var i = 0,value = '',isCurrent = false,rowItems = null;var lineContainer = this.nodes.obTree.querySelectorAll('.wrapper-sku-props');if (intNumber > -1 && intNumber < lineContainer.length){rowItems = lineContainer[intNumber].querySelectorAll('li');for (i = 0;i < rowItems.length;i++){value = rowItems[i].getAttribute('data-onevalue');isCurrent = value === activeId;if (isCurrent){BX.addClass(rowItems[i],'active')}else{BX.removeClass(rowItems[i],'active')}if (BX.util.in_array(value,canBuyId)){BX.removeClass(rowItems[i],'notallowed')}else{BX.addClass(rowItems[i],'notallowed')}rowItems[i].style.display = BX.util.in_array(value,showId) ? '' :'none';if (isCurrent){lineContainer[intNumber].style.display = (value == 0) ? 'none' :''}}}},changeInfo:function (){var index = -1,j = 0,boolOneSearch = true,descTitle = null,rowItems = null;var i;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in this.selectedValues){if (this.selectedValues[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){index = i;break}}this.oldElement = this.currentElement;this.element.OFFER_ID_SELECTED = index;this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];this.changeCharsBlock();if (index > -1){if (this.nodes.obPriceMatrix && this.currentElement.PRICE_MATRIX_RESULT.HTML)this.setPriceMatrix(this.currentElement.PRICE_MATRIX_RESULT.HTML);this.updateInfoBasketOffer(this.currentElement.ID,this.element.VISUAL.ID);for (i = 0;i < this.element.OFFERS.length;i++){if (this.element.CONFIG.OFFER_GROUP){if (offerGroupNode = BX(this.element.VISUAL.OFFER_GROUP + this.element.OFFERS[i].ID))offerGroupNode.style.display = (i == index ? '' :'none')}}$("input.product-" + this.currentElement.ID + "-picture-src-small").val(this.currentElement.MORE_PHOTOS[0].SMALL.SRC);if (this.element.CONFIG.ZOOM){$(this.nodes.obProduct).find('.zoom-offer').trigger('zoom
18281-offer.destroy');initZoomer($(this.nodes.obProduct).find(".zoom-offer"))}if (this.currentElement.IN_BASKET == true ||this.currentElement.IN_DELAY == true ||this.currentElement.IN_COMPARE == true){setItemButtonStatus(this.currentElement.ID,'',this.currentElement.IN_BASKET,this.currentElement.IN_DELAY,this.currentElement.IN_COMPARE);setItemButtonStatus(this.currentElement.ID,'','offer_delay_added');setItemButtonStatus(this.currentElement.ID,'','compare_added')}else{setItemButtonStatus(arStatusBasketPhoenix)}}this.quantitySet();this.setPrice();this.setQuantityHtml();this.btnsControl();if (!this.firstLoad){this.drawImages(this.currentElement.MORE_PHOTOS);if (this.element.CONFIG.USE_OID !== 'Y')this.changeDetailUrl(this.currentElement.ID);var previewText = this.nodes.obPreviewText.querySelector('.detail-description');if (previewText)this.changeText(previewText,this.currentElement.PREVIEW_TEXT_HTML);this.showArticleStoreQuantity()}getHtmlStoreList(this.currentElement.ID,this.element.STORE,this.currentElement.MEASURE);this.firstLoad = false},changeText:function (ob,text){if (text.length > 0){ob.innerHTML = text;ob.classList.remove('d-none')}else{ob.classList.add('d-none');ob.innerHTML = ''}},hideBtns:function (){if (this.currentElement.SHOW_BUY_BTN === 'Y'){this.nodes.obWrBuyBtn.classList.add('d-none');this.nodes.obWrBuyBtn.classList.remove('active')}if (this.currentElement.SHOW_BTN_BASKET === 'Y'){this.nodes.obWrBasketBtn.classList.add('d-none');this.nodes.obWrBasketBtn.classList.remove('active')}this.nodes.obBasketActions.classList.add('d-none');this.nodes.quantity.classList.add('d-none');this.nodes.obBasketActions.classList.remove('active');this.nodes.quantity.classList.remove('active')},showBtns:function (){this.nodes.obBasketActions.classList.remove('d-none');this.nodes.obBasketActions.classList.add('active');if (this.currentElement.SHOW_BUY_BTN === 'Y'){this.nodes.obWrBuyBtn.classList.remove('d-none');this.nodes.obWrBuyBtn.classList.add('active')}else{this.nodes.obWrBuyBtn.classList.add('d-none');this.nodes.obWrBuyBtn.classList.remove('active')}if (this.currentElement.SHOW_BTN_BASKET === 'Y'){this.nodes.obWrBasketBtn.classList.remove('d-none');this.nodes.quantity.classList.remove('d-none');this.nodes.obWrBasketBtn.classList.add('active');this.nodes.quantity.classList.add('active')}else{this.nodes.quantity.classList.add('d-none');this.nodes.quantity.classList.remove('active')}},btnsControl:function (){var show = false;if (this.currentElement.SHOWPREORDERBTN || this.currentElement.MODE_ARCHIVE){if (this.currentElement.SHOWPREORDERBTN){this.nodes.obWrPreorderBtn.classList.remove('d-none');this.nodes.obWrPreorderBtn.classList.add('active')}else{this.nodes.obWrPreorderBtn.classList.add('d-none');this.nodes.obWrPreorderBtn.classList.remove('active')}}else{this.nodes.obWrPreorderBtn.classList.add('d-none');this.nodes.obWrPreorderBtn.classList.remove('active');if (this.currentElement.CAN_BUY && this.currentElement.MODE_DISALLOW_ORDER != "Y")show = true}if (this.currentElement.SUBSCRIBE === "Y" && this.currentElement.MAX_QUANTITY <= 0){this.nodes.obWrSubscribe.classList.add("active");if(this.nodes.obWrSubscribe.firstElementChild)this.nodes.obWrSubscribe.firstElementChild.style.display = ""}else{this.nodes.obWrSubscribe.classList.add("d-none")}if (this.currentElement.SHOW_BTNS === 'Y' && this.currentElement.CAN_BUY)show = true;else{show = false}if (show)this.showBtns();else{this.hideBtns()}},updateInfoBasketOffer:function (id,parent){parent = parent || '';if (parent.length > 0)parent = "#" + parent;$(parent + ' .add2basket').attr('data-item',id);$(parent + ' .move2basket').attr('data-item',id);$(parent + ' .quantity-block').attr('data-item',id);$(parent + ' .delay').attr('data-item',id);$(parent + ' .compare').attr('data-item',id)},setPriceMatrix:function (sPriceMatrix){if (sPriceMatrix.length > 0){this.nodes.obPriceMatrix.classList.remove('d-none');this.nodes.obPriceMatrix.innerHTML = sPriceMatrix}else{this.nodes.obPriceMatrix.classList.add('d-none');this.nodes.obPriceMatrix.innerHTML = ''}},changeCharsBlock:function (){var html = "";if (this.nodes.obSkuChars){if (this.currentElement.SKU_LIST_CHARS.length){for (i = 0;i < this.currentElement.SKU_LIST_CHARS.length;i++){html += "<table class='cart-char-table mobile-break show-hidden-child'>";html += "<tbody>";html += "<tr>";html += "<td class='left'>" + this.currentElement.SKU_LIST_CHARS[i].NAME + "</td>";html += "<td class='dotted'>";html += "<div class='dotted'></div>";html += "</td>";html += "<td class='sku-value right bold'>" + this.currentElement.SKU_LIST_CHARS[i].VALUE + "</td>";html += "</tr>";html += "</tbody>";html += "</table>"}$("#chars").removeClass('d-none')}else{$(".chars-link").addClass("d-none")}BX.adjust(this.nodes.obSkuChars,{html:html});if ($(".cart-char-table").length <= 0 && $(".cart-char-col-right").length <= 0){$("#chars").addClass('d-none');$(".chars-link").addClass("d-none")}else{$("#chars").removeClass('d-none');$(".chars-link").removeClass("d-none")}if (html.length <= 0 && $(this.nodes.obSkuChars).parents(".cart-char-col-left").find(".cart-char-table").length <= 0)$(this.nodes.obSkuChars).parents(".cart-char-col-left").hide();else{$(this.nodes.obSkuChars).parents(".cart-char-col-left").show()}}},showArticleStoreQuantity:function (){var showArticle = false,showQuantity = false,html = "";var showArticle = false,showQuantity = false,html = "";var obAvailable = this.nodes.obArticleAvailable.querySelector(".product-available-js"),obArticle = this.nodes.obArticleAvailable.querySelector(".detail-article");if (this.currentElement.QUANTITY.HTML.length > 0){obAvailable.innerHTML = this.currentElement.QUANTITY.HTML;obAvailable.classList.remove('d-none');showQuantity = true}else{obAvailable.classList.add('d-none')}if (this.currentElement.ARTICLE){obArticle.innerHTML = BX.message("ARTICLE") + this.currentElement.ARTICLE;obArticle.title = obArticle.innerHTML;obArticle.classList.remove('d-none');showArticle = true}else{obArticle.classList.add('d-none')}if (showArticle || showQuantity){this.nodes.obArticleAvailable.classList.remove('d-none')}else{this.nodes.obArticleAvailable.classList.add('d-none')}},setPrice:function (){var price;if (this.nodes.obQuantity)this.checkPriceRange(this.nodes.obQuantity.value);
18281this.checkQuantityControls();price = this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED];var blockPrice = this.nodes.obProduct.querySelector('.block-price');if (this.nodes.obPrice.price){var showPrice = true;if (this.currentElement.MODE_ARCHIVE === 'Y' || price.PRICE == "-1")showPrice = false;if (showPrice){this.nodes.obPrice.price.innerHTML = price.PRINT_PRICE;blockPrice.classList.remove('d-none');var nameTypePrice = this.nodes.obProduct.querySelector(".name-type-price");if (price.NAME && !this.currentElement.PRICE_MATRIX_RESULT.EXTRA_PRICE){nameTypePrice.innerHTML = price.NAME;nameTypePrice.classList.remove('d-none')}else{nameTypePrice.innerHTML = '';nameTypePrice.classList.add('d-none')}if (price && price.RATIO_PRICE !== price.RATIO_BASE_PRICE){if (this.element.CONFIG.SHOW_OLD_PRICE === "Y"){this.nodes.obPrice.old.classList.remove("d-none");this.nodes.obPrice.old.innerHTML = price.PRINT_BASE_PRICE;if (this.nodes.obPrice.discount){this.nodes.obPrice.discount.querySelector('.product-price-discount-js').innerHTML = price.PRINT_DISCOUNT;if (this.element.CONFIG.SHOW_DISCOUNT_PERCENT === "Y" && price.PERCENT > 0){this.nodes.obPrice.percent.innerHTML = (-price.PERCENT) + "%";this.nodes.obPrice.percent.classList.remove('d-none')}else{this.nodes.obPrice.percent.classList.add('d-none')}this.nodes.obPrice.discount.classList.remove('d-none')}else{this.nodes.obPrice.discount.classList.add('d-none')}}}else{this.nodes.obPrice.old.classList.add("d-none");this.nodes.obPrice.discount.classList.add('d-none');this.nodes.obPrice.percent.classList.add('d-none')}if (this.nodes.obPrice.total){if (price && this.nodes.obQuantity && this.nodes.obQuantity.value != this.currentElement.STEP_QUANTITY){var sum = BX.Currency.currencyFormat(price.PRICE * this.nodes.obQuantity.value,price.CURRENCY,true);this.nodes.obPrice.total.classList.remove('d-none');this.nodes.obPrice.total.querySelector('.total-value').innerHTML = sum;this.nodes.obPrice.total.querySelector('.total-value').title = sum}else{this.nodes.obPrice.total.classList.add('d-none')}}}else{this.nodes.obPrice.price.innerHTML = "";blockPrice.classList.add("d-none")}}},checkQuantityControls:function (){if (!this.nodes.obQuantity)return;var reachedTopLimit = this.element.CONFIG.SHOW_QUANTITY === "Y" && parseFloat(this.nodes.obQuantity.value) + this.currentElement.STEP_QUANTITY > this.currentElement.MAX_QUANTITY,reachedBottomLimit = parseFloat(this.nodes.obQuantity.value) - this.currentElement.STEP_QUANTITY < this.currentElement.MIN_QUANTITY;if (reachedTopLimit)BX.addClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled');else if (BX.hasClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled')){BX.removeClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled')}if (reachedBottomLimit)BX.addClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled');else if (BX.hasClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled')){BX.removeClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled')}if (reachedTopLimit && reachedBottomLimit)this.nodes.obQuantity.setAttribute('disabled','disabled');else{this.nodes.obQuantity.removeAttribute('disabled')}},checkPriceRange:function (quantity){if (typeof quantity === 'undefined' || this.currentElement.ITEM_PRICE_MODE !== 'Q')return;var range,found = false;for (var i in this.currentElement.ITEM_QUANTITY_RANGES){if (this.currentElement.ITEM_QUANTITY_RANGES.hasOwnProperty(i)){range = this.currentElement.ITEM_QUANTITY_RANGES[i];if (parseFloat(quantity) >= parseFloat(range.SORT_FROM) &&(range.SORT_TO === 'INF' ||parseFloat(quantity) <= parseFloat(range.SORT_TO))){found = true;this.currentElement.ITEM_QUANTITY_RANGE_SELECTED = range.HASH;break}}}if (!found && (range = this.getMinPriceRange())){this.currentElement.ITEM_QUANTITY_RANGE_SELECTED = range.HASH}for (var k in this.currentElement.ITEM_PRICES){if (this.currentElement.ITEM_PRICES.hasOwnProperty(k)){if (this.currentElement.ITEM_PRICES[k].QUANTITY_HASH == this.currentElement.ITEM_QUANTITY_RANGE_SELECTED){this.currentElement.ITEM_PRICE_SELECTED = k;break}}}},checkQuantityRange:function (quantity,direction){if (typeof quantity === 'undefined' || this.currentElement.ITEM_PRICE_MODE !== 'Q'){return quantity}quantity = parseFloat(quantity);var nearestQuantity = quantity;var range,diffFrom,absDiffFrom,diffTo,absDiffTo,shortestDiff;for (var i in this.currentElement.ITEM_QUANTITY_RANGES){if (this.currentElement.ITEM_QUANTITY_RANGES.hasOwnProperty(i)){range = this.currentElement.ITEM_QUANTITY_RANGES[i];if (parseFloat(quantity) >= parseFloat(range.SORT_FROM) &&(range.SORT_TO === 'INF' ||parseFloat(quantity) <= parseFloat(range.SORT_TO))){nearestQuantity = quantity;break}else{diffFrom = parseFloat(range.SORT_FROM) - quantity;absDiffFrom = Math.abs(diffFrom);diffTo = parseFloat(range.SORT_TO) - quantity;absDiffTo = Math.abs(diffTo);if (shortestDiff === undefined || shortestDiff > absDiffFrom){if (direction === undefined ||(direction === 'up' && diffFrom > 0) ||(direction === 'down' && diffFrom < 0)){shortestDiff = absDiffFrom;nearestQuantity = parseFloat(range.SORT_FROM)}}if (shortestDiff === undefined || shortestDiff > absDiffTo){if (direction === undefined ||(direction === 'up' && diffFrom > 0) ||(direction === 'down' && diffFrom < 0)){shortestDiff = absDiffTo;nearestQuantity = parseFloat(range.SORT_TO)}}}}}return nearestQuantity},getMinPriceRange:function (){var range;for (var i in this.currentElement.ITEM_QUANTITY_RANGES){if (this.currentElement.ITEM_QUANTITY_RANGES.hasOwnProperty(i)){if (!range ||parseInt(this.currentElement.ITEM_QUANTITY_RANGES[i].SORT_FROM) < parseInt(range.SORT_FROM)){range = this.currentElement.ITEM_QUANTITY_RANGES[i]}}}return range},startQuantityInterval:function (){var target = BX.proxy_context;var func = target.id === this.element.VISUAL.QUANTITY_DOWN ?BX.proxy(this.quantityDown,this) :BX.proxy(this.quantityUp,this);this.quantityDelay = setTimeout(BX.delegate(function (){this.quantityTimer = setInterval(func,150)},this),300)},clearQuantityInterval:function (){clearTimeout(this.quantityDelay);clearInterval(this.quantityTimer)},quantityUp:function (){var curValue = 0,boolSet = true;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y" && this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :parseInt(this.nodes.obQuantity.value,10);if (!isNaN(curValue)){curValue += this.currentElement.STEP_QUANTITY;curValue = this.checkQuantityRange(curValue,'up');if (this.currentElement.CHECK_QUANTITY && curValue > this.currentElement.MAX_QUANTITY){boolSet = false}if (boolSet){if (this.currentElement.QUANTITY_FLOAT){curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue;this.setPrice()}}}},quantityDown:function (){var curValue = 0,boolSet = true;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y" && this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :parseInt(this.nodes.obQuantity.value,10);if (!isNaN(curValue)){curValue -= this.currentElement.STEP_QUANTITY;curValue = this.checkQuantityRange(curValue,'down');if (curValue < this.currentElement.MIN_QUANTITY){boolSet = false}if (boolSet){if (this.currentElement.QUANTITY_FLOAT){curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue;this.setPrice()}}}},quantityChange:function (){var curValue = 0,intCount;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y"){if (this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :Math.round(this.nodes.obQuantity.value);if (!isNaN(curValue)){curValue = this.checkQuantityRange(curValue);if (this.currentElement.CHECK_QUANTITY){if (curValue > this.currentElement.MAX_QUANTITY){curValue = this.currentElement.MAX_QUANTITY}}this.checkPriceRange(curValue);if (curValue < this.currentElement.MIN_QUANTITY){curValue = this.currentElement.MIN_QUANTITY}else{intCount = Math.round(Math.round(curValue * this.element.precisionFactor / this.currentElement.STEP_QUANTITY) / this.element.precisionFactor) || 1;curValue = (intCount <= 1 ? this.currentElement.STEP_QUANTITY :intCount * this.currentElement.STEP_QUANTITY);curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue}else{this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}}else{this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}this.setPrice()}},quantitySet:function (){var strLimit,resetQuantity;var newOffer = this.currentElement,oldOffer = this.oldElement;if (this.errorCode === 0){this.currentElement.CAN_BUY = newOffer.CAN_BUY;if (this.currentElement.CAN_BUY){this.nodes.quantity.classList.remove('d-none');this.nodes.obBasketActions.classList.remove('d-none');this.nodes.obWrSubscribe.classList.add('d-none')}else{this.nodes.quantity.classList.add('d-none');if (this.nodes.obWrSubscribe){if (newOffer.CATALOG_SUBSCRIBE === 'Y'){this.nodes.obWrSubscribe.classList.remove('d-none');this.nodes.obWrSubscribe.setAttribute('data-item',newOffer.ID);BX(this.element.VISUAL.SUBSCRIBE_LINK + '_hidden').click()}else{this.nodes.obWrSubscribe.classList.add('d-none')}}}this.currentElement.QUANTITY_FLOAT = newOffer.QUANTITY_FLOAT;this.element.CHECK_QUANTITY = newOffer.CHECK_QUANTITY;if (this.currentElement.QUANTITY_FLOAT){this.currentElement.STEP_QUANTITY = Math.round(parseFloat(newOffer.STEP_QUANTITY) * this.element.precisionFactor) / this.element.precisionFactor;this.currentElement.MAX_QUANTITY = parseFloat(newOffer.MAX_QUANTITY);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseFloat(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY}else{this.currentElement.STEP_QUANTITY = parseInt(newOffer.STEP_QUANTITY,10);this.currentElement.MAX_QUANTITY = parseInt(newOffer.MAX_QUANTITY,10);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseInt(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY}if (this.element.CONFIG.SHOW_QUANTITY){var isDifferentMinQuantity = oldOffer.ITEM_PRICES.length &&oldOffer.ITEM_PRICES[oldOffer.ITEM_PRICE_SELECTED] &&oldOffer.ITEM_PRICES[oldOffer.ITEM_PRICE_SELECTED].MIN_QUANTITY != this.currentElement.MIN_QUANTITY;if (this.currentElement.QUANTITY_FLOAT){resetQuantity = Math.round(parseFloat(oldOffer.STEP_QUANTITY) * this.element.precisionFactor) / this.element.precisionFactor !== this.currentElement.STEP_QUANTITY ||isDifferentMinQuantity ||oldOffer.MEASURE !== newOffer.MEASURE ||(this.currentElement.CHECK_QUANTITY &&parseFloat(oldOffer.MAX_QUANTITY) > this.currentElement.MAX_QUANTITY &&parseFloat(this.nodes.obQuantity.value) > this.currentElement.MAX_QUANTITY)}else{resetQuantity = parseInt(oldOffer.STEP_QUANTITY,10) !== this.currentElement.STEP_QUANTITY ||isDifferentMinQuantity ||oldOffer.MEASURE !== newOffer.MEASURE ||(this.currentElement.CHECK_QUANTITY &&parseInt(oldOffer.MAX_QUANTITY,10) > this.currentElement.MAX_QUANTITY &&parseInt(this.nodes.obQuantity.value,10) > this.currentElement.MAX_QUANTITY)}this.nodes.obQuantity.disabled = !this.currentElement.CAN_BUY;if (resetQuantity){this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}}if (this.nodes.obMeasure){if (newOffer.MEASURE_HTML){BX.adjust(this.nodes.obMeasure,{html:newOffer.MEASURE_HTML,style:{display:''}})}else{BX.adjust(this.nodes.obMeasure,{html:'',style:{display:'none'}})}}}},getCanBuy:function (arFilter){var i,j = 0,boolOneSearch = true,boolSearch = false;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (this.element.OFFERS[i].CAN_BUY){boolSearch = true;break}}}return boolSearch},drawImages:function (images){var nodeControlPics = $(this.nodes.obBigSlider).find(".controls-pictures"),nodeBigPics = $(this.nodes.obBigSlider).find(".wrapper-big-picture"),nodeControlPicsParent = nodeControlPics.parent(),nodeBigPicsParent = nodeBigPics.parent(),listControl = "",listBigPic = "",imagesIsset = images && BX.type.isArray(images),countMoreImages = 0,countImages = 0;nodeControlPics.removeClass('one-photo').html("");nodeBigPics.html("");if (imagesIsset){countImages = images.length;if (countImages > 0){for (i = 0;i < images.length;i++){if (i < 3){listControl += "<div data-value='" + images[i].ID + "'";listControl += "class='small-picture";if (i == 0){listControl += " active"}listControl += "'>";listControl += "<img src='" + images[i].SMALL.SRC + "' alt = '";if (images[i].DESC)listControl += images[i].DESC;listControl += "'/>";listControl += "</div>"}listBigPic += "<div data-id='" + images[i].ID + "'";listBigPic += "class='big-picture";if (i == 0){listBigPic += " active"}listBigPic += "'>";listBigPic += "<a class='cursor-loop d-block open-popup-gallery " + this.element.CONFIG.ZOOM + "-offer' data-popup-gallery='" + this.currentElement.ID + "_" + this.element.OBJ_ID + "'>";listBigPic += "<img class='d-block mx-auto img-fluid open-popup-gallery-item' data-src='" + images[i].BIG.SRC + "' src='" + images[i].BIG.SRC + "' title='" + this.element.TITLE + "'";listBigPic += " data-popup-gallery='" + this.currentElement.ID + "_" + this.element.OBJ_ID + "'";listBigPic += " data-small-src = '" + images[i].SMALL.SRC + "'";listBigPic += " data-big-src = '" + images[i].BIG.SRC + "'";listBigPic += " data-desc ='" + images[i].DESC + "'";listBigPic += " alt ='" + images[i].DESC + "'";listBigPic += ">";listBigPic += "</a>";listBigPic += "</div>"}if (images.length > 3){countMoreImages = images.length - 3;listControl += "<div class='more open-popup-gallery' data-popup-gallery='" + this.currentElement.ID + "_" + this.element.OBJ_ID + "'><a>" + BX.message('MORE_PHOTOS') + ' ' + (images.length - 3) + "</a></div>"}}}else{listBigPic += "<div";listBigPic += "class='big-picture active'>";listBigPic += "<img src='" + this.no_photo_src + "' title='" + this.config.title + "'>";listBigPic += "</div>"}nodeBigPics.html(listBigPic);nodeControlPics.html(listControl);if (countImages> 1 || nodeControlPicsParent.hasClass('video')){nodeControlPicsParent.removeClass('d-none');nodeControlPicsParent.addClass('col-2');
18281nodeBigPicsParent.removeClass('col-12');nodeBigPicsParent.addClass('col-10')}else{nodeControlPicsParent.addClass('d-none');nodeBigPicsParent.removeClass('col-10');nodeBigPicsParent.addClass('col-12')}}};window.JCCatalogItem = function (arParams){this.element = arParams;this.nodes ={};this.currentElement ={};this.oldElement ={};this.firstLoad = true;this.errorCode = 0;this.selectedValues ={};if (typeof arParams === 'object'){this.initConfig();switch (this.element.PRODUCT_TYPE){case 0:case 1:case 2:this.initProductData();break;case 3:this.initOffersData();break;default:this.errorCode = -1}}if (this.errorCode === 0)BX.ready(BX.delegate(this.init,this))};window.JCCatalogItem.prototype ={initConfig:function (){this.nodes.obProduct = BX(this.element.VISUAL.ID);if (!this.nodes.obProduct)this.errorCode = -1;this.element.PRODUCT_TYPE = parseInt(this.element.PRODUCT_TYPE,10);this.nodes.obPriceMatrix = BX(this.element.VISUAL.PRICE_MATRIX);this.nodes.obMeasure = BX(this.element.VISUAL.QUANTITY_MEASURE);this.nodes.obPreviewText = BX(this.element.VISUAL.PREVIEW_TEXT);this.nodes.obShortDescription = BX(this.element.VISUAL.SHORT_DESCRIPTION);this.nodes.obArticleAvailable = BX(this.element.VISUAL.ARTICLE_AVAILABLE);this.nodes.obSkuChars = BX(this.element.VISUAL.SKU_CHARS);this.nodes.obPict = BX(this.element.VISUAL.PICT);this.nodes.obBasketActions = BX(this.element.VISUAL.BASKET_ACTIONS);this.nodes.obWrAdd2BasketBtn = BX(this.element.VISUAL.WR_ADD2BASKET);this.nodes.obAdd2BasketBtn = BX(this.element.VISUAL.ADD2BASKET);this.nodes.obMove2Basket = BX(this.element.VISUAL.MOVE2BASKET);this.nodes.obAdd2BasketBtn && BX.bind(this.nodes.obAdd2BasketBtn,'click',BX.proxy(this.add2Basket,this));this.nodes.obDetailUrlImg = BX(this.element.VISUAL.DETAIL_URL_IMG);this.nodes.obName = BX(this.element.VISUAL.NAME);this.nodes.obBtn2pageProduct = BX(this.element.VISUAL.BTN2DETAIL_PAGE_PRODUCT);if (this.element.CONFIG.USE_DELAY === "Y"){this.nodes.obDelay = BX(this.element.VISUAL.DELAY);this.nodes.obDelay && BX.bind(this.nodes.obDelay,'click',BX.proxy(this.add2Delay,this))}if (this.element.CONFIG.USE_COMPARE === "Y"){this.nodes.obCompare = BX(this.element.VISUAL.COMPARE);this.nodes.obCompare && BX.bind(this.nodes.obCompare,'click',BX.proxy(this.add2Compare,this))}if (this.element.CONFIG.SHOW_PRICE === "Y"){this.nodes.obPrice ={price:null,old:null,percent:null};this.nodes.obPrice.price = BX(this.element.VISUAL.PRICE);if (!this.nodes.obPrice.price){this.errorCode = -16}else{this.nodes.obPrice.old = BX(this.element.VISUAL.OLD_PRICE);this.nodes.obPrice.percent = BX(this.element.VISUAL.DISCOUNT_PERCENT)}}if (this.element.CONFIG.SHOW_QUANTITY === "Y"){this.nodes.obQuantity = BX(this.element.VISUAL.QUANTITY);this.nodes.quantity = this.nodes.obProduct.querySelector('.quantity-block');if (this.element.VISUAL.QUANTITY_UP){this.nodes.obQuantityUp = BX(this.element.VISUAL.QUANTITY_UP);BX.bind(this.nodes.obQuantityUp,'click',BX.delegate(this.quantityUp,this))}if (this.element.VISUAL.QUANTITY_DOWN){this.nodes.obQuantityDown = BX(this.element.VISUAL.QUANTITY_DOWN);BX.bind(this.nodes.obQuantityDown,'click',BX.delegate(this.quantityDown,this))}if (this.nodes.obQuantity)BX.bind(this.nodes.obQuantity,'change',BX.delegate(this.quantityChange,this));this.element.precisionFactor = Math.pow(10,this.element.CONFIG.PRECISION)}},initProductData:function (){this.currentElement = this.element;this.oldElement = this.currentElement;this.currentElement.MAX_QUANTITY = this.currentElement.QUANTITY_FLOAT ?parseFloat(this.element.MAX_QUANTITY) :parseInt(this.element.MAX_QUANTITY,10);this.currentElement.STEP_QUANTITY = this.currentElement.QUANTITY_FLOAT ?parseFloat(this.currentElement.STEP_QUANTITY) :parseInt(this.currentElement.STEP_QUANTITY,10);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseFloat(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY;if (this.currentElement.QUANTITY_FLOAT)this.currentElement.STEP_QUANTITY = Math.round(this.currentElement.STEP_QUANTITY * this.element.precisionFactor) / this.element.precisionFactor;this.setPrice();this.setQuantityHtml();this.btnsControl();if (this.nodes.obPriceMatrix && this.currentElement.PRICE_MATRIX_RESULT.HTML)this.setPriceMatrix(this.currentElement.PRICE_MATRIX_RESULT.HTML)},initOffersData:function (){if (this.element.CONFIG.SHOW_OFFERS){this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];this.nodes.obTree = BX(this.element.VISUAL.TREE);if (!this.nodes.obTree)this.errorCode = -256}else{this.hideBtns();this.errorCode = -1}},init:function (){var i = 0,j = 0,treeItems = null;if (this.errorCode === 0){switch (this.element.PRODUCT_TYPE){case 0:case 1:case 2:this.checkQuantityControl
18281s();break;case 3:treeItems = this.nodes.obTree.querySelectorAll('li');for (i = 0;i < treeItems.length;i++){BX.bind(treeItems[i],'click',BX.delegate(this.selectOfferProp,this))}this.setCurrent();break}}},add2Basket:function (){if (!this.currentElement.CAN_BUY)return;var productID = '',value = 1;if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;productItem ={PRODUCT_ID:this.currentElement.ID,QUANTITY:value,PRICE_ID:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].ID};$(this.nodes.obAdd2BasketBtn).addClass("btn-processing");BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/add2basket.php',data:{productItem:productItem,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.basketResult,this)})},basketResult:function (arResult){if (arResult["OK"] == "Y"){if (this.element.PRODUCT_TYPE === 3)this.element.OFFERS[this.element.OFFER_ID_SELECTED].IN_BASKET = true;markProductAddBasket(this.currentElement.ID);if (arResult["SCRIPTS"])$('body').append(arResult["SCRIPTS"])}$(this.nodes.obAdd2BasketBtn).removeClass("btn-processing")},add2Delay:function (){var productID = '',value = 1;if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/wishlist.php',data:{product_id:this.currentElement.ID,price_id:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].ID,price:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].PRICE,name:this.currentElement.NAME,detail_page:this.currentElement.DETAIL_PAGE_URL,can_buy:this.currentElement.CAN_BUY,quantity:value,currency:this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].CURRENCY,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.delayResult,this)})},delayResult:function (arResult){if (arResult["OK"] == "Y"){if (this.element.PRODUCT_TYPE == 3){if (arResult["ACTION"] == 'active')this.currentElement.IN_DELAY = true;if (arResult["ACTION"] == 'delete')this.currentElement.IN_DELAY = false}markProductDelayBasket(this.currentElement.ID,arResult["ACTION"])}else{console.log(arResult["OK"])}},add2Compare:function (){var checked = false;if (!BX.hasClass(this.nodes.obCompare,"active"))checked = true;var url = checked ? this.element.CONFIG.COMPARE_URL + '?action=ADD_TO_COMPARE_LIST&id=#ID#' :this.element.CONFIG.COMPARE_URL + '?action=DELETE_FROM_COMPARE_LIST&id=#ID#',compareLink;if (url){compareLink = url.replace('#ID#',this.currentElement.ID);BX.ajax({method:'POST',dataType:checked ? 'json' :'html',url:compareLink + (compareLink.indexOf('?') !== -1 ? '&' :'?') + 'ajax_action=Y',onsuccess:checked ?BX.proxy(this.compareResult,this) :BX.proxy(this.compareDeleteResult,this)})}},compareResult:function (arResult){if (this.element.OFFERS.length > 0)this.currentElement.IN_COMPARE = true;markProductCompareBasket(this.currentItemId,'active')},compareDeleteResult:function (arResult){if (this.element.OFFERS.length > 0)this.currentElement.IN_COMPARE = false;markProductCompareBasket(this.currentItemId,'delete')},showArticleStoreQuantity:function (){var showArticle = false,showQuantity = false,html = "";var obAvailable = this.nodes.obArticleAvailable.querySelector(".product-available-js"),obArticle = this.nodes.obArticleAvailable.querySelector(".detail-article");if (this.currentElement.QUANTITY.HTML.length > 0){obAvailable.innerHTML = this.currentElement.QUANTITY.HTML;obAvailable.classList.remove('d-none');showQuantity = true}else{obAvailable.classList.add('d-none')}if (this.currentElement.ARTICLE){obArticle.innerHTML = BX.message("ARTICLE") + this.currentElement.ARTICLE;obArticle.title = obArticle.innerHTML;obArticle.classList.remove('d-none');showArticle = true}else{obArticle.classList.add('d-none')}if (showArticle || showQuantity){this.nodes.obArticleAvailable.classList.remove('d-none')}else{this.nodes.obArticleAvailable.classList.add('d-none')}},selectOfferProp:function (){var i = 0,strTreeValue = '',arTreeItem = [],rowItems = null,target = BX.proxy_context,smallCardItem;if (target && target.hasAttribute('data-treevalue')){if (BX.hasClass(target,'active'))return;if (typeof document.activeElement === 'object'){document.activeElement.blur()}strTreeValue = target.getAttribute('data-treevalue');arTreeItem = strTreeValue.split('_');this.searchOfferPropIndex(arTreeItem[0],arTreeItem[1]);rowItems = BX.findChildren(target.parentNode,{tagName:'li'},false);if (rowItems && rowItems.length){for (i = 0;i < rowItems.length;i++){BX.removeClass(rowItems[i],'active')}}BX.addClass(target,'active')}},searchOfferPropIndex:function (strPropID,strPropValue){var strName = '',arShowValues = false,arCanBuyValues = [],allValues = [],index = -1,i,j,arFilter ={},tmpFilter = [];for (i = 0;i < this.element.TREE_PROPS.length;i++){if (this.element.TREE_PROPS[i].ID === strPropID){index = i;break}}if (index > -1){for (i = 0;i < index;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arFilter[strName] = this.selectedValues[strName]}strName = 'PROP_' + this.element.TREE_PROPS[index].ID;arFilter[strName] = strPropValue;for (i = index + 1;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;allValues = [];if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];allValues[allValues.length] = arShowValues[j];if (this.getCanBuy(tmpFilter))arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}else{arCanBuyValues = arShowValues}if (this.selectedValues[strName] && BX.util.in_array(this.selectedValues[strName],arCanBuyValues)){arFilter[strName] = this.selectedValues[strName]}else{if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arFilter[strName] = (arCanBuyValues.length ? arCanBuyValues[0] :allValues[0])}else{arFilter[strName] = arCanBuyValues[0]}}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()}},setCurrent:function (){var i,j = 0,strName = '',arShowValues = false,arCanBuyValues = [],arFilter ={},tmpFilter = [],current = this.currentElement.TREE;for (i = 0;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;if (BX.util.in_array(current[strName],arShowValues)){arFilter[strName] = current[strName]}else{arFilter[strName] = arShowValues[0];this.element.OFFER_ID_SELECTED = 0}if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];if (this.getCanBuy(tmpFilter)){arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}}else{arCanBuyValues = arShowValues}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()},getRowValues:function (arFilter,index){var arValues = [],i = 0,j = 0,boolSearch = false,boolOneSearch = true;if (arFilter.length === 0){for (i = 0;i < this.element.OFFERS.length;i++){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}}boolSearch = true}else{for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}boolSearch = true}}}return (boolSearch ? arValues :false)},updateRow:function (intNumber,activeId,showId,canBuyId){var i = 0,value = '',isCurrent = false,rowItems = null;var lineContainer = this.nodes.obTree.querySelectorAll('.wrapper-sku-props');if (intNumber > -1 && intNumber < lineContainer.length){rowItems = lineContainer[intNumber].querySelectorAll('li');for (i = 0;i < rowItems.length;i++){value = rowItems[i].getAttribute('data-onevalue');isCurrent = value === activeId;if (isCurrent){BX.addClass(rowItems[i],'active')}else{BX.removeClass(rowItems[i],'active')}if (BX.util.in_array(value,canBuyId)){BX.removeClass(rowItems[i],'notallowed')}else{BX.addClass(rowItems[i],'notallowed')}rowItems[i].style.display = BX.util.in_array(value,showId) ? '' :'none';if (isCurrent){lineContainer[intNumber].style.display = (value == 0) ? 'none' :''}}}},changeInfo:function (){var index = -1,j = 0,boolOneSearch = true,descTitle = null,rowItems = null;var i;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in this.selectedValues){if (this.selectedValues[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){index = i;break}}this.oldElement = this.currentElement;this.element.OFFER_ID_SELECTED = index;this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];this.changeCharsBlock();if (index > -1){if (this.nodes.obPriceMatrix && this.currentElement.PRICE_MATRIX_RESULT.HTML)this.setPriceMatrix(this.currentElement.PRICE_MATRIX_RESULT.HTML);this.updateInfoBasketOffer(this.currentElement.ID,this.element.VISUAL.ID);for (i = 0;i < this.element.OFFERS.length;i++){if (this.element.CONFIG.OFFER_GROUP && this.element.OFFERS[i].OFFER_GROUP){if (offerGroupNode = BX(this.element.VISUAL.OFFER_GROUP + this.element.OFFERS[i].ID))offerGroupNode.style.display = (i == index ? '' :'none')}}$("input.product-" + this.currentElement.ID + "-picture-src-small").val(this.currentElement.PHOTO);if (this.element.CONFIG.ZOOM){$(this.nodes.obProduct).find('.zoom-offer').trigger('zoom
18281-offer.destroy');initZoomer($(this.nodes.obProduct).find(".zoom-offer"))}if (this.currentElement.IN_BASKET == true ||this.currentElement.IN_DELAY == true ||this.currentElement.IN_COMPARE == true){setItemButtonStatus(this.currentElement.ID,'',this.currentElement.IN_BASKET,this.currentElement.IN_DELAY,this.currentElement.IN_COMPARE);setItemButtonStatus(this.currentElement.ID,'','offer_delay_added');setItemButtonStatus(this.currentElement.ID,'','compare_added')}else{setItemButtonStatus(arStatusBasketPhoenix)}}this.quantitySet();this.setPrice();this.btnsControl();this.setQuantityHtml();if (!this.firstLoad){this.drawPicture();this.changeDetailUrl(this.currentElement.ID);if (this.nodes.obShortDescription)this.changeText(this.nodes.obShortDescription,this.currentElement.SHORT_DESCRIPTION_HTML);if (this.nodes.obPreviewText)this.changeText(this.nodes.obPreviewText,this.currentElement.PREVIEW_TEXT_HTML);this.showArticleStoreQuantity()}this.firstLoad = false;this.updateInfoBasketOffer(this.currentElement.ID,this.element.VISUAL.ID)},setQuantityHtml:function (){var productAvailableValue = this.nodes.obProduct.querySelector(".product-available-js");if (this.currentElement.QUANTITY.HTML && productAvailableValue){productAvailableValue.innerHTML = this.currentElement.QUANTITY.HTML;productAvailableValue.classList.add("active")}},setPrice:function (){var price;if (this.nodes.obQuantity)this.checkPriceRange(this.nodes.obQuantity.value);this.checkQuantityControls();price = this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED];var blockPrice = this.nodes.obProduct.querySelector('.block-price');if (this.nodes.obPrice.price){var showPrice = true;if (this.currentElement.MODE_ARCHIVE === 'Y' || price.PRICE == "-1")showPrice = false;if (showPrice){this.nodes.obPrice.price.innerHTML = price.PRINT_PRICE;blockPrice.classList.remove("d-none");var nameTypePrice = this.nodes.obProduct.querySelector(".name-type-price");if (price.NAME && !this.currentElement.PRICE_MATRIX_RESULT.EXTRA_PRICE){nameTypePrice.innerHTML = price.NAME;nameTypePrice.classList.remove('d-none')}else{nameTypePrice.innerHTML = '';nameTypePrice.classList.add('d-none')}if (price && price.RATIO_PRICE !== price.RATIO_BASE_PRICE){if (this.element.CONFIG.SHOW_OLD_PRICE
18281=== "Y"){this.nodes.obPrice.old.classList.remove("d-none");this.nodes.obPrice.old.innerHTML = price.PRINT_BASE_PRICE;if (this.element.CONFIG.SHOW_DISCOUNT_PERCENT === "Y" && price.PERCENT > 0){this.nodes.obPrice.percent.innerHTML = (-price.PERCENT) + "%";this.nodes.obPrice.percent.classList.remove('d-none')}else{this.nodes.obPrice.percent.classList.add('d-none')}}}else{this.nodes.obPrice.old.classList.add("d-none");this.nodes.obPrice.percent.classList.add('d-none')}}else{this.nodes.obPrice.price.innerHTML = "";blockPrice.classList.add("d-none")}}},checkPriceRange:function (quantity){if (typeof quantity === 'undefined' || this.currentElement.ITEM_PRICE_MODE !== 'Q')return;var range,found = false;for (var i in this.currentElement.ITEM_QUANTITY_RANGES){if (this.currentElement.ITEM_QUANTITY_RANGES.hasOwnProperty(i)){range = this.currentElement.ITEM_QUANTITY_RANGES[i];if (parseFloat(quantity) >= parseFloat(range.SORT_FROM) &&(range.SORT_TO === 'INF' ||parseFloat(quantity) <= parseFloat(range.SORT_TO))){found = true;this.currentElement.ITEM_QUANTITY_RANGE_SELECTED = range.HASH;break}}}if (!found && (range = this.getMinPriceRange())){this.currentElement.ITEM_QUANTITY_RANGE_SELECTED = range.HASH}for (var k in this.currentElement.ITEM_PRICES){if (this.currentElement.ITEM_PRICES.hasOwnProperty(k)){if (this.currentElement.ITEM_PRICES[k].QUANTITY_HASH == this.currentElement.ITEM_QUANTITY_RANGE_SELECTED){this.currentElement.ITEM_PRICE_SELECTED = k;break}}}},getMinPriceRange:function (){var range;for (var i in this.currentElement.ITEM_QUANTITY_RANGES){if (this.currentElement.ITEM_QUANTITY_RANGES.hasOwnProperty(i)){if (!range ||parseInt(this.currentElement.ITEM_QUANTITY_RANGES[i].SORT_FROM) < parseInt(range.SORT_FROM)){range = this.currentElement.ITEM_QUANTITY_RANGES[i]}}}return range},checkQuantityControls:function (){if (!this.nodes.obQuantity)return;var reachedTopLimit = this.element.CONFIG.SHOW_QUANTITY === "Y" && parseFloat(this.nodes.obQuantity.value) + this.currentElement.STEP_QUANTITY > this.currentElement.MAX_QUANTITY,reachedBottomLimit = parseFloat(this.nodes.obQuantity.value) - this.currentElement.STEP_QUANTITY < this.currentElement.MIN_QUANTITY;if (reachedTopLimit)BX.addClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled');else if (BX.hasClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled')){BX.removeClass(this.nodes.obQuantityUp,'product-item-amount-field-btn-disabled')}if (reachedBottomLimit)BX.addClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled');else if (BX.hasClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled')){BX.removeClass(this.nodes.obQuantityDown,'product-item-amount-field-btn-disabled')}if (reachedTopLimit && reachedBottomLimit)this.nodes.obQuantity.setAttribute('disabled','disabled');else{this.nodes.obQuantity.removeAttribute('disabled')}},quantityUp:function (){var curValue = 0,boolSet = true;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y" && this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :parseInt(this.nodes.obQuantity.value,10);if (!isNaN(curValue)){curValue += this.currentElement.STEP_QUANTITY;curValue = this.checkQuantityRange(curValue,'up');if (this.currentElement.CHECK_QUANTITY && curValue > this.currentElement.MAX_QUANTITY){boolSet = false}if (boolSet){if (this.currentElement.QUANTITY_FLOAT){curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue;this.setPrice()}}}},quantityDown:function (){var curValue = 0,boolSet = true;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y" && this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :parseInt(this.nodes.obQuantity.value,10);if (!isNaN(curValue)){curValue -= this.currentElement.STEP_QUANTITY;curValue = this.checkQuantityRange(curValue,'down');if (curValue < this.currentElement.MIN_QUANTITY){boolSet = false}if (boolSet){if (this.currentElement.QUANTITY_FLOAT){curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue;this.setPrice()}}}},quantityChange:function (){var curValue = 0,intCount;if (this.errorCode === 0 && this.element.CONFIG.SHOW_QUANTITY === "Y"){if (this.currentElement.CAN_BUY){curValue = this.currentElement.QUANTITY_FLOAT ? parseFloat(this.nodes.obQuantity.value) :Math.round(this.nodes.obQuantity.value);if (!isNaN(curValue)){curValue = this.checkQuantityRange(curValue);if (this.currentElement.CHECK_QUANTITY){if (curValue > this.currentElement.MAX_QUANTITY){curValue = this.currentElement.MAX_QUANTITY}}this.checkPriceRange(curValue);if (curValue < this.currentElement.MIN_QUANTITY){curValue = this.currentElement.MIN_QUANTITY}else{intCount = Math.round(Math.round(curValue * this.element.precisionFactor / this.currentElement.STEP_QUANTITY) / this.element.precisionFactor) || 1;curValue = (intCount <= 1 ? this.currentElement.STEP_QUANTITY :intCount * this.currentElement.STEP_QUANTITY);curValue = Math.round(curValue * this.element.precisionFactor) / this.element.precisionFactor}this.nodes.obQuantity.value = curValue}else{this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}}else{this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}this.setPrice()}},checkQuantityRange:function (quantity,direction){if (typeof quantity === 'undefined' || this.currentElement.ITEM_PRICE_MODE !== 'Q'){return quantity}quantity = parseFloat(quantity);var nearestQuantity = quantity;var range,diffFrom,absDiffFrom,diffTo,absDiffTo,shortestDiff;for (var i in this.currentQuantityRanges){if (this.currentQuantityRanges.hasOwnProperty(i)){range = this.currentQuantityRanges[i];if (parseFloat(quantity) >= parseFloat(range.SORT_FROM) &&(range.SORT_TO === 'INF' ||parseFloat(quantity) <= parseFloat(range.SORT_TO))){nearestQuantity = quantity;break}else{diffFrom = parseFloat(range.SORT_FROM) - quantity;absDiffFrom = Math.abs(diffFrom);diffTo = parseFloat(range.SORT_TO) - quantity;absDiffTo = Math.abs(diffTo);if (shortestDiff === undefined || shortestDiff > absDiffFrom){if (direction === undefined ||(direction === 'up' && diffFrom > 0) ||(direction === 'down' && diffFrom < 0)){shortestDiff = absDiffFrom;nearestQuantity = parseFloat(range.SORT_FROM)}}if (shortestDiff === undefined || shortestDiff > absDiffTo){if (direction === undefined ||(direction === 'up' && diffFrom > 0) ||(direction === 'down' && diffFrom < 0)){shortestDiff = absDiffTo;nearestQuantity = parseFloat(range.SORT_TO)}}}}}return nearestQuantity},getCanBuy:function (arFilter){var i,j = 0,boolOneSearch = true,boolSearch = false;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (this.element.OFFERS[i].CAN_BUY){boolSearch = true;break}}}return boolSearch},updateInfoBasketOffer:function (id,parent){parent = parent || '';if (parent.length > 0)parent = "#" + parent;$(parent + ' .add2basket').attr('data-item',id);$(parent + ' .move2basket').attr('data-item',id);$(parent + ' .quantity-block').attr('data-item',id);$(parent + ' .delay').attr('data-item',id);$(parent + ' .compare').attr('data-item',id)},setPriceMatrix:function (sPriceMatrix){if (sPriceMatrix.length > 0){this.nodes.obPriceMatrix.classList.remove('d-none');this.nodes.obPriceMatrix.innerHTML = sPriceMatrix}else{this.nodes.obPriceMatrix.classList.add('d-none');this.nodes.obPriceMatrix.innerHTML = ''}},quantitySet:function (){var strLimit,resetQuantity;var newOffer = this.currentElement,oldOffer = this.oldElement;if (this.errorCode === 0){this.currentElement.CAN_BUY = newOffer.CAN_BUY;this.currentElement.QUANTITY_FLOAT = newOffer.QUANTITY_FLOAT;this.element.CHECK_QUANTITY = newOffer.CHECK_QUANTITY;if (this.currentElement.QUANTITY_FLOAT){this.currentElement.STEP_QUANTITY = Math.round(parseFloat(newOffer.STEP_QUANTITY) * this.element.precisionFactor) / this.element.precisionFactor;this.currentElement.MAX_QUANTITY = parseFloat(newOffer.MAX_QUANTITY);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseFloat(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY}else{this.currentElement.STEP_QUANTITY = parseInt(newOffer.STEP_QUANTITY,10);this.currentElement.MAX_QUANTITY = parseInt(newOffer.MAX_QUANTITY,10);this.currentElement.MIN_QUANTITY = this.currentElement.ITEM_PRICE_MODE === 'Q' ? parseInt(this.currentElement.ITEM_PRICES[this.currentElement.ITEM_PRICE_SELECTED].MIN_QUANTITY) :this.currentElement.STEP_QUANTITY}if (this.element.CONFIG.SHOW_QUANTITY){var isDifferentMinQuantity = oldOffer.ITEM_PRICES.length &&oldOffer.ITEM_PRICES[oldOffer.ITEM_PRICE_SELECTED] &&oldOffer.ITEM_PRICES[oldOffer.ITEM_PRICE_SELECTED].MIN_QUANTITY != this.currentElement.MIN_QUANTITY;if (this.currentElement.QUANTITY_FLOAT){resetQuantity = Math.round(parseFloat(oldOffer.STEP_QUANTITY) * this.element.precisionFactor) / this.element.precisionFactor !== this.currentElement.STEP_QUANTITY ||isDifferentMinQuantity ||oldOffer.MEASURE !== newOffer.MEASURE ||(this.currentElement.CHECK_QUANTITY &&parseFloat(oldOffer.MAX_QUANTITY) > this.currentElement.MAX_QUANTITY &&parseFloat(this.nodes.obQuantity.value) > this.currentElement.MAX_QUANTITY)}else{resetQuantity = parseInt(oldOffer.STEP_QUANTITY,10) !== this.currentElement.STEP_QUANTITY ||isDifferentMinQuantity ||oldOffer.MEASURE !== newOffer.MEASURE ||(this.currentElement.CHECK_QUANTITY &&parseInt(oldOffer.MAX_QUANTITY,10) > this.currentElement.MAX_QUANTITY &&parseInt(this.nodes.obQuantity.value,10) > this.currentElement.MAX_QUANTITY)}this.nodes.obQuantity.disabled = !this.currentElement.CAN_BUY;if (resetQuantity){this.nodes.obQuantity.value = this.currentElement.MIN_QUANTITY}}if (this.nodes.obMeasure){if (newOffer.MEASURE_HTML){BX.adjust(this.nodes.obMeasure,{html:newOffer.MEASURE_HTML,style:{display:''}})}else{BX.adjust(this.nodes.obMeasure,{html:'',style:{display:'none'}})}}}},changeText:function (ob,text){if (text.length > 0){ob.innerHTML = text;ob.classList.remove('d-none')}else{ob.classList.add('d-none');ob.innerHTML = ''}},setCompared:function (state){if (!this.nodes.obCompare)return;var checkbox = this.nodes.obCompare.querySelector('[data-entity="compare-checkbox"]');if (checkbox){checkbox.checked = state}},drawPicture:function (){if (this.nodes.obPict){BX.adjust(this.nodes.obPict,{props:{src:this.currentElement.PHOTO,alt:this.element.ALT},})}},changeCharsBlock:function (){var html = "",showChars = false;if (this.nodes.obSkuChars){if (this.currentElement.SKU_LIST_CHARS.length){if (this.element.VIEW == "LIST"){for (i = 0;i < this.currentElement.SKU_LIST_CHARS.length;i++){html += "<div class='characteristics-item'>";html += "<span class='characteristics-item-name'>" + this.currentElement.SKU_LIST_CHARS[i].NAME + " - </span>";html += "<span class='characteristics-item-value'>" + this.currentElement.SKU_LIST_CHARS[i].VALUE + "</span>";html += "</div>"}}else{for (i = 0;i < this.currentElement.SKU_LIST_CHARS.length;i++){html += "<div class='characteristics-item'>";html += "<span class='characteristics-item-name bold'>" + this.currentElement.SKU_LIST_CHARS[i].NAME + ":</span>";html += "<span class='characteristics-item-value'>" + this.currentElement.SKU_LIST_CHARS[i].VALUE + "</span>";html += "</div>"}}html = "<div class='characteristics'>" + html + "</div>"}BX.adjust(this.nodes.obSkuChars,{html:html})}if (this.element.PROPS_CHARS.length > 0 || this.element.PROP_CHARS.length > 0 || this.currentElement.SKU_LIST_CHARS.length > 0){showChars = true}var wrChars = this.nodes.obProduct.querySelector('.wrapper-characteristics');if (wrChars){if (showChars)wrChars.classList.remove('hidden');else{wrChars.classList.add('hidden')}}},changeDetailUrl:function (ID){if (this.nodes.obDetailUrlImg)this.nodes.obDetailUrlImg.href = this.currentElement.DETAIL_PAGE_URL;if (this.nodes.obName)this.nodes.obName.href = this.currentElement.DETAIL_PAGE_URL},hideBtns:function (){this.nodes.obWrAdd2BasketBtn.classList.remove('active');this.nodes.obWrAdd2BasketBtn.classList.add('d-none');this.nodes.obBtn2pageProduct.classList.remove('d-none')},showBtns:function (){this.nodes.obWrAdd2BasketBtn.classList.add('active');this.nodes.obWrAdd2BasketBtn.classList.remove('d-none');this.nodes.obBtn2pageProduct.classList.add('d-none')},btnsControl:function (){var show = false;if ((this.currentElement.CAN_BUY && this.currentElement.MODE_DISALLOW_ORDER != "Y") && (this.currentElement.SHOWPREORDERBTN || this.currentElement.MODE_ARCHIVE))show = true;if (this.currentElement.SHOW_BTN_BASKET === 'Y' && this.currentElement.CAN_BUY)show = true;else{show = false}if(this.currentElement.ISOFFERS && this.currentElement.VIEW === 'FLAT SLIDER')show = false;if (show)this.showBtns();else{this.hideBtns()}},}})(window);$(document).on('click','.small-picture',function (){$(this).parents(".wrapper-picture").find(".big-picture").removeClass('active');$(this).parents(".wrapper-picture").find(".small-picture").removeClass('active');$(this).addClass('active');$(this).parents(".wrapper-picture").find(".big-picture[data-id='" + $(this).attr("data-value") + "']").addClass('active');if ($(this).hasClass('popup-control')){$('#sliderPopup').attr('data-current-image',$(this).attr("data-value"))}});var popupGalleryCollection = [];function popupGallery(id){if (typeof ($(".open-popup-gallery-item[data-popup-gallery='" + id + "']")) != "undefined"){if ($(".open-popup-gallery-item[data-popup-gallery='" + id + "']").length > 0){$(".open-popup-gallery-item[data-popup-gallery='" + id + "']").each(function (index){popupGalleryCollection[index] ={"smallSrc":$(this).attr("data-small-src"),"bigSrc":$(this).attr("data-big-src"),"desc":$(this).attr("data-desc"),};if ($(this).parents(".big-picture").hasClass('active'))popupGalleryCollection[index]["active"] = "Y"});sliderPopup(popupGalleryCollection)}}}function sliderPopup(images){if (images && BX.type.isArray(images)){var nodeControlPics = $("#sliderPopup").find(".controls-pictures"),nodeBigPics = $("#sliderPopup").find(".wrapper-big-picture"),nodeControlPicsParent = nodeControlPics.parent(),nodeBigPicsParent = nodeBigPics.parent(),listControl = "",listBigPic = "";nodeControlPics.html("");nodeBigPics.html("");if (images.length > 0){for (i = 0;i < images.length;i++){listControl += "<div data-value='" + i + "'";listControl += "class='small-picture popup-control";if (images[i].active == "Y"){listControl += " active";$("#sliderPopup").attr("data-current-image",i)}listControl += "'>";listControl += "<img src='" + images[i].smallSrc + "' alt = '";if (images[i].desc)listControl += images[i].desc;listControl += "'/>";listControl += "</div>";listBigPic += "<div data-id='" + i + "'";listBigPic += "class='big-picture";if (images[i].active == "Y")listBigPic += " active";if (images[i].desc)listBigPic += " with-desc";listBigPic += "'>";listBigPic += "<img src='" + images[i].bigSrc + "' class='d-block mx-auto img-fluid' alt = '";if (images[i].desc)listBigPic += images[i].desc;listBigPic += "'/>";if (images[i].desc)listBigPic += "<div class='desc-img'>" + images[i].desc + "</div>";listBigPic += "</div>"}}nodeBigPics.html(listBigPic);nodeControlPics.html(listControl)}}function destroyPopupGallery(){popupGalleryCollection = [];$('#sliderPopup').removeClass('active');$('body').removeClass('modal-open');$('#sliderPopup').find(".wrapper-big-picture").children().remove();$('#sliderPopup').find(".controls-pictures").children().remove()}$(document).on('click','.open-popup-gallery',function (){$('.popup-slider').addClass('active');$('body').addClass('modal-open');popupGallery($(this).attr("data-popup-gallery"))});$(document).on('click','.wrapper-select-input',function (){if (!$(this).hasClass('open'))$(this).addClass('open');else{$(this).removeClass('open')}});
18281function setCurrentPopupSlide(slideID){$('#sliderPopup').find(".small-picture").removeClass('active');$('#sliderPopup').find(".big-picture").removeClass('active');$('#sliderPopup').find(".small-picture[data-value='" + slideID + "']").addClass('active');$('#sliderPopup').find(".big-picture[data-id='" + slideID + "']").addClass('active');$('#sliderPopup').attr("data-current-image",slideID)}function slidePopupControl(btn,action){var arSlider = $('#sliderPopup').find(".controls-pictures").children(),curSlide = $('#sliderPopup').attr("data-current-image");for (var i = 0;arSlider.length > i;i++){if (i == curSlide){if (action == "prev"){curSlide = i - 1}if (action == "next"){curSlide = i + 1}if (curSlide > arSlider.length - 1){curSlide = 0}if (curSlide < 0){curSlide = arSlider.length - 1}if (typeof curSlide !== "undefined"){setCurrentPopupSlide(curSlide)}return}}}$(document).on('click','.nav-item.action_prev',function (){slidePopupControl($(this),'prev')});$(document).on('click','.nav-item.action_next',function (){slidePopupControl($(this),'next')});$(document).on('click','.btn-open-hidden-board',function (){$(".content-hidden-board[data-content=" + $(this).attr("data-open") + "]").addClass('active');$(".catalog-list-wrap.z-index-99").removeClass('z-index-99')}
18281);$(document).on('click','.btn-close-hidden-board',function (){$(".content-hidden-board[data-content=" + $(this).attr("data-close") + "]").removeClass('active')});$(document).mouseup(function (e){var div = $(".content-hidden-board.active");if (!div.is(e.target) && div.has(e.target).length === 0){div.removeClass('active')}});if ($(window).width() > 1200){$(document).on({mouseenter:function (){var total = parseInt($(this).find('.elem-hover-height-more').css('margin-bottom')) + $(this).find('.elem-hover-height').outerHeight(true);$(this).css({'height':total + 'px'});$(this).find('div.elem-hover-show').slideDown(250)},mouseleave:function (){$(this).find('div.elem-hover-show').slideUp(0)},},".elem-hover")}$(document).on('click','.section-with-hidden-items .head-filter',function (){var btn = $(this);var content = $(".content-animate-slide-down[data-show ='" + btn.attr("data-show") + "']");var btns = $(".click-animate-slide-down[data-show ='" + btn.attr("data-show") + "']");content.slideUp(400,function (){btns.addClass('noactive-mob').removeClass('active-mob');content.addClass('noactive-mob').removeClass('active-mob')})});$(document).on('click','.click-animate-slide-down',function (){var btn = $(this);var content = $(".content-animate-slide-down[data-show ='" + btn.attr("data-show") + "']");if ($(window).width() > 768){if (!btn.hasClass('active')){content.slideDown(400,function (){btn.addClass('active').removeClass('noactive');content.addClass('active').removeClass('noactive')});BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_catalog_tab_' + btn.attr("data-show") + $("input.site_id").val(),'active',{expires:60 * 60 * 60 * 60,path:"/"})}else{content.slideUp(400,function (){btn.addClass('noactive').removeClass('active');content.addClass('noactive').removeClass('active')});BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_catalog_tab_' + btn.attr("data-show") + $("input.site_id").val(),'noactive',{expires:60 * 60 * 60 * 60,path:"/"})}}else{if (!btn.hasClass('active-mob')){content.addClass('active-mob').removeClass('noactive-mob');content.slideDown(400,function (){btn.addClass('active-mob').removeClass('noactive-mob')})}else{content.slideUp(400,function (){btn.addClass('noactive-mob').removeClass('active-mob');content.addClass('noactive-mob').removeClass('active-mob')})}}});$(document).on('click','.btn-hide-column',function (){if (!$(this).hasClass('active')){if ($('div.menu-banner-slider').hasClass('slick-initialized'))$('div.menu-banner-slider').slick('unslick');$('div.menu-banner-slider').slick({slidesToShow:1,slidesToScroll:1,autoplay:true,autoplaySpeed:5000,dots:false,infinite:true,adaptiveHeight:false,speed:500,arrows:false});$(this).addClass('active');$('.parent-hide-column').removeClass('hide');BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_catalog_side_column_' + $("input.site_id").val(),'Y',{expires:60 * 60 * 60 * 60,path:"/"})}else{if ($('div.menu-banner-slider').hasClass('slick-initialized'))$('div.menu-banner-slider').slick('unslick');$(this).removeClass('active');$('.parent-hide-column').addClass('hide');BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_catalog_side_column_' + $("input.site_id").val(),'N',{expires:60 * 60 * 60 * 60,path:"/"})}showProcessLoad();updateCatalogList()});function updateCatalogList($params){$params = $params ||{"ajax_action":"Y"};showProcessLoad();$('.element-list-wrap').removeClass("active");$.post(location.href,$params,function (html){closeProcessLoad();$('.element-list-wrap').html(html);$('.element-list-wrap').addClass("active");$('.lazyload').Lazy(paramsLazy);setInfoBasket("firstLoad")})}$(document).on('click','.sort_btn_js',function (){var sort = $(this).attr("data-sort"),order = $(this).attr("data-order"),_th = $(this),available = null;_th.parents(".element-sort").find(".sort_btn_js").removeClass('active');_th.addClass('active');if (_th.hasClass('asc')){_th.removeClass('asc').addClass('desc');_th.attr("data-order","asc")}else if (_th.hasClass('desc')){_th.removeClass('desc').addClass('asc');_th.attr("data-order","desc")}if($('.sort-available-js').length>0){if ($('.sort-available-js').attr("data-available") == "Y"){available = 'N'}else{available = 'Y'}}var $params ={"ajax_action":"Y","sort":sort,"order":order,};if(available)$params['available'] = available;updateCatalogList($params)});$(document).on('click','.sort-available-js',function (){var $params ={"ajax_action":"Y","available":$(this).attr("data-available")};if ($(this).attr("data-available") == "Y"){$(this).attr("data-available","N");$(this).addClass("active")}else{$(this).attr("data-available","Y");$(this).removeClass("active")}updateCatalogList($params)});$(document).on('click','.display-view-js',function (){if (!$(this).hasClass('active')){var $params ={"ajax_action":"Y","view":$(this).attr("data-view")};$(this).parents('.view-list').find('.display-view-js').removeClass('active');$(this).addClass('active');updateCatalogList($params)}});$(document).on('click','.toogle-animate-click',function (){var block = $(this).parents(".toogle-animate-parent");if (!block.hasClass("active")){$(".toogle-animate-content",block).slideDown(200,function (){block.addClass("active")})}else{$(".toogle-animate-content",block).slideUp(200,function (){block.removeClass("active")})}});$(document).on('click','div.bx_sort_container ul.tabs-head li',function (){if (!$(this).hasClass("current"))location.href = $(this).find("span").attr("data-href")});BasketPoolQuantity = function (){this.processing = false;this.poolQuantity ={};this.updateTimer = null;this.currentQuantity ={};this.lastStableQuantities ={};this.updateQuantity()};BasketPoolQuantity.prototype.updateQuantity = function (){if (BX('basket_items')){var items = BX('basket_items').querySelectorAll('div.product');if (!!items && items.length > 0){for (var i = 0;items.length > i;i++){var itemId = items[i].id;this.currentQuantity[itemId] = BX('QUANTITY_' + itemId).value}}this.lastStableQuantities = BX.clone(this.currentQuantity,true)}};BasketPoolQuantity.prototype.changeQuantity = function (itemId){var quantity = BX('QUANTITY_' + itemId).value;var isPoolEmpty = this.isPoolEmpty();if (this.currentQuantity[itemId] && this.currentQuantity[itemId] != quantity){this.poolQuantity[itemId] = this.currentQuantity[itemId] = quantity}if (!isPoolEmpty){this.enableTimer(true)}else{this.trySendPool()}};BasketPoolQuantity.prototype.trySendPool = function (){if (!this.isPoolEmpty() && !this.isProcessing()){this.enableTimer(false);recalcBasketAjax({})}};BasketPoolQuantity.prototype.isPoolEmpty = function (){return (Object.keys(this.poolQuantity).length == 0)};BasketPoolQuantity.prototype.clearPool = function (){this.poolQuantity ={}};BasketPoolQuantity.prototype.isProcessing = function (){return (this.processing === true)};BasketPoolQuantity.prototype.setProcessing = function (value){this.processing = (value === true)};BasketPoolQuantity.prototype.enableTimer = function (value){clearTimeout(this.updateTimer);if (value === false)return;this.updateTimer = setTimeout(function (){basketPoolQuantity.trySendPool()},1500)};function updateQuantity(controlId,basketId,ratio,bUseFloatQuantity){clearTimeout($.data(this,'timer-quantity'));$.data(this,'timer-quantity',setTimeout($.proxy(function (){var oldVal = BX(controlId).defaultValue,newVal = parseFloat(BX(controlId).value) || 0,bIsCorrectQuantityForRatio = false,autoCalculate = ((BX("auto_calculation") && BX("auto_calculation").value == "Y") || !BX("auto_calculation"));if (ratio === 0 || ratio == 1){bIsCorrectQuantityForRatio = true}else{var newValInt = newVal * 10000,ratioInt = ratio * 10000,reminder = newValInt % ratioInt,newValRound = parseInt(newVal);if (reminder === 0){bIsCorrectQuantityForRatio = true}}var bIsQuantityFloat = false;if (parseInt(newVal) != parseFloat(newVal)){bIsQuantityFloat = true}newVal = (bUseFloatQuantity === false && bIsQuantityFloat === false) ? parseInt(newVal) :parseFloat(newVal).toFixed(4);newVal = correctQuantity(newVal);if (bIsCorrectQuantityForRatio){BX(controlId).defaultValue = newVal;BX("QUANTITY_INPUT_" + basketId).value = newVal;BX("QUANTITY_" + basketId).value = newVal;if (autoCalculate){basketPoolQuantity.changeQuantity(basketId)}}else{newVal = getCorrectRatioQuantity(newVal,ratio,bUseFloatQuantity);newVal = correctQuantity(newVal);if (newVal != oldVal){BX("QUANTITY_INPUT_" + basketId).value = newVal;BX("QUANTITY_" + basketId).value = newVal;if (autoCalculate){basketPoolQuantity.changeQuantity(basketId)}}else{BX(controlId).value = oldVal}}},this),700))}function correctQuantity(quantity){return parseFloat((quantity * 1).toString())}function recalcBasketAjax(params){if (basketPoolQuantity.isProcessing()){return false}var property_values ={}
18281,action_var = 'recalculate',delayedItems = '',items = BX('basket_items').querySelectorAll('div.product'),postData,i;if (BX('delayed_items'))delayedItems = BX('delayed_items').querySelectorAll('div.product');postData ={'sessid':BX.bitrix_sessid(),'site_id':$("input.site_id").val(),'action_var':action_var,'quantity_float':BX('quantity_float').value};postData[action_var] = 'recalculate';if (!!params && typeof params === 'object'){for (i in params){if (params.hasOwnProperty(i))postData[i] = params[i]}}if (!!items && items.length > 0){for (i = 0;items.length > i;i++){postData['QUANTITY_' + items[i].id] = BX('QUANTITY_' + items[i].id).value}}if (!!delayedItems && delayedItems.length > 0){$('.show_items[data-items="delayed"]').css({"display":""});for (i = 1;delayedItems.length > i;i++)postData['DELAY_' + delayedItems[i].id] = 'Y'}else{$('.show_items[data-items="delayed"]').css({"display":"none"});showFormOrder()}basketPoolQuantity.setProcessing(true);basketPoolQuantity.clearPool();if ($("input.basketOrder").length <= 0)showProcessLoadTopRight();BX.ajax({url:'/bitrix/components/bitrix/sale.basket.basket/ajax.php',method:'POST',data:postData,dataType:'json',onsuccess:function (result){if ($("input.basketOrder").length <= 0)closeProcessLoadTopRight();if ($("input.basketOrder").length > 0 && params.action != "stopRefreshOrder")BX.Sale.OrderAjaxComponent.sendRequest("refreshOrderAjax","noRedirect");basketPoolQuantity.setProcessing(false);if (basketPoolQuantity.isPoolEmpty()){updateBasketTable(null,result);basketPoolQuantity.updateQuantity()}else{basketPoolQuantity.enableTimer(true)}}})}function setQuantity(basketId,ratio,sign,bUseFloatQuantity){var curVal = parseFloat(BX("QUANTITY_INPUT_" + basketId).value),newVal;newVal = (sign == 'up') ? curVal + ratio :curVal - ratio;if (newVal < 0)newVal = 0;if (bUseFloatQuantity){newVal = parseFloat(newVal).toFixed(4)}newVal = correctQuantity(newVal);if (ratio > 0 && newVal < ratio){newVal = ratio}if (!bUseFloatQuantity && newVal != newVal.toFixed(4)){newVal = parseFloat(newVal).toFixed(4)}newVal = getCorrectRatioQuantity(newVal,ratio,bUseFloatQuantity);newVal = correctQuantity(newVal);BX("QUANTITY_INPUT_" + basketId).value = newVal;BX("QUANTITY_INPUT_" + basketId).defaultValue = newVal;updateQuantity('QUANTITY_INPUT_' + basketId,basketId,ratio,bUseFloatQuantity)}function getCorrectRatioQuantity(quantity,ratio,bUseFloatQuantity){var newValInt = quantity * 10000,ratioInt = ratio * 10000,reminder = (quantity / ratio - ((quantity / ratio).toFixed(0))).toFixed(6),result = quantity,bIsQuantityFloat = false,i;ratio = parseFloat(ratio);if (reminder == 0){return result}if (ratio !== 0 && ratio != 1){for (i = ratio,max = parseFloat(quantity) + parseFloat(ratio);i <= max;i = parseFloat(parseFloat(i) + parseFloat(ratio)).toFixed(4)){result = i}}else if (ratio === 1){result = quantity | 0}if (parseInt(result,10) != parseFloat(result)){bIsQuantityFloat = true}result = (bUseFloatQuantity === false && bIsQuantityFloat === false) ? parseInt(result,10) :parseFloat(result).toFixed(4);result = correctQuantity(result);return result}function correctQuantity(quantity){return parseFloat((quantity * 1).toString())}function updateBasketTable(basketItemId,res){var table = BX("basket_items"),rows,newBasketItemId,arItem,lastRow,newRow,arColumns,bShowDeleteColumn = false,bShowDelayColumn = false,bShowPropsColumn = false,bShowPriceType = false,bUseFloatQuantity,origBasketItem,oCellMargin,i,oCellName,imageURL,cellNameHTML,oCellItem,cellItemHTML,bSkip,j,val,propId,arProp,bIsImageProperty,countValues,full,fullWidth,itemWidth,arVal,valId,arSkuValue,selected,valueId,k,arItemProp,oCellQuantity,oCellQuantityHTML,ratio,isUpdateQuantity,oldQuantity,oCellPrice,fullPrice,id,oCellDiscount,oCellWeight,oCellCustom,customColumnVal,propsMap,selectedIndex,counter,marginLeft,createNewItem;if (!table || typeof res !== 'object'){return}rows = table.querySelectorAll('div.product');lastRow = rows[rows.length - 1];bUseFloatQuantity = (res.PARAMS.QUANTITY_FLOAT === 'Y');if (!!res.BASKET_DATA){for (id in res.BASKET_DATA.GRID.ROWS){if (res.BASKET_DATA.GRID.ROWS.hasOwnProperty(id)){var item = res.BASKET_DATA.GRID.ROWS[id];if (BX('discount_value_' + id))BX('discount_value_' + id).innerHTML = item.DISCOUNT_PRICE_PERCENT_FORMATED;if (BX('current_price_' + id))BX('current_price_' + id).innerHTML = item.PRICE_FORMATED;if (BX('old_price_' + id)){if (item.DISCOUNT_PRICE_PERCENT > 0){BX('old_price_' + id).innerHTML = item.SUM_FULL_PRICE_FORMATED;$('#old_price_' + id).css({"display":""})}else{$('#old_price_' + id).css({"display":"none"})}}if (BX('sum_' + id))BX('sum_' + id).innerHTML = item.SUM;if (BX('QUANTITY_' + id)){BX('QUANTITY_INPUT_' + id).value = item.QUANTITY;BX('QUANTITY_INPUT_' + id).defaultValue = item.QUANTITY;BX('QUANTITY_' + id).value = item.QUANTITY}}}}if (!!res.BASKET_DATA)couponListUpdate(res.BASKET_DATA);if (!!res.BASKET_DATA){if (BX('allSum_FORMATED'))BX('allSum_FORMATED').innerHTML = res['BASKET_DATA']['allSum_FORMATED'];if (BX('DISCOUNT_PRICE_ALL')){if (res['BASKET_DATA']['DISCOUNT_PRICE_ALL'] > 0){$('.basket-style').find(".dynamic-show-hide-discount").css({"display":""});$('.basket-style').find(".dynamic-show-hide-total-title").css({"display":"none"});BX('DISCOUNT_PRICE_ALL').innerHTML = res['BASKET_DATA']['DISCOUNT_PRICE_FORMATED']}else{$('.basket-style').find(".dynamic-show-hide-total-title").css({"display":""});$('.basket-style').find(".dynamic-show-hide-discount").css({"display":"none"})}}if ($("input#min_sum").length > 0){if ($("input#min_sum").val().length){var minSum = $("input#min_sum").val();minSum = +minSum;if (res['BASKET_DATA']['allSum'] <= minSum){$(".alert-message-min-sum").css({"display":""});$(".basket-buttons").css({"display":"none"});$(".clear-basket-node-control").addClass('hidden')}else{$(".alert-message-min-sum").css({"display":"none"});$(".basket-buttons").css({"display":""});$(".clear-basket-node-control").removeClass('hidden')}}}}}function couponListUpdate(res){if (!!res && typeof res !== 'object')return;var couponBlock = $('.coupons_block');if (couponBlock.length > 0){if (!!res.COUPON_LIST && BX.type.isArray(res.COUPON_LIST)){if ($('.input-coupon').length > 0){$('.input-coupon').val("");$('.input-coupon').parents(".in-focus").removeClass('in-focus')}couponsCollection = $(".coupons_block").find(".coupon-one");if (couponsCollection.length > 0){for (i = 0;i < res.COUPON_LIST.length;i++){couponFound = false;key = -1;for (j = 0;j < couponsCollection.length;j++){if ($(couponsCollection[j]).find(".coupon-close").attr("data-coupon") === res.COUPON_LIST[i].COUPON
18281){couponFound = true;key = j;couponsCollection[j].couponUpdate = true;break}}if (couponFound){couponClass = 'disabled';if (res.COUPON_LIST[i].JS_STATUS === 'BAD')couponClass = 'bad';else if (res.COUPON_LIST[i].JS_STATUS === 'APPLYED')couponClass = 'good';$(couponsCollection[key]).removeClass("disabled bad good").addClass(couponClass)}else{couponCreate(res.COUPON_LIST[i])}}for (j = 0;j < couponsCollection.length;j++){if (typeof (couponsCollection[j].couponUpdate) === 'undefined' || !couponsCollection[j].couponUpdate){$(couponsCollection[j]).remove();couponsCollection[j] = null}else{couponsCollection[j].couponUpdate = null}}}else{for (i = 0;i < res.COUPON_LIST.length;i++){couponCreate(res.COUPON_LIST[i])}}}}}function couponCreate(oneCoupon,order){var couponClass = 'disabled',removeClass = 'remove-coupon';order = order || false;if ($(".coupons_block").length <= 0)return;if (oneCoupon.JS_STATUS === 'BAD')couponClass = 'bad';else if (oneCoupon.JS_STATUS === 'APPLYED')couponClass = 'good';if (order)removeClass = 'remove-order-coupon';html = "<div class=\"coupon-one " + couponClass + "\">" +"<span class=\"coupon-name\">" + oneCoupon.COUPON + "</span><span class=\"coupon-close " + removeClass + "\" data-coupon=\"" + oneCoupon.COUPON + "\"></span>" +"</div>";$(html).appendTo(".coupons_block")}$(document).on("click",".remove-coupon",function (){var target = this,value;if (BX.type.isElementNode(target) && target.hasAttribute('data-coupon')){value = target.getAttribute('data-coupon');if (BX.type.isNotEmptyString(value)){recalcBasketAjax({'delete_coupon':value})}}});$(document).on("click",".remove-order-coupon",function (){var target = this,value;if (BX.type.isElementNode(target) && target.hasAttribute('data-coupon')){value = target.getAttribute('data-coupon');if (BX.type.isNotEmptyString(value)){BX.Sale.OrderAjaxComponent.sendRequest("removeCoupon",value)}}});$(document).on("click",".show_items",function (){$(".show_items").removeClass('active');$(this).addClass('active');$(".basket_items_list").removeClass('active');$(".basket_items_list[data-items='" + $(this).attr("data-items") + "']").addClass('active');if ($(this).attr("data-items") == "delayed")hideFormOrder();if ($(this).attr("data-items") == "items")showFormOrder();BasketFilter($("input.basket-filter").val())});function enterCoupon(){if ($('.input-coupon').length > 0)recalcBasketAjax({'coupon':$('.input-coupon').val()})}function enterOrderCoupon(){if ($('.input-coupon').length > 0)BX.Sale.OrderAjaxComponent.sendRequest("enterCoupon",$('.input-coupon').val())}function add2Basket(productItem,target){productItem = productItem || "";target = target || "";if (productItem){if (target.length > 0)target.addClass('btn-processing');BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/add2basket.php',data:{productItem:productItem,site_id:$("input.site_id").val()},onsuccess:function (arResult){if (arResult["OK"] == "Y"){markProductAddBasket(productItem["PRODUCT_ID"]);if (arResult["SCRIPTS"])$('body').append(arResult["SCRIPTS"])}else{if (target.length > 0)target.removeClass('btn-processing')}}})}}function showProcessLoadBlock(obj){obj.find('.loading-block').addClass('active')}function closeProcessLoadBlock(obj){obj.find('.loading-block').removeClass('active')}function showProcessLoad(){$('.loading').addClass('active')}function closeProcessLoad(){$('.loading').removeClass('active')}function showProcessLoadItem(id){$('.preloader-item[data-preload="' + id + '"]').addClass('active')}function closeProcessLoadItem(id){$('.preloader-item[data-preload="' + id + '"]').removeClass('active')}function showProcessLoadTopRight(){$('.loading-top-right').addClass('active')}function closeProcessLoadTopRight(){$('.loading-top-right').removeClass('active')}function startBlurWrapperContainer(params){params = params ||{"blur":true};if (!$("body").hasClass('modal-open')){if (params.blur)$('.wrapper').addClass('blur');$("body").addClass("modal-open");if (device.ios()){cur_pos = $(document).scrollTop();$("body").addClass("modal-ios")}}}function stopBlurWrapperContainer(){if ($("body").hasClass('modal-open')){$("body").removeClass("modal-open");$('.wrapper').removeClass('blur');if (device.ios()){$("body").removeClass("modal-ios");window.scrollTo(0,cur_pos)}}}function startModalMode(selectorArea){startBlurWrapperContainer();closeProcessLoad();setTimeout(function (){$(selectorArea).find('.phoenix-modal').addClass('active')},100)}function callFastOrderForm(fromBasket,productItem){fromBasket = fromBasket || "";productItem = productItem || "";$.ajax({method:'POST',dataType:'html',url:'/bitrix/tools/concept.phoenix/ajax/basket/call_form_fast_order.php',data:{site_id:$("input.site_id").val(),fromBasket:fromBasket,productItem:productItem},success:function (html){closeProcessLoad();startModalMode("div.modalAreaForm");$('div.modalAreaForm').html(html);$('div.modalAreaForm form.form .date').datetimepicker({timepicker:false,format:'d/m/Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1})}})}function getStringNameItem(name,offers){var input = name;for (var i in offers){input += offers[i].SKU_NAME + ":" + offers[i].NAME + ";"}return input}$(document).on("click",".callFastOrder",function (){var callDialog = "N";if ($(".callFastOrder").hasClass("callDialog"))callDialog = "Y";if ($(this).attr("data-param-product"))var productItem = eval("(" + $(this).attr("data-param-product") + ")");callFastOrderForm(callDialog,productItem)});$(document).on("click",".btn-add2basket",function (){var productItem = eval("(" + $(this).attr("data-param-product") + ")");add2Basket(productItem,$(this))});function AjaxQuickSearch(arParams){var _this = this;this.arParams ={'CONTAINER_ID':arParams.CONTAINER_ID,'INPUT_ID':arParams.INPUT_ID,'SHOW_RESULTS':arParams.SHOW_RESULTS,'LINE_VIEW_SIZE':""};if (arParams.LINE_VIEW_SIZE)this.arParams.LINE_VIEW_SIZE = arParam
18281s.LINE_VIEW_SIZE;this.arParams.AJAX_PAGE = "/bitrix/tools/concept.phoenix/ajax/search.php";this.arParams.MIN_QUERY_LEN = 3;this.cache = [];this.cache_key = null;this.startText = '';this.running = false;this.searchWait = 0;this.currentRow = -1;this.RESULT = null;this.RESULT_WRAPPER = null;this.CONTAINER = null;this.INPUT = null;this.WAIT = null;this.HINT_BTN = null;this.SEARCH_IN_BTN = null;this.FOCUS = false;this.searchIn = null;this.searchInOld = null;this.ShowResult = function (result){if (BX.type.isString(result))_this.RESULT.innerHTML = result;if ($.trim(_this.RESULT.innerHTML).length > 0){setTimeout(function (){_this.RESULT_WRAPPER.style.display = 'block';var pos = _this.adjustResultNode()},450)}else{_this.RESULT_WRAPPER.style.display = 'none'}};this.onKeyPress = function (keyCode){switch (keyCode){case 27:_this.RESULT_WRAPPER.style.display = 'none';_this.currentRow = -1;_this.UnSelectAll();return true}return false};this.onTimeout = function (){_this.onChange(function (){setTimeout(_this.onTimeout,500)})};this.onChange = function (callback){if ($(window).width() >= 1199){if (this.arParams.SHOW_RESULTS != "Y")return;if (_this.running){_this.runningCall = true;return}_this.running = true;if (_this.INPUT.value != _this.oldValue || _this.searchIn != _this.searchInOld){_this.oldValue = _this.INPUT.value;_this.searchInOld = _this.searchIn;if (_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN){showWaitSearch($("#" + _this.arParams.CONTAINER_ID));clearTimeout(_this.searchWait);_this.searchWait = setTimeout(function (){_this.cache_key = _this.arParams.INPUT_ID + '|' + _this.INPUT.value + '|' + _this.searchIn;if (_this.cache[_this.cache_key] == null){if (_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN){BX.ajax.post(_this.arParams.AJAX_PAGE,{'q':_this.INPUT.value,'searchIn':_this.searchIn,'LINE_VIEW_SIZE':_this.arParams.LINE_VIEW_SIZE,'ajax_mode':"Y",'site_id':$("input.site_id").val()},function (result){_this.cache[_this.cache_key] = result;_this.ShowResult(result);if (_this.WAIT)_this.WAIT.style.display = 'none';hideWaitSearch($("#" + _this.arParams.CONTAINER_ID));if (!!callback)callback();_this.running = false;if (_this.runningCall){_this.runningCall = false;_this.onChange()}});return}else{hideWaitSearch($("#" + _this.arParams.CONTAINER_ID))}}else{_this.ShowResult(_this.cache[_this.cache_key]);_this.currentRow = -1;_this.EnableMouseEvents();hideWaitSearch($("#" + _this.arParams.CONTAINER_ID))}},900)}else{_this.RESULT_WRAPPER.style.display = 'none';_this.RESULT.innerHTML = "";_this.currentRow = -1;_this.UnSelectAll()}}if (!!callback)callback();_this.running = false}};this.onScroll = function (){if (BX.type.isElementNode(_this.RESULT_WRAPPER) && _this.RESULT_WRAPPER.style.display !== "none" && _this.RESULT.innerHTML !== '')_this.adjustResultNode()};this.UnSelectAll = function (){var tbl = BX.findChild(_this.RESULT,{'tag':'table','class':'title-search-result'},true);if (tbl){var cnt = tbl.rows.length;for (var i = 0;i < cnt;i++)tbl.rows[i].className = ''}};this.EnableMouseEvents = function (){};this.onFocusLost = function (hide){setTimeout(function (){if (!_this.FOCUS)_this.RESULT_WRAPPER.style.display = 'none'},250);_this.FOCUS = false};this.onFocusGain = function (){if ($.trim(_this.RESULT.innerHTML).length)_this.ShowResult()};this.onKeyDown = function (e){if (!e)e = window.event;if (_this.RESULT_WRAPPER.style.display == 'block'){if (_this.onKeyPress(e.keyCode))return BX.PreventDefault(e)}};this.adjustResultNode = function (){if (!(BX.type.isElementNode(_this.RESULT_WRAPPER) &&BX.type.isElementNode(_this.CONTAINER)))return{top:0,right:0,bottom:0,left:0,width:0,height:0};var pos = BX.pos(_this.CONTAINER);var bxpanel = document.getElementById("bx-panel");var bxheight = 0;if (bxpanel != null && !$("#" + this.arParams.CONTAINER_ID).hasClass('outside-div'))bxheight = parseInt(bxpanel.clientHeight);_this.RESULT_WRAPPER.style.position = 'absolute';_this.RESULT_WRAPPER.style.top = (pos.bottom - bxheight) + 'px';_this.RESULT_WRAPPER.style.left = (pos.left - 15) + 'px';_this.RESULT_WRAPPER.style.width = (pos.width + 30) + 'px';if ($("#" + this.arParams.CONTAINER_ID).hasClass('outside-div'))_this.RESULT_WRAPPER.style.height = ($(window).height() - pos.height - 40) + 'px';return pos};this._onContainerLayoutChange = function (){if (BX.type.isElementNode(_this.RESULT_WRAPPER) && _this.RESULT_WRAPPER.style.display !== "none" && _this.RESULT.innerHTML !== '')_this.adjustResultNode()};this.SetSearchIn = function (){searchGet = $(BX.proxy_context);searchGet.parents(".show-search-list-parent").find(".search-cur").text(searchGet.text());searchGet.parents(".search-list").find('span.search-get').removeClass("active");searchGet.parents(".search-list").removeClass('active');searchGet.addClass('active');searchGet.parents("form.search-form").attr("action",searchGet.attr("data-url"));_this.searchIn = searchGet.attr("data-id");_this.onChange()};this.Init = function (){var parent = document.getElementById("phoenix-container");if ($("#" + this.arParams.CONTAINER_ID).hasClass('outside-div'))parent = document.getElementById("body");this.searchIn = $("#" + this.arParams.CONTAINER_ID).find(".search-get.active").attr("data-id");this.RESULT_WRAPPER = parent.appendChild(document.createElement("DIV"));this.RESULT_WRAPPER.className = 'ajax-search-results';if ($("#" + this.arParams.CONTAINER_ID).hasClass('outside-div'))this.RESULT_WRAPPER.className = 'ajax-search-results outside';this.RESULT = this.RESULT_WRAPPER.appendChild(document.createElement("DIV"));this.RESULT.className = 'ajax-search-results-inner';this.INPUT = BX(this.arParams.INPUT_ID);this.startText = this.oldValue = this.INPUT.value;BX.bind(this.INPUT,'focus',function (){_this.onFocusGain()});BX.bind(this.INPUT,'blur',function (){_this.onFocusLost()});this.INPUT.onkeydown = this.onKeyDown;BX.bind(this.INPUT,'bxchange',function (){_this.onChange()});this.CONTAINER = BX(this.arParams.CONTAINER_ID);BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange);this.HINT_BTN = BX(this.arParams.CONTAINER_ID + "_hint");BX.bind(this.HINT_BTN,'click',function (){_this.FOCUS = true;BX.focus(_this.INPUT);_this.INPUT.value = _this.HINT_BTN.innerHTML;if (!$("#" + _this.arParams.CONTAINER_ID).find(".search-panel-js").hasClass('top-panel'))scrollToBlock($("#" + _this.arParams.INPUT_ID).parents(".search-panel-js").find(".search-scroll-focus"),'',40);checkInput($("#" + _this.arParams.INPUT_ID));_this.onChange();setTimeout(function (){_this.FOCUS = false},1000)});var searchGet = this.CONTAINER.querySelectorAll('.search-get');if (searchGet.length){for (var i = 0;i < searchGet.length;i++)BX.bind(searchGet[i],'click',BX.delegate(this.SetSearchIn,this))}var fixedParent = BX.findParent(this.CONTAINER,BX.is_fixed);if (BX.type.isElementNode(fixedParent)){BX.bind(window,'scroll',BX.throttle(this.onScroll,100,this))}};BX.ready(function (){_this.Init(arParams)})}$(document).on("click",".show-dialog-map",function (){showProcessLoad();$.post('/bitrix/tools/concept.phoenix/ajax/popup/dialog_map.php',{site_id:$("input.site_id").val()},function (html){closeProcessLoad();startBlurWrapperContainer();$("div.modalAreaWindow").html(html);setTimeout(function (){$("div.modalAreaWindow").find('.phoenix-modal').addClass('active')},100)})});$(window).on("load",function (){if (customEvent){updateLazyLoad()}else{var counter = 0;var timerId = setInterval(function (){if (counter > 5)clearInterval(timerId);updateLazyLoad();counter++},1000)}});$(document).on("click",".show-fast-order-form",function (){$(".form-order[data-target='" + $(this).attr("data-target") + "']").addClass('active');$(".info-table[data-target='" + $(this).attr("data-target") + "']").removeClass('active');$(".hide-fast-order-form[data-target='" + $(this).attr("data-target") + "']").addClass('active');$('.date-group').datetimepicker({timepicker:false,format:'d.m.Y',scrollMonth:false,scrollInput:false,dayOfWeekStart:1})});$(document).on("click",".hide-fast-order-form",function (){$(this).removeClass('active');$(".form-order[data-target='" + $(this).attr("data-target") + "']").removeClass('active');$(".info-table[data-target='" + $(this).attr("data-target") + "']").addClass('active')});$(document).on("click",".btn-show-sort-board",function (){$(this).children('.sort-dialog-content').addClass('active')});$(document).mouseup(function (e){var div = $(".sort-dialog-content");if (!div.is(e.target) && div.has(e.target).length === 0) div.removeClass('active')});$(document).on("click",".show-side-menu",function (){$(".wr-transform-to-dialog-by-mob").removeClass('d-none');startBlurWrapperContainer()});$(document).on("click",".close-side-menu",function (){$(".wr-transform-to-dialog-by-mob").addClass('d-none');stopBlurWrapperContainer()});if ($(window).width() <= 1024){$(document).on({click:function (){$(".soc-groups-in-menu").removeClass('d-none')}},".show-soc-groups")}$(document).on({click:function (){$(".soc-groups-in-menu").addClass('d-none')}},".close-soc-groups");
18281$(document).mouseup(function (e){var div = $(".soc-groups-in-menu");if (!div.is(e.target) && div.has(e.target).length === 0) div.addClass('d-none')});var ratingProducts ={},ratingProductsParse ={};$(document).ready(function (){getRatingCookie();setVoteItems()});function setVoteItems(){for (key in ratingProductsParse){var collectVote = $(".simple-rating[data-item-id='" + key + "']").children(),currentPoint = parseInt(ratingProductsParse[key]);$(".simple-rating[data-item-id='" + key + "']").addClass("disabled");$(collectVote).each(function (index,element){if (parseInt($(element).attr("data-point")) <= currentPoint)$(element).addClass('voted')})}}function setVoteItem(id,vote){var collectVote = $(".simple-rating[data-item-id='vote-block-" + id + "']").children(),currentPoint = parseInt(vote);$(".simple-rating[data-item-id='vote-block-" + id + "']").addClass("disabled");collectVote.removeClass('voted');$(collectVote).each(function (index,element){if (parseInt($(element).attr("data-point")) <= currentPoint)$(element).addClass('voted')})}function issetRatingCookie(id){return !(ratingProductsParse[id] === undefined)}function getRatingCookie(){ratingProducts = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenix_rating_products');if (ratingProducts)ratingProductsParse = JSON.parse(ratingProducts)}function setRatingCookie(id,vote){ratingProductsParse["vote-block-" + id] = vote;BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_rating_products',JSON.stringify(ratingProductsParse),{expires:60 * 60 * 60 * 60,path:"/"})}function setReviewsCountProduct(id,review){$(".reviews-count[data-item-id=\"" + id + "\"]").html(review)}function setRatingProduct(id,rating,selector){selector = selector || "";var collectVote = $(selector + ".stars_container[data-item-id='vote-block-" + id + "']").children(),currentPoint = parseInt(rating);$(selector + ".stars_container[data-item-id='vote-block-" + id + "']").attr("data-rating",rating);if (currentPoint > 5)currentPoint = 5;else if (currentPoint < 0)return false;collectVote.removeClass('active');$(collectVote).each(function (index,element){if (parseInt($(element).attr("data-point")) <= currentPoint)$(element).addClass('active')});return true}function showMessageSuccessVote(){$('#alert-vote').show();var voteAlertTimer = setTimeout(function (){$('#alert-vote').hide();clearTimeout(voteAlertTimer)},2000)}function updateRatingProduct(id,vote){$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/update/rating.php',method:'POST',data:{site_id:$("input.site_id").val(),id:id.replace('vote-block-',''),vote:vote},success:function (data){if (data.OK == "Y"){setRatingProduct(data.PRODUCT.ID,data.PRODUCT.RATING);setRatingCookie(data.PRODUCT.ID,data.PRODUCT.VOTE);setVoteItem(data.PRODUCT.ID,data.PRODUCT.VOTE);showMessageSuccessVote()}}})}$(document).on({mouseenter:function (){if ($(this).parent().hasClass('simple-rating') && issetRatingCookie($(this).parent().attr("data-item-id")))return false;var collectVote = $(this).parent().children(),currentPoint = parseInt($(this).attr("data-point"));collectVote.removeClass('hover');$(collectVote).each(function (index,element){if (parseInt($(element).attr("data-point")) <= currentPoint)$(element).addClass('hover')})},mouseleave:function (){$(this).parent().children().removeClass('hover')}},".stars_container.hover .star");$(document).on("click",".stars_container.simple-rating .star",function (){getRatingCookie();if (!issetRatingCookie($(this).parent().attr("data-item-id")))updateRatingProduct($(this).parent().attr("data-item-id"),$(this).attr("data-point"))});$(document).on("click",".stars_container.full-rating .star",function (){setRatingProduct($(this).parent().attr("data-item-id").replace('vote-block-',''),$(this).attr("data-point"),".full-rating");if ($(this).parents(".wr-rating").length > 0)$(this).parents(".wr-rating").removeClass('has-error');if ($("input[name='review-vote'][data-item-id='" + $(this).parent().attr("data-item-id") + "']").length > 0)$("input[name='review-vote'][data-item-id='" + $(this).parent().attr("data-item-id") + "']").val($(this).attr("data-point"))});function setRatingProgress(id,rating){var circleParent = $("svg.circle-progress-bar[data-item-id='" + id + "']"),circle = circleParent.find("circle.rating-progress-bar"),radius = parseInt(circle.css("r")),circumference = 2 * Math.PI * radius,offset = 0,rating = parseFloat(rating).toFixed(1) || 0;var color = "";if (rating == 0)color = "rating-0";else if (rating < 1)return false;else if (rating > 5)rating = 5.0;if (1 <= rating && rating <= 1.8)color = "rating-1";if (1.8 < rating && rating <= 2.8)color = "rating-2";if (2.8 < rating && rating <= 3.8)color = "rating-3";if (3.8 < rating && rating <= 4.8)color = "rating-4";if (4.8 < rating && rating <= 5)color = "rating-5";offset = circumference - rating / 5 * circumference;circle[0].style.strokeDasharray = circumference + " " + circumference;circle[0].style.strokeDashoffset = offset;circleParent.removeClass('rating-0 rating-1 rating-2 rating-3 rating-4 rating-5');circleParent.addClass(color);$(".rating-value[data-item-id='" + id + "']").text(rating);return true}var noClickLayer = 0;function openFlyBlock(id){if (noClickLayer == 0)startBlurWrapperContainer();noClickLayer++;$('body').append('<div class="click-ghost-area" data-fly-block-id="' + id + '"></div>');$('.fly-block[data-fly-block-id="' + id + '"]').addClass('active');var tOutShow = setTimeout(function (){$('.fly-block[data-fly-block-id="' + id + '"]').addClass('on');clearTimeout(tOutShow)},200)}function closeFlyBlock(id){if (noClickLayer == 1)stopBlurWrapperContainer();noClickLayer--;$('.click-ghost-area[data-fly-block-id="' + id + '"]').remove();$('.fly-block[data-fly-block-id="' + id + '"]').removeClass('on');var tOutHide = setTimeout(function (){$('.fly-block[data-fly-block-id="' + id + '"]').removeClass('active');clearTimeout(tOutHide)},700)}$(document).on("click",".click-ghost-area",function (){if (typeof ($(this).attr("data-fly-block-id")) != "undefined")closeFlyBlock($(this).attr("data-fly-block-id"))});function setFlyBlockParams(_this){params = null;if (_this.hasClass('fly-block-review')){params ={"PRODUCT_ID":_this.attr("data-product-id"),"NAME":$("input.product-" + _this.attr("data-product-id") + "-name").val(),"PICTURE_SRC":$
18281("input.product-" + _this.attr("data-product-id") + "-picture-src-small").val(),"PATH":"/bitrix/tools/concept.phoenix/ajax/reviews/fly_block_review_html.php"}}return params}var loadingFlyReviewFlag = false;function loadingFlyReview(){loadingFlyReviewFlag = true}function completedFlyReview(){loadingFlyReviewFlag = false}function createFlyBlock(id,params){if (loadingFlyReviewFlag)return false;showProcessLoad();params = params || null;loadingFlyReview();$.post(params.PATH,{site_id:$("input.site_id").val(),params:params},function (html){closeProcessLoad();$('body').append(html);setRatingProduct(params.PRODUCT_ID,$(".stars_container.full-rating[data-item-id='vote-block-" + params.PRODUCT_ID + "']").attr("data-rating"),".full-rating");openFlyBlock(id);completedFlyReview();$('[data-toggle="tooltip-ajax"]').tooltip({html:true})})}$(document).on("click",".open-fly-block",function (){var id = $(this).attr("data-fly-block-id");if ($('.fly-block[data-fly-block-id="' + id + '"]').length <= 0){var params = setFlyBlockParams($(this));createFlyBlock(id,params)}else{openFlyBlock(id)}});$(document).on("click",".close-fly-block",function (){closeFlyBlock($(this).attr("data-fly-block-id"))});$(document).on({click:function (){var label = $(this).parent();if (label.hasClass("selected")){label.removeClass("selected");$(this).prop('checked',false)}else{$("input[type='radio'][name='" + $(this).attr("name") + "']").parent().removeClass("selected");label.addClass("selected")}},},".btn-radio-simple:not(.disabled) input[type='radio']");$(document).on('change',"input.load-file-simple[type='file']",function (){var inp = $(this);var file_list_name = "";$(inp[0].files).each(function (key){if (key == 10)return false;if (key != 0)file_list_name += ", ";file_list_name += "<span>" + inp[0].files[key].name + "</span>"});if (!file_list_name.length)return;inp.parents('form').addClass('file-download');inp.parents('label').find('.area-files-name').html(file_list_name);inp.closest('.load-file').removeClass("has-error")});$(document).on("focus",".text-require,.input-simple input[type='email']",function (){$(this).removeClass("has-error")});function validForm(form,params){var valid = true;params = params || null;if (typeof ($("input.agreecheck",form).val()) != "undefined"){if (!$("input.agreecheck",form).prop("checked")){$("input.agreecheck",form).parents("div.wrap-agree").addClass("has-error");valid = false}}$("input[type='email'],input[type='text'],input[type='password'],textarea",form).each(function (key,value){if ($(this).hasClass("text-require")){if ($(this).val().trim().length <= 0){$(this).val("");$(this).addClass("has-error");valid = false}}else if ($(this).attr("type") == "email" && $(this).val().length > 0){if (!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,15}$/i).test($(this).val())){$(this).addClass("has-error");valid = false}}});$(".file-require",form).each(function (key,value){if ($(this).parents('.label-require-file').find('span.area-file').hasClass('area-file')){$(this).parents('.label-require-file').addClass("has-error");valid = false}});if (params !== null){for (key in params){if (params[key].selector.length > 0){params[key].selector.removeClass('has-error');if (params[key].value.length <= 0){params[key].selector.addClass('has-error');valid = false}}}}return valid}function buildFormValues(form,params){params = params || null;var formSendAll = new FormData();if (params){for (key in params){formSendAll.append(key,params[key])}}form_arr = form.find(':input,select,textarea').serializeArray();for (var i = 0;i < form_arr.length;i++){if (form_arr[i].value.length > 0)formSendAll.append(form_arr[i].name,form_arr[i].value)};if (form.hasClass('file-download')){form.find('input[type=file]').each(function (key){var inp = $(this);var file_list_name = "";$(inp[0].files).each(function (k){formSendAll.append(inp.attr('name'),inp[0].files[k],inp[0].files[k].name)})})}return formSendAll}$(document).on("click",".btn-submit-review",function (){var form = $(this).parents("form.form-review"),load = form.find(".preloader-simple"),btn = $(this),moderateMode = $("input.review-moderate-mode").val(),panelProcess = $(".wr-panel-process",form),panelSuccess = $(".wr-panel-success",form),footer = $("div.footer",form);paramsValid ={"rating":{"selector":$(".wr-rating",form),"value":$(".stars_container",form).attr('data-rating')}};if (!validForm(form,paramsValid)){formAttentionScroll(form.find('.has-error:first').offset().top - form.offset().top,".fly-block");return false}else{load.addClass('active');btn.removeClass('active');var params ={"send":"Y","site_id":$("input.site_id").val(),"VOTE":$(".stars_container",form).attr('data-rating')};var formSendAll = buildFormValues(form,params);var path = "/bitrix/tools/concept.phoenix/ajax/reviews/add.php";$.ajax({url:path,method:'POST',contentType:false,processData:false,data:formSendAll,dataType:'json',success:function (json){if (json.OK == "Y"){panelProcess.addClass('d-none');footer.addClass('d-none');panelSuccess.removeClass('d-none');$.ajax({url:"/bitrix/tools/concept.phoenix/ajax/ajax_hit_page.php",method:'POST',success:function (json){}})}else if (json.OK == "N"){load.removeClass('active');btn.addClass('active')}}})}return true});var reviewsLike ={},reviewsLikeParse ={};function setReviewsLike(){for (key in reviewsLikeParse){$(".review-item[data-review-id='" + key.replace("like-","") + "']").find(".review-like").addClass('selected')}}function getReviewsLikeCookie(){reviewsLike = BX.getCookie($(".domen-url-for-cookie").val() + '_phoenix_reviewsLike');if (reviewsLike)reviewsLikeParse = JSON.parse(reviewsLike)}function setReviewsLikeCookie(id,value){reviewsLikeParse["like-" + id] = value;BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_reviewsLike',JSON.stringify(reviewsLikeParse),{expires:60 * 60 * 60 * 60,path:"/"})}function deleteReviewsLikeCookie(id){delete reviewsLikeParse["like-" + id];BX.setCookie($(".domen-url-for-cookie").val() + '_phoenix_reviewsLike',JSON.stringify(reviewsLikeParse),{expires:60 * 60 * 60 * 60,path:"/"})}var likeProcess = false;$(document).on("click",".review-like",function (){if (likeProcess)return false;var btn = $(this),reviewNode = $(this).parents(".review-item"),reviewID = reviewNode.attr("data-review-id"),countLikeNode = reviewNode.find(".review-like-count"),action = btn.hasClass('selected') ? "unlike" :"like";likeProcess = true;var path = "/bitrix/tools/concept.phoenix/ajax/reviews/update_like.php";var formSendAll = new FormData();formSendAll.append("REVIEW_ID",reviewID);formSendAll.append("ACTION",action);formSendAll.append("site_id",$("input.site_id").val());formSendAll.append("sessid",(typeof BX !== "undefined" && typeof BX.bitrix_sessid === "function") ? BX.bitrix_sessid() :"");$.ajax({url:path,method:'POST',contentType:false,processData:false,data:formSendAll,dataType:'json',success:function (json){likeProcess = false;if (json.OK == "Y"){if (action === "like"){btn.addClass('selected');setReviewsLikeCookie(reviewID,1)}else{btn.removeClass('selected');deleteReviewsLikeCookie(reviewID)}if (parseInt(json.LIKE_COUNT) > 0){countLikeNode.html("+" + json.LIKE_COUNT);countLikeNode.addClass('plus')}else{countLikeNode.html(0);countLikeNode.removeClass('plus')}countLikeNode.attr("data-count",json.LIKE_COUNT)}}})});function ajaxGetReviews(params){var path = "/bitrix/tools/concept.phoenix/ajax/reviews/reviews_block.php";params = params || 0;showProcessLoad();if (params.this.hasClass('btn-filter'))params.this.parents(".group-list-simple").find(".btn-filter").removeClass('selected');$.post(path,{site_id:$("input.site_id").val(),id:$(".review-block-ajax").attr("data-product-id"),page:params.pageNum,filter:params.filter,mode:"list"},function (html){closeProcessLoad();getReviewsLikeCookie();setTimeout(function (){setReviewsLike()},700);if (params.this.hasClass('getReviews')){$(".review-block-ajax .wr-review-list").append(html);params.this.remove()}else if (params.this.hasClass('btn-filter')){$(".review-block-ajax .wr-review-list").html(html);params.this.addClass('selected')}})}$(document).on("click",".getReviews",function (){var params ={"this":$(this),"pageNum":$(this).attr("data-page"),"filter":$(this).attr("data-filter"),};ajaxGetReviews(params)});$(document).on("click",".btn-filter.active:not(.selected)",function (){var params ={"this":$(this),"pageNum":0,"filter":$(this).attr("data-filter"),};ajaxGetReviews(params)});function ajaxReviewsBlock(){if ($(".review-block-ajax").length > 0){var path = "/bitrix/tools/concept.phoenix/ajax/reviews/reviews_block.php";$.post(path,{site_id:$("input.site_id").val(),id:$(".review-block-ajax").attr("data-product-id"),mode:"full"},function (html){$(".review-block-ajax").html(html);getReviewsLikeCookie();setReviewsLike();$('[data-toggle="tooltip-ajax"]').tooltip({html:true})})}}$(document).ready(function (){ajaxReviewsBlock()});$(document).on("click",".btn-show-container",function (){$(this).parents(".wr-hidden-container").find(".hidden-container").removeClass('d-none');$(this).remove()});var arrBasketFilter ={},arrDelayFilter ={};function BasketFilter(query){query = query || "";if (query.length <= 0)$(".basket-items-search-clear-btn").addClass('d-none');else{$(".basket-items-search-clear-btn").removeClass('d-none')}query = query.toLowerCase();var realKey = "",productName = "",arrSearchBasket ={},selector = "";if ($(".tab_item[data-items='items']").hasClass('active')){arrSearchBasket = arrBasketFilter;selector = $("#basket_items")}if ($(".tab_item[data-items='delayed']").hasClass('active')){arrSearchBasket = arrDelayFilter;selector = $("#delayed_items")}for (key in arrSearchBasket){realKey = key.replace('id_','');if (!(arrSearchBasket[key].QUERY.indexOf(query) !== -1))selector.find(".product#" + realKey).addClass('d-none').find(".product-name").html(arrSearchBasket[key].NAME);else{productName = arrSearchBasket[key].NAME.slice(arrSearchBasket[key].QUERY.indexOf(query),arrSearchBasket[key].QUERY.indexOf(query) + query.length);productName = arrSearchBasket[key].NAME.replace(productName,"<span class='highlight'>" + productName + "</span>");selector.find(".product#" + realKey).removeClass('d-none').find(".product-name").html(productName)}}delete arrSearchBasket}$(document).on({keyup:function (){BasketFilter($(this).val())},paste:function (){BasketFilter($(this).val())},cut:function (){BasketFilter($(this).val())},blur:function (){BasketFilter($(this).val())},},"input.basket-filter");function clearInput(input){input.val("").attr("placeholder",input.attr("data-placeholder"))}$(document).on({click:function (){BasketFilter("");clearInput($("input.basket-filter"))},},".basket-items-search-clear-btn");function initPhoneMask(){$(document).on("focus","form input.phone",function (){$(this).mask($("input.mask-phone").val())})}function getTermination(num,array){num = num.toString();var number = num.substring(num.length,-2);var term = "";if (number > 10 && number < 15){term = array[3]}else{number = num.substring(num.length,-1);if (number == 0){term = array[0]}if (number == 1){term = array[1]}if (number > 1){term = array[2]}if (number > 4){term = array[3]}}return term}$(document).on('click','.open-dialog-window',function (){if ($(this).attr("data-typename")){var params ={"typeName":$(this).attr("data-typename"),"elementID":$(this).attr("data-elementid"),"blockTitle":$(this).attr("data-blocktitle"),"iblockID":$("input#LAND_iblockID").val(),"iblockTypeID":$("input#LAND_iblockTypeID").val(),"site_id":$("input.site_id").val()};callDialogWindow(params)}});function callDialogWindow(params){params = params || null;if (params){showProcessLoad();startBlurWrapperContainer();$.post("/bitrix/tools/concept.phoenix/ajax/popup/modal.php",params,function (html){closeProcessLoad();$(".modalAreaDetail").html(html);setTimeout(function (){$('div.modalAreaDetail').find('.phoenix-modal').addClass('active')},100)})}}function getHtmlStoreList(PRODUCT_ID,STORE,MEASURE){if ($("input.tab-store").length > 0){if (STORE.length <= 0){$(".ajax_store_area").html("");return true}clearTimeout($.data(this,'store_block'));$.data(this,'store_block',setTimeout($.proxy(function (){showProcessLoadItem("store_block");$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/store_list.php',method:'POST',data:{site_id:$("input.site_id").val(),TAB:$("input.tab-store").val(),PRODUCT_ID:PRODUCT_ID,STORE:STORE,MEASURE:MEASURE},success:function (data){setTimeout(function (){closeProcessLoadItem("store_block");$(".ajax_store_area").html(data)},300)}})},this),700))}}$(document).on("click",".bx_storege .btn-tab",function (){$(".bx_storege").find(".btn-tab").removeClass('active');$(".bx_storege").find(".tab-content").addClass('d-none');$(this).addClass('active');$(".tab-content[data-content='" + $(this).attr("data-content") + "']").removeClass('d-none')});$(document).on("click",".bx_storege .list-item.flat",function (){$(".bx_storege").find(".back2list").removeClass('d-none');$(".bx_storege").find(".list-item.flat").addClass('d-none');$(".bx_storege").find(".detail-item.flat").addClass('d-none');$(".detail-item.flat[data-content='" + $(this).attr("data-content") + "']").removeClass('d-none')});$(document).on("click",".bx_storege .back2list",function (){$(this).addClass('d-none');$(".bx_storege").find(".list-item.flat").removeClass('d-none');$(".bx_storege").find(".detail-item.flat").addClass('d-none')});function preparePopupBlockStore(){if ($(".popup-block[data-popup='store-block']").length > 0){var clone = $(".popup-block[data-popup='store-block']").clone();$(".popup-block[data-popup='store-block']").remove();clone.appendTo('body')}}$(document).ready(function (){preparePopupBlockStore()});PopupWindow ={init:function (container,params){if (container.length <= 0)return false;params = params ||{};if (params.ajax){console.log('ajax')}else{PopupWindow.show(container,params)}},show:function (container,params){if (container.hasClass('animated')){}else{container.removeClass("d-none");var cartOut = setTimeout(function (){container.addClass('active');clearTimeout(cartOut)},300)}startBlurWrapperContainer({"blur":params.blur});if (params.hideContainer)$(params.hideContainer).addClass('d-none')},hide:function (container,params){var timeHide = 300;if (container.hasClass('animated')){if (container.hasClass('fadeInUp')){container.removeClass('fadeInUp');if (typeof container.attr("data-animate-out") != "undefined"){var animateOut = container.attr("data-animate-out");container.addClass(animateOut);timeHide = 1500}}}else{container.removeClass('active')}var cartOut = setTimeout(function (){container.addClass('d-none');clearTimeout(cartOut)},timeHide);if (params.blur)stopBlurWrapperContainer()}};$(document).on('click','.show-popup-block',function (){var container = $('.popup-block[data-popup="' + $(this).attr("data-popup") + '"]'),params ={"blur":false,"hideContainer":false};if (typeof $(this).attr("data-hide-container") != 'undefined')params.hideContainer = $(this).attr("data-hide-container");PopupWindow.init(container,params)});$(document).on('click','.info-right-side .show-popup-block-store',function (){var container = $('.popup-block[data-popup="store-block"]'),params ={"blur":false};PopupWindow.init(container,params)});$(document).on('click','.hide-popup-block-js',function (){var container = $(this).parents(".popup-block"),params ={"blur":true};PopupWindow.hide(container,params);if ($(this).hasClass('set-first-region-values'))setFirstRegionValues()});function setFirstRegionValues(){setTimeout(function (){$(".value-region").text($("input.region-name").val())},1000);if ($("input.region-image").val().length > 0){$("input.region-image-default").val($("input.region-image").val());$(".region-popup").find(".left-side").css({"background-image":"url(" + $("input.region-image-default").val() + ")"});$(".region-popup").find(".right-side").css({"background-image":"url(" + $("input.region-image-default").val() + ")"})}$("input.region-id").val($("input.region-id-current").val());$("input.region-id-default").val($("input.region-id-current").val());$("input.region-name-default").val($("input.region-name").val());if ($("input[name='region-value'][value='" + $("input.region-id-current").val() + "']").length > 0)$("input[name='region-value'][value='" + $("input.region-id-current").val() + "']").prop("checked",true);else{var favorites = $(".region-popup input[type='radio']");if (favorites.length > 0
18281){$(favorites).each(function (index,element){element.checked = false})}}}function autocompleteRegionAreaSelected(th,ui){th.parents(".mode-select").addClass('ok');var favorites = th.parents("form").find("input[type='radio']");if (favorites.length > 0){$(favorites).each(function (index,element){element.checked = false})}var arRegionsValues = ui.item.value.split(';');var regionID = arRegionsValues[0];var regionHref = arRegionsValues[1];var regionName = arRegionsValues[2];th.val(ui.item.label);if (regionName.length > 0)$(".value-region").text(regionName);else{$(".value-region").text(ui.item.label)}$("input.region-id").val(regionID);$(".region-popup .error-input").addClass('d-none');$(".region-popup").find(".left-side").removeAttr('style');$(".region-popup").find(".right-side").removeAttr('style');if (ui.item.icon.length > 0){$(".region-popup").find(".left-side").css({"background-image":"url(" + ui.item.icon + ")"});$(".region-popup").find(".right-side").css({"background-image":"url(" + ui.item.icon + ")"})}}function autocompleteRegionAreaChange(th,flag){if (flag){$("input.autocompleteRegion").parents(".mode-select").addClass('ok');$(".region-popup .error-input").addClass('d-none');var favorites = th.parents("form").find("input[type='radio']");if (favorites.length > 0){$(favorites).each(function (index,element){element.checked = false})}}else{$("input.autocompleteRegion").val("");$(".region-popup .error-input").removeClass('d-none');$("input.autocompleteRegion").parents(".mode-select").removeClass('ok');$("input.region-id").val($("input.region-id-default").val());if ($("input[name='region-value'][value='" + $("input.region-id").val() + "']").length > 0)$("input[name='region-value'][value='" + $("input.region-id").val() + "']").prop("checked",true);$(".value-region").html($("input.region-name-default").val());$(".region-popup").find(".right-side").removeAttr('style');$(".region-popup").find(".left-side").removeAttr('style');if ($("input.region-image-default").val().length > 0){$(".region-popup").find(".left-side").css({"background-image":"url(" + $("input.region-image-default").val() + ")"});$(".region-popup").find(".right-side").css({"background-image":"url(" + $("input.region-image-default").val() + ")"})}}}$(document).on('click','.region-popup input[type="radio"]',function (){var form = $(this).parents("form");$("input.region-id").val($(this).val());$(".value-region").text($(this).attr("data-label"));$(".region-popup .error-input").addClass('d-none');if ($(window).width() <= 767){$("input.autocompleteRegion").val($(this).parent().find("span.text").html());form.find(".mode-select").addClass('ok')}else{$("input.autocompleteRegion").val("");form.find(".mode-select").removeClass('ok')}$(".region-popup").find(".right-side").removeAttr('style');if ($(this).attr("data-icon").length > 0)$(".region-popup").find(".right-side").css({"background-image":"url(" + $(this).attr("data-icon") + ")"});$(".region-popup").find(".left-side").removeAttr('style');if ($(this).attr("data-icon").length > 0)$(".region-popup").find(".left-side").css({"background-image":"url(" + $(this).attr("data-icon") + ")"})});$(document).on("focus","input.autocompleteRegion",function (){if ($(this).val().length <= 0){$(this).parents(".mode-select").removeClass('ok')}});$(document).on("blur","input.autocompleteRegion",function (){if ($(this).val().length <= 0){$(this).parents(".mode-select").removeClass('ok')}});function setCookieRegion(regionID,submit){submit = submit || "";$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/update/region_set_cookie.php',method:'POST',data:{site_id:$("input.site_id").val(),serverName:$("input.serverName").val(),curPageUrl:$("input.curPageUrl").val(),submit:submit,id:regionID},success:function (data){if (data.HREF.length > 0){setTimeout(function (){location.href = data.HREF},1000)}else{$('.value-region').html(data.NAME_LOCATION);$('.value-region-main').html(data.NAME_LOCATION);var favorites = $(".region-popup input[type='radio']");if (favorites.length > 0){$(favorites).each(function (index,element){element.checked = false})}$('input[name="region-value"][value='+data.ID_LOCATION+']').prop("checked",true)}},error:function (){$(".submit-region").removeClass("hide-text");$(".submit-region-load").removeClass('d-block')}})}$(document).on("click",".submit-region",function (){var regionID = $("input.region-id").val(),regionDefaultID = $("input.region-id-default").val(),container = $(this).parents(".popup-block"),params ={"blur":true};regionID = regionID || regionDefaultID;$(this).addClass("hide-text");$(".submit-region-load").addClass('d-block');setCookieRegion(regionID,"Y")});var subMenuLvl2 = null;document.addEventListener("DOMContentLoaded",function(){subMenuLvl2 = document.querySelectorAll(".sub-menu
18281-lvl-2-item-js");if(subMenuLvl2){if (windowWidth <= 1024){for (var i = 0;i < subMenuLvl2.length;i++){subMenuLvl2[i].addEventListener('click',function(){var target = event.target.closest(".sub-menu-lvl-2-item-js");if(!target.classList.contains('active')){event.preventDefault()}showSubMenuLvl2Items(target)})}}else{for (var i = 0;i < subMenuLvl2.length;i++){subMenuLvl2[i].addEventListener('mouseenter',function(){var target = event.target.closest(".sub-menu-lvl-2-item-js");$.data(this,'timer-'+i,setTimeout($.proxy(function (){showSubMenuLvl2Items(target)},this),100))});subMenuLvl2[i].addEventListener('mouseleave',function(){clearTimeout($.data(this,'timer-'+i))})}}}});function clearSubMenuLvl2Items(){var subMenuLvl2Items = document.querySelectorAll(".sub-menu-wr-lvl-3-item-js");if(subMenuLvl2Items){for (var i = 0;i < subMenuLvl2Items.length;i++){subMenuLvl2Items[i].classList.remove('active')}}if(subMenuLvl2){for (var i = 0;i < subMenuLvl2.length;i++){subMenuLvl2[i].classList.remove('active')}}}function showSubMenuLvl2Items(target){var attr = target.getAttribute('data-sub-menu-lvl-2'),groupItems = document.querySelector(".sub-menu-wr-lvl-3-item-js[data-sub-menu-lvl-2='"+attr+"']");clearSubMenuLvl2Items();if(groupItems)groupItems.classList.add('active');target.classList.add('active');$('.lazyload').Lazy(paramsLazy)}function menuLvls4Selected(th){var itemSelected = th.find('.sub-menu-lvl-2-item-js.selected'),items = th.find('.sub-menu-lvl-2-item-js');clearSubMenuLvl2Items();if(itemSelected.length<=0 && items.length>0){items[0].classList.add('active');$(".sub-menu-wr-lvl-3-item-js[data-sub-menu-lvl-2="+items[0].getAttribute('data-sub-menu-lvl-2')+"]").addClass('active')}else if(itemSelected.length>0){itemSelected[0].classList.add('active');$(".sub-menu-wr-lvl-3-item-js[data-sub-menu-lvl-2="+itemSelected[0].getAttribute('data-sub-menu-lvl-2')+"]").addClass('active')}}function getCatalogStories(){if($(".catalog-stories-ajax").length>0){$.ajax({url:'/bitrix/tools/concept.phoenix/ajax/catalog_stories.php',method:'POST',data:{site_id:$("input.site_id").val(),COUNT:$(".catalog-stories-ajax").attr('data-count'),},success:function (data){$(".catalog-stories-ajax").append(data)}})}}(function (window){if (!!window.JCSaleGiftBasket){return}window.JCSaleGiftBasket = function (arParams){this.element = arParams;this.nodes ={};this.currentElement ={};this.oldElement ={};this.errorCode = 0;this.firstLoad = true;this.selectedValues ={};this.firstLoad = false;if (typeof arParams === 'object'){this.initConfig();switch (this.element.PRODUCT_TYPE){case 0:case 1:case 2:this.initProductData();break;case 3:this.initOffersData();break;default:this.errorCode = -1}}if (this.errorCode === 0)BX.ready(BX.delegate(this.init,this))};window.JCSaleGiftBasket.prototype ={initConfig:function (){this.element.PRODUCT_TYPE = parseInt(this.element.PRODUCT_TYPE,10);this.nodes.obProduct = document.querySelector("#"+this.element.VISUAL.ID);this.nodes.obProductItem = this.nodes.obProduct.querySelector('.gift-item-js');this.nodes.obImg = this.nodes.obProduct.querySelector('.gift-item-img-js');this.nodes.obImgLink = this.nodes.obProduct.querySelector('.gift-item-img-link-js');this.nodes.obPrice = this.nodes.obProduct.querySelector('.gift-item-price-js');this.nodes.obName = this.nodes.obProduct.querySelector('.gift-item-name-js');this.nodes.obSku = this.nodes.obProduct.querySelector('.sku-container-js');this.nodes.obBtn = this.nodes.obProduct.querySelector('.gift-item-btn-js');this.nodes.obBtn && BX.bind(this.nodes.obBtn,'click',BX.proxy(this.SendToBasket,this))},initProductData:function (){this.currentElement = this.element;this.oldElement = this.currentElement;this.setPrice();if(this.currentElement.CAN_BUY){this.nodes.obProduct.classList.remove('d-none')}else{this.nodes.obProduct.remove()}},initOffersData:function (){if (this.element.CONFIG.SHOW_OFFERS){this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];var treeItems = this.nodes.obSku.querySelectorAll('li');for (i = 0;i < treeItems.length;i++){BX.bind(treeItems[i],'click',BX.delegate(this.selectOfferProp,this))}this.setCurrent()}},selectOfferProp:function (){var i = 0,strTreeValue = '',arTreeItem = [],rowItems = null,target = BX.proxy_context,smallCardItem;if (target && target.hasAttribute('data-treevalue')){if (BX.hasClass(target,'active'))return;if (typeof document.activeElement === 'object'){document.activeElement.blur()}strTreeValue = target.getAttribute('data-treevalue');arTreeItem = strTreeValue.split('_');this.searchOfferPropIndex(arTreeItem[0],arTreeItem[1]);rowItems = BX.findChildren(target.parentNode,{tagName:'li'},false);if (rowItems && rowItems.length){for (i = 0;i < rowItems.length;i++){BX.removeClass(rowItems[i],'active')}}BX.addClass(target,'active')}},searchOfferPropIndex:function (strPropID,strPropValue){var strName = '',arShowValues = false,arCanBuyValues = [],allValues = [],index = -1,i,j,arFilter ={},tmpFilter = [];for (i = 0;i < this.element.TREE_PROPS.length;i++){if (this.element.TREE_PROPS[i].ID === strPropID){index = i;break}}if (index > -1){for (i = 0;i < index;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arFilter[strName] = this.selectedValues[strName]}strName = 'PROP_' + this.element.TREE_PROPS[index].ID;arFilter[strName] = strPropValue;for (i = index + 1;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;allValues = [];if (this.element.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];allValues[allValues.length] = arShowValues[j];if (this.getCanBuy(tmpFilter))arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}else{arCanBuyValues = arShowValues}if (this.selectedValues[strName] && BX.util.in_array(this.selectedValues[strName],arCanBuyValues)){arFilter[strName] = this.selectedValues[strName]}else{if (this.element.SHOW_ABSENT === 'Y'){arFilter[strName] = (arCanBuyValues.length ? arCanBuyValues[0] :allValues[0])}else{arFilter[strName] = arCanBuyValues[0]}}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()}},setCurrent:function (){var i,j = 0,strName = '',arShowValues = false,arCanBuyValues = [],arFilter ={},tmpFilter = [],current = this.currentElement.TREE;for (i = 0;i < this.element.TREE_PROPS.length;i++){strName = 'PROP_' + this.element.TREE_PROPS[i].ID;arShowValues = this.getRowValues(arFilter,strName);if (!arShowValues)break;if (BX.util.in_array(current[strName],arShowValues)){arFilter[strName] = current[strName]}else{arFilter[strName] = arShowValues[0];this.element.OFFER_ID_SELECTED = 0}if (this.element.CONFIG.SHOW_ABSENT === 'Y'){arCanBuyValues = [];tmpFilter = [];tmpFilter = BX.clone(arFilter,true);for (j = 0;j < arShowValues.length;j++){tmpFilter[strName] = arShowValues[j];if (this.getCanBuy(tmpFilter)){arCanBuyValues[arCanBuyValues.length] = arShowValues[j]}}}else{arCanBuyValues = arShowValues}this.updateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues = arFilter;this.changeInfo()},getCanBuy:function (arFilter){var i,j = 0,boolOneSearch = true,boolSearch = false;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (this.element.OFFERS[i].CAN_BUY){boolSearch = true;break}}}return boolSearch},getRowValues:function (arFilter,index){var arValues = [],i = 0,j = 0,boolSearch = false,boolOneSearch = true;if (arFilter.length === 0){for (i = 0;i < this.element.OFFERS.length;i++){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}}boolSearch = true}else{for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in arFilter){if (arFilter[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){if (!BX.util.in_array(this.element.OFFERS[i].TREE[index],arValues)){arValues[arValues.length] = this.element.OFFERS[i].TREE[index]}boolSearch = true}}}return (boolSearch ? arValues :false)},updateRow:function (intNumber,activeId,showId,canBuyId){var i = 0,value = '',isCurrent = false,rowItems = null;var lineContainer = this.nodes.obSku.querySelectorAll('.wr-sku-props');if (intNumber > -1 && intNumber < lineContainer.length){rowItems = lineContainer[intNumber].querySelectorAll('li');for (i = 0;i < rowItems.length;i++){value = rowItems[i].getAttribute('data-onevalue');isCurrent = value === activeId;if (isCurrent){BX.addClass(rowItems[i],'active')}else{BX.removeClass(rowItems[i],'active')}if (BX.util.in_array(value,canBuyId)){BX.removeClass(rowItems[i],'notallowed')}else{BX.addClass(rowItems[i],'notallowed')}rowItems[i].style.display = BX.util.in_array(value,showId) ? '' :'none';if (isCurrent){lineContainer[intNumber].style.display = (value == 0) ? 'none' :''}}}},changeInfo:function (){var index = -1,j = 0,boolOneSearch = true,descTitle = null,rowItems = null;var i;for (i = 0;i < this.element.OFFERS.length;i++){boolOneSearch = true;for (j in this.selectedValues){if (this.selectedValues[j] !== this.element.OFFERS[i].TREE[j]){boolOneSearch = false;break}}if (boolOneSearch){index = i;break}}this.oldElement = this.currentElement;this.element.OFFER_ID_SELECTED = index;this.currentElement = this.element.OFFERS[this.element.OFFER_ID_SELECTED];this.setPrice();if (!this.firstLoad){this.drawPicture();this.changeDetailUrl(this.currentElement.ID)}},drawPicture:function (){this.nodes.obImg.src = this.currentElement.PHOTO;this.nodes.obImg.alt = this.element.ALT},changeDetailUrl:function (){this.nodes.obName.href = this.nodes.obImgLink.href = this.currentElement.DETAIL_PAGE_URL},setPrice:function (){this.nodes.obPrice.innerHTML = this.currentElement.PRICE.PRINT_VALUE;this.nodes.obPrice.title=this.currentElement.PRICE.VALUE;if (!this.currentElement.CAN_BUY){this.nodes.obBtn.parentNode.classList.add('hidden')}else{this.nodes.obBtn.parentNode.classList.remove('hidden')}},SendToBasket:function (){if (!this.currentElement.CAN_BUY)return;var productID = '',value = 1;if (this.nodes.obQuantity)value = this.nodes.obQuantity.value;productItem ={PRODUCT_ID:this.currentElement.ID,QUANTITY:value,PRICE_ID:this.currentElement.PRICE.PRICE_ID};showProcessLoad();
18281BX.ajax({method:'POST',dataType:'json',url:'/bitrix/tools/concept.phoenix/ajax/basket/add2basket.php',data:{productItem:productItem,site_id:$("input.site_id").val()},onsuccess:BX.proxy(this.basketResult,this)})},basketResult:function (arResult){closeProcessLoad();if (arResult["OK"] == "Y"){setInfoBasket()}},}})(window); 18282/* End */ 18283; 18284; /* Start:"a:4:{s:4:"full";s:68:"/bitrix/templates/concept_phoenix_s4/js/forms.min.js?178249863720086";s:6:"source";s:48:"/bitrix/templates/concept_phoenix_s4/js/forms.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 18285$(document).ready(function(){$("input[type='email'],input[type='text'],input[type='password'],textarea","form").focus(function(){$(this).parent().removeClass("has-error")})});$(window).on("load",function(){cur_pos = $(document).scrollTop();$("input.urlpage").val(location.href)});$(document).on('change',"form input[type='file'].flat",function(){var inp = $(this);var btn = inp.parent();var lbl = btn.find("span.ex-file");var file_api = (window.File && window.FileReader && window.FileList && window.Blob) ? true :false;if (file_api && inp[0].files[0])file_name = inp[0].files[0].name;else{file_name = inp.val().replace("C:\\fakepath\\",'')}if (!file_name.length)return;if (lbl.is(":visible")){lbl.text(file_name)}else{btn.text(file_name)}inp.parents(".clearfile-parent").find('input.phoenix_file_del').val('');btn.addClass('focus-anim for-download');inp.parents(".clearfile-parent").find(".clearfile").addClass('on')});$(document).on('change',".form.send input[type='file']",function(){var inp = $(this);var file_list_name = "";$(inp[0].files).each(function(key){file_list_name += "<span>"+inp[0].files[key].name+"</span><br/>"});if(!file_list_name.length)return;inp.parents('form.send').addClass('file-download');inp.parents('label').find('.area-files-name').html(file_list_name);inp.parents('label').removeClass("area-file");inp.closest('.load-file').removeClass("has-error")});$(document).on("click","div.wrap-agree input[type='checkbox']",function(){$(this).parents("div.wrap-agree").removeClass("has-error")});function validGroupCheckbox(arParams){var error = 0;for (key in arParams){var cheked = false;for (var i = 0;
18285i < arParams[key].length;i++){if(arParams[key][i].checked)cheked = true}if(!cheked){if(error == 0)error = 1;for (var i = 0;i < arParams[key].length;i++){$(arParams[key][i]).addClass('has-error')}}}return error}function validGroupSelect(arParams){var error = 0;for (key in arParams){var cheked = false;for (var i = 0;i < arParams[key].length;i++){if(arParams[key][i].checked)cheked = true}if(!cheked){if(error == 0)error = 1;$(arParams[key][0]).parents(".form-select").addClass('has-error')}}return error}function sendForm(arParams){var error = 0,formSendAll = new FormData();formSendAll.append("send","Y");formSendAll.append("element",arParams.form_block.attr("id").replace("form-",""));formSendAll.append("tmpl_path",$("input.tmpl_path").val());formSendAll.append("typeForm",arParams.typeForm);formSendAll.append("fromBasket",arParams.fromBasket);formSendAll.append("site_id",$("input.site_id").val());formSendAll.append("url",location.href);for (var i = 1;i <= 10;i++){if($("input#custom-input-"+i).val().length>0)formSendAll.append("custom-input-"+i,$("input#custom-input-"+i).val())}for (var i = 1;i <= 3;i++){if($("input#custom-dynamic-input-"+i).val().length>0)formSendAll.append("custom-dynamic-input-"+i,$("input#custom-dynamic-input-"+i).val())}if (typeof(arParams.agreecheck.val()) != "undefined"){if (!arParams.agreecheck.prop("checked")){arParams.agreecheck.parents("div.wrap-agree").addClass("has-error");error = 1}}$("input[type='email'],input[type='text'],input[type='password'],textarea",arParams.form_block).each(function(key,value){if ($(this).hasClass("email") && $(this).val().length > 0){if (!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,15}$/i).test($(this).val())){$(this).parent("div.input").addClass("has-error");error = 1}}if ($(this).hasClass("require")){if ($(this).val().trim().length <= 0){$(this).val("");$(this).parent("div.input").addClass("has-error");error = 1}}});$("input[type='file']",arParams.form_block).each(function(key,value){if ($(this).hasClass("require")){if ($(this).closest('.load-file').find('.area-file').length>0){$(this).closest('.load-file').addClass("has-error");error = 1}}});if (!$('.phoenix-modal').hasClass('form-modal')){var otherHeight = 0;if ($('header').hasClass('fixed')) otherHeight = $('.fix-board').outerHeight(true)}var arChecbox ={},newKey = null;$("input.check-require[type='checkbox']",arParams.form_block).each(function(key,value){newKey = $(this).attr('name').replace("[]","");if(typeof arChecbox[newKey] == "undefined")arChecbox[newKey] = [];arChecbox[newKey].push(this)});if(newKey && !error)error = validGroupCheckbox(arChecbox);delete arChecbox;newKey = null;var arRadio ={};$(".select-require input.opinion[type='radio']",arParams.form_block).each(function(key,value){newKey = $(this).attr('name');if(typeof arRadio[newKey] == "undefined")arRadio[newKey] = [];arRadio[newKey].push(this)});if(newKey && !error)error = validGroupSelect(arRadio);delete arRadio;newKey = null;if (error == 1){if ($('.phoenix-modal').hasClass('form-modal')){formAttentionScroll(arParams.form_block.find('.has-error:first').offset().top - arParams.form_block.parents('.phoenix-modal-dialog').offset().top,".phoenix-modal")}else if (arParams.form_block.hasClass('form-cart')){formAttentionScroll(arParams.form_block.find('.has-error:first').offset().top - arParams.form_block.find(".body").offset().top,".cart-parent")}else{formAttentionScroll(arParams.form_block.find('.has-error:first').offset().top - otherHeight,"html:not(:animated),body:not(:animated)")}}if (error == 0){arParams.form_block.css({"height":arParams.form_block.outerHeight() + "px"});if ($("body").hasClass('yandex-captcha')){if (!arParams.captchaToken || arParams.captchaToken.length === 0){var $cap = arParams.form_block.find('#captcha-container,.smart-captcha').first();if ($cap.length) $cap.addClass('has-error');arParams.button.addClass("active");arParams.load.removeClass("active");return}else{arParams.form_block.find('#captcha-container,.smart-captcha').first().removeClass('has-error')}}var form_arr = arParams.form_block.find(':input,select,textarea').serializeArray();for (var i = 0;i < form_arr.length;i++){if (form_arr[i].value.length > 0){formSendAll.append(form_arr[i].name,form_arr[i].value)}};
18285if (arParams.form_block.hasClass('file-download')){arParams.form_block.find('input[type=file]').each(function(key){var inp = $(this);var file_list_name = "";$(inp[0].files).each(function(k){formSendAll.append(inp.attr('name'),inp[0].files[k],inp[0].files[k].name)})})}if(arParams.captchaToken.length>0)formSendAll.append("captchaToken",arParams.captchaToken);arParams.button.removeClass("active");arParams.load.addClass("active");setTimeout(function(){$.ajax({url:arParams.path,method:'POST',contentType:false,processData:false,data:formSendAll,dataType:'json',success:function(json){if(typeof (json.OK) != "undefined" ){if(json.OK == "N"){arParams.button.addClass("active");arParams.load.removeClass("active")}if (json.OK == "Y"){if(arParams.typeForm != "fast_order"){arParams.questions.removeClass("active");arParams.thank.addClass("active");if(typeof(arParams.linkHREF) != "undefined"){if(typeof(arParams.linkHREFNew) != "undefined"){if(arParams.linkHREFNew == "Y"){setTimeout(function(){window.open(arParams.linkHREF,'_blank')},1000)}}
18285else{setTimeout(function(){window.location.href = arParams.linkHREF},3300)}}}$.ajax({url:"/bitrix/tools/concept.phoenix/ajax/ajax_hit_page.php",method:'POST',success:function(json){}});setTimeout(function(){if ($('.phoenix-modal').hasClass('form-modal'))formAttentionScroll(arParams.form_block.find('.thank').offset().top - arParams.form_block.parents('.phoenix-modal-dialog').offset().top,".phoenix-modal");else if (arParams.form_block.hasClass('form-cart')){formAttentionScroll(arParams.form_block.find('.thank').offset().top - arParams.form_block.find(".body").offset().top,".cart-parent")}else{formAttentionScroll(arParams.form_block.find('.thank').offset().top -otherHeight,"html:not(:animated),body:not(:animated)")}},300);if(typeof(json.SCRIPTS) != "undefined"){if (json.SCRIPTS.length > 0){$('body').append("<script>"+json.SCRIPTS+"</script>")}}resetCustomDynamicInputs()}if(arParams.typeForm == "fast_order"){if (arParams.fromBasket == "Y"){if (typeof(json.CUR_PAGE) != "undefined"){if(json.CUR_PAGE.length>0){window.location.href = json.CUR_PAGE}}}else{if (typeof(json.TEXT_THANK) != "undefined"){if(json.TEXT_THANK.length>0){arParams.questions.removeClass("active");arParams.thank.html(json.TEXT_THANK);arParams.thank.addClass("active")}}}}}}})},1000)}}$(document).on("click",".btn-submit",function(){var form = $(this).parents("form.send"),typeForm = "",fromBasket = "",paramsForm ={};if(form.length>0){if($(this).hasClass('fast-order'))typeForm = "fast_order";if($(this).hasClass('fast-order-basket')){fromBasket = "Y";typeForm = "fast_order"}paramsForm ={form_block:form,typeForm:typeForm,fromBasket:fromBasket,path:"/bitrix/tools/concept.phoenix/ajax/form_send.php",button:$(this),linkHREF:$(this).attr("data-link"),linkHREFNew:$(this).attr("data-link-new"),header:$("input[name='header']",form),agreecheck:$("input.agreecheck",form),questions:$("div.questions",form),load:$("div.load",form),thank:$("div.thank",form),captchaToken:""};if($("body").hasClass('captcha')){grecaptcha.execute($(".captcha-site-key").val(),{action:'homepage'}).then(function(token){paramsForm.captchaToken = token;sendForm(paramsForm)})}else if($("body").hasClass('yandex-captcha')){var tokenInput = form.find('input[name="smart-token"]');paramsForm.captchaToken = tokenInput.length ? $.trim(tokenInput.val()) :"";sendForm(paramsForm)}else{sendForm(paramsForm)}}});$(document).on("focus","input[type='email'],input[type='text'],input[type='password'],textarea",function(){$(this).parent("div.input").removeClass("has-error");if ($(this).val().length <= 0 && !$(this).hasClass("phone")){$(this).attr("data-placeholder",$(this).attr("placeholder"));$(this).attr("placeholder","")}});$(document).on("blur","input[type='email'],input[type='text'],input[type='password'],textarea",function(){if ($(this).val().length <= 0 && !$(this).hasClass("phone")) $(this).attr("placeholder",$(this).attr("data-placeholder"))});$(document).on("keypress","form.form div.count input",function(e){e = e || event;if (e.ctrlKey || e.altKey || e.metaKey) return;var chr = getChar(e);if (chr == null) return;if (chr < '0' || chr > '9'){return false}});$(document).on("keyup","form.form div.count input",function(e){var value = $(this).val().toString();var newVal = "";for (var i = 0;i < value.length;i++){if (value[i] == "0" || value[i] == "1" || value[i] == "2" || value[i] =="3" || value[i] == "4" || value[i] == "5" || value[i] == "6" || value[i] =="7" || value[i] == "8" || value[i] == "9") newVal += value[i]}if (newVal == 0) newVal = 1;$(this).val(newVal);if ($(this).val() == "") $(this).parent().addClass('in-focus')});$(document).on("click","form.form div.count span.plus",function(e){var input = $(this).parent("div.count").find("input");var value = parseFloat(input.val());if (isNaN(value)) value = 0;value += 1;input.val(value);if ($(this).val() == "") $(this).parent().addClass('in-focus')});$(document).on("click","form.form div.count span.minus",function(e){var input = $(this).parent("div.count").find("input");var value = parseFloat(input.val());if (isNaN(value)) value = 0;value -= 1;if (value < 0) value = '';if (value == 0) value = 1;input.val(value)});$(document).on("keypress",".only-num",function(e){e = e || event;if (e.ctrlKey || e.altKey || e.metaKey) return;var chr = getChar(e);if (chr == null) return;if (chr < '0' || chr > '9'){return false}});$(document).on("focus","input.focus-anim,textarea.focus-anim",function(){if ($(this).val() == "") $(this).parent().addClass('in-focus')});$(document).on("blur","input.focus-anim,textarea.focus-anim",function(){element = $(this);setTimeout(function(){if (element.val() == "") element.parent().removeClass('in-focus')},200)});function showModalDialog(target){startBlurWrapperContainer();$(".phx-modal-dialog[data-target='"+target+"']").addClass('active');var timer = setTimeout(function(){$(".phx-modal-dialog[data-target='"+target+"']").addClass('show');clearTimeout(timer)},300)}function closeModalDialog(target){$(".phx-modal-dialog[data-target='"+target+"']").removeClass('show');var timer = setTimeout(function(){$(".phx-modal-dialog[data-target='"+target+"']").removeClass('active');stopBlurWrapperContainer();clearTimeout(timer)},300)}$(document).on("click",".show-phx-modal-dialog",function(){showModalDialog($(this).attr("data-target"))});$(document).on("click",".close-phx-modal-dialog",function(){closeModalDialog($(this).attr("data-target"))});$(document).on("click",".auth-submit",function(){var form = $(this).parents("form.auth"),er_block = $("div.errors",form),login = $("input[name='auth-login']",form),password = $("input[name='auth-password']",form),error = 0,count = 0,button = $("button",form),load = $("div.load",form);$("input[type='text'],input[type='password']",form).each(function(){if($(this).hasClass("email") && $(this).val().length > 0){if(!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,15}$/i).test($(this).val())){$(this).parent("div.input").addClass("has-error");error = 1;count++;
18285if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}if($(this).hasClass("require")){if($(this).val().length <= 0){$(this).parent("div.input").addClass("has-error");error = 1;count++;if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}});if(error == 0){button.removeClass('active');load.addClass('active');$.post("/bitrix/tools/concept.phoenix/ajax/personal/auth.php",{"send":"Y","login":login.val(),"password":password.val(),"site_id":$("input.site_id").val(),"sessid":(typeof BX !== "undefined" && typeof BX.bitrix_sessid === "function") ? BX.bitrix_sessid() :""},function(data){if(data.OK == "N"){er_block.html(data.ERROR);button.addClass('active');load.removeClass('active')}if(data.OK == "Y"){location.href = location.href}},"json")}return false});$(document).on("click",".register-submit",function(){var form = $(this).parents("form.reg-form"),wr_form = form.parents("div.reg-page"),er_block = $("div.errors",wr_form),name = $("input[name='bx-name']",form),password = $("input[name='bx-password']",form),email = $("input[name='bx-email']",form),error = 0,count = 0,button = $("button",form),load = $("div.load",form);if($("input.agreecheck",form).length>0){agreecheck = $("input.agreecheck",form);if (!agreecheck.prop("checked")){agreecheck.parents("div.wrap-agree").addClass("has-error");error = 1}}if ($("body").hasClass('yandex-captcha')){var $cap = form.find('#captcha-container,.smart-captcha').first();var tokenVal = $.trim(($cap.find('input[name="smart-token"]').first().val() || ''));if (!tokenVal){$cap.addClass('has-error');button.addClass('active');load.removeClass('active');if ($cap.length) $('html,body').animate({scrollTop:$cap.offset().top - 120},300);return false}else{$cap.removeClass('has-error')}}$("input[type='email'],input[type='text'],input[type='password']",form).each(function(){if($(this).hasClass("email") && $(this).val().length > 0){if(!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,15}$/i).test($(this).val())){$(this).parent("div.input").addClass("has-error");error = 1;count++;
18285if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}if($(this).hasClass("require")){if($(this).val().length <= 0){$(this).parent("div.input").addClass("has-error");error = 1;count++;if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}});var captchaToken = "";if(error == 0){button.removeClass("active");load.addClass('active');if($("body").hasClass('captcha')){grecaptcha.execute($(".captcha-site-key").val(),{action:'homepage'}).then(function(token){captchaToken = token;$.post("/bitrix/tools/concept.phoenix/ajax/personal/reg.php",{"send":"Y","bx-name":name.val(),"bx-email":email.val(),"bx-password":password.val(),"site_id":$("input.site_id").val(),"captchaToken":captchaToken},function(data){if(data.OK == "N"){er_block.html(data.ERROR);$('html,body').animate({scrollTop:er_block.offset().top - 100},500);button.addClass("active");load.removeClass('active')}if(data.OK == "Y"){location.href = data.HREF}},"json")})}else if ($("body").hasClass('yandex-captcha')){var tokenInput = form.find('input[name="smart-token"]');captchaToken = tokenInput.length ? $.trim(tokenInput.val()) :"";$.post("/bitrix/tools/concept.phoenix/ajax/personal/reg.php",{"send":"Y","bx-name":name.val(),"bx-email":email.val(),"bx-password":password.val(),"site_id":$("input.site_id").val(),"captchaToken":captchaToken},function(data){if(data.OK == "N"){er_block.html(data.ERROR);$('html,body').animate({scrollTop:er_block.offset().top - 100},500);button.addClass("active");load.removeClass('active')}if(data.OK == "Y"){location.href = data.HREF}},"json")}else{$.post("/bitrix/tools/concept.phoenix/ajax/personal/reg.php",{"send":"Y","bx-name":name.val(),"bx-email":email.val(),"bx-password":password.val(),"site_id":$("input.site_id").val()},function(data){if(data.OK == "N"){er_block.html(data.ERROR);$('html,body').animate({scrollTop:er_block.offset().top - 100},500);button.addClass("active");load.removeClass('active')}if(data.OK == "Y"){location.href = data.HREF}},"json")}}return false});$(document).on("click",".changepassword-submit",function(){var form = $(this).parents("form.changepassword"),wr_form = form.parents("div.changepassword"),er_block = $("div.errors",wr_form),suc_block = $("div.success",wr_form),login = $("input[name='USER_LOGIN']",form),checkword = $("input[name='USER_CHECKWORD']",form),password = $("input[name='USER_PASSWORD']",form),password_confirm = $("input[name='USER_CONFIRM_PASSWORD']",form),error = 0,count = 0,button = $("button",form),load = $("div.load",form);$("input[type='password']",form).each(function(){if($(this).hasClass("require")){if($(this).val().length <= 0){$(this).parent("div.input").addClass("has-error");error = 1;count++;
18285if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}});if(error == 0){button.removeClass("active");load.addClass('active');$.post("/bitrix/tools/concept.phoenix/ajax/personal/changepassword.php",{"send":"Y","login":login.val(),"password":password.val(),"password_confirm":password_confirm.val(),"checkword":checkword.val(),"site_id":$("input.site_id").val(),"sessid":(typeof BX !== "undefined" && typeof BX.bitrix_sessid === "function") ? BX.bitrix_sessid() :""},function(data){if(data.OK == "N"){if(data.ERRORS){var errors_html = "";for( var i in data.ERRORS ){errors_html += "<div class='er-policy-item'>"+data.ERRORS[i]+"</div>"}er_block.show().html('<div class="er-policy">'+errors_html+"</div>");$('html,body').animate({scrollTop:er_block.offset().top - 100},500)}suc_block.hide();form.show();button.addClass("active");load.removeClass('active')}if(data.OK == "Y"){er_block.hide();form.hide();suc_block.show().html(data.SUCCESS);$.ajax({url:"/bitrix/tools/concept.phoenix/ajax/ajax_hit_page.php",method:'POST',success:function(json){}})}},"json")}return false});$(document).on("click",".forgotpassword-submit",function(){var form = $(this).parents("form.forgotpassword"),wr_form = form.parents("div.forgetpass"),er_block = $("div.errors",wr_form),suc_block = $("div.success",wr_form),desc_block = $(".description-change-form",wr_form),login = $("input[name='USER_LOGIN']",form),error = 0,count = 0,button = $("button",form),load = $("div.load",form);$("input[type='text']",form).each(function(){if($(this).hasClass("require")){if($(this).val().length <= 0){$(this).parent("div.input").addClass("has-error");error = 1;count++;
18285if(count == 1){$('html,body').animate({scrollTop:$(this).offset().top - 100},500)}}}});if(error == 0){button.removeClass("active");load.addClass('active');$.post("/bitrix/tools/concept.phoenix/ajax/personal/forgotpassword.php",{"send":"Y","login":login.val(),"site_id":$("input.site_id").val(),"sessid":(typeof BX !== "undefined" && typeof BX.bitrix_sessid === "function") ? BX.bitrix_sessid() :""},function(data){if(data.OK == "N"){er_block.show().html(data.ERRORS);suc_block.hide();desc_block.show();form.show();button.addClass("active");load.removeClass('active')}if(data.OK == "Y"){desc_block.hide();er_block.hide();form.hide();suc_block.show().html(data.SUCCESS)}},"json")}return false}); 18286/* End */ 18287;; /* /bitrix/templates/concept_phoenix_s4/js/jqueryConcept.min.js?175034561186926*/ 18288; /* /bitrix/templates/concept_phoenix_s4/js/bootstrap.min.js?175034561151039*/ 18289; /* /bitrix/templates/concept_phoenix_s4/js/bootstrap.bundle.min.js?175034561170966*/ 18290; /* /bitrix/templates/concept_phoenix_s4/js/jquery.plugin.min.js?17503456113400*/ 18291; /* /bitrix/templates/concept_phoenix_s4/js/jquery.countdown.min.js?175034561113652*/ 18292; /* /bitrix/templates/concept_phoenix_s4/lang/ru/jquery.countdown-ru.min.js?1750345612787*/ 18293; /* /bitrix/templates/concept_phoenix_s4/js/device.min.js?17503456112605*/ 18294; /* /bitrix/templates/concept_phoenix_s4/js/wow.min.js?17503456168342*/ 18295; /* /bitrix/templates/concept_phoenix_s4/js/jquery.enllax.min.js?17503456162560*/ 18296; /* /bitrix/templates/concept_phoenix_s4/js/jquery.maskedinputConcept.min.js?17503456114330*/ 18297; /* /bitrix/templates/concept_phoenix_s4/js/jquery.blueimp-gallery.min.js?175034561131993*/ 18298; /* /bitrix/templates/concept_phoenix_s4/slick/slick.min.js?175034561242863*/ 18299; /* /bitrix/templates/concept_phoenix_s4/lang/ru/jquery.datetimepicker.full.min.js?175034561239852*/ 18300; /* /bitrix/templates/concept_phoenix_s4/js/typed.min.js?17503456113851*/ 18301; /* /bitrix/templates/concept_phoenix_s4/js/sly.min.js?175034561631934*/ 18302; /* /bitrix/templates/concept_phoenix_s4/js/lazyload.min.js?17503456115023*/ 18303; /* /bitrix/templates/concept_phoenix_s4/js/jquery.zoom.min.js?17503456112616*/ 18304; /* /bitrix/templates/concept_phoenix_s4/js/jquery-ui.min.js?1750345611519734*/ 18305; /* /bitrix/templates/concept_phoenix_s4/js/subscribe.min.js?175034561613478*/ 18306; /* /bitrix/templates/concept_phoenix_s4/js/script.min.js?1782498637212557*/ 18307; /* /bitrix/templates/concept_phoenix_s4/js/forms.min.js?178249863720086*/ 18308 18309//# sourceMappingURL=template_9d62de3f51651b739ebf8ccb55166816.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.